addBehavior
Attach continuous frame-tick behaviors to 3D objects for animations like spinning, bobbing, orbiting, facing cameras, or pulsing in live scenes.
Instructions
Attach a continuous frame-tick behavior to an object. Behaviors run every frame until removed. Types: spin (rotate continuously), bob (oscillate up/down), orbit (circle around a point), lookAt (always face camera), pulse (rhythmic scale breathing).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Unique behavior id | |
| objectId | Yes | ID of the object to attach to | |
| type | Yes | Behavior type | |
| params | No | Type-specific parameters. spin: {axis:"x"|"y"|"z", speed:number(rad/s, default 1)}. bob: {axis:"x"|"y"|"z", amplitude:number(default 0.5), speed:number(default 1)}. orbit: {center:{x,y,z}, radius:number(default 2), speed:number(default 1), axis:"x"|"y"|"z"(default "y")}. lookAt: {target:"camera"|objectId}. pulse: {min:number(default 0.8), max:number(default 1.2), speed:number(default 1)}. |