@dcl-sdk/utils
Version:
A collection of helpers to make it easier to build a Decentraland scene using the SDK 7.
20 lines (19 loc) • 709 B
TypeScript
import { Entity, IEngine } from '@dcl/sdk/ecs';
import { Quaternion } from '@dcl/sdk/math';
export type PerpetualMotions = ReturnType<typeof createPerpetualMotions>;
export declare enum AXIS {
X = "x",
Y = "y",
Z = "z"
}
declare function createPerpetualMotions(targetEngine: IEngine): {
startRotation(entity: Entity, velocity: Quaternion): void;
stopRotation(entity: Entity): void;
smoothRotation(entity: Entity, duration: number, axis?: AXIS): void;
};
export declare const perpetualMotions: {
startRotation(entity: Entity, velocity: Quaternion): void;
stopRotation(entity: Entity): void;
smoothRotation(entity: Entity, duration: number, axis?: AXIS): void;
};
export {};