'I created a GLTF with multiple cubes, but only two are displayed [closed]

Thank you very much!!!

Sorry I don't have enough prestige to post images, but I only see 2 cubes using any model viewer tool.

GLTF json as follows,4 cubes are placed in sequence, but only 2 cubes are displayed:

{
    "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
        }
    ]
}

I only retained POSITION and indices to eliminate problems, but could not show all cubes anyway.



Solution 1:[1]

It's my problem. The vertex indexes after cube 2 are all equal to cube 2. Thank you all

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 LinKefei