Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
f853cc7
Use EXT_mesh_primitive_restart
eringram Jul 25, 2025
aa855c3
Merge branch 'main' into eringram/ext_mesh_primitive_restart
eringram Jul 28, 2025
eeb4870
Merge branch 'main' into eringram/ext_mesh_primitive_restart
eringram Aug 1, 2025
b6bc483
Add to contributors & docs
eringram Aug 1, 2025
0a5db4d
Merge branch 'main' into eringram/ext_mesh_primitive_restart
eringram Aug 1, 2025
8c8cac1
Test WIP
eringram Aug 4, 2025
559664c
Merge branch 'main' into eringram/ext_mesh_primitive_restart
eringram Aug 4, 2025
2fc1c56
Update tests, don't use spread operator
eringram Aug 6, 2025
e0dd124
Fix error msg in test
eringram Aug 6, 2025
0b1884a
Rm unnecessary test and check material
eringram Aug 6, 2025
29040d5
Rm material test
eringram Aug 6, 2025
315954f
Update test data to use unsigned short instead of int, changelog
eringram Aug 7, 2025
a4507ff
Add back whitespace
eringram Aug 8, 2025
54c6384
Test regex
eringram Aug 8, 2025
86894f7
Error type
eringram Aug 8, 2025
8087ad0
Test increase timeout
eringram Aug 8, 2025
5191dc1
Remove test
eringram Aug 8, 2025
ed262b2
Update packages/engine/Source/Scene/GltfLoader.js
eringram Aug 8, 2025
285834d
Update packages/engine/Source/Scene/GltfLoader.js
eringram Aug 8, 2025
b9597bc
Update packages/engine/Source/Scene/GltfLoader.js
eringram Aug 8, 2025
9890914
Fix changelog, move getMeshPrimitives to new file
eringram Aug 8, 2025
03af512
Add to list of supported extensions
eringram Aug 8, 2025
10a91bb
Merge branch 'main' into eringram/ext_mesh_primitive_restart
eringram Aug 11, 2025
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
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@

