i-renderer.component overview
Table of contents
utils
IRendererComponent (class)
Signature
export declare class IRendererComponent<D, R, VTypeDoc> {
protected constructor(
public readonly scene: IVisualSceneComponent<D, R, VTypeDoc>,
public readonly canvas?: HTMLCanvasElement,
options: Partial<RendererOptions & VTypeDoc['rendererExtraOpts']> = {}
)
}
render (method)
Renders the scene.
Signature
abstract render(): void;
addToWorld (method)
Signature
abstract addToWorld(world: GgWorld<D, R, VTypeDoc>): void;
removeFromWorld (method)
Signature
abstract removeFromWorld(world: GgWorld<D, R, VTypeDoc>): void;
resizeRenderer (method)
Resizes the renderer to the specified size.
Signature
abstract resizeRenderer(newSize: Point2): void;
dispose (method)
Signature
abstract dispose(): void;
entity (property)
Signature
entity: IEntity<any, any, VisualTypeDocRepo<any, any>, PhysicsTypeDocRepo<any, any>> | null
rendererOptions (property)
Specifies the options for the renderer.
Signature
readonly rendererOptions: RendererOptions & Partial<VTypeDoc["rendererExtraOpts"]>
RendererOptions (type alias)
Represents the options that can be passed to a renderer.
Signature
export type RendererOptions = {
transparent: boolean
background: number
size: Point2 | 'fullscreen' | ((pageSize: Point2) => Point2) | Observable<Point2>
forceResolution?: number
antialias: boolean
}