player
<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. -->
player
<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. -->TODO: describe this module.
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2game.player — PLAYER / TOOLS SLICE of "Church is on Fire". Interface (spec.md): init(), setActive(on), update(dt), currentTool() -> string?, shutdown() What it does, all at runtime (the Arsonist prototype is plan-owned): * finds the local player (layers.localPlayer.avatar) and its camera (CameraRig clone), hides the humanoid body from its own camera (Camera.renderLayers "all !Player"), sets eye height Rules.EYE_HEIGHT on the first_person behaviour, keeps the body inside Rules.PLAY_RADIUS and on env.groundHeight. Walking itself is the humanoid's CharacterController (WASD / left stick / on-screen stick via the default map). * builds a gloved hand (procedural, materials under game/player/materials) as a child of the camera, holding the current tool: lit match (flickering flame + point light), jack-o'-lantern oil lantern (glowing face, inner light, iron bail), birch-bark kindling. * game/player/arsonist.inputMap: useTool, toolMatch/Lantern/Kindling, nextTool, prevTool, toolScroll, cinematic, endRound (keyboard, gamepad, touch). * aiming: ray vs Rules.state.parts AABBs (+ renderer.raycast / env.groundHeight for surfaces). Writes Rules.state.aim = { tool, canUse, target, dist, pos } for the HUD reticle, outlines the targeted part, shows a glowing aim mark, and a throw arc for the lantern. * use: match -> ignite on the touched part; lantern -> thrown on a ballistic arc, ignite at its landing point (splash + burning oil); kindling -> placed at the aimed spot, long burn. Each decrements Rules.state.tools, emits 'ignite' then 'toolUsed'. * End key -> request 'end'. Cinematic orbit toggle while burning; slow dolly on results.
loadMats( ) → void
M(name: string) → any
| arg | type | description |
|---|---|---|
| name | string |
alive(e: any) → boolean
| arg | type | description |
|---|---|---|
| e | any |
piece(parent: any, name: string, model: string, mat: string, pos: { number }, scale: { number }, euler: { number }?) → any
| arg | type | description |
|---|---|---|
| parent | any | |
| name | string | |
| model | string | |
| mat | string | |
| pos | { number } | |
| scale | { number } | |
| euler | { number }? |
node(parent: any, name: string, pos: { number }?, euler: { number }?) → any
| arg | type | description |
|---|---|---|
| parent | any | |
| name | string | |
| pos | { number }? | |
| euler | { number }? |
pointLight(parent: any, name: string, pos: { number }, color: { number }, intensity: number, radius: number) → any
| arg | type | description |
|---|---|---|
| parent | any | |
| name | string | |
| pos | { number } | |
| color | { number } | |
| intensity | number | |
| radius | number |
hash(i: number) → number
deterministic little hash noise for variety in procedural props
| arg | type | description |
|---|---|---|
| i | number |
buildMatch(parent: any) → any
procedural props (stand-ins for generated meshes; see slots in the report)
| arg | type | description |
|---|---|---|
| parent | any |
buildLantern(parent: any, withLight: boolean) → any
| arg | type | description |
|---|---|---|
| parent | any | |
| withLight | boolean |
buildKindling(parent: any) → any
| arg | type | description |
|---|---|---|
| parent | any |
buildHand(parent: any) → any
A right hand in a worn leather glove, curled into a pinching fist. Hand-local frame matches the camera: +X right, +Y up, -Z forward. The wrist/sleeve run back (+Z).
| arg | type | description |
|---|---|---|
| parent | any |
fxRoot( ) → any
binding to the live player
fpComp( ) → any
setBehavior(fp: boolean) → void
| arg | type | description |
|---|---|---|
| fp | boolean |
tryBind( ) → boolean
count(tool: string) → number
tools
| arg | type | description |
|---|---|---|
| tool | string |
currentTool( ) → string
pickAvailable( ) → void
refreshHand( ) → void
select(tool: string) → void
| arg | type | description |
|---|---|---|
| tool | string |
cycle(dir: number) → void
| arg | type | description |
|---|---|---|
| dir | number |
camBasis( ) → void
aiming
rayParts(o: { number }, d: { number }, maxT: number) → void
ray vs part AABBs: nearest t in [0, maxT]
| arg | type | description |
|---|---|---|
| o | { number } | |
| d | { number } | |
| maxT | number |
groundAt(x: number, z: number) → number
| arg | type | description |
|---|---|---|
| x | number | |
| z | number |
rayGround(o: { number }, d: { number }, maxT: number) → number
| arg | type | description |
|---|---|---|
| o | { number } | |
| d | { number } | |
| maxT | number |
at(o: ?, d: ?, t: ?) → void
| arg | type | description |
|---|---|---|
| o | ? | |
| d | ? | |
| t | ? |
setOutline(part: any, on: boolean) → void
| arg | type | description |
|---|---|---|
| part | any | |
| on | boolean |
lanternLaunch( ) → void
stepFlight(p: ?, v: ?, dt: ?) → void
| arg | type | description |
|---|---|---|
| p | ? | |
| v | ? | |
| dt | ? |
computeAim( ) → void
ensureMarks( ) → void
showMarks(aim: ?) → void
| arg | type | description |
|---|---|---|
| aim | ? |
spend(tool: string) → void
using a tool
| arg | type | description |
|---|---|---|
| tool | string |
landLantern(pos: { number }) → void
| arg | type | description |
|---|---|---|
| pos | { number } |
use( ) → boolean
churchFrame( ) → void
camera modes
quatLook(from: { number }, to: { number }) → void
| arg | type | description |
|---|---|---|
| from | { number } | |
| to | { number } |
setCamMode(mode: string) → void
| arg | type | description |
|---|---|---|
| mode | string |
cameraMode( ) → string return P
driveCinematic(dt: number) → void
| arg | type | description |
|---|---|---|
| dt | number |
activateInput( ) → void
input
deactivateInput( ) → void
toggleCinematic( ) → void
clearFx( ) → void
interface
init( ) → void
respawn( ) → void
setActive(on: boolean) → void
| arg | type | description |
|---|---|---|
| on | boolean |
animateHand(dt: number) → void
| arg | type | description |
|---|---|---|
| dt | number |
keepInBounds( ) → void
updateProjectiles(dt: number) → void
| arg | type | description |
|---|---|---|
| dt | number |
update(dt: number) → void
| arg | type | description |
|---|---|---|
| dt | number |
shutdown( ) → 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.