bear
<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this component provides and who consumes it, then delete both comment lines. -->
bear
<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this component provides and who consumes it, then delete both comment lines. -->TODO: describe this component.
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2strict
approach(v: number, goal: number, step: number) → number
| arg | type | description |
|---|---|---|
| v | number | |
| goal | number | |
| step | number |
fireLit( ) → boolean
inBuilding(x: number, z: number) → boolean
Inside any station building's footprint (a small margin past the walls).
| arg | type | description |
|---|---|---|
| x | number | |
| z | number |
buildingLocal(b: ?, x: number, z: number) → void
Both points in the building's own frame, and whether the segment between them crosses its footprint grown by `margin`.
| arg | type | description |
|---|---|---|
| b | ? | |
| x | number | |
| z | number |
crossesBuilding(ax: number, az: number, bx: number, bz: number, b: ?, margin: number) → boolean
| arg | type | description |
|---|---|---|
| ax | number | |
| az | number | |
| bx | number | |
| bz | number | |
| b | ? | |
| margin | number |
nextWaypoint(bx: number, bz: number, tx: number, tz: number) → void
The point to walk toward next on the way to (tx, tz): the target itself when the straight line is clear, otherwise the corner of the first building in the way that makes the shortest detour.
| arg | type | description |
|---|---|---|
| bx | number | |
| bz | number | |
| tx | number | |
| tz | number |
nearestAvatar(bx: number, bz: number) → void
The nearest player's avatar, whoever owns it.
| arg | type | description |
|---|---|---|
| bx | number | |
| bz | number |
lineOfSight(bx: number, bz: number, av: ?) → boolean
Nothing solid between the bear's eyes and the player's chest.
| arg | type | description |
|---|---|---|
| bx | number | |
| bz | number | |
| av | ? |
setMode(m: string) → void
| arg | type | description |
|---|---|---|
| m | string |
ensureBody( ) → Body
source(name: string, clip: ?, looping: boolean, volume: number, maxDistance: number) → void
the voice of the bear, heard from wherever it stands
| arg | type | description |
|---|---|---|
| name | string | |
| clip | ? | |
| looping | boolean | |
| volume | number | |
| maxDistance | number |
steer(dt: number, bx: number, bz: number, tx: number, tz: number, maxSpeed: number, turn: number) → void
Turn toward (tx, tz) at `turn` rad/s and walk at up to `maxSpeed`; the step is capped so a charge lands on the player instead of passing through.
| arg | type | description |
|---|---|---|
| dt | number | |
| bx | number | |
| bz | number | |
| tx | number | |
| tz | number | |
| maxSpeed | number | |
| turn | number |
halt(dt: number) → void
| arg | type | description |
|---|---|---|
| dt | number |
think(dt: number) → void
| arg | type | description |
|---|---|---|
| dt | number |
reflect(dt: number) → void
| arg | type | description |
|---|---|---|
| dt | number |
awake( ) → void
update(dt: number) → void
| arg | type | description |
|---|---|---|
| dt | number |
onDestroy( ) → void
Sub-parts
Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.
Showing up to 3 levels deep. Open a part to see what it holds further down.
Problems
Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.
agent_score is exposed.+ quality × 0.35
+ performance × 0.25
± compat factor
Usability ratings
Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".
Scoped to this part · feeds back into the world's score.