- Removed the argument fallback in `ITwinData.*` functions. Please switch to the new options argument signature [#12778](https://github.com/CesiumGS/cesium/issues/12778)

#### Additions :tada:

- Added support for the [EXT_mesh_primitive_restart](https://github.com/KhronosGroup/glTF/pull/2478) glTF extension. [#12764](https://github.com/CesiumGS/cesium/issues/12764)

## 1.132 - 2025-08-01

### @cesium/engine
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute to Cesiu
- [Bentley Systems, Inc.](https://www.bentley.com)
- [Paul Connelly](https://github.com/pmconne)
- [Jason Crow](https://github.com/jason-crow)
- [Erin Ingram](https://github.com/eringram)
- [Flightradar24 AB](https://www.flightradar24.com)
- [Aleksei Kalmykov](https://github.com/kalmykov)
- [BIT Systems](http://www.caci.com/bit-systems)
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,315 @@
{
"asset": {
"generator": "glTF-Transform v4.2.0",
"version": "2.0"
},
"accessors": [
{
"name": "Positions Accessor 0",
"type": "VEC3",
"componentType": 5126,
"count": 4,
"max": [
0.5,
0.5,
0
],
"min": [
-0.5,
-0.5,
0
],
"bufferView": 0,
"byteOffset": 0
},
{
"name": "Indices Accessor 0",
"type": "SCALAR",
"componentType": 5123,
"count": 3,
"bufferView": 1,
"byteOffset": 0
},
{
"name": "Indices Accessor 1",
"type": "SCALAR",
"componentType": 5123,
"count": 3,
"bufferView": 1,
"byteOffset": 8
},
{
"name": "Indices Accessor 2",
"type": "SCALAR",
"componentType": 5123,
"count": 3,
"bufferView": 1,
"byteOffset": 16
},
{
"name": "Indices Accessor 3",
"type": "SCALAR",
"componentType": 5123,
"count": 3,
"bufferView": 1,
"byteOffset": 24
},
{
"name": "Indices Accessor 4",
"type": "SCALAR",
"componentType": 5123,
"count": 2,
"bufferView": 1,
"byteOffset": 32
},
{
"name": "Indices Accessor 5",
"type": "SCALAR",
"componentType": 5123,
"count": 2,
"bufferView": 1,
"byteOffset": 36
},
{
"name": "Indices Accessor 6",
"type": "SCALAR",
"componentType": 5123,
"count": 2,
"bufferView": 1,
"byteOffset": 40
},
{
"name": "Indices Accessor 7",
"type": "SCALAR",
"componentType": 5123,
"count": 2,
"bufferView": 1,
"byteOffset": 44
},
{
"name": "All indices 0",
"type": "SCALAR",
"componentType": 5123,
"count": 7,
"bufferView": 2,
"byteOffset": 0
},
{
"name": "All indices 1",
"type": "SCALAR",
"componentType": 5123,
"count": 7,
"bufferView": 2,
"byteOffset": 16
},
{
"name": "All indices 2",
"type": "SCALAR",
"componentType": 5123,
"count": 5,
"bufferView": 2,
"byteOffset": 32
},
{
"name": "All indices 3",
"type": "SCALAR",
"componentType": 5123,
"count": 5,
"bufferView": 2,
"byteOffset": 44
},
{
"name": "Positions Accessor 1",
"type": "VEC3",
"componentType": 5126,
"count": 4,
"max": [
1.5,
1.5,
0
],
"min": [
0.5,
0.5,
0
],
"bufferView": 3,
"byteOffset": 0
}
],
"bufferViews": [
{
"buffer": 0,
"byteOffset": 0,
"byteLength": 48,
"byteStride": 12,
"target": 34962
},
{
"buffer": 0,
"byteOffset": 48,
"byteLength": 48,
"target": 34963
},
{
"buffer": 0,
"byteOffset": 96,
"byteLength": 56
},
{
"buffer": 0,
"byteOffset": 152,
"byteLength": 48,
"byteStride": 12,
"target": 34962
}
],
"buffers": [
{
"uri": "MeshPrimitiveRestart.bin",
"byteLength": 200
}
],
"materials": [
{
"pbrMetallicRoughness": {
"baseColorFactor": [
0,
1,
0,
1
]
}
},
{
"pbrMetallicRoughness": {
"baseColorFactor": [
0,
0,
1,
1
]
}
}
],
"meshes": [
{
"primitives": [
{
"attributes": {
"POSITION": 0
},
"mode": 5,
"material": 0,
"indices": 1
},
{
"attributes": {
"POSITION": 0
},
"mode": 5,
"material": 0,
"indices": 2
},
{
"attributes": {
"POSITION": 13
},
"mode": 6,
"material": 1,
"indices": 3
},
{
"attributes": {
"POSITION": 13
},
"mode": 6,
"material": 1,
"indices": 4
},
{
"attributes": {
"POSITION": 13
},
"mode": 3,
"material": 0,
"indices": 5
},
{
"attributes": {
"POSITION": 13
},
"mode": 3,
"material": 0,
"indices": 6
},
{
"attributes": {
"POSITION": 0
},
"mode": 2,
"material": 1,
"indices": 7
},
{
"attributes": {
"POSITION": 0
},
"mode": 2,
"material": 1,
"indices": 8
}
],
"extensions": {
"EXT_mesh_primitive_restart": {
"primitiveGroups": [
{
"primitives": [
0,
1
],
"indices": 9
},
{
"primitives": [
2,
3
],
"indices": 10
},
{
"primitives": [
4,
5
],
"indices": 11
},
{
"primitives": [
6,
7
],
"indices": 12
}
]
}
}
}
],
"nodes": [
{
"mesh": 0
}
],
"scenes": [
{
"nodes": [
0
]
}
],
"scene": 0,
"extensionsUsed": [
"EXT_mesh_primitive_restart"
]
}
3 changes: 2 additions & 1 deletion packages/engine/Source/Scene/GltfLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import GltfGpmLoader from "./Model/Extensions/Gpm/GltfGpmLoader.js";
import GltfMeshPrimitiveGpmLoader from "./Model/Extensions/Gpm/GltfMeshPrimitiveGpmLoader.js";
import oneTimeWarning from "../Core/oneTimeWarning.js";
import addAllToArray from "../Core/addAllToArray.js";
import getMeshPrimitives from "./getMeshPrimitives.js";

const {
Attribute,
Expand Down Expand Up @@ -2432,7 +2433,7 @@ function loadNode(loader, gltfNode, frameState) {
const meshId = gltfNode.mesh;
if (defined(meshId)) {
const mesh = loader.gltfJson.meshes[meshId];
const primitives = mesh.primitives;
const primitives = getMeshPrimitives(mesh);
for (let i = 0; i < primitives.length; ++i) {
node.primitives.push(
loadPrimitive(
Expand Down
3 changes: 3 additions & 0 deletions packages/engine/Source/Scene/Model/Model.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ import ModelImagery from "./ModelImagery.js";
* {@link https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Vendor/EXT_mesh_gpu_instancing|EXT_mesh_gpu_instancing}
* </li>
* <li>
* {@link https://github.com/KhronosGroup/glTF/pull/2514|EXT_mesh_primitive_restart}
* </li>
* <li>
* {@link https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Vendor/EXT_meshopt_compression|EXT_meshopt_compression}
* </li>
* <li>
Expand Down
Loading