Skip to main content

Class: BaseRenderer

Core-API.BaseRenderer

Hierarchy

  • SimpleEventDispatcher<"animationLoop" | "update" | "resize" | "contextLost" | "contextRestored">

    BaseRenderer

Implements

Accessors

composer

get composer(): EffectComposer2

Returns

EffectComposer2

Implementation of

IRenderer.composer

Defined in

webgi/src/core/threejs/BaseRenderer.ts:48


passes

get passes(): IFilter<IPass, string>[]

Returns

IFilter<IPass, string>[]

Implementation of

IRenderer.passes

Defined in

webgi/src/core/threejs/BaseRenderer.ts:52


isWebGL2

get isWebGL2(): boolean

Returns

boolean

Implementation of

IRenderer.isWebGL2

Defined in

webgi/src/core/threejs/BaseRenderer.ts:56


composerTarget

get composerTarget(): IRenderTarget

Returns

IRenderTarget

Implementation of

IRenderer.composerTarget

Defined in

webgi/src/core/threejs/BaseRenderer.ts:60


renderSize

get renderSize(): Vector2

Returns

Vector2

Defined in

webgi/src/core/threejs/BaseRenderer.ts:67


displayCanvasScaling

get displayCanvasScaling(): number

Returns

number

Implementation of

IRenderer.displayCanvasScaling

Defined in

webgi/src/core/threejs/BaseRenderer.ts:73

set displayCanvasScaling(value): void

Parameters

NameType
valuenumber

Returns

void

Implementation of

IRenderer.displayCanvasScaling

Defined in

webgi/src/core/threejs/BaseRenderer.ts:77


frameCount

get frameCount(): number

Returns

number

Implementation of

IRenderer.frameCount

Defined in

webgi/src/core/threejs/BaseRenderer.ts:86


totalFrameCount

get totalFrameCount(): number

Returns

number

Defined in

webgi/src/core/threejs/BaseRenderer.ts:90


pipeline

get pipeline(): string[]

Returns

string[]

Implementation of

IRenderer.pipeline

Defined in

webgi/src/core/threejs/BaseRenderer.ts:99

set pipeline(value): void

Parameters

NameType
valuestring[]

Returns

void

Implementation of

IRenderer.pipeline

Defined in

webgi/src/core/threejs/BaseRenderer.ts:94


context

get context(): WebGLRenderingContext

Returns

WebGLRenderingContext

Implementation of

IRenderer.context

Defined in

webgi/src/core/threejs/BaseRenderer.ts:161


rendererObject

get rendererObject(): WebGLRenderer & { outputColorSpace: ColorSpace }

Returns

WebGLRenderer & { outputColorSpace: ColorSpace }

Implementation of

IRenderer.rendererObject

Defined in

webgi/src/core/threejs/BaseRenderer.ts:165


clock

get clock(): Clock

Returns

Clock

Defined in

webgi/src/core/threejs/BaseRenderer.ts:192


useLegacyLights

get useLegacyLights(): boolean

Returns

boolean

Defined in

webgi/src/core/threejs/BaseRenderer.ts:735

set useLegacyLights(v): void

Parameters

NameType
vboolean

Returns

void

Defined in

webgi/src/core/threejs/BaseRenderer.ts:739


useTotalFrameCount

get useTotalFrameCount(): boolean

deprecated use {@see stableNoise} instead

Returns

boolean

Defined in

webgi/src/core/threejs/BaseRenderer.ts:748

set useTotalFrameCount(v): void

deprecated use stableNoise instead

Parameters

NameType
vboolean

Returns

void

Defined in

webgi/src/core/threejs/BaseRenderer.ts:756


renderScale

get renderScale(): number

Returns

number

Defined in

webgi/src/core/threejs/BaseRenderer.ts:761

set renderScale(value): void

Parameters

NameType
valuenumber

Returns

void

Defined in

webgi/src/core/threejs/BaseRenderer.ts:765

Properties

