Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EXT_animation_map extension proposal #1137

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open
Prev Previous commit
Next Next commit
node->nodes, specify that any node can trigger
  • Loading branch information
msfeldstein committed Oct 31, 2017
commit cfa2bf76b0bb28b9d80bc180f1f60082ccf87e36
6 changes: 2 additions & 4 deletions extensions/Vendor/FB_animation_map/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ It maps a semantic, which can be any string a client wishes to bind, to an array
* **LEAVE**: Trigger a single shot animation as the object is leaving the scene or viewport
* **ALWAYS**: Constantly loop an animation

The following semantics require a list of glTF Node objects to specify interaction targets.
The following semantics require a list of glTF Node objects to specify interaction targets. If the nodes are omitted, it can be assumed that the entire glTF Scene is the target.

* **TRIGGER**: A user triggering a single shot animation on Touch, Tap, Click, or any other way of activating
* **GRAB**: Triggered when an object is picked up, for example grabbed in vr, or dragged in WebGL.
Expand All @@ -41,8 +41,6 @@ The following semantics require a list of glTF Node objects to specify interacti
* **PROXIMITY**: Looped while a viewer is near to an object
* **PROXIMITY_LEAVE**: Triggered when a viewer gets further from an object

The 'object' referred to is the mesh

## glTF Schema Updates

The new FB_animation_map property is a root glTF level optional extension object. The **bindings** array is a list of objects containing a semantic, an array of animations mapped to that semantic, and an optional list of nodes that this animation targets. The node parameter is used for interactive animations like GRAB or GAZE. Animations should be played all at once, though future additions could add parallel (default), sequential, or random play modes.
Expand Down Expand Up @@ -72,7 +70,7 @@ The new FB_animation_map property is a root glTF level optional extension object
{
"semantic": "GAZE_ENTER",
"animations": [4],
"node": [3]
"nodes": [3]
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,16 @@
"type": "number",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

number -> integer

"minimum": 0
}
},
"nodes": {
"type": "array",
"items": {
"type": "number",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

number -> integer

"minimum": 0
}
}
}
},
"required": ["semantic", "animations"]
}
},
"properties" : {
Expand Down