Skip to content

Commit

Permalink
Use positive property name
Browse files Browse the repository at this point in the history
  • Loading branch information
lexaknyazev committed Jun 17, 2024
1 parent 288a168 commit 52d04b5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
20 changes: 10 additions & 10 deletions extensions/2.0/Khronos/KHR_node_visibility/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# KHR_node_visibility
# KHR\_node\_visibility

## Contributors

Expand All @@ -21,13 +21,13 @@ This extension allows glTF animations and interactivity to control visibility of

## Extending Nodes

The `KHR_node_visibility` extension object is added to the objects within the `nodes` array. The extension object contains a single boolean `hidden` property. This value is mutable through JSON pointers as defined in the glTF 2.0 Asset Object Model and controls visibility of the node that contains it and all its children nodes recursively. A value of `true` causes all nodes below in the hierarchy to be omitted from display, even any nodes below that have a value of `false`.
The `KHR_node_visibility` extension object is added to the objects within the `nodes` array. The extension object contains a single boolean `visible` property. This value is mutable through JSON pointers as defined in the glTF 2.0 Asset Object Model and controls visibility of the node that contains it and all its children nodes recursively. A value of `false` causes all nodes below in the hierarchy to be omitted from display, even any nodes below that have a value of `true`.

| | Type | Description | Required |
|------------|-----------|---------------------------------------|---------------------|
| **hidden** | `boolean` | Specifies whether the node is hidden. | No, default: `false`|
| | Type | Description | Required |
|-------------|-----------|----------------------------------------|--------------------|
| **visible** | `boolean` | Specifies whether the node is visible. | No, default: `true`|

In other words, a node is visible if and only if its own `hidden` property is `false` and all its parents are visible. This allows a single change of a `hidden` property at a high level of the hierarchy to hide or show complex (multi-node) objects.
In other words, a node is visible if and only if its own `visible` property is `true` and all its parents are visible. This allows a single change of a `visible` property at a high level of the hierarchy to hide or show complex (multi-node) objects.

In the following example, both nodes (and therefore their meshes) are initially hidden.

Expand All @@ -39,7 +39,7 @@ In the following example, both nodes (and therefore their meshes) are initially
"mesh": 0,
"extensions": {
"KHR_node_visibility": {
"hidden": true
"visible": false
}
},
},
Expand All @@ -54,9 +54,9 @@ In the following example, both nodes (and therefore their meshes) are initially

The following pointer template represents the mutable property defined by this extension.

| Pointer | Type |
|---------------------------------------------------|--------|
| `/nodes/{}/extensions/KHR_node_visibility/hidden` | `bool` |
| Pointer | Type |
|----------------------------------------------------|--------|
| `/nodes/{}/extensions/KHR_node_visibility/visible` | `bool` |

## JSON Schema

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
"description": "glTF extension that defines node's visibility.",
"allOf": [ { "$ref": "glTFProperty.schema.json" } ],
"properties": {
"hidden": {
"visible": {
"type": "boolean",
"description": "Specifies whether the node is hidden.",
"default": false,
"gltf_detailedDescription": "Specifies whether the node is hidden. A value of true means that the node and all its children are hidden."
"description": "Specifies whether the node is visible.",
"default": true,
"gltf_detailedDescription": "Specifies whether the node is visible. A value of false means that the node and all its children are hidden."
},
"extensions": { },
"extras": { }
Expand Down

0 comments on commit 52d04b5

Please sign in to comment.