Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some comments on docs reinforcing that it's only possible to upda… #13383

Merged
merged 1 commit into from
Dec 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/dev/core/src/Gizmos/gizmo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ export class Gizmo implements IGizmo {

/**
* If set the gizmo's rotation will be updated to match the attached mesh each frame (Default: true)
* NOTE: This is only possible for meshes with uniform scaling, as otherwise it's not possible to decompose the rotation
*/
public set updateGizmoRotationToMatchAttachedMesh(value: boolean) {
this._updateGizmoRotationToMatchAttachedMesh = value;
Expand Down
4 changes: 4 additions & 0 deletions packages/dev/core/src/Gizmos/positionGizmo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,10 @@ export class PositionGizmo extends Gizmo implements IPositionGizmo {
return this._planarGizmoEnabled;
}

/**
* If set the gizmo's rotation will be updated to match the attached mesh each frame (Default: true)
* NOTE: This is only possible for meshes with uniform scaling, as otherwise it's not possible to decompose the rotation
*/
public set updateGizmoRotationToMatchAttachedMesh(value: boolean) {
this._updateGizmoRotationToMatchAttachedMesh = value;
[this.xGizmo, this.yGizmo, this.zGizmo, this.xPlaneGizmo, this.yPlaneGizmo, this.zPlaneGizmo].forEach((gizmo) => {
Expand Down
4 changes: 4 additions & 0 deletions packages/dev/core/src/Gizmos/rotationGizmo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,10 @@ export class RotationGizmo extends Gizmo implements IRotationGizmo {
}
}

/**
* If set the gizmo's rotation will be updated to match the attached mesh each frame (Default: true)
* NOTE: This is only possible for meshes with uniform scaling, as otherwise it's not possible to decompose the rotation
*/
public set updateGizmoRotationToMatchAttachedMesh(value: boolean) {
if (this.xGizmo) {
this.xGizmo.updateGizmoRotationToMatchAttachedMesh = value;
Expand Down