dirty

dirty: boolean = true

Implementation of

IRenderer.dirty

Defined in

webgi/src/core/threejs/BaseRenderer.ts:84


frameWaitTime

frameWaitTime: number = 0

Defined in

webgi/src/core/threejs/BaseRenderer.ts:171


defaultRenderToScreen

defaultRenderToScreen: boolean = true

Default value for renderToScreen in render

Defined in

webgi/src/core/threejs/BaseRenderer.ts:412


maxTempPerKey

Readonly maxTempPerKey: 5

Defined in

webgi/src/core/threejs/BaseRenderer.ts:643


stableNoise

stableNoise: boolean = false

Use total frame count, if this is set to true, then frameCount won't be reset when the viewer is set to dirty. Which will generate different random numbers for each frame during postprocessing steps. With TAA set properly, this will give a smoother result.

Defined in

webgi/src/core/threejs/BaseRenderer.ts:663

Methods

refreshPipeline

refreshPipeline(): string[]

Returns

string[]

Implementation of

IRenderer.refreshPipeline

Defined in

webgi/src/core/threejs/BaseRenderer.ts:103


registerPass

registerPass(pass, replaceId?): void

Parameters

NameTypeDefault value
passIFilter<IPass, string>undefined
replaceIdbooleantrue

Returns

void

Implementation of

IRenderer.registerPass

Defined in

webgi/src/core/threejs/BaseRenderer.ts:196


unregisterPass

unregisterPass(pass): void

Parameters

NameType
passIFilter<IPass, string>

Returns

void

Implementation of

IRenderer.unregisterPass

Defined in

webgi/src/core/threejs/BaseRenderer.ts:208


setSize

setSize(width?, height?, force?): void

Parameters

NameTypeDefault value
width?numberundefined
height?numberundefined
forcebooleanfalse

Returns

void

Defined in

webgi/src/core/threejs/BaseRenderer.ts:291


blit

blit(source, destination, __namedParameters?): void

Parameters

NameType
sourceundefined | ITexture<any>
destinationundefined | IRenderTarget
__namedParametersIRenderOptions

Returns

void

Implementation of

IRenderer.blit

Defined in

webgi/src/core/threejs/BaseRenderer.ts:325


clearColor

clearColor(__namedParameters): void

Parameters

NameType
__namedParametersObject
__namedParameters.r?number
__namedParameters.g?number
__namedParameters.b?number
__namedParameters.a?number
__namedParameters.target?IRenderTarget
__namedParameters.depth?boolean
__namedParameters.stencil?boolean

Returns

void

Implementation of

IRenderer.clearColor

Defined in

webgi/src/core/threejs/BaseRenderer.ts:367


renderModel

renderModel(model, camera): void

Parameters

NameType
modelIModel<any>
cameraICamera<ICameraOptions, any, any>

Returns

void

Implementation of

IRenderer.renderModel

Defined in

webgi/src/core/threejs/BaseRenderer.ts:394


renderScene

renderScene(scene): void

Parameters

NameType
sceneIScene<any, ICamera<ICameraOptions, any, any>>

Returns

void

Implementation of

IRenderer.renderScene

Defined in

webgi/src/core/threejs/BaseRenderer.ts:398


render

render(renderToScreen?): void

Parameters

NameType
renderToScreen?boolean

Returns

void

Defined in

webgi/src/core/threejs/BaseRenderer.ts:414


updateDirty

updateDirty(): void

Returns

void

Defined in

webgi/src/core/threejs/BaseRenderer.ts:433


reset

reset(): void

Returns

void

Implementation of

IRenderer.reset

Defined in

webgi/src/core/threejs/BaseRenderer.ts:437


resetShadows

resetShadows(): void

Returns

void

Implementation of

IRenderer.resetShadows

Defined in

webgi/src/core/threejs/BaseRenderer.ts:443


refreshPasses

refreshPasses(): void

Returns

void

Defined in

