FirstPersonPresentation
@zylem/game-lib / behavior / FirstPersonPresentation
Class: FirstPersonPresentation
Defined in: node_modules/.pnpm/@zylem+behaviors@0.8.9_@types+react@19.3.0_react@19.3.0_three@0.185.1/node_modules/@zylem/behaviors/dist/first-person.d.ts:108
Presentation system driven by runtime pose + snapshot reads.
Constructors
Constructor
new FirstPersonPresentation():
FirstPersonPresentation
Returns
FirstPersonPresentation
Methods
destroy()
destroy():
void
Defined in: node_modules/.pnpm/@zylem+behaviors@0.8.9_@types+react@19.3.0_react@19.3.0_three@0.185.1/node_modules/@zylem/behaviors/dist/first-person.d.ts:133
Cleanup
Returns
void
hasPerspective()
hasPerspective(
entityUuid):boolean
Defined in: node_modules/.pnpm/@zylem+behaviors@0.8.9_@types+react@19.3.0_react@19.3.0_three@0.185.1/node_modules/@zylem/behaviors/dist/first-person.d.ts:116
Parameters
entityUuid
string
Returns
boolean
hasViewmodel()
hasViewmodel(
entityUuid):boolean
Defined in: node_modules/.pnpm/@zylem+behaviors@0.8.9_@types+react@19.3.0_react@19.3.0_three@0.185.1/node_modules/@zylem/behaviors/dist/first-person.d.ts:122
Parameters
entityUuid
string
Returns
boolean
setPerspective()
setPerspective(
entityUuid,perspective):void
Defined in: node_modules/.pnpm/@zylem+behaviors@0.8.9_@types+react@19.3.0_react@19.3.0_three@0.185.1/node_modules/@zylem/behaviors/dist/first-person.d.ts:115
Associate a FirstPersonPerspective with an entity (by uuid). Called once by the descriptor system when the behavior is initialized.
Parameters
entityUuid
string
perspective
FirstPersonPerspective
Returns
void
setViewmodel()
setViewmodel(
entityUuid,config):void
Defined in: node_modules/.pnpm/@zylem+behaviors@0.8.9_@types+react@19.3.0_react@19.3.0_three@0.185.1/node_modules/@zylem/behaviors/dist/first-person.d.ts:121
Attach a viewmodel (weapon/item) to an entity. The viewmodel entity's group will be positioned relative to the camera each frame.
Parameters
entityUuid
string
config
Returns
void
syncEntity()
syncEntity(
entityUuid,runtime,handle,movement,state):void
Defined in: node_modules/.pnpm/@zylem+behaviors@0.8.9_@types+react@19.3.0_react@19.3.0_three@0.185.1/node_modules/@zylem/behaviors/dist/first-person.d.ts:126
Sync camera + viewmodel for one entity from the runtime state.
Parameters
entityUuid
string
runtime
handle
number
movement
state
FirstPersonStateComponent | undefined
Returns
void