import * as AFRAME from 'aframe'; import * as THREE from 'three'; /** * Component for rendering an Effekseer effect. */ declare const EffekseerComponent: AFRAME.ComponentConstructor<{ schema: { /** The .efk or .efkpkg file to use */ readonly src: { readonly type: "asset"; }; /** Whether or not to play the effect as soon as it's loaded */ readonly autoPlay: { readonly type: "boolean"; readonly default: true; }; /** Whether to loop the effect or not */ readonly loop: { readonly type: "boolean"; readonly default: false; }; /** Whether or not to update the effects scale, position and rotation each tick */ readonly dynamic: { readonly type: "boolean"; readonly default: false; }; }; init: () => void; update: (oldData: { src: string; autoPlay: boolean; loop: boolean; dynamic: boolean; }) => void; updateTransform: () => void; /** * Starts a new playback of the effect. This doesn't stop any already playing * effects associated with this component. Call {@link stopEffect()} for that instead */ playEffect: () => void; /** * Pauses the playback of the effect */ pauseEffect: () => void; /** * Resumes the effect in case it has been paused */ resumeEffect: () => void; /** * Stops the effect */ stopEffect: () => void; /** * Sets the target location for effects that make use of this. * This is NOT the location of the effect, but the location the effect _targets_ on. * Not all effects make use of this location. * @param target The location the effect should target on */ setTargetLocation: (target: THREE.Vector3) => void; tick: () => void; remove: () => void; }, { /** The .efk or .efkpkg file to use */ readonly src: { readonly type: "asset"; }; /** Whether or not to play the effect as soon as it's loaded */ readonly autoPlay: { readonly type: "boolean"; readonly default: true; }; /** Whether to loop the effect or not */ readonly loop: { readonly type: "boolean"; readonly default: false; }; /** Whether or not to update the effects scale, position and rotation each tick */ readonly dynamic: { readonly type: "boolean"; readonly default: false; }; }, { schema: { readonly wasmPath: { readonly type: "string"; }; readonly frameRate: { readonly type: "number"; readonly default: 60; }; }; init: () => void; getOrLoadEffect(src: string): Promise; playEffect(effect: effekseer.EffekseerEffect): effekseer.EffekseerHandle; tick: (_t: number, dt: number) => void; } & { getContext: Promise; context: effekseer.EffekseerContext; effects: Map; fileLoader: THREE.FileLoader; sentinel: THREE.Mesh; } & AFRAME.System<{ readonly wasmPath: { readonly type: "string"; }; readonly frameRate: { readonly type: "number"; readonly default: 60; }; }> & ThisType<{ schema: { readonly wasmPath: { readonly type: "string"; }; readonly frameRate: { readonly type: "number"; readonly default: 60; }; }; init: () => void; getOrLoadEffect(src: string): Promise; playEffect(effect: effekseer.EffekseerEffect): effekseer.EffekseerHandle; tick: (_t: number, dt: number) => void; } & { getContext: Promise; context: effekseer.EffekseerContext; effects: Map; fileLoader: THREE.FileLoader; sentinel: THREE.Mesh; } & AFRAME.System<{ readonly wasmPath: { readonly type: "string"; }; readonly frameRate: { readonly type: "number"; readonly default: 60; }; }>>, { effect: effekseer.EffekseerEffect | null; handle: effekseer.EffekseerHandle | null; tempMatrixArray: Float32Array; targetLocation: THREE.Vector3; }>; declare module "aframe" { interface Components { "effekseer": InstanceType; } } /** * System for managing the Effekseer context and handling rendering of the effects */ declare const EffekseerSystem: AFRAME.SystemConstructor<{ schema: { /** URL to the effekseer.wasm file */ readonly wasmPath: { readonly type: "string"; }; /** Frame-rate at which the effects are played back */ readonly frameRate: { readonly type: "number"; readonly default: 60; }; }; init: () => void; getOrLoadEffect(src: string): Promise; playEffect(effect: effekseer.EffekseerEffect): effekseer.EffekseerHandle; tick: (_t: number, dt: number) => void; }, { /** URL to the effekseer.wasm file */ readonly wasmPath: { readonly type: "string"; }; /** Frame-rate at which the effects are played back */ readonly frameRate: { readonly type: "number"; readonly default: 60; }; }, { getContext: Promise; context: effekseer.EffekseerContext; effects: Map; fileLoader: THREE.FileLoader; sentinel: THREE.Mesh; }>; declare module "aframe" { interface Systems { "effekseer": InstanceType; } } export { EffekseerComponent, EffekseerSystem };