Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Normalize EOL for all files that Git considers text files.
* text=auto eol=lf
13 changes: 13 additions & 0 deletions Models/CubeVisibility/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Cube Visiblity test for KHR_node_visibility

This model demonstrates the `KHR_node_visibility` extension and its interaction with `KHR_animation_pointer`.

- If your implementation shows either of the red cubes, it is not compliant with `KHR_node_visibility`.

- If your implementation does not have the blue cube hiding and showing every 0.5 seconds, either the animation is not playing, or it does not support using `KHR_animation_pointer` to animate the `KHR_node_visibility` visible property.

Animated screenshot of the test model in action:

![Cube Visibility](screenshot/screenshot_animated.webp)

[Show](https://gltf-interactivity.needle.tools?model=https://raw.githubusercontent.com/KhronosGroup/glTF-Interactivity-Sample-Assets/main/Models/CubeVisibility/glTF-Binary/CubeVisibility.glb) – [Download GLB](https://raw.githubusercontent.com/KhronosGroup/glTF-Interactivity-Sample-Assets/main/Models/CubeVisibility/glTF-Binary/CubeVisibility.glb)
Binary file not shown.
47 changes: 47 additions & 0 deletions Models/CubeVisibility/glTF/CubeVisibility.gltf
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"accessors": [
{ "bufferView": 0, "componentType": 5126, "count": 24, "max": [0.5, 0.5, 0.5], "min": [-0.5, -0.5, -0.5], "normalized": false, "type": "VEC3" },
{ "bufferView": 1, "componentType": 5126, "count": 24, "max": [1.0, 1.0, 1.0], "min": [-1.0, -1.0, -1.0], "normalized": false, "type": "VEC3" },
{ "bufferView": 2, "componentType": 5121, "count": 36, "max": [23], "min": [0], "normalized": false, "type": "SCALAR" },
{ "bufferView": 3, "componentType": 5126, "count": 11, "max": [5.0], "min": [0.0], "normalized": false, "type": "SCALAR" },
{ "bufferView": 4, "componentType": 5121, "count": 11, "max": [1], "min": [0], "normalized": false, "type": "SCALAR" }
],
"animations": [
{
"channels": [{ "sampler": 0, "target": { "extensions": { "KHR_animation_pointer": { "pointer": "/nodes/5/extensions/KHR_node_visibility/visible" } }, "path": "pointer" } }],
"name": "BlinkingBlueCube",
"samplers": [{ "input": 3, "interpolation": "STEP", "output": 4 }]
}
],
"asset": { "copyright": "2025 The Khronos Group", "generator": "Godot Engine v4.6.dev.custom_build", "version": "2.0" },
"bufferViews": [
{ "buffer": 0, "byteLength": 288, "byteStride": 12, "target": 34962 },
{ "buffer": 0, "byteLength": 288, "byteOffset": 288, "byteStride": 12, "target": 34962 },
{ "buffer": 0, "byteLength": 36, "byteOffset": 576, "target": 34963 },
{ "buffer": 0, "byteLength": 44, "byteOffset": 612 },
{ "buffer": 0, "byteLength": 11, "byteOffset": 656 }
],
"buffers": [{ "byteLength": 667, "uri": "CubeVisibility0.bin" }],
"extensionsRequired": ["KHR_node_visibility"],
"extensionsUsed": ["KHR_animation_pointer", "KHR_node_visibility"],
"materials": [
{ "pbrMetallicRoughness": { "baseColorFactor": [0.855, 0.0, 0.0, 1.0], "metallicFactor": 0.0, "roughnessFactor": 1.0 } },
{ "pbrMetallicRoughness": { "baseColorFactor": [0.0, 0.855, 0.0, 1.0], "metallicFactor": 0.0, "roughnessFactor": 1.0 } },
{ "pbrMetallicRoughness": { "baseColorFactor": [0.0, 0.0, 0.855, 1.0], "metallicFactor": 0.0, "roughnessFactor": 1.0 } }
],
"meshes": [
{ "primitives": [{ "attributes": { "NORMAL": 1, "POSITION": 0 }, "indices": 2, "material": 0, "mode": 4 }] },
{ "primitives": [{ "attributes": { "NORMAL": 1, "POSITION": 0 }, "indices": 2, "material": 1, "mode": 4 }] },
{ "primitives": [{ "attributes": { "NORMAL": 1, "POSITION": 0 }, "indices": 2, "material": 2, "mode": 4 }] }
],
"nodes": [
{ "children": [1, 4, 5], "name": "CubeVisibility" },
{ "children": [2], "extensions": { "KHR_node_visibility": { "visible": false } }, "mesh": 0, "name": "InvisibleCube", "translation": [-1.5, 0.0, 0.0] },
{ "children": [3], "mesh": 0, "name": "ChildOfInvisibleShouldBeInvisible", "translation": [0.0, 1.5, 0.0] },
{ "mesh": 0, "name": "DescendantOfInvisibleShouldBeInvisible", "translation": [0.0, 1.5, 0.0] },
{ "mesh": 1, "name": "VisibleCube" },
{ "extensions": { "KHR_node_visibility": { "visible": true } }, "mesh": 2, "name": "AnimatedVisibility", "translation": [1.5, 0.0, 0.0] }
],
"scene": 0,
"scenes": [{ "nodes": [0] }]
}
Binary file added Models/CubeVisibility/glTF/CubeVisibility0.bin
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions Models/LightVisibility/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Light Visiblity test for KHR_node_visibility