webgi/src/core/threejs/BaseRenderer.ts:447


dispose

dispose(): void

Returns

void

Defined in

webgi/src/core/threejs/BaseRenderer.ts:464


trackTarget

trackTarget(target): void

Parameters

NameType
targetIRenderTarget

Returns

void

Implementation of

IRenderer.trackTarget

Defined in

webgi/src/core/threejs/BaseRenderer.ts:472


removeTrackedTarget

removeTrackedTarget(target): void

Parameters

NameType
targetIRenderTarget

Returns

void

Implementation of

IRenderer.removeTrackedTarget

Defined in

webgi/src/core/threejs/BaseRenderer.ts:476


createTarget

createTarget(__namedParameters?, trackTarget?): IRenderTarget

Parameters

NameTypeDefault value
__namedParametersCreateRenderTargetOptions{}
trackTargetbooleantrue

Returns

IRenderTarget

Implementation of

IRenderer.createTarget

Defined in

webgi/src/core/threejs/BaseRenderer.ts:482


disposeTarget

disposeTarget(target): void

Parameters

NameType
targetIRenderTarget

Returns

void

Implementation of

IRenderer.disposeTarget

Defined in

webgi/src/core/threejs/BaseRenderer.ts:527


createTargetCustom

createTargetCustom<T>(__namedParameters, options?, clazz?): T

Type parameters

NameType
Textends IRenderTarget<T>

Parameters

NameType
__namedParametersObject
__namedParameters.widthnumber
__namedParameters.heightnumber
__namedParameters.count?number
optionsWebGLRenderTargetOptions
clazz?Class<T>

Returns

T

Implementation of

IRenderer.createTargetCustom

Defined in

webgi/src/core/threejs/BaseRenderer.ts:534


getTempTarget

getTempTarget(op?): IRenderTarget

Parameters

NameType
opCreateRenderTargetOptions

Returns

IRenderTarget

Implementation of

IRenderer.getTempTarget

Defined in

webgi/src/core/threejs/BaseRenderer.ts:622


releaseTempTarget

releaseTempTarget(target): void

Parameters

NameType
targetIRenderTarget

Returns

void

Implementation of

IRenderer.releaseTempTarget

Defined in

webgi/src/core/threejs/BaseRenderer.ts:645


updateShaderProperties

updateShaderProperties(material): BaseRenderer

Parameters

NameType
materialObject
material.definesRecord<string, undefined | string | number>
material.uniformsObject

Returns

BaseRenderer

Implementation of

IRenderer.updateShaderProperties

Defined in

webgi/src/core/threejs/BaseRenderer.ts:665


renderTargetToDataUrl

renderTargetToDataUrl(target, mimeType?, quality?, textureIndex?): string

Parameters

NameTypeDefault value
targetWebGLMultipleRenderTargets | WebGLRenderTargetundefined
mimeTypestring'image/png'
qualitynumber90
textureIndexnumber0

Returns

string

Defined in

webgi/src/core/threejs/BaseRenderer.ts:691


renderTargetToBuffer

renderTargetToBuffer(target, textureIndex?): Uint8Array | Uint16Array

Parameters

NameTypeDefault value
targetWebGLMultipleRenderTargets | WebGLRenderTargetundefined
textureIndexnumber0

Returns

Uint8Array | Uint16Array

Defined in

webgi/src/core/threejs/BaseRenderer.ts:725

Constructors

constructor

new BaseRenderer(__namedParameters)

Parameters

NameType
__namedParametersObject
__namedParameters.animationLoop?(ev: any) => void
__namedParameters.antialias?boolean
__namedParameters.alpha?boolean
__namedParameters.canvasHTMLCanvasElement
__namedParameters.targetOptionsCreateRenderTargetOptions

Overrides

SimpleEventDispatcher<'animationLoop' | 'update' | 'resize' | 'contextLost' | 'contextRestored'\>.constructor

Defined in

webgi/src/core/threejs/BaseRenderer.ts:218