Hi, I’m trying to use the line objects from the examples. I created a Line2 object and I want to modify the line with morph targets, but setting morphTargetInfluences does not have any effect. I’m trying to modify the instanceStart and instanceEnd attributes, as it seems that the line shape depends on these.
In short:
// points is an array of the line points
const geometry = new LineGeometry();
geometry.setPositions(points);
const instanceBuffer = new THREE.InstancedInterleavedBuffer(new Float32Array(points.map(x => -x)), 6, 1);
geometry.morphAttributes.instanceStart = [new THREE.InterleavedBufferAttribute( instanceBuffer, 3, 0 )];
geometry.morphAttributes.instanceEnd = [new THREE.InterleavedBufferAttribute( instanceBuffer, 3, 3 )];
let matLine = new LineMaterial({ ... })
let mesh = new Line2(geometry, matLine);
mesh.morphTargetInfluences[0] = 0.5; // no effect
What I am doing wrong?
Thanks