working example, not VR movement bindings though

mannequin
Fabien Benetou 2 years ago
parent 0b34186ca4
commit 86a109ca9b
  1. 31
      index.html

@ -24,6 +24,7 @@
<script src='dependencies/webdav.js'></script>
<script src="https://unpkg.com/shiki"></script>
<script src="https://cdn.jsdelivr.net/gh/c-frame/aframe-physics-system@v4.2.2/dist/aframe-physics-system.min.js"></script>
<script src='dependencies/mannequin.js'></script>
<!-- replacing with local copies as CDNs are like unpkg tend to be slow
<script type="module" src="https://unpkg.com/immers-client/dist/destination.bundle.js"></script>
@ -2370,6 +2371,36 @@ AFRAME.registerComponent('dynamic-unless-picked', {
// should unregister on remove
})
function addMannequins(){
let mannequins = []
scene = AFRAME.scenes[0].object3D
man = new Male();
man.position.x = 2;
man.turn = -120;
man.torso.turn += 45;
man.scale.set(.01, .01, .01)
mannequins.push( man )
woman = new Female();
woman.position.x = -2;
woman.turn = -60;
woman.scale.set(.01, .01, .01)
mannequins.push( woman )
kid = new Child();
kid.position.z = -2
kid.position.y = 1
kid.scale.set(.01, .01, .01)
mannequins.push( kid )
return mannequins
}
// then usable as people[2].head.tilt -= 29
// could rely on nextMovementToPoints()
// could also make joint targets but must consider how to use rotation too, not just position
// but must consider how to use rotation too, not just position
// must rely on its own system in order to respect constraints, if defined
</script>
<div id="observablehq-key">
<div id="observablehq-viewof-offsetExample-ab4c1560"></div>

Loading…
Cancel
Save