我创建了一个包含多个立方体的 GLTF,但只显示了两个
I created a GLTF with multiple cubes, but only two are displayed
非常感谢!!!
抱歉,我没有足够的声望 post 图片,但我使用任何模型查看器工具只看到 2 个立方体。
GLTF json如下,4个立方体按顺序放置,但只显示2个立方体:
{
"asset": {
"version": "2.0"
},
"scene": 0,
"scenes": [
{
"nodes": [
0
]
}
],
"nodes": [
{
"mesh": 0
}
],
"meshes": [
{
"primitives": [
{
"attributes": {
"POSITION": 0
},
"indices": 1,
"mode": 4
}
]
}
],
"accessors": [
{
"bufferView": 0,
"byteOffset": 0,
"componentType": 5126,
"count": 96,
"type": "VEC3",
"max": [
6.5,
0.5,
0.5
],
"min": [
-0.5,
-0.5,
-0.5
]
},
{
"bufferView": 1,
"byteOffset": 0,
"componentType": 5125,
"count": 144,
"type": "SCALAR"
}
],
"bufferViews": [
{
"buffer": 0,
"byteOffset": 0,
"byteLength": 1152,
"target": 34962
},
{
"buffer": 0,
"byteOffset": 1152,
"byteLength": 576,
"target": 34963
}
],
"buffers": [
{
"uri": "myTest.bin",
"byteLength": 1728
}
]
}
我只保留了 POSITION 和索引来消除问题,但无论如何都无法显示所有立方体。
这是我的问题。 cube 2之后的顶点索引都等于cube 2 谢谢大家
非常感谢!!!
抱歉,我没有足够的声望 post 图片,但我使用任何模型查看器工具只看到 2 个立方体。
GLTF json如下,4个立方体按顺序放置,但只显示2个立方体:
{
"asset": {
"version": "2.0"
},
"scene": 0,
"scenes": [
{
"nodes": [
0
]
}
],
"nodes": [
{
"mesh": 0
}
],
"meshes": [
{
"primitives": [
{
"attributes": {
"POSITION": 0
},
"indices": 1,
"mode": 4
}
]
}
],
"accessors": [
{
"bufferView": 0,
"byteOffset": 0,
"componentType": 5126,
"count": 96,
"type": "VEC3",
"max": [
6.5,
0.5,
0.5
],
"min": [
-0.5,
-0.5,
-0.5
]
},
{
"bufferView": 1,
"byteOffset": 0,
"componentType": 5125,
"count": 144,
"type": "SCALAR"
}
],
"bufferViews": [
{
"buffer": 0,
"byteOffset": 0,
"byteLength": 1152,
"target": 34962
},
{
"buffer": 0,
"byteOffset": 1152,
"byteLength": 576,
"target": 34963
}
],
"buffers": [
{
"uri": "myTest.bin",
"byteLength": 1728
}
]
}
我只保留了 POSITION 和索引来消除问题,但无论如何都无法显示所有立方体。
这是我的问题。 cube 2之后的顶点索引都等于cube 2 谢谢大家