浏览代码

Move test assets to meshes library

Gary Hsu 7 年之前
父节点
当前提交
7c0bf9b2c5

二进制
Playground/scenes/CompileMaterialsTest/BaseColor.png


二进制
Playground/scenes/CompileMaterialsTest/Test.bin


+ 0 - 127
Playground/scenes/CompileMaterialsTest/Test.gltf

@@ -1,127 +0,0 @@
-{
-  "accessors": [
-    {
-      "bufferView": 0,
-      "componentType": 5126,
-      "count": 4,
-      "type": "VEC3",
-      "max": [
-        0.5,
-        0.5,
-        0.0
-      ],
-      "min": [
-        -0.5,
-        -0.5,
-        0.0
-      ]
-    },
-    {
-      "bufferView": 1,
-      "componentType": 5126,
-      "count": 4,
-      "type": "VEC4"
-    },
-    {
-      "bufferView": 2,
-      "componentType": 5126,
-      "count": 4,
-      "type": "VEC2"
-    },
-    {
-      "bufferView": 3,
-      "componentType": 5125,
-      "count": 6,
-      "type": "SCALAR"
-    }
-  ],
-  "asset": {
-    "version": "2.0"
-  },
-  "buffers": [
-    {
-      "uri": "Test.bin",
-      "byteLength": 168
-    }
-  ],
-  "bufferViews": [
-    {
-      "buffer": 0,
-      "byteLength": 48
-    },
-    {
-      "buffer": 0,
-      "byteOffset": 48,
-      "byteLength": 64
-    },
-    {
-      "buffer": 0,
-      "byteOffset": 112,
-      "byteLength": 32
-    },
-    {
-      "buffer": 0,
-      "byteOffset": 144,
-      "byteLength": 24
-    }
-  ],
-  "images": [
-    {
-      "uri": "BaseColor.png"
-    }
-  ],
-  "materials": [
-    {
-      "pbrMetallicRoughness": {
-        "baseColorFactor": [
-          1.0,
-          1.0,
-          1.0,
-          0.7
-        ],
-        "baseColorTexture": {
-          "index": 0
-        }
-      },
-      "alphaMode": "BLEND"
-    }
-  ],
-  "meshes": [
-    {
-      "primitives": [
-        {
-          "attributes": {
-            "POSITION": 0,
-            "COLOR_0": 1,
-            "TEXCOORD_0": 2
-          },
-          "indices": 3,
-          "material": 0
-        }
-      ]
-    }
-  ],
-  "nodes": [
-    {
-      "mesh": 0,
-      "scale": [
-        0.5,
-        1,
-        1
-      ]
-    }
-  ],
-  "scene": 0,
-  "scenes": [
-    {
-      "nodes": [
-        0
-      ]
-    }
-  ],
-  "textures": [
-    {
-      "source": 0
-    }
-  ]
-}

二进制
Playground/scenes/MultiPrimitive/MultiPrimitive.bin


+ 0 - 134
Playground/scenes/MultiPrimitive/MultiPrimitive.gltf

@@ -1,134 +0,0 @@
-{
-  "accessors": [
-    {
-      "bufferView": 0,
-      "componentType": 5126,
-      "count": 3,
-      "type": "VEC3",
-      "max": [
-        0.5,
-        0.5,
-        0.0
-      ],
-      "min": [
-        -0.5,
-        -0.5,
-        0.0
-      ]
-    },
-    {
-      "bufferView": 1,
-      "componentType": 5126,
-      "count": 3,
-      "type": "VEC2"
-    },
-    {
-      "bufferView": 2,
-      "componentType": 5125,
-      "count": 3,
-      "type": "SCALAR"
-    },
-    {
-      "bufferView": 3,
-      "componentType": 5126,
-      "count": 3,
-      "type": "VEC3",
-      "max": [
-        0.5,
-        0.5,
-        0.0
-      ],
-      "min": [
-        -0.5,
-        -0.5,
-        0.0
-      ]
-    },
-    {
-      "bufferView": 4,
-      "componentType": 5126,
-      "count": 3,
-      "type": "VEC2"
-    },
-    {
-      "bufferView": 5,
-      "componentType": 5125,
-      "count": 3,
-      "type": "SCALAR"
-    }
-  ],
-  "asset": {
-    "version": "2.0"
-  },
-  "buffers": [
-    {
-      "uri": "MultiPrimitive.bin",
-      "byteLength": 144
-    }
-  ],
-  "bufferViews": [
-    {
-      "buffer": 0,
-      "byteLength": 36
-    },
-    {
-      "buffer": 0,
-      "byteOffset": 36,
-      "byteLength": 24
-    },
-    {
-      "buffer": 0,
-      "byteOffset": 60,
-      "byteLength": 12
-    },
-    {
-      "buffer": 0,
-      "byteOffset": 72,
-      "byteLength": 36
-    },
-    {
-      "buffer": 0,
-      "byteOffset": 108,
-      "byteLength": 24
-    },
-    {
-      "buffer": 0,
-      "byteOffset": 132,
-      "byteLength": 12
-    }
-  ],
-  "meshes": [
-    {
-      "primitives": [
-        {
-          "attributes": {
-            "POSITION": 0,
-            "TEXCOORD_0": 1
-          },
-          "indices": 2
-        },
-        {
-          "attributes": {
-            "POSITION": 3,
-            "TEXCOORD_0": 4
-          },
-          "indices": 5
-        }
-      ]
-    }
-  ],
-  "nodes": [
-    {
-      "name": "node",
-      "mesh": 0
-    }
-  ],
-  "scene": 0,
-  "scenes": [
-    {
-      "nodes": [
-        0
-      ]
-    }
-  ]
-}

二进制
Playground/scenes/TwoQuads/LOD0.png


