gg-world overview
Table of contents
- utils
- GgWorld (class)
- init (method)
- start (method)
- pauseWorld (method)
- resumeWorld (method)
- createClock (method)
- dispose (method)
- addPrimitiveRigidBody (method)
- addEntity (method)
- removeEntity (method)
- worldClock (property)
- keyboardInput (property)
- name (property)
- children (property)
- tickListeners (property)
- tickStarted$ (property)
- tickForwardTo$ (property)
- tickForwardedTo$ (property)
- paused$ (property)
- PhysicsTypeDocRepo (type alias)
- VisualTypeDocRepo (type alias)
utils
GgWorld (class)
Signature
export declare class GgWorld<D, R, VTypeDoc, PTypeDoc, VS, PW> {
protected constructor(public readonly visualScene: VS, public readonly physicsWorld: PW)
}
init (method)
Signature
public async init()
start (method)
Signature
public start()
pauseWorld (method)
Signature
public pauseWorld()
resumeWorld (method)
Signature
public resumeWorld()
createClock (method)
Signature
public createClock(autoStart: boolean): PausableClock
dispose (method)
Signature
public dispose(): void
addPrimitiveRigidBody (method)
Signature
abstract addPrimitiveRigidBody(
descr: unknown, // type defined in subclasses
position?: D,
rotation?: R,
material?: unknown, // type defined in subclasses
): IPositionable<D, R> & IRenderableEntity<D, R, VTypeDoc>;
addEntity (method)
Signature
public addEntity(entity: IEntity): void
removeEntity (method)
Signature
public removeEntity(entity: IEntity, dispose = false): void
worldClock (property)
Signature
readonly worldClock: PausableClock
keyboardInput (property)
Signature
readonly keyboardInput: KeyboardInput
name (property)
Signature
name: string
children (property)
Signature
readonly children: IEntity<any, any, VisualTypeDocRepo<any, any>, PhysicsTypeDocRepo<any, any>>[]
tickListeners (property)
Signature
readonly tickListeners: IEntity<any, any, VisualTypeDocRepo<any, any>, PhysicsTypeDocRepo<any, any>>[]
tickStarted$ (property)
Signature
readonly tickStarted$: any
tickForwardTo$ (property)
Signature
readonly tickForwardTo$: any
tickForwardedTo$ (property)
Signature
readonly tickForwardedTo$: any
paused$ (property)
Signature
readonly paused$: any
PhysicsTypeDocRepo (type alias)
Signature
export type PhysicsTypeDocRepo<D, R> = {
factory: unknown
rigidBody: IRigidBodyComponent<D, R>
trigger: ITriggerComponent<D, R>
}
VisualTypeDocRepo (type alias)
Signature
export type VisualTypeDocRepo<D, R> = {
factory: unknown
displayObject: IDisplayObjectComponent<D, R>
renderer: IRendererComponent<D, R>
rendererExtraOpts: {}
}