UNPKG

dualsense-ts

Version:

A natural interface for your DualSense controller, with Typescript

34 lines 898 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Gyroscope = void 0; const input_1 = require("../input"); const axis_1 = require("./axis"); /** Tracks the angular velocity of the controller. */ class Gyroscope extends input_1.Input { constructor(params) { super(params); this.state = this; this.active = false; const { x, y, z } = params ?? {}; this.x = new axis_1.Axis({ icon: "GX", name: "X", ...params, ...x, }); this.y = new axis_1.Axis({ icon: "GY", name: "Y", ...params, ...y, }); this.z = new axis_1.Axis({ icon: "GZ", name: "Z", ...params, ...z, }); } } exports.Gyroscope = Gyroscope; //# sourceMappingURL=gyroscope.js.map