Small World Engine API Reference - v0.76.20
    Preparing search index...

    Class SquashStretchBehavior

    Applies a brief, volume-preserving-ish squash-and-stretch impulse to an object's scale, driven by a damped spring so it overshoots and settles back to the base scale — the classic "game feel" cue for landings, launches, and impacts.

    Hierarchy (View Summary)

    Index
    damping: number
    isActive: boolean = true
    stiffness: number
    target: CameraInterfaceData | Object3D | undefined = undefined

    The object this behavior is attached to. Set automatically.

    uuid: string = ...
    inspector?: Record<string, InspectorField>
    • Triggers a squash-and-stretch impulse.

      Parameters

      • intensity: number = 0.35

        Squash amount along Y (0 = none, 1 = fully flattened). The object stretches outward on X/Z by roughly half of that to read as volume-preserving. Default 0.35.

      Returns void