ソースを参照

GLTFLoader: Include CesiumMilkTruck/glTF-Draco/* example.

Don McCurdy 8 年 前
コミット
17aacc133e

+ 580 - 0
examples/models/gltf/CesiumMilkTruck/glTF-Draco/CesiumMilkTruck.gltf

@@ -0,0 +1,580 @@
+{
+    "asset": {
+        "generator": "COLLADA2GLTF",
+        "version": "2.0"
+    },
+    "scene": 0,
+    "scenes": [
+        {
+            "nodes": [
+                0
+            ]
+        }
+    ],
+    "nodes": [
+        {
+            "mesh": 0,
+            "children": [
+                3,
+                1
+            ]
+        },
+        {
+            "children": [
+                2
+            ],
+            "matrix": [
+                1.0,
+                0.0,
+                0.0,
+                0.0,
+                0.0,
+                1.0,
+                0.0,
+                0.0,
+                0.0,
+                0.0,
+                1.0,
+                0.0,
+                -1.352329969406128,
+                0.4277220070362091,
+                -2.98022992950564e-8,
+                1.0
+            ]
+        },
+        {
+            "mesh": 1,
+            "rotation": [
+                -0.0,
+                -0.0,
+                0.08848590403795243,
+                -0.9960774183273317
+            ]
+        },
+        {
+            "children": [
+                4
+            ],
+            "matrix": [
+                1.0,
+                0.0,
+                0.0,
+                0.0,
+                0.0,
+                1.0,
+                0.0,
+                0.0,
+                0.0,
+                0.0,
+                1.0,
+                0.0,
+                1.432669997215271,
+                0.4277220070362091,
+                -2.98022992950564e-8,
+                1.0
+            ]
+        },
+        {
+            "mesh": 1,
+            "rotation": [
+                -0.0,
+                -0.0,
+                0.08848590403795243,
+                -0.9960774183273317
+            ]
+        }
+    ],
+    "meshes": [
+        {
+            "primitives": [
+                {
+                    "attributes": {
+                        "NORMAL": 1,
+                        "POSITION": 2,
+                        "TEXCOORD_0": 3
+                    },
+                    "indices": 0,
+                    "mode": 4,
+                    "material": 0,
+                    "extensions": {
+                        "KHR_draco_mesh_compression": {
+                            "bufferView": 0,
+                            "attributes": {
+                                "TEXCOORD_0": 2,
+                                "NORMAL": 0,
+                                "POSITION": 1
+                            }
+                        }
+                    }
+                },
+                {
+                    "attributes": {
+                        "NORMAL": 5,
+                        "POSITION": 6
+                    },
+                    "indices": 4,
+                    "mode": 4,
+                    "material": 1,
+                    "extensions": {
+                        "KHR_draco_mesh_compression": {
+                            "bufferView": 1,
+                            "attributes": {
+                                "NORMAL": 0,
+                                "POSITION": 1
+                            }
+                        }
+                    }
+                },
+                {
+                    "attributes": {
+                        "NORMAL": 8,
+                        "POSITION": 9
+                    },
+                    "indices": 7,
+                    "mode": 4,
+                    "material": 2,
+                    "extensions": {
+                        "KHR_draco_mesh_compression": {
+                            "bufferView": 2,
+                            "attributes": {
+                                "NORMAL": 0,
+                                "POSITION": 1
+                            }
+                        }
+                    }
+                }
+            ],
+            "name": "Cesium_Milk_Truck"
+        },
+        {
+            "primitives": [
+                {
+                    "attributes": {
+                        "NORMAL": 11,
+                        "POSITION": 12,
+                        "TEXCOORD_0": 13
+                    },
+                    "indices": 10,
+                    "mode": 4,
+                    "material": 3,
+                    "extensions": {
+                        "KHR_draco_mesh_compression": {
+                            "bufferView": 3,
+                            "attributes": {
+                                "TEXCOORD_0": 2,
+                                "NORMAL": 0,
+                                "POSITION": 1
+                            }
+                        }
+                    }
+                }
+            ],
+            "name": "Wheels"
+        }
+    ],
+    "animations": [
+        {
+            "channels": [
+                {
+                    "sampler": 0,
+                    "target": {
+                        "node": 4,
+                        "path": "rotation"
+                    }
+                }
+            ],
+            "samplers": [
+                {
+                    "input": 14,
+                    "interpolation": "LINEAR",
+                    "output": 15
+                }
+            ]
+        },
+        {
+            "channels": [
+                {
+                    "sampler": 0,
+                    "target": {
+                        "node": 2,
+                        "path": "rotation"
+                    }
+                }
+            ],
+            "samplers": [
+                {
+                    "input": 16,
+                    "interpolation": "LINEAR",
+                    "output": 17
+                }
+            ]
+        }
+    ],
+    "accessors": [
+        {
+            "componentType": 5123,
+            "count": 5232,
+            "max": [
+                1855
+            ],
+            "min": [
+                0
+            ],
+            "type": "SCALAR"
+        },
+        {
+            "componentType": 5126,
+            "count": 1856,
+            "max": [
+                1.0,
+                1.0,
+                1.0
+            ],
+            "min": [
+                -1.0,
+                -1.0,
+                -1.0
+            ],
+            "type": "VEC3"
+        },
+        {
+            "componentType": 5126,
+            "count": 1856,
+            "max": [
+                2.437999963760376,
+                2.5843698978424074,
+                1.3960000276565552
+            ],
+            "min": [
+                -2.430910110473633,
+                0.2667999863624573,
+                -1.3960000276565552
+            ],
+            "type": "VEC3"
+        },
+        {
+            "componentType": 5126,
+            "count": 1856,
+            "max": [
+                0.8964580297470093,
+                0.997245192527771
+            ],
+            "min": [
+                0.002956389915198088,
+                0.015672028064727784
+            ],
+            "type": "VEC2"
+        },
+        {
+            "componentType": 5123,
+            "count": 168,
+            "max": [
+                71
+            ],
+            "min": [
+                0
+            ],
+            "type": "SCALAR"
+        },
+        {
+            "componentType": 5126,
+            "count": 72,
+            "max": [
+                0.957480013370514,
+                0.28850099444389346,
+                1.0
+            ],
+            "min": [
+                -1.0,
+                0.0,
+                -1.0
+            ],
+            "type": "VEC3"
+        },
+        {
+            "componentType": 5126,
+            "count": 72,
+            "max": [
+                1.6011799573898316,
+                2.3545401096343996,
+                1.3960000276565552
+            ],
+            "min": [
+                0.22885000705718998,
+                1.631850004196167,
+                -1.3960000276565552
+            ],
+            "type": "VEC3"
+        },
+        {
+            "componentType": 5123,
+            "count": 864,
+            "max": [
+                463
+            ],
+            "min": [
+                0
+            ],
+            "type": "SCALAR"
+        },
+        {
+            "componentType": 5126,
+            "count": 464,
+            "max": [
+                1.0,
+                1.0,
+                1.0
+            ],
+            "min": [
+                -1.0,
+                -1.0,
+                -1.0
+            ],
+            "type": "VEC3"
+        },
+        {
+            "componentType": 5126,
+            "count": 464,
+            "max": [
+                1.62267005443573,
+                2.3919999599456789,
+                1.100000023841858
+            ],
+            "min": [
+                0.1932000070810318,
+                1.5961999893188477,
+                -1.1100000143051148
+            ],
+            "type": "VEC3"
+        },
+        {
+            "componentType": 5123,
+            "count": 2304,
+            "max": [
+                585
+            ],
+            "min": [
+                0
+            ],
+            "type": "SCALAR"
+        },
+        {
+            "componentType": 5126,
+            "count": 586,
+            "max": [
+                0.9990389943122864,
+                0.9990379810333252,
+                1.0
+            ],
+            "min": [
+                -0.9990379810333252,
+                -0.9990379810333252,
+                -1.0
+            ],
+            "type": "VEC3"
+        },
+        {
+            "componentType": 5126,
+            "count": 586,
+            "max": [
+                0.4277999997138977,
+                0.4277999997138977,
+                1.0579999685287476
+            ],
+            "min": [
+                -0.4277999997138977,
+                -0.4277999997138977,
+                -1.0579999685287476
+            ],
+            "type": "VEC3"
+        },
+        {
+            "componentType": 5126,
+            "count": 586,
+            "max": [
+                0.9936569929122924,
+                0.9895756244659424
+            ],
+            "min": [
+                0.6050930023193359,
+                0.00905001163482666
+            ],
+            "type": "VEC2"
+        },
+        {
+            "bufferView": 4,
+            "byteOffset": 0,
+            "componentType": 5126,
+            "count": 31,
+            "max": [
+                1.25
+            ],
+            "min": [
+                0.0
+            ],
+            "type": "SCALAR"
+        },
+        {
+            "bufferView": 5,
+            "byteOffset": 0,
+            "componentType": 5126,
+            "count": 31,
+            "max": [
+                -0.0,
+                -0.0,
+                0.9990190863609314,
+                1.0
+            ],
+            "min": [
+                -0.0,
+                -0.0,
+                0.0,
+                -0.9960774183273317
+            ],
+            "type": "VEC4"
+        },
+        {
+            "bufferView": 4,
+            "byteOffset": 124,
+            "componentType": 5126,
+            "count": 31,
+            "max": [
+                1.25
+            ],
+            "min": [
+                0.0
+            ],
+            "type": "SCALAR"
+        },
+        {
+            "bufferView": 5,
+            "byteOffset": 496,
+            "componentType": 5126,
+            "count": 31,
+            "max": [
+                -0.0,
+                -0.0,
+                0.9990190863609314,
+                1.0
+            ],
+            "min": [
+                -0.0,
+                -0.0,
+                0.0,
+                -0.9960774183273317
+            ],
+            "type": "VEC4"
+        }
+    ],
+    "materials": [
+        {
+            "pbrMetallicRoughness": {
+                "baseColorTexture": {
+                    "index": 0
+                },
+                "metallicFactor": 0.0
+            },
+            "name": "truck"
+        },
+        {
+            "pbrMetallicRoughness": {
+                "baseColorFactor": [
+                    0.0,
+                    0.04050629958510399,
+                    0.021240700036287309,
+                    1.0
+                ],
+                "metallicFactor": 0.0
+            },
+            "name": "glass"
+        },
+        {
+            "pbrMetallicRoughness": {
+                "baseColorFactor": [
+                    0.06400000303983689,
+                    0.06400000303983689,
+                    0.06400000303983689,
+                    1.0
+                ],
+                "metallicFactor": 0.0
+            },
+            "name": "window_trim"
+        },
+        {
+            "pbrMetallicRoughness": {
+                "baseColorTexture": {
+                    "index": 1
+                },
+                "metallicFactor": 0.0
+            },
+            "name": "wheels"
+        }
+    ],
+    "textures": [
+        {
+            "sampler": 0,
+            "source": 0
+        },
+        {
+            "sampler": 0,
+            "source": 0
+        }
+    ],
+    "images": [
+        {
+            "uri": "CesiumMilkTruck.png"
+        }
+    ],
+    "samplers": [
+        {
+            "magFilter": 9729,
+            "minFilter": 9986,
+            "wrapS": 10497,
+            "wrapT": 10497
+        }
+    ],
+    "bufferViews": [
+        {
+            "buffer": 0,
+            "byteOffset": 1240,
+            "byteLength": 9611
+        },
+        {
+            "buffer": 0,
+            "byteOffset": 10851,
+            "byteLength": 406
+        },
+        {
+            "buffer": 0,
+            "byteOffset": 11257,
+            "byteLength": 1783
+        },
+        {
+            "buffer": 0,
+            "byteOffset": 13040,
+            "byteLength": 2985
+        },
+        {
+            "buffer": 0,
+            "byteOffset": 992,
+            "byteLength": 248
+        },
+        {
+            "buffer": 0,
+            "byteOffset": 0,
+            "byteLength": 992
+        }
+    ],
+    "buffers": [
+        {
+            "byteLength": 16025,
+            "uri": "CesiumMilkTruck0.bin"
+        }
+    ],
+    "extensionsRequired": [
+        "KHR_draco_mesh_compression"
+    ],
+    "extensionsUsed": [
+        "KHR_draco_mesh_compression"
+    ]
+}

BIN
examples/models/gltf/CesiumMilkTruck/glTF-Draco/CesiumMilkTruck.png


BIN
examples/models/gltf/CesiumMilkTruck/glTF-Draco/CesiumMilkTruck0.bin