writeChanges method
dynamic
writeChanges(
- dynamic index
The extra information about which curve and curve position is stored in the translation components of the matrix for the instanced objects This writes that information to the matrix and marks it as needing update.
@param {number} index of the instanced element to update
Implementation
writeChanges(index) {
matrix.makeTranslation(curveLengthArray[whichCurve[index]], whichCurve[index], offsets[index]);
var obj = object3D as InstancedMesh;
obj.setMatrixAt(index, matrix);
obj.instanceMatrix?.needsUpdate = true;
}