Open michaelnicol opened 2 years ago
In the following code in the animation section of the book: Link to code block description
The following code is provided:
These three keyframes will make an object start at the center of the scene, move right, up, and forwards over three seconds, then reverse direction and move back to the center. Next, we’ll create a vector track with these keyframes.
import { VectorKeyframeTrack } from 'three'; const times = [0, 3, 6]; const values = [0, 0, 0, 2, 2, 2, 0, 0, 0 ]; const positionKF = new VectorKeyframeTrack('.material.opacity', times, values);
Since this is a Vector track, the key track property should be .position, not .material.opacity
.position
.material.opacity
Good catch, I will update this.
In the following code in the animation section of the book: Link to code block description
The following code is provided:
Since this is a Vector track, the key track property should be
.position
, not.material.opacity