UNPKG

blaze-2d

Version:

A fast and simple WebGL 2 2D game engine written in TypeScript

21 lines 639 B
/** * Stores common properties and methods for controls. */ export default class Controls { /** * Creates a {@link Controls} instance. * * @param element The element to use when handling control events * @param object An optional object to follow the camera's yaw * @param sensitivity Movement sensitivity */ constructor(element, camera, object, sensitivity = 0.1) { this.movementX = 0; this.movementY = 0; this.element = element; this.camera = camera; this.object = object; this.sensitivity = sensitivity; } } //# sourceMappingURL=controls.js.map