3D engine that AI agents drive
JavaScript 3d3d-engineagentic-aiai-agentsblenderclaude-codegame-enginegaussian-splattinggltfjavascriptmcpmcp-servermodel-context-protocolpath-tracerpath-tracingpbrrenderingthreejs-alternativewebgl2webgpu
Merge remote-tracking branch 'origin/main' into 2452-gltf-list-field-errors-wt
Nguyen Xuan Anfc1a66a780a8
diff --cc docs/gltf.mdindex ac4b4b48,15b9a563..a2d6520f--- a/docs/gltf.md+++ b/docs/gltf.md@@@ -55,7 -55,7 +55,7 @@@ The importer rejects cyclic hierarchiesIt checks PNG, JPEG and WebP dimensions before browser image decoding.Decoded accessor data has its own budget, `maxDecodedBytes`, and a file over it fails before any accessor is read: `decoded accessor bytes 1200000000, over maxDecodedBytes 1073741824. Fix: pass { maxDecodedBytes: 1200000000 }`.- A file also fails when its meshopt-compressed buffer views would decode to more than `maxDecodedBytes` in total, even a view no accessor uses; the views and the accessors then share that one budget. A meshopt view whose `byteLength`, extension `byteLength`, `count` or `byteStride` is not a non-negative safe integer fails by field name. The check names the total, for example `decoded meshopt view bytes 4800000000, over maxDecodedBytes 1073741824`, and is raised before the decoder runs; when the accessors then push the shared total over, the error reads `decoded accessor and meshopt view bytes`. A scene `nodes` that is not an array fails by field name too. So does any of `nodes`, `meshes`, `accessors`, `bufferViews`, `buffers`, `materials`, `textures`, `images`, `skins` or `animations` that is neither absent, `null` nor an array (`Invalid glTF meshes: expected an array of objects.`), or that holds a `null` or non-object entry (the error names the array and the index of the bad entry); a `null` array is treated as absent. So does any of `nodes[i].children`, `animations[i].channels`, `animations[i].samplers`, `extensionsUsed` or `extensionsRequired` that is not an array (a `null` one is treated as absent), a `null` animation channel, and a node or mesh `name` that is not a string. A dangling index (`primitive.material`, a scene node, an accessor `bufferView`, a mesh without `primitives`) fails with the field and the valid range. A buffer view `byteStride` below the element size or not a multiple of 4, an accessor or sparse `byteOffset` that is negative or fractional, and a sparse index type other than 5121, 5123 or 5125, fail by name. A `normalized` flag on a float or 32-bit integer accessor is ignored.-A file also fails when its meshopt-compressed buffer views would decode to more than `maxDecodedBytes` in total, even a view no accessor uses; the views and the accessors then share that one budget. A meshopt view whose `byteLength`, extension `byteLength`, `count` or `byteStride` is not a non-negative safe integer fails by field name. The check names the total, for example `decoded meshopt view bytes 4800000000, over maxDecodedBytes 1073741824`, and is raised before the decoder runs; when the accessors then push the shared total over, the error reads `decoded accessor and meshopt view bytes`. A scene `nodes` that is not an array fails by field name too. So does any of `nodes`, `meshes`, `accessors`, `bufferViews`, `buffers`, `materials`, `textures`, `images`, `skins` or `animations` that is neither absent, `null` nor an array (`Invalid glTF meshes: expected an array of objects.`), or that holds a `null` or non-object entry (the error names the array and the index of the bad entry); a `null` array is treated as absent. A dangling index (`primitive.material`, a scene node, an accessor `bufferView`, a mesh without `primitives`) fails with the field and the valid range. A buffer view `byteStride` below the element size or not a multiple of 4, an accessor or sparse `byteOffset` that is negative or fractional, and a sparse index type other than 5121, 5123 or 5125, fail by name. A `normalized` flag on a float or 32-bit integer accessor is ignored. A MAT2 or MAT3 accessor of byte or short components is read with the padding the glTF spec gives each column (to a multiple of 4 bytes). A node `mesh`, a child of `nodes[i].children`, an accessor `count` or a `POSITION` that is not an integer index fails or skips with its path.++A file also fails when its meshopt-compressed buffer views would decode to more than `maxDecodedBytes` in total, even a view no accessor uses; the views and the accessors then share that one budget. A meshopt view whose `byteLength`, extension `byteLength`, `count` or `byteStride` is not a non-negative safe integer fails by field name. The check names the total, for example `decoded meshopt view bytes 4800000000, over maxDecodedBytes 1073741824`, and is raised before the decoder runs; when the accessors then push the shared total over, the error reads `decoded accessor and meshopt view bytes`. A scene `nodes` that is not an array fails by field name too. So does any of `nodes`, `meshes`, `accessors`, `bufferViews`, `buffers`, `materials`, `textures`, `images`, `skins` or `animations` that is neither absent, `null` nor an array (`Invalid glTF meshes: expected an array of objects.`), or that holds a `null` or non-object entry (the error names the array and the index of the bad entry); a `null` array is treated as absent. So does any of `nodes[i].children`, `animations[i].channels`, `animations[i].samplers`, `extensionsUsed` or `extensionsRequired` that is not an array (a `null` one is treated as absent), a `null` animation channel, and a node or mesh `name` that is not a string. A dangling index (`primitive.material`, a scene node, an accessor `bufferView`, a mesh without `primitives`) fails with the field and the valid range. A buffer view `byteStride` below the element size or not a multiple of 4, an accessor or sparse `byteOffset` that is negative or fractional, and a sparse index type other than 5121, 5123 or 5125, fail by name. A `normalized` flag on a float or 32-bit integer accessor is ignored. A MAT2 or MAT3 accessor of byte or short components is read with the padding the glTF spec gives each column (to a multiple of 4 bytes). A node `mesh`, a child of `nodes[i].children`, an accessor `count` or a `POSITION` that is not an integer index fails or skips with its path.Accessors are decoded one primitive at a time while the scene is converted, and each is released after the last node that uses it, so decoding holds the file bytes plus the converted geometry plus one primitive, not every accessor at once. The file bytes stay until the last primitive is read; drop your own reference to them after the call returns.These limits bound asset inputs and geometry, rather than the renderer's total GPU allocation.The renderer retains its separate memory budget.