I want to animate a line by setting the position of each vertex directly, i.e not by animating the transform of the parent object.
I have tried creating a line using LineSegementsGeometry and animating it's 'positions' via keyframe tracks. I have also tried creating a line using BufferGeometry and animating it's 'position' buffer attribute via keyframe tracks, neither of these approaches seem to work, the line vertex positions do not animate. Animating position, rotation etc on the parent object with keyframe tracks works fine.
Could someone provide a simple example of animating two vertex points on a line with keyframe tracks?
The way to animate vertex positions would be using morph targets. Sadly, this is not yet supported for lines in threejs. See upstream issue: https://github.com/mrdoob/three.js/issues/2875.
I want to animate a line by setting the position of each vertex directly, i.e not by animating the transform of the parent object.
I have tried creating a line using LineSegementsGeometry and animating it's 'positions' via keyframe tracks. I have also tried creating a line using BufferGeometry and animating it's 'position' buffer attribute via keyframe tracks, neither of these approaches seem to work, the line vertex positions do not animate. Animating position, rotation etc on the parent object with keyframe tracks works fine.
Could someone provide a simple example of animating two vertex points on a line with keyframe tracks?