/** * An instance of {@link Morph}. Contains weights to assign to every {@link MorphTarget}, manages * selection of active morph targets. * * @category Graphics */ export class MorphInstance { /** * Create a new MorphInstance instance. * * @param {import('./morph.js').Morph} morph - The {@link Morph} to instance. */ constructor(morph: import("./morph.js").Morph); /** * The morph with its targets, which is being instanced. * * @type {import('./morph.js').Morph} */ morph: import("./morph.js").Morph; device: import("../index.js").GraphicsDevice; _weights: any[]; _weightMap: Map; _activeTargets: any[]; shaderCache: {}; maxSubmitCount: any; _shaderMorphWeights: Float32Array; rtPositions: RenderTarget; rtNormals: RenderTarget; _textureParams: Float32Array; morphFactor: import("../index.js").ScopeId; zeroTextures: boolean; _shaderMorphWeightsA: Float32Array; _shaderMorphWeightsB: Float32Array; _activeVertexBuffers: any[]; /** * Frees video memory allocated by this object. */ destroy(): void; shader: any; texturePositions: any; textureNormals: any; /** * Clones a MorphInstance. The returned clone uses the same {@link Morph} and weights are set * to defaults. * * @returns {MorphInstance} A clone of the specified MorphInstance. */ clone(): MorphInstance; _getWeightIndex(key: any): any; /** * Gets current weight of the specified morph target. * * @param {string|number} key - An identifier for the morph target. Either the weight index or * the weight name. * @returns {number} Weight. */ getWeight(key: string | number): number; /** * Sets weight of the specified morph target. * * @param {string|number} key - An identifier for the morph target. Either the weight index or * the weight name. * @param {number} weight - Weight. */ setWeight(key: string | number, weight: number): void; _dirty: boolean; /** * Generate fragment shader to blend a number of textures using specified weights. * * @param {number} numTextures - Number of textures to blend. * @returns {string} Fragment shader. * @private */ private _getFragmentShader; /** * Create complete shader for texture based morphing. * * @param {number} count - Number of textures to blend. * @returns {import('../platform/graphics/shader.js').Shader} Shader. * @private */ private _getShader; _updateTextureRenderTarget(renderTarget: any, srcTextureName: any): void; _updateTextureMorph(): void; _updateVertexMorph(): void; /** * Selects active morph targets and prepares morph for rendering. Called automatically by * renderer. */ update(): void; } import { RenderTarget } from '../platform/graphics/render-target.js';