import type Camera2d from "../camera2d.ts"; import CameraEffect from "./camera_effect.ts"; /** * A camera effect that shakes the viewport by applying random offsets. * @category Camera * @example * camera.addCameraEffect(new ShakeEffect(camera, { * intensity: 10, * duration: 500, * axis: camera.AXIS.BOTH, * })); */ export default class ShakeEffect extends CameraEffect { /** * maximum pixel offset during shake */ intensity: number; /** * remaining duration in milliseconds */ duration: number; /** * which axes to shake (use camera.AXIS constants) */ axis: number; /** * optional callback when shake completes */ onComplete: (() => void) | undefined; /** * @param camera - the camera to shake * @param options - shake parameters * @param options.intensity - maximum offset in pixels * @param options.duration - duration in milliseconds * @param [options.axis=3] - which axes (NONE=0, HORIZONTAL=1, VERTICAL=2, BOTH=3) * @param [options.onComplete] - callback when the shake finishes */ constructor(camera: Camera2d, options: { intensity: number; duration: number; axis?: number | undefined; onComplete?: (() => void) | undefined; }); update(dt: number): void; destroy(): void; } //# sourceMappingURL=shake_effect.d.ts.map