UNPKG

rock-mod

Version:

Rock-Mod is a powerful framework designed for creating and managing mods for Grand Theft Auto (GTA) games.

42 lines (41 loc) 1.17 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.RageMarker = void 0; const RageWorldObject_1 = require("../worldObject/RageWorldObject"); const utils_1 = require("../../../../shared/common/utils"); class RageMarker extends RageWorldObject_1.RageWorldObject { get markerType() { return this.mpEntity.model; } get visible() { return this.mpEntity.visible; } get scale() { return this.mpEntity.scale; } get color() { const [r, g, b, a] = this.mpEntity.getColor(); return new utils_1.RGBA(r, g, b, a ?? 255); } get rotation() { const { x, y, z } = this.mpEntity.rotation; return new utils_1.Vector3D(x, y, z); } constructor(options) { super(options); } setVisible(value) { this.mpEntity.visible = value; } setScale(value) { this.mpEntity.scale = value; } setColor(value) { const { r, g, b, a } = value; this.mpEntity.setColor(r, g, b, a ?? 255); } setRotation(value) { this.mpEntity.rotation = new mp.Vector3(value); } } exports.RageMarker = RageMarker;