import { AppObjectEntity, getSingletonComponent, MemoizedBoolean, MemoizedNumber, Quaternion, Vector3, } from "@vived/core";
export class StoredView extends AppObjectEntity {
}
StoredView.type = "STORED_VIEW";
StoredView.get = (appObjects) => getSingletonComponent(StoredView.type, appObjects);
export function makeStoredView(appObj) {
    return new StoredViewImp(appObj);
}
class StoredViewImp extends StoredView {
    get position() {
        return this._position;
    }
    set position(p) {
        if (Vector3.Equal(this._position, p))
            return;
        this._position = p;
        this.notifyOnChange();
    }
    get rotation() {
        return this._rotation;
    }
    set rotation(r) {
        if (Quaternion.Equal(this._rotation, r))
            return;
        this._rotation = r;
        this.notifyOnChange();
    }
    get scale() {
        return this._memoizedScale.val;
    }
    set scale(s) {
        this._memoizedScale.val = s;
    }
    get hasStoredView() {
        return this._memoizedHasStoredView.val;
    }
    set hasStoredView(hasStoredValue) {
        this._memoizedHasStoredView.val = hasStoredValue;
    }
    constructor(appObject) {
        super(appObject, StoredView.type);
        this._position = Vector3.Zero();
        this._rotation = Quaternion.Identity();
        this._memoizedScale = new MemoizedNumber(1, this.notifyOnChange);
        this._memoizedHasStoredView = new MemoizedBoolean(false, this.notifyOnChange);
    }
}
//# sourceMappingURL=StoredView.js.map