"use strict";
/*!
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Licensed under the MIT License.
 */
Object.defineProperty(exports, "__esModule", { value: true });
const __1 = require("..");
/**
 * Describes the ways in which an actor can face (point its local +Z axis toward) and track another object in the scene
 */
var LookAtMode;
(function (LookAtMode) {
    /**
     * Actor is world-locked and does not rotate
     */
    LookAtMode["None"] = "None";
    /**
     * Actor rotates around its Y axis to face the target, offset by its rotation
     */
    LookAtMode["TargetY"] = "TargetY";
    /**
     * Actor rotates around its X and Y axes to face the target, offset by its rotation
     */
    LookAtMode["TargetXY"] = "TargetXY";
})(LookAtMode = exports.LookAtMode || (exports.LookAtMode = {}));
class LookAt {
    constructor() {
        this._actorId = __1.ZeroGuid;
        this._mode = LookAtMode.None;
        this._backward = false;
    }
    get actorId() { return this._actorId; }
    set actorId(value) { value ? this._actorId = value : this._actorId = __1.ZeroGuid; }
    get mode() { return this._mode; }
    set mode(value) { value ? this._mode = value : this._mode = LookAtMode.None; }
    get backward() { return this._backward; }
    set backward(value) { this._backward = !!value; }
    /** @hidden */
    toJSON() {
        return {
            actorId: this.actorId,
            mode: this.mode,
            backward: this.backward
        };
    }
    copy(from) {
        if (!from) {
            return this;
        }
        if (from.actorId !== undefined) {
            this.actorId = from.actorId;
        }
        if (from.mode !== undefined) {
            this.mode = from.mode;
        }
        if (from.backward !== undefined) {
            this.backward = from.backward;
        }
        return this;
    }
}
exports.LookAt = LookAt;
//# sourceMappingURL=lookAt.js.map