Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

glTF 2.0 in samples generator #139

Merged
merged 24 commits into from
Aug 31, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
493 changes: 243 additions & 250 deletions samples-generator/bin/3d-tiles-samples-generator.js

Large diffs are not rendered by default.

Binary file removed samples-generator/data/box-z-up.glb
Binary file not shown.
Binary file modified samples-generator/data/box.glb
Binary file not shown.
Binary file modified samples-generator/data/building.glb
Binary file not shown.
Binary file modified samples-generator/data/dragon_high.glb
Binary file not shown.
Binary file modified samples-generator/data/dragon_low.glb
Binary file not shown.
Binary file modified samples-generator/data/dragon_medium.glb
Binary file not shown.
238 changes: 50 additions & 188 deletions samples-generator/data/house/door0.gltf
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{
"accessors": {
"accessor_index_0": {
"bufferView": "bufferView_1",
"accessors": [
{
"bufferView": 1,
"byteOffset": 0,
"byteStride": 0,
"componentType": 5123,
"count": 72,
"type": "SCALAR",
Expand All @@ -14,10 +13,9 @@
45
]
},
"accessor_position": {
"bufferView": "bufferView_0",
{
"bufferView": 0,
"byteOffset": 0,
"byteStride": 0,
"componentType": 5126,
"count": 46,
"min": [
Expand All @@ -32,10 +30,9 @@
],
"type": "VEC3"
},
"accessor_normal": {
"bufferView": "bufferView_0",
{
"bufferView": 0,
"byteOffset": 552,
"byteStride": 0,
"componentType": 5126,
"count": 46,
"type": "VEC3",
Expand All @@ -50,214 +47,79 @@
1
]
}
},
],
"asset": {
"generator": "OBJ2GLTF",
"premultipliedAlpha": true,
"profile": {
"api": "WebGL",
"version": "1.0"
},
"version": "1.0"
"version": "2.0"
},
"buffers": {
"buffer_0": {
"type": "arraybuffer",
"buffers": [
{
"byteLength": 1248,
"uri": "data:application/octet-stream;base64,6UW9vqERqD+HpnC/6UW9vqERqD/eH4u/6UW9vgAAAADeH4u/6UW9vgAAAACHpnC/6UW9vqERqD/eH4u/6UW9PqERqD/eH4u/7fVePhXjND/eH4u/7fVePpmCkz/eH4u/6UW9vgAAAADeH4u/6UW9PgAAAADeH4u/6UW9PqERqD/eH4u/6UW9PqERqD+HpnC/6UW9PgAAAACHpnC/6UW9PgAAAADeH4u/6UW9PqERqD+HpnC/6UW9vqERqD+HpnC/6UW9vgAAAACHpnC/6UW9PgAAAACHpnC/6UW9vgAAAACHpnC/6UW9vgAAAADeH4u/6UW9PgAAAADeH4u/6UW9PgAAAACHpnC/6UW9PqERqD+HpnC/6UW9PqERqD/eH4u/6UW9vqERqD/eH4u/6UW9vqERqD+HpnC/hpJpvpmCkz987YG/hpJpvhXjND987YG/hpJpvhXjND/eH4u/hpJpvpmCkz/eH4u/7fVePpmCkz987YG/7fVePhXjND987YG/hpJpvhXjND987YG/hpJpvpmCkz987YG/hpJpvhXjND987YG/7fVePhXjND987YG/7fVePhXjND/eH4u/hpJpvhXjND/eH4u/7fVePpmCkz987YG/hpJpvpmCkz987YG/hpJpvpmCkz/eH4u/7fVePpmCkz/eH4u/7fVePhXjND/eH4u/7fVePhXjND987YG/7fVePpmCkz987YG/7fVePpmCkz/eH4u/AACAvwAAAAAAAAAAAACAvwAAAAAAAAAAAACAvwAAAAAAAAAAAACAvwAAAAAAAAAAAAAAgAAAAAAAAIC/AAAAgAAAAAAAAIC/AAAAgAAAAAAAAIC/AAAAgAAAAAAAAIC/AAAAgAAAAAAAAIC/AAAAgAAAAAAAAIC/AACAPwAAAAAAAAAAAACAPwAAAAAAAAAAAACAPwAAAAAAAAAAAACAPwAAAAAAAAAAAAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAgL8AAAAAAAAAAAAAgL8AAAAAAAAAAAAAgL8AAAAAAAAAAAAAgL8AAAAAAAAAAAAAgD8AAAAAAAAAAAAAgD8AAAAAAAAAAAAAgD8AAAAAAAAAAAAAgD8AAAAAAACAPwAAAAAAAAAAAACAPwAAAAAAAAAAAACAPwAAAAAAAAAAAACAPwAAAAAAAAAAAAAAgAAAAAAAAIC/AAAAgAAAAAAAAIC/AAAAgAAAAAAAAIC/AAAAgAAAAAAAAIC/AAAAAAAAgD8AAAAAAAAAAAAAgD8AAAAAAAAAAAAAgD8AAAAAAAAAAAAAgD8AAAAAAAAAAAAAgL8AAAAAAAAAAAAAgL8AAAAAAAAAAAAAgL8AAAAAAAAAAAAAgL8AAAAAAACAvwAAAAAAAAAAAACAvwAAAAAAAAAAAACAvwAAAAAAAAAAAACAvwAAAAAAAAAAAAABAAIAAAACAAMABAAFAAYABAAGAAcABQAIAAQABQAJAAgACgALAAwACgAMAA0ADgAPABAADgAQABEAEgATABQAEgAUABUAFgAXABgAFgAYABkAGgAbABwAGgAcAB0AHgAfACAAHgAgACEAIgAjACQAIgAkACUAJgAnACgAJgAoACkAKgArACwAKgAsAC0A"
}
},
"bufferViews": {
"bufferView_0": {
"buffer": "buffer_0",
],
"bufferViews": [
{
"buffer": 0,
"byteLength": 1104,
"byteOffset": 0,
"target": 34962
"target": 34962,
"byteStride": 12
},
"bufferView_1": {
"buffer": "buffer_0",
{
"buffer": 0,
"byteLength": 144,
"byteOffset": 1104,
"target": 34963
}
},
"images": {},
"materials": {
"material_Material.002": {
"name": "Material.002",
"extensions": {},
"values": {
"ambient": [
1,
1,
1,
1
],
"diffuse": [
],
"materials": [
{
"pbrMetallicRoughness": {
"baseColorFactor": [
0.45435,
0.245963,
0.171126,
1
],
"emission": [
0,
0,
0,
1
],
"specular": [
0,
0,
0,
1
],
"shininess": 96.078431,
"transparency": 1
"metallicFactor": 0,
"roughnessFactor": 1
},
"technique": "technique0"
"emissiveFactor": [
0,
0,
0
],
"alphaMode": "OPAQUE",
"doubleSided": false
}
},
"meshes": {
"mesh_door0": {
"name": "door0",
],
"meshes": [
{
"primitives": [
{
"attributes": {
"POSITION": "accessor_position",
"NORMAL": "accessor_normal"
"POSITION": 1,
"NORMAL": 2
},
"indices": "accessor_index_0",
"material": "material_Material.002",
"indices": 0,
"material": 0,
"mode": 4
}
]
}
},
"nodes": {
"rootNode": {
"children": [],
"meshes": [
"mesh_door0"
],
"matrix": [
1,
0,
0,
0,
0,
1,
0,
0,
0,
0,
1,
0,
0,
0,
0,
1
]
],
"nodes": [
{
"mesh": 0
}
},
"samplers": {},
"scene": "scene_door0",
"scenes": {
"scene_door0": {
],
"scene": 0,
"scenes": [
{
"nodes": [
"rootNode"
0
]
}
},
"textures": {},
"extensionsUsed": [],
"animations": {},
"cameras": {},
"techniques": {
"technique0": {
"attributes": {
"a_position": "position",
"a_normal": "normal"
},
"parameters": {
"modelViewMatrix": {
"semantic": "MODELVIEW",
"type": 35676
},
"projectionMatrix": {
"semantic": "PROJECTION",
"type": 35676
},
"normalMatrix": {
"semantic": "MODELVIEWINVERSETRANSPOSE",
"type": 35675
},
"ambient": {
"type": 35666
},
"diffuse": {
"type": 35666
},
"emission": {
"type": 35666
},
"specular": {
"type": 35666
},
"shininess": {
"type": 5126
},
"transparency": {
"type": 5126
},
"position": {
"semantic": "POSITION",
"type": 35665
},
"normal": {
"semantic": "NORMAL",
"type": 35665
}
},
"program": "program0",
"states": {
"enable": [
2884,
2929
]
},
"uniforms": {
"u_modelViewMatrix": "modelViewMatrix",
"u_projectionMatrix": "projectionMatrix",
"u_normalMatrix": "normalMatrix",
"u_ambient": "ambient",
"u_diffuse": "diffuse",
"u_emission": "emission",
"u_specular": "specular",
"u_shininess": "shininess",
"u_transparency": "transparency"
}
}
},
"programs": {
"program0": {
"attributes": [
"a_position",
"a_normal"
],
"fragmentShader": "fragmentShader0",
"vertexShader": "vertexShader0"
}
},
"shaders": {
"vertexShader0": {
"type": 35633,
"uri": "data:text/plain;base64,cHJlY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