five-on-it / apps/client/src/renderer/gunfire / Gunfire
Interface: Gunfire
Defined in: apps/client/src/renderer/gunfire.ts:162
The gunfire of a scene.
Methods
events()
events(
events,entities,seen,me):void
Defined in: apps/client/src/renderer/gunfire.ts:181
A snapshot's shots, blasts and hits that the camera sees (seen), as entities (the snapshot's) stand: the shots of the player me are skipped (drawn at the trigger).
Parameters
events
readonly GameEvent[]
entities
readonly EntitySnapshot[]
seen
(ev) => boolean
me
number
Returns
void
fire()
fire(
holder,origin,yaw,pitch,weapon,first,exclude):void
Defined in: apps/client/src/renderer/gunfire.ts:168
The player's own shot, at the trigger: from origin (the simulation's, over the shooter's centre) along yaw and pitch, its first pellet first as the local world traced it (its others traced here, exclude kept out), drawn from holder's muzzle.
Parameters
holder
Holder | undefined
origin
yaw
number
pitch
number
weapon
number
first
exclude
RigidBody | undefined
Returns
void