effects
<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. -->
effects
<!-- 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/fx/effects.module — Toddler of Duty's crayon / clay effects (GAMEPLAY slice). Crayon "PEW!" muzzle bursts, crayon tracers, the pinecone BOOM (generated crayon starburst sprite + flying pinecone scales and leaves + a warm flash), the poop splat (glossy clay puddle with X-eyes and buzzing flies), dizzy stars over stunned toddlers and the floating TIME-OUT! label. Everything spawns under one temporary "GameplayFX" root and is ticked by M.update(dt) (called from game.match). `require("game.fx.effects")`.
V(p: any) → vector
| arg | type | description |
|---|---|---|
| p | any |
setPos(e: any, v: any) → void
| arg | type | description |
|---|---|---|
| e | any | |
| v | any |
part(parent: any, name: string, model: any, mat: any, pos: { number }, scale: { number }, euler: { number }?, shadows: boolean?) → any
A clay part: one primitive mesh child with a material, local pose and scale.
| arg | type | description |
|---|---|---|
| parent | any | |
| name | string | |
| model | any | |
| mat | any | |
| pos | { number } | |
| scale | { number } | |
| euler | { number }? | |
| shadows | boolean? |
root( ) → any
setCamera(cam: any) → void
| arg | type | description |
|---|---|---|
| cam | any |
cameraPos( ) → vector
add(ent: any, life: number, step: ((any, number) → void
| arg | type | description |
|---|---|---|
| ent | any | |
| life | number | |
| step | ((any, number |
kill(e: any) → void
| arg | type | description |
|---|---|---|
| e | any |
pop(t: number) → number
Crayon pop: overshoot in, hold, shrink away (alpha-cutout sprites can't fade).
| arg | type | description |
|---|---|---|
| t | number |
sprite(parent: any, mat: any, size: number) → any
A camera-facing crayon sprite: pivot (aimed at the camera) + a plane quad.
| arg | type | description |
|---|---|---|
| parent | any | |
| mat | any | |
| size | number |
face(piv: any) → void
| arg | type | description |
|---|---|---|
| piv | any |
update(dt: number) → void
| arg | type | description |
|---|---|---|
| dt | number |
clear( ) → void
pew(cam: any, offset: { number }?) → void
First-person PEW! burst at the stick's muzzle, parented to the camera.
| arg | type | description |
|---|---|---|
| cam | any | |
| offset | { number }? |
worldPew(pos: vector, size: number) → void
World-space PEW! burst (bots' sticks), facing the camera.
| arg | type | description |
|---|---|---|
| pos | vector | |
| size | number |
tracer(a: vector, b: vector) → void
A quick waxy-yellow crayon streak from muzzle to impact.
| arg | type | description |
|---|---|---|
| a | vector | |
| b | vector |
puff(pos: vector) → void
Small crayon puff where a shot hits the yard.
| arg | type | description |
|---|---|---|
| pos | vector |
boom(pos: vector, radius: number) → void
| arg | type | description |
|---|---|---|
| pos | vector | |
| radius | number |
splat(pos: vector, radius: number, life: number) → void
| arg | type | description |
|---|---|---|
| pos | vector | |
| radius | number | |
| life | number |
dizzy(follow: () → void
| arg | type | description |
|---|---|---|
| follow | ( |
timeoutLabel(pos: vector) → void
| arg | type | description |
|---|---|---|
| pos | vector |
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.