rock-mod
Version:
Rock-Mod is a powerful framework designed for creating and managing mods for Grand Theft Auto (GTA) games.
59 lines (58 loc) • 1.38 kB
JavaScript
import { BaseObjectType } from "../../../../shared/entities";
import { Vector3D } from "../../../../shared/common/utils";
export class CCMPCamera {
constructor(_camera) {
this._camera = _camera;
}
get id() {
return this._camera.id;
}
get remoteId() {
return null;
}
get type() {
return BaseObjectType.Camera;
}
get isExists() {
return this._camera.isAlive;
}
get handle() {
return this._camera.handle;
}
destroy() {
this._camera.destroy();
}
get isActive() {
return this._camera.isActive;
}
setIsActive(value) {
this._camera.setActive(value);
}
get direction() {
const { x, y, z } = this._camera.direction;
return new Vector3D(x, y, z);
}
get fov() {
return this._camera.fov;
}
setFov(value) {
this._camera.setFov(value);
}
pointAtCoord(value) {
this._camera.pointAtCoord(value);
}
setPosition(value) {
this._camera.setPosition(value);
}
get position() {
const { x, y, z } = this._camera.position;
return new Vector3D(x, y, z);
}
get rotation() {
const { x, y, z } = this._camera.rotation;
return new Vector3D(x, y, z);
}
setRotation(value) {
this._camera.setRotation(value);
}
}