Skip to content

Commit

Permalink
Remove check for undefined node rotation; we should set it regardless (
Browse files Browse the repository at this point in the history
  • Loading branch information
alexchuber authored Feb 3, 2025
1 parent e9088de commit 72a7b18
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions packages/dev/serializers/src/glTF/2.0/glTFUtilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,11 +213,9 @@ export function ConvertCameraRotationToGLTF(rotation: Quaternion): Quaternion {
}

export function RotateNode180Y(node: INode) {
if (node.rotation) {
const rotation = Quaternion.FromArrayToRef(node.rotation || [0, 0, 0, 1], 0, TmpVectors.Quaternion[1]);
rotation180Y.multiplyToRef(rotation, rotation);
node.rotation = rotation.asArray();
}
const rotation = Quaternion.FromArrayToRef(node.rotation || [0, 0, 0, 1], 0, TmpVectors.Quaternion[1]);
rotation180Y.multiplyToRef(rotation, rotation);
node.rotation = rotation.asArray();
}

/**
Expand Down

0 comments on commit 72a7b18

Please sign in to comment.