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

Serialize getters instead of private vars #12758

Merged
merged 1 commit into from
Jul 18, 2022
Merged
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
10 changes: 5 additions & 5 deletions packages/dev/core/src/Cameras/camera.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ export class Camera extends Node {
* Define the current limit on the left side for an orthographic camera
* In scene unit
*/
@serialize()
private _orthoLeft: Nullable<number> = null;

public set orthoLeft(value: Nullable<number>) {
Expand All @@ -180,6 +179,7 @@ export class Camera extends Node {
}
}

@serialize()
public get orthoLeft(): Nullable<number> {
return this._orthoLeft;
}
Expand All @@ -188,7 +188,6 @@ export class Camera extends Node {
* Define the current limit on the right side for an orthographic camera
* In scene unit
*/
@serialize()
private _orthoRight: Nullable<number> = null;

public set orthoRight(value: Nullable<number>) {
Expand All @@ -199,6 +198,7 @@ export class Camera extends Node {
}
}

@serialize()
public get orthoRight(): Nullable<number> {
return this._orthoRight;
}
Expand All @@ -207,7 +207,6 @@ export class Camera extends Node {
* Define the current limit on the bottom side for an orthographic camera
* In scene unit
*/
@serialize()
private _orthoBottom: Nullable<number> = null;

public set orthoBottom(value: Nullable<number>) {
Expand All @@ -218,6 +217,7 @@ export class Camera extends Node {
}
}

@serialize()
public get orthoBottom(): Nullable<number> {
return this._orthoBottom;
}
Expand All @@ -226,7 +226,6 @@ export class Camera extends Node {
* Define the current limit on the top side for an orthographic camera
* In scene unit
*/
@serialize()
private _orthoTop: Nullable<number> = null;

public set orthoTop(value: Nullable<number>) {
Expand All @@ -237,6 +236,7 @@ export class Camera extends Node {
}
}

@serialize()
public get orthoTop(): Nullable<number> {
return this._orthoTop;
}
Expand Down Expand Up @@ -281,7 +281,6 @@ export class Camera extends Node {
/**
* Define the mode of the camera (Camera.PERSPECTIVE_CAMERA or Camera.ORTHOGRAPHIC_CAMERA)
*/
@serialize()
private _mode = Camera.PERSPECTIVE_CAMERA;
set mode(mode: number) {
this._mode = mode;
Expand All @@ -292,6 +291,7 @@ export class Camera extends Node {
}
}

@serialize()
get mode(): number {
return this._mode;
}
Expand Down