/** * Options of the `anim` component accepted by {@link AnimComponentSystem} that differ from the * properties of {@link AnimComponent}. Each replaces the same-named property of the options that * {@link Entity#addComponent} derives from the component class; see * {@link ComponentOptionsOverrides}. */ export type AnimComponentOptionsOverrides = { /** * - * Layers to add with {@link AnimComponent#addLayer}, each with a `name` and optional `weight`, * `mask` and `blendType`. */ layers?: { name: string; weight?: number; mask?: object; blendType?: string; }[]; /** * - Bone masks to assign to the added * layers, keyed by layer name. */ masks?: { [layer: string]: { mask: object; }; }; }; /** * @import { AppBase } from '../../app-base.js' * @import { Component } from '../component.js' * @import { Entity } from '../../entity.js' */ /** * Options of the `anim` component accepted by {@link AnimComponentSystem} that differ from the * properties of {@link AnimComponent}. Each replaces the same-named property of the options that * {@link Entity#addComponent} derives from the component class; see * {@link ComponentOptionsOverrides}. * * @typedef {object} AnimComponentOptionsOverrides * @property {{ name: string, weight?: number, mask?: object, blendType?: string }[]} [layers] - * Layers to add with {@link AnimComponent#addLayer}, each with a `name` and optional `weight`, * `mask` and `blendType`. * @property {{ [layer: string]: { mask: object } }} [masks] - Bone masks to assign to the added * layers, keyed by layer name. * @ignore */ /** * Manages the {@link AnimComponent}s of an application and advances their state graphs each * frame. Reach it through `app.systems.anim`; components are created with * {@link Entity#addComponent}, never by calling the system directly. * * @category Animation */ export class AnimComponentSystem extends ComponentSystem { id: string; ComponentType: typeof AnimComponent; initializeComponentData(component: any, data: any, properties: any): void; onAnimationUpdate(dt: any): void; /** * Rebinds every component animating a hierarchy which contains the entity whose mesh instances * changed. Anim targets which reference mesh instances - morph target weights and animated * material textures - are resolved once and then cached, so they have to be re-resolved when the * mesh instances they point at are created or destroyed. Disabled components are included, as * they keep their bindings and are not rebound when re-enabled. * * @param {Component} component - The component whose mesh instances changed. * @private */ private onMeshInstancesChange; cloneComponent(entity: any, clone: any): Component; onBeforeRemove(entity: any, component: any): void; } import { ComponentSystem } from '../system.js'; import { AnimComponent } from './component.js'; import type { Component } from '../component.js';