mrjs
volumetrics
Models and Animation
Models can enhance the 3D interactive experience of mixed reality making you feel the blend of virtual and real environment more realistically.
Model Format Examples
stl
glb
attribution
glb
With Animation as part of the file format.
glb - play all clips
With multiple Animations as part of the file format.
glb - play just one clip
With multiple Animations as part of the file format.
fbx
With Animation as part of the file format.
attribution
dae
Note that dae can have a Y-up vs Z-up coordinate system difference that threejs will warn about.
attribution
obj
Without mtl referenced in file. "mr-model src='/path/to/objFile.obj'"
attribution
obj
With mtl referenced in file, mtl NOT loaded as part of 'src'. "mr-model src='/path/to/objFile.obj'"
attribution
obj
mtl referenced in file AND mtl IS loaded as part of 'src'. "mr-model src='/pathto/mtlFile.mtl,/pathto/objFile.obj'"
attribution
dynamic switch of `src`
switch button
Animation / Looping
loop = 'true'
loop = 'false'
loopMode = once
loop = 3, loopMode = repeat
loop = Infinity, loopMode = repeat
loop = 5, loopMode = pingpong
loopMode = once, end at start position
loopMode = once, freeze at final position
loop: false, plays once, and play again by button push
Play animation
loop: false, plays once, and play again by button push, freeze at final position
Play animation
model
Model loading is achieved using the model component, `mr-model`, it has one attribute:
src
You fill this out as you would any `src` attribute on an < img /> or < video /> html tag.
That is, with the path to the file to be loaded (for example `/examples-assets/foo.glb`)
action
the playback state action
values: play, pause, stop
loop
whether the animation should be looped, or if paired with `loopCount`, how many times it should loop.
values: true, false, or number >= 0
loopMode
The type of looping a user wishes to occur.
values: once, repeat, pingpong