Skip to content

Commit

Permalink
fix invalid setter
Browse files Browse the repository at this point in the history
  • Loading branch information
micheal-parks committed Jul 17, 2024
1 parent a835239 commit cc019fa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@viamrobotics/three",
"version": "0.0.9",
"version": "0.0.10",
"license": "Apache-2.0",
"type": "module",
"files": [
Expand Down
8 changes: 3 additions & 5 deletions src/orientation-vector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export class OrientationVector {
}

set z(value: number) {
this.#vec.setY(value);
this.#vec.setZ(value);

if (this.autoNormalize) {
this.#vec.normalize();
Expand Down Expand Up @@ -221,7 +221,7 @@ export class OrientationVector {
return this.toArray();
}

setFromQuaternion(quaternion: Quaternion, update = true): this {
setFromQuaternion(quaternion: Quaternion): this {
// Get the transform of our +X and +Z points
const conj = quatA.copy(quaternion).conjugate();
const newX = quatB.multiplyQuaternions(quaternion, xAxis).multiply(conj);
Expand Down Expand Up @@ -280,9 +280,7 @@ export class OrientationVector {

this.set(newZ.x, newZ.y, newZ.z, th);

if (update) {
this.#onChangeCallback?.();
}
this.#onChangeCallback?.();

return this;
}
Expand Down

0 comments on commit cc019fa

Please sign in to comment.