import { b as FlowGraphExecutionBlockWithOutSignal } from './KHR_interactivity-VqtS29i9.esm.js';
import { R as RichTypeAny, k as RichTypeVector3 } from './declarationMapper-CZ6AxirO.esm.js';
import { f as RegisterClass } from './index-Cl9U4nB-.esm.js';
import './objectModelMapping-ghOGfUOh.esm.js';

/**
 * @experimental
 * A block that sets the angular velocity of a physics body.
 */
class FlowGraphSetAngularVelocityBlock extends FlowGraphExecutionBlockWithOutSignal {
    /**
     * Constructs a new FlowGraphSetAngularVelocityBlock.
     * @param config - optional configuration for the block
     */
    constructor(config) {
        super(config);
        this.body = this.registerDataInput("body", RichTypeAny);
        this.velocity = this.registerDataInput("velocity", RichTypeVector3);
    }
    /**
     * @internal
     */
    _execute(context, _callingSignal) {
        const physicsBody = this.body.getValue(context);
        if (!physicsBody) {
            this._reportError(context, "No physics body provided");
            this.out._activateSignal(context);
            return;
        }
        physicsBody.setAngularVelocity(this.velocity.getValue(context));
        this.out._activateSignal(context);
    }
    /**
     * @returns class name of the block.
     */
    getClassName() {
        return "FlowGraphSetAngularVelocityBlock" /* FlowGraphBlockNames.PhysicsSetAngularVelocity */;
    }
}
RegisterClass("FlowGraphSetAngularVelocityBlock" /* FlowGraphBlockNames.PhysicsSetAngularVelocity */, FlowGraphSetAngularVelocityBlock);

export { FlowGraphSetAngularVelocityBlock };
//# sourceMappingURL=flowGraphSetAngularVelocityBlock-pUBGKgAj.esm.js.map