This model demonstrates the `KHR_node_visibility` extension and its interaction with `KHR_animation_pointer`.

- If your implementation shows any of the red lights, it is not compliant with `KHR_node_visibility`.

- If your implementation does not have the blue light hiding and showing every 0.5 seconds, either the animation is not playing, or it does not support using `KHR_animation_pointer` to animate the `KHR_node_visibility` visible property.

Animated screenshot of the test model in action:

![Light Visibility](screenshot/screenshot_animated.webp)

[Show](https://gltf-interactivity.needle.tools?model=https://raw.githubusercontent.com/KhronosGroup/glTF-Interactivity-Sample-Assets/main/Models/LightVisibility/glTF-Binary/LightVisibility.glb) – [Download GLB](https://raw.githubusercontent.com/KhronosGroup/glTF-Interactivity-Sample-Assets/main/Models/LightVisibility/glTF-Binary/LightVisibility.glb)
Binary file not shown.
56 changes: 56 additions & 0 deletions Models/LightVisibility/glTF/LightVisibility.gltf
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"accessors": [
{ "bufferView": 0, "componentType": 5126, "count": 4, "max": [3.0, 1.5, 0.0], "min": [-3.0, -1.5, 0.0], "normalized": false, "type": "VEC3" },
{
"bufferView": 1,
"componentType": 5126,
"count": 4,
"max": [-1.5259254723787308e-5, -1.5259254723787308e-5, 1.0],
"min": [-1.5259254723787308e-5, -1.5259254723787308e-5, 1.0],
"normalized": false,
"type": "VEC3"
},
{ "bufferView": 2, "componentType": 5121, "count": 6, "max": [3], "min": [0], "normalized": false, "type": "SCALAR" },
{ "bufferView": 3, "componentType": 5126, "count": 11, "max": [5.0], "min": [0.0], "normalized": false, "type": "SCALAR" },
{ "bufferView": 4, "componentType": 5121, "count": 11, "max": [1], "min": [0], "normalized": false, "type": "SCALAR" }
],
"animations": [
{
"channels": [{ "sampler": 0, "target": { "extensions": { "KHR_animation_pointer": { "pointer": "/nodes/5/extensions/KHR_node_visibility/visible" } }, "path": "pointer" } }],
"name": "BlinkingBlueLight",
"samplers": [{ "input": 3, "interpolation": "STEP", "output": 4 }]
}
],
"asset": { "copyright": "2025 The Khronos Group", "generator": "Godot Engine v4.6.dev.custom_build", "version": "2.0" },
"bufferViews": [
{ "buffer": 0, "byteLength": 48, "byteStride": 12, "target": 34962 },
{ "buffer": 0, "byteLength": 48, "byteOffset": 48, "byteStride": 12, "target": 34962 },
{ "buffer": 0, "byteLength": 6, "byteOffset": 96, "target": 34963 },
{ "buffer": 0, "byteLength": 44, "byteOffset": 104 },
{ "buffer": 0, "byteLength": 11, "byteOffset": 148 }
],
"buffers": [{ "byteLength": 159, "uri": "LightVisibility0.bin" }],
"extensions": {
"KHR_lights_punctual": {
"lights": [
{ "color": [1.0, 0.0, 0.0], "intensity": 5.0, "range": 5.0, "spot": { "innerConeAngle": 0.65, "outerConeAngle": 0.8 }, "type": "spot" },
{ "color": [0.0, 1.0, 0.0], "intensity": 5.0, "range": 5.0, "spot": { "innerConeAngle": 0.65, "outerConeAngle": 0.8 }, "type": "spot" },
{ "color": [0.0, 0.125, 1.0], "intensity": 6.0, "range": 5.0, "spot": { "innerConeAngle": 0.65, "outerConeAngle": 0.8 }, "type": "spot" }
]
}
},
"extensionsRequired": ["KHR_lights_punctual", "KHR_node_visibility"],
"extensionsUsed": ["KHR_animation_pointer", "KHR_lights_punctual", "KHR_node_visibility"],
"meshes": [{ "primitives": [{ "attributes": { "NORMAL": 1, "POSITION": 0 }, "indices": 2, "mode": 4 }] }],
"nodes": [
{ "children": [1, 4, 5, 6], "name": "LightVisibility" },
{ "children": [2], "extensions": { "KHR_lights_punctual": { "light": 0 }, "KHR_node_visibility": { "visible": false } }, "name": "InvisibleLight", "translation": [-1.5, 0.0, 1.0] },
{ "children": [3], "extensions": { "KHR_lights_punctual": { "light": 0 } }, "name": "ChildOfInvisibleShouldBeInvisible" },
{ "extensions": { "KHR_lights_punctual": { "light": 0 } }, "name": "DescendantOfInvisibleShouldBeInvisible" },
{ "extensions": { "KHR_lights_punctual": { "light": 1 } }, "name": "VisibleLight", "translation": [0.0, 0.0, 1.0] },
{ "extensions": { "KHR_lights_punctual": { "light": 2 }, "KHR_node_visibility": { "visible": true } }, "name": "AnimatedVisibility", "translation": [1.5, 0.0, 1.0] },
{ "mesh": 0, "name": "QuadMeshNode" }
],
"scene": 0,
"scenes": [{ "nodes": [0] }]
}
Binary file added Models/LightVisibility/glTF/LightVisibility0.bin
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion Models/Models-showcase.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ Models that demonstrate interactive features of glTF.

