preparing VR movement bindings

mannequin
Fabien Benetou 2 years ago
parent 86a109ca9b
commit 6378796456
  1. 11
      index.html

@ -2401,6 +2401,17 @@ function addMannequins(){
// but must consider how to use rotation too, not just position
// must rely on its own system in order to respect constraints, if defined
let people
async function moveMannequinPartExample(mannequin=0){
testPoints = await fetch("pointsFromMovementExample.json").then( r => r.json() )
// to replace by nextMovementToPoints() then pointsFromMovement
let first = new THREE.Vector3( ).copy( testPoints[0] )
let last = new THREE.Vector3( ).copy( testPoints[testPoints.length-1])
let distance = first.distanceTo( last )
if (!people) people = addMannequins()
people[mannequin].head.tilt -= distance
}
</script>
<div id="observablehq-key">
<div id="observablehq-viewof-offsetExample-ab4c1560"></div>

Loading…
Cancel
Save