middle of attempting to fix rotations

This commit is contained in:
CDaut 2023-11-22 11:52:04 +01:00
parent 6cbd93aad0
commit 8657806aba
10 changed files with 692 additions and 78 deletions

538
scenes/cube_on_plane.gltf Normal file
View file

@ -0,0 +1,538 @@
{
"asset":{
"generator":"Khronos glTF Blender I/O v4.1.34",
"version":"2.0"
},
"extensionsUsed":[
"KHR_lights_punctual"
],
"extensionsRequired":[
"KHR_lights_punctual"
],
"extensions":{
"KHR_lights_punctual":{
"lights":[
{
"color":[
1,
1,
1
],
"intensity":54351.41306588226,
"type":"point",
"name":"Light"
}
]
}
},
"scene":0,
"scenes":[
{
"name":"Scene",
"nodes":[
0,
1,
2,
3,
4,
5,
6
]
}
],
"nodes":[
{
"mesh":0,
"name":"Cube"
},
{
"extensions":{
"KHR_lights_punctual":{
"light":0
}
},
"name":"Light",
"rotation":[
-0.28416627645492554,
0.7269423007965088,
0.34203392267227173,
0.5232754945755005
],
"translation":[
4.076245307922363,
5.903861999511719,
-1.0054539442062378
]
},
{
"camera":0,
"name":"Camera",
"rotation":[
0,
1,
0,
0
],
"translation":[
2,
10,
-1.9999992847442627
]
},
{
"mesh":1,
"name":"Cube.001"
},
{
"mesh":2,
"name":"Cube.002",
"translation":[
2,
10,
-10
]
},
{
"mesh":3,
"name":"Cube.003",
"rotation":[
0,
0.3826834559440613,
0,
0.9238795638084412
],
"translation":[
2,
10,
10
]
},
{
"mesh":4,
"name":"Suzanne",
"translation":[
-10,
10,
0
]
}
],
"cameras":[
{
"name":"Camera",
"perspective":{
"aspectRatio":1,
"yfov":0.7853981852531433,
"zfar":100,
"znear":0.0010000000474974513
},
"type":"perspective"
}
],
"materials":[
{
"doubleSided":true,
"name":"Material",
"pbrMetallicRoughness":{
"baseColorFactor":[
0.800000011920929,
0.800000011920929,
0.800000011920929,
1
],
"metallicFactor":0,
"roughnessFactor":0.5
}
},
{
"doubleSided":true,
"name":"Material.001",
"pbrMetallicRoughness":{
"baseColorFactor":[
0.8002041578292847,
0,
0,
1
],
"metallicFactor":0,
"roughnessFactor":0.5
}
},
{
"doubleSided":true,
"name":"Material.003",
"pbrMetallicRoughness":{
"baseColorFactor":[
0.019036345183849335,
0,
0.8002663850784302,
1
],
"metallicFactor":0,
"roughnessFactor":0.5
}
},
{
"doubleSided":true,
"name":"Material.002",
"pbrMetallicRoughness":{
"baseColorFactor":[
0.008347976952791214,
0.8001724481582642,
0,
1
],
"metallicFactor":0,
"roughnessFactor":0.5
}
}
],
"meshes":[
{
"name":"Cube",
"primitives":[
{
"attributes":{
"POSITION":0,
"NORMAL":1,
"TEXCOORD_0":2
},
"indices":3,
"material":0
}
]
},
{
"name":"Cube.001",
"primitives":[
{
"attributes":{
"POSITION":4,
"NORMAL":5,
"TEXCOORD_0":6
},
"indices":3,
"material":0
}
]
},
{
"name":"Cube.002",
"primitives":[
{
"attributes":{
"POSITION":7,
"NORMAL":8,
"TEXCOORD_0":9
},
"indices":10,
"material":1
}
]
},
{
"name":"Cube.003",
"primitives":[
{
"attributes":{
"POSITION":11,
"NORMAL":12,
"TEXCOORD_0":13
},
"indices":10,
"material":2
}
]
},
{
"name":"Suzanne",
"primitives":[
{
"attributes":{
"POSITION":14,
"NORMAL":15,
"TEXCOORD_0":16
},
"indices":17,
"material":3
}
]
}
],
"accessors":[
{
"bufferView":0,
"componentType":5126,
"count":14,
"max":[
1.4142135381698608,
2,
1.4142135381698608
],
"min":[
-1.4142135381698608,
0,
-1.4142135381698608
],
"type":"VEC3"
},
{
"bufferView":1,
"componentType":5126,
"count":14,
"type":"VEC3"
},
{
"bufferView":2,
"componentType":5126,
"count":14,
"type":"VEC2"
},
{
"bufferView":3,
"componentType":5123,
"count":36,
"type":"SCALAR"
},
{
"bufferView":4,
"componentType":5126,
"count":14,
"max":[
-0.5857864618301392,
2,
-0.5857864618301392
],
"min":[
-3.4142136573791504,
0,
-3.4142136573791504
],
"type":"VEC3"
},
{
"bufferView":5,
"componentType":5126,
"count":14,
"type":"VEC3"
},
{
"bufferView":6,
"componentType":5126,
"count":14,
"type":"VEC2"
},
{
"bufferView":7,
"componentType":5126,
"count":14,
"max":[
1,
1,
1
],
"min":[
-1,
-1,
-1
],
"type":"VEC3"
},
{
"bufferView":8,
"componentType":5126,
"count":14,
"type":"VEC3"
},
{
"bufferView":9,
"componentType":5126,
"count":14,
"type":"VEC2"
},
{
"bufferView":10,
"componentType":5123,
"count":36,
"type":"SCALAR"
},
{
"bufferView":11,
"componentType":5126,
"count":14,
"max":[
1,
1,
1
],
"min":[
-1,
-1,
-1
],
"type":"VEC3"
},
{
"bufferView":12,
"componentType":5126,
"count":14,
"type":"VEC3"
},
{
"bufferView":13,
"componentType":5126,
"count":14,
"type":"VEC2"
},
{
"bufferView":14,
"componentType":5126,
"count":555,
"max":[
1.3671875,
0.984375,
0.8515625
],
"min":[
-1.3671875,
-0.984375,
-0.8515625
],
"type":"VEC3"
},
{
"bufferView":15,
"componentType":5126,
"count":555,
"type":"VEC3"
},
{
"bufferView":16,
"componentType":5126,
"count":555,
"type":"VEC2"
},
{
"bufferView":17,
"componentType":5123,
"count":2904,
"type":"SCALAR"
}
],
"bufferViews":[
{
"buffer":0,
"byteLength":168,
"byteOffset":0,
"target":34962
},
{
"buffer":0,
"byteLength":168,
"byteOffset":168,
"target":34962
},
{
"buffer":0,
"byteLength":112,
"byteOffset":336,
"target":34962
},
{
"buffer":0,
"byteLength":72,
"byteOffset":448,
"target":34963
},
{
"buffer":0,
"byteLength":168,
"byteOffset":520,
"target":34962
},
{
"buffer":0,
"byteLength":168,
"byteOffset":688,
"target":34962
},
{
"buffer":0,
"byteLength":112,
"byteOffset":856,
"target":34962
},
{
"buffer":0,
"byteLength":168,
"byteOffset":968,
"target":34962
},
{
"buffer":0,
"byteLength":168,
"byteOffset":1136,
"target":34962
},
{
"buffer":0,
"byteLength":112,
"byteOffset":1304,
"target":34962
},
{
"buffer":0,
"byteLength":72,
"byteOffset":1416,
"target":34963
},
{
"buffer":0,
"byteLength":168,
"byteOffset":1488,
"target":34962
},
{
"buffer":0,
"byteLength":168,
"byteOffset":1656,
"target":34962
},
{
"buffer":0,
"byteLength":112,
"byteOffset":1824,
"target":34962
},
{
"buffer":0,
"byteLength":6660,
"byteOffset":1936,
"target":34962
},
{
"buffer":0,
"byteLength":6660,
"byteOffset":8596,
"target":34962
},
{
"buffer":0,
"byteLength":4440,
"byteOffset":15256,
"target":34962
},
{
"buffer":0,
"byteLength":5808,
"byteOffset":19696,
"target":34963
}
],
"buffers":[
{
"byteLength":25504,
"uri":"cube_on_plane.bin"
}
]
}