This is what I have figured out so far (i can move the instances, that works)
but i’m stumped at getting the instances to rotate continuously (say) on the X axis?
Any help appreciated !
whatToAnimate = scene.getObjectByName("loadedInstancedMeshGroup");
for ( var m = 0; m < whatToAnimate.count; m ++ ) {
loadedInstancedMeshGroup.getMatrixAt( m, loadedInstancesMatrix );
// extract position from instancedMeshGroupMatrix
vector3PositionFromMatrix.setFromMatrixPosition( loadedInstancesMatrix );
// change the z position
vector3PositionFromMatrix.z = vector3PositionFromMatrix.z + 0.1;
// write the new positon back
loadedInstancesMatrix.setPosition( vector3PositionFromMatrix );
finalPosition = vector3PositionFromMatrix;
// extract rotation from instancedMeshGroupMatrix ?
// increment the rotation ? (any would do, just to show me one example)
// write the rotation back ?
whatToAnimate.setMatrixAt( m, loadedInstancesMatrix );
whatToAnimate.instanceMatrix.needsUpdate = true;
}