© 2025, The Khronos Group and Needle.

**License:** [Creative Commons Attribtution 4.0 International](https://creativecommons.org/licenses/by/4.0/legalcode)
**License:** [Creative Commons Attribtution 4.0 International](https://creativecommons.org/licenses/by/4.0/legalcode)
26 changes: 24 additions & 2 deletions Models/model-index.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,18 @@
"glTF-Binary": "ConstructionSite.glb"
}
},
{
{
"label": "Cube Visibility",
"name": "CubeVisibility",
"screenshot": "screenshot/screenshot_animated.webp",
"description": "Demonstrates KHR_node_visibility and its interaction with KHR_animation_pointer.",
"tags": ["animation", "minimal"],
"variants": {
"glTF-Binary": "CubeVisibility.glb",
"glTF": "CubeVisibility.gltf"
}
},
{
"label": "Ghost",
"name": "Ghost",
"screenshot": "screenshot/screenshot.png",
Expand All @@ -28,6 +39,17 @@
"glTF-Binary": "ghost_v2.glb"
}
},
{
"label": "Light Visibility",
"name": "LightVisibility",
"screenshot": "screenshot/screenshot_animated.webp",
"description": "Demonstrates KHR_node_visibility and its interaction with KHR_animation_pointer.",
"tags": ["animation", "minimal"],
"variants": {
"glTF-Binary": "LightVisibility.glb",
"glTF": "LightVisibility.gltf"
}
},
{
"label": "Magic Ball",
"name": "MagicBall",
Expand Down Expand Up @@ -127,4 +149,4 @@
}
}

]
]