mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-09 15:52:27 +02:00
Merge pull request #416 from HifiExperiments/model
Fix issues with glb urls
This commit is contained in:
commit
ec9c584eaa
1 changed files with 3 additions and 3 deletions
|
@ -437,7 +437,7 @@ bool GLTFSerializer::addBuffer(const QJsonObject& object) {
|
|||
|
||||
getIntVal(object, "byteLength", buffer.byteLength, buffer.defined);
|
||||
|
||||
if (_url.toString().endsWith("glb")) {
|
||||
if (_url.path().endsWith("glb")) {
|
||||
if (!_glbBinary.isEmpty()) {
|
||||
buffer.blob = _glbBinary;
|
||||
} else {
|
||||
|
@ -677,7 +677,7 @@ bool GLTFSerializer::parseGLTF(const hifi::ByteArray& data) {
|
|||
|
||||
hifi::ByteArray jsonChunk = data;
|
||||
|
||||
if (_url.toString().endsWith("glb") && data.indexOf("glTF") == 0 && data.contains("JSON")) {
|
||||
if (_url.path().endsWith("glb") && data.indexOf("glTF") == 0 && data.contains("JSON")) {
|
||||
jsonChunk = setGLBChunks(data);
|
||||
}
|
||||
|
||||
|
@ -1686,7 +1686,7 @@ HFMTexture GLTFSerializer::getHFMTexture(const GLTFTexture& texture) {
|
|||
fbxtex.name = fname;
|
||||
fbxtex.filename = textureUrl.toEncoded();
|
||||
|
||||
if (_url.toString().endsWith("glb") && !_glbBinary.isEmpty()) {
|
||||
if (_url.path().endsWith("glb") && !_glbBinary.isEmpty()) {
|
||||
int bufferView = _file.images[texture.source].bufferView;
|
||||
|
||||
GLTFBufferView& imagesBufferview = _file.bufferviews[bufferView];
|
||||
|
|
Loading…
Reference in a new issue