Merge pull request #217 from storytold/feature/bugfix-transform-reset-broken

Feature/bugfix transform reset broken
This commit is contained in:
ArEnSc authored and GitHub committed 2024-04-23 23:31:30 -04:00
commit 698068c609
1 file changed
+2 -2
@@ -133,10 +133,10 @@ export class TransformClip {
if (this.keyframes.length > 0) {
let first_pos = this.keyframes[0].position;
let first_rot = this.keyframes[0].rotation;
let first_quat = new THREE.Quaternion().setFromEuler(new THREE.Euler(THREE.MathUtils.degToRad(first_rot.x), THREE.MathUtils.degToRad(first_rot.y), THREE.MathUtils.degToRad(first_rot.z)));
let first_quat = new THREE.Euler(THREE.MathUtils.degToRad(first_rot.x), THREE.MathUtils.degToRad(first_rot.y), THREE.MathUtils.degToRad(first_rot.z));
let first_scl = this.keyframes[0].scale;
object.position.copy(first_pos);
object.rotation.set(first_quat.x, first_quat.y, first_quat.z);
object.rotation.copy(first_quat);
object.scale.copy(first_scl);
this.step_frame = 0;
}