UNPKG

@dcl/ecs

Version:
34 lines (33 loc) 972 B
import { IEngine, LastWriteWinElementSetComponentDefinition } from '../../engine'; import { PBTween, Move, Rotate, Scale, TextureMove } from '../generated/index.gen'; /** * @public */ export interface TweenHelper { /** * @returns a move mode tween */ Move: (move: Move) => PBTween['mode']; /** * @returns a move mode tween */ Rotate: (rotate: Rotate) => PBTween['mode']; /** * @returns a move mode tween */ Scale: (scale: Scale) => PBTween['mode']; /** * @returns a texture move mode tween */ TextureMove: (textureMove: TextureMove) => PBTween['mode']; } /** * @public */ export interface TweenComponentDefinitionExtended extends LastWriteWinElementSetComponentDefinition<PBTween> { /** * Texture helpers with constructor */ Mode: TweenHelper; } export declare function defineTweenComponent(engine: Pick<IEngine, 'defineComponentFromSchema'>): TweenComponentDefinitionExtended;