二进制
Playground/scenes/TwoQuads/LOD1.png


二进制
Playground/scenes/TwoQuads/LOD2.png


二进制
Playground/scenes/TwoQuads/TwoQuads.bin


+ 0 - 162
Playground/scenes/TwoQuads/TwoQuads.gltf

@@ -1,162 +0,0 @@
-{
-  "accessors": [
-    {
-      "bufferView": 0,
-      "componentType": 5126,
-      "count": 4,
-      "type": "VEC3",
-      "max": [
-        0.5,
-        0.5,
-        0.0
-      ],
-      "min": [
-        -0.5,
-        -0.5,
-        0.0
-      ]
-    },
-    {
-      "bufferView": 1,
-      "componentType": 5126,
-      "count": 4,
-      "type": "VEC2"
-    },
-    {
-      "bufferView": 2,
-      "componentType": 5125,
-      "count": 6,
-      "type": "SCALAR"
-    }
-  ],
-  "asset": {
-    "version": "2.0"
-  },
-  "buffers": [
-    {
-      "uri": "TwoQuads.bin",
-      "byteLength": 104
-    }
-  ],
-  "bufferViews": [
-    {
-      "buffer": 0,
-      "byteLength": 48
-    },
-    {
-      "buffer": 0,
-      "byteOffset": 48,
-      "byteLength": 32
-    },
-    {
-      "buffer": 0,
-      "byteOffset": 80,
-      "byteLength": 24
-    }
-  ],
-  "extensionsUsed": [
-    "MSFT_lod"
-  ],
-  "images": [
-    {
-      "uri": "LOD0.png"
-    },
-    {
-      "uri": "LOD1.png"
-    },
-    {
-      "uri": "LOD2.png"
-    }
-  ],
-  "materials": [
-    {
-      "name": "LOD0",
-      "pbrMetallicRoughness": {
-        "baseColorTexture": {
-          "index": 0
-        },
-        "metallicFactor": 0
-      },
-      "extensions": {
-        "MSFT_lod": {
-          "ids": [
-            1,
-            2
-          ]
-        }
-      }
-    },
-    {
-      "name": "LOD1",
-      "pbrMetallicRoughness": {
-        "baseColorTexture": {
-          "index": 1
-        },
-        "metallicFactor": 0
-      }
-    },
-    {
-      "name": "LOD2",
-      "pbrMetallicRoughness": {
-        "baseColorTexture": {
-          "index": 2
-        },
-        "metallicFactor": 0
-      }
-    }
-  ],
-  "meshes": [
-    {
-      "primitives": [
-        {
-          "attributes": {
-            "POSITION": 0,
-            "TEXCOORD_0": 1
-          },
-          "indices": 2,
-          "material": 0
-        }
-      ]
-    }
-  ],
-  "nodes": [
-    {
-      "name": "node0",
-      "mesh": 0,
-      "translation": [
-        -0.55,
-        0,
-        0
-      ]
-    },
-    {
-      "name": "node1",
-      "mesh": 0,
-      "translation": [
-        0.55,
-        0,
-        0
-      ]
-    }
-  ],
-  "scene": 0,
-  "scenes": [
-    {
-      "nodes": [
-        0,
-        1
-      ]
-    }
-  ],
-  "textures": [
-    {
-      "source": 0
-    },
-    {
-      "source": 1
-    },
-    {
-      "source": 2
-    }
-  ]
-}

+ 4 - 4
tests/unit/babylon/src/Loading/babylon.sceneLoader.tests.ts

@@ -170,7 +170,7 @@ describe('Babylon Scene Loader', function () {
             });
         });
 
-        it('Load CompileMaterialsTest with compileMaterials', () => {
+        it('Load CompileMaterials', () => {
             const scene = new BABYLON.Scene(subject);
             const promises = new Array<Promise<void>>();
             let createShaderProgramSpy: sinon.SinonSpy;
@@ -193,7 +193,7 @@ describe('Babylon Scene Loader', function () {
                 }));
             }, undefined, undefined, undefined, true);
 
-            promises.push(BABYLON.SceneLoader.AppendAsync("/Playground/scenes/CompileMaterialsTest/", "Test.gltf", scene).then(() => {
+            promises.push(BABYLON.SceneLoader.AppendAsync("http://models.babylonjs.com/Tests/CompileMaterials/", "Test.gltf", scene).then(() => {
                 createShaderProgramSpy = sinon.spy(subject, "createShaderProgram");
             }));
 
@@ -304,7 +304,7 @@ describe('Babylon Scene Loader', function () {
                 }));
             }, undefined, undefined, undefined, true);
 
-            promises.push(BABYLON.SceneLoader.AppendAsync("/Playground/scenes/TwoQuads/", "TwoQuads.gltf", scene).then(() => {
+            promises.push(BABYLON.SceneLoader.AppendAsync("http://models.babylonjs.com/Tests/TwoQuads/", "TwoQuads.gltf", scene).then(() => {
                 const meshes = [
                     scene.getMeshByName("node0"),
                     scene.getMeshByName("node1")
@@ -333,7 +333,7 @@ describe('Babylon Scene Loader', function () {
 
         it('Load MultiPrimitive', () => {
             const scene = new BABYLON.Scene(subject);
-            return BABYLON.SceneLoader.ImportMeshAsync(null, "/Playground/scenes/MultiPrimitive/", "MultiPrimitive.gltf", scene).then(result => {
+            return BABYLON.SceneLoader.ImportMeshAsync(null, "http://models.babylonjs.com/Tests/MultiPrimitive/", "MultiPrimitive.gltf", scene).then(result => {
                 expect(result.meshes, "meshes").to.have.lengthOf(4);
 
                 const node = scene.getMeshByName("node");