|
|
@ -2401,6 +2401,17 @@ function addMannequins(){ |
|
|
|
// 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 |
|
|
|
// 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> |
|
|
|
</script> |
|
|
|
<div id="observablehq-key"> |
|
|
|
<div id="observablehq-key"> |
|
|
|
<div id="observablehq-viewof-offsetExample-ab4c1560"></div> |
|
|
|
<div id="observablehq-viewof-offsetExample-ab4c1560"></div> |
|
|
|