Strata - v1.4.10
    Preparing search index...

    Interface DestructibleProps

    Props for the Destructible component.

    interface DestructibleProps {
        children?: ReactNode;
        config?: Partial<DestructibleConfig>;
        onBreak?: () => void;
        onDamage?: (remainingHealth: number) => void;
        position?: [number, number, number];
        size?: [number, number, number];
    }
    Index

    Properties

    children?: ReactNode

    Child components (the visual representation of the intact object).

    config?: Partial<DestructibleConfig>

    Configuration for health, debris count, and explosion forces.

    onBreak?: () => void

    Callback fired when the object is fully destroyed.

    onDamage?: (remainingHealth: number) => void

    Callback fired whenever the object takes damage.

    position?: [number, number, number]

    Initial position. Default: [0, 0, 0].

    size?: [number, number, number]

    Overall size of the destructible object. Default: [1, 1, 1].