mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 03:59:50 +02:00
no, no, no, NOW all hail pyogenics i messed up the last time
This commit is contained in:
1 parent
9fac6dd40d
commit
73c8807f14
1 file changed
+2
-21
@@ -166,28 +166,9 @@ export async function extractModel(data: string, path: string) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'TransformComponent': {
|
case 'TransformComponent': {
|
||||||
const translation = new Vector3();
|
|
||||||
const rotation = new Quaternion();
|
|
||||||
const scale = new Vector3();
|
|
||||||
|
|
||||||
new Matrix4()
|
|
||||||
.multiplyMatrices(
|
|
||||||
new Matrix4().compose(
|
|
||||||
new Vector3().fromArray(component['tc.worldTranslation']),
|
|
||||||
new Quaternion().fromArray(component['tc.worldRotation']),
|
|
||||||
new Vector3().fromArray(component['tc.worldScale']),
|
|
||||||
),
|
|
||||||
new Matrix4().compose(
|
|
||||||
new Vector3().fromArray(),
|
|
||||||
new Quaternion().fromArray(),
|
|
||||||
new Vector3().fromArray(component['tc.localScale']),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
.decompose(translation, rotation, scale);
|
|
||||||
|
|
||||||
node.setTranslation(component['tc.localTranslation']);
|
node.setTranslation(component['tc.localTranslation']);
|
||||||
node.setRotation(rotation.toArray() as Vector4Tuple);
|
node.setRotation(component['tc.localRotation']);
|
||||||
node.setScale(scale.toArray());
|
node.setScale(component['tc.localScale']);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user