Skip to content

viewListener beta ​

Function of @v12-engine/client/common

ts
export declare function viewListener<T>(event: EventKey<T>, run: (payload: T, client: GameClientApi) => void): ViewListener;

Typed help for writing one: viewListener(invaderThrough, ({ x, z }, client) => client.camera.shake(x, z, 0.6))