/** * MIT License * * Copyright (c) 2024 Mika Suominen * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ declare class DynamicBones { private opt; private scene; private armature; private config; private data; private dict; private objectsUpdate; private helpers; private running; private timerMs; constructor(opt?: null); /** * Get option value. * * @param {string} key Option name * @return {any} Option value */ getOptionValue(key: string | number): any; /** * Set option value. * * @param {string} key Option name * @param {any} val Option value */ setOptionValue(key: string | number, val: any): void; /** * Get dynamic bone names. * * @return {string[]} Array of bone names */ getBoneNames(): any[]; /** * Get property value for a dynamic bone. * * @param {string} name Name of the bone * @param {string} key Property name * @return {any} Property value */ getValue(name: string, key: string): any; /** * Set property value for a dynamic bone. * * @param {string} name Name of the bone * @param {string} key Property name * @param {any} val Property value */ setValue(name: string, key: string, val: any): void; /** * Get current config. * * @return {Object[]} Config. */ getConfig(): any[]; /** * Sort bones so that they get updated in optimal order. */ sortBones(): void; /** * Setup dynamic bones. * * @param {Scene} scene Scene, if helper is used * @param {Object3D} armature Armature object * @param {Object[]} config Array of configuration objects */ setup(scene: { isScene: any; }, armature: { isObject3D: any; }, config: any[]): void; /** * Animate dynamic bones. * @param {number} dt Delta time in ms. */ update(dt: number): void; /** * Add dynamic bone helpers to the scene. * * @param {boolean} all Show all or just flagged, if not set, use previous mode * @param {boolean} [keepSetting=false] If true, keep the previos all setting */ showHelpers(all?: any): void; /** * Update the positions of dynamic bone helpers. */ updateHelpers(): void; /** * Remove dynamic bone helpers. */ hideHelpers(): void; /** * Start dynamic bones. */ start(): void; /** * Stop dynamic bones and reset positions and rotations. */ stop(): void; /** * Reset local position and rotations and dispose the dynamic bones. */ dispose(): void; } export { DynamicBones };