diff --git a/index.html b/index.html index a922431..af98693 100644 --- a/index.html +++ b/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 +} +