import { SkeletonModifier } from './skeleton_modifier.js';

/**
 * Post-processor wrapper for spring physics systems.
 *
 * Integrates spring-based physics simulation into the skeleton post-processing pipeline.
 * The spring system is updated each frame and results are blended with the base animation.
 *
 * @deprecated Use the new {@link JointDynamicsModifier} class instead.
 *
 * @public
 */ class SpringModifier extends SkeletonModifier {
    _springSystem;
    _weight;
    /**
   * Create a spring post-processor.
   *
   * @param springSystem - The spring system to integrate
   * @param weight - Blend weight [0-1] (default: 1.0)
   */ constructor(springSystem, weight = 1.0){
        super();
        this._weight = weight;
        this._springSystem = springSystem;
    }
    /**
   * Get the spring system.
   */ get springSystem() {
        return this._springSystem;
    }
    /**
   * Apply spring physics to skeleton joints.
   */ apply(_skeleton, deltaTime) {
        if (!this._enabled || this._weight <= 0) {
            return;
        }
        // Update spring physics simulation
        this._springSystem.update(deltaTime);
        // Apply results to scene nodes with blending
        this._springSystem.applyToNodes(this._weight);
    }
    /**
   * Reset the spring system to initial state.
   */ reset() {
        this._springSystem.reset();
    }
    /**
   * Get the blend weight for this processor.
   * @returns The current blend weight (0-1)
   */ _getWeight() {
        return this._weight;
    }
    /**
   * Set the blend weight for this processor.
   * @param value - New blend weight (0-1)
   */ _setWeight(value) {
        this._weight = Math.max(0, Math.min(1, value));
    }
}

export { SpringModifier };
//# sourceMappingURL=spring_modifier.js.map
