mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-18 15:44:36 +00:00
Merge pull request #217 from storytold/feature/bugfix-transform-reset-broken
Feature/bugfix transform reset broken
This commit is contained in:
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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user