-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add data-comp-animation page and update audio for 'state'-->'action' (#…
…50) Signed-off-by: hanbollar <[email protected]>
- Loading branch information
Showing
3 changed files
with
40 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# data-comp-animation | ||
|
||
```html | ||
<mr-model src="path/to/file" data-comp-animation="action: play; loop: true"></mr-entity> | ||
``` | ||
|
||
## `action` | ||
|
||
Handles the animation starting and stopping. | ||
|
||
Values: `play`, `pause`, `stop` | ||
|
||
## `loop` | ||
|
||
Handles how the animation loops for the model file. If set to `true`/`false` ignores the value of `loopMode`, otherwise acts as a numerical looping count. | ||
|
||
Values: `true`, `false`, number >= 0 | ||
|
||
> if set to `true`/`false`, ignores the `loopMode` value | ||
## `loopMode` | ||
|
||
The format for how the looping should occur. Values are based on threejs defaults. | ||
|
||
Values: `once`, `repeat`, and `pingpong` | ||
|
||
> if set to `once`, ignores the `loop` value. | ||
## `clampWhenFinished` | ||
|
||
Freezes the animation state to the last frame when stop is called or any looping ends. | ||
|
||
Values: `true`, `false` | ||
|
||
> if not set, defaults to the threejs internals setup, which is `false` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters