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:46


passes

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

Returns

IFilter<IPass, string>[]

Implementation of

IRenderer.passes

Defined in

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


isWebGL2

get isWebGL2(): boolean

Returns

boolean

Implementation of

IRenderer.isWebGL2

Defined in

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


composerTarget

get composerTarget(): IRenderTarget

Returns

IRenderTarget

Implementation of

IRenderer.composerTarget

Defined in

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


renderSize

get renderSize(): Vector2

Returns

Vector2

Defined in

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


displayCanvasScaling

get displayCanvasScaling(): number

Returns

number

Implementation of

IRenderer.displayCanvasScaling

Defined in

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

set displayCanvasScaling(value): void

Parameters

NameType
valuenumber

Returns

void

Implementation of

IRenderer.displayCanvasScaling

Defined in

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


frameCount

get frameCount(): number

Returns

number

Implementation of

IRenderer.frameCount

Defined in

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


totalFrameCount

get totalFrameCount(): number

Returns

number

Defined in

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


pipeline

get pipeline(): string[]

Returns

string[]

Implementation of

IRenderer.pipeline

Defined in

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

set pipeline(value): void

Parameters

NameType
valuestring[]

Returns

void

Implementation of

IRenderer.pipeline

Defined in

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


context

get context(): WebGLRenderingContext

Returns

WebGLRenderingContext

Implementation of

IRenderer.context

Defined in

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


rendererObject

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

Returns

WebGLRenderer & { outputColorSpace: ColorSpace }

Implementation of

IRenderer.rendererObject

Defined in

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


clock

get clock(): Clock

Returns

Clock

Defined in

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


useLegacyLights

get useLegacyLights(): boolean

Returns

boolean

Defined in

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

set useLegacyLights(v): void

Parameters

NameType
vboolean

Returns

void

Defined in

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


useTotalFrameCount

get useTotalFrameCount(): boolean

deprecated use {@see stableNoise} instead

Returns

boolean

Defined in

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

set useTotalFrameCount(v): void

deprecated use {@see stableNoise} instead

Parameters

NameType
vboolean

Returns

void

Defined in

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


renderScale

get renderScale(): number

Returns

number

Defined in

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

set renderScale(value): void

Parameters

NameType
valuenumber

Returns

void

Defined in

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

Properties

dirty

dirty: boolean = true

Implementation of

IRenderer.dirty

Defined in

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


frameWaitTime

frameWaitTime: number = 0

Defined in

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


maxTempPerKey

Readonly maxTempPerKey: 5

Defined in

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


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:600

Methods

refreshPipeline

refreshPipeline(): string[]

Returns

string[]

Implementation of

IRenderer.refreshPipeline

Defined in

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


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:182


unregisterPass

unregisterPass(pass): void

Parameters

NameType
passIFilter<IPass, string>

Returns

void

Implementation of

IRenderer.unregisterPass

Defined in

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


setSize

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

Parameters

NameTypeDefault value
width?numberundefined
height?numberundefined
forcebooleanfalse

Returns

void

Defined in

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


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:304


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:340


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:356


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:360


render

render(renderToScreen?): void

Parameters

NameTypeDefault value
renderToScreenbooleantrue

Returns

void

Defined in

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


updateDirty

updateDirty(): void

Returns

void

Defined in

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


reset

reset(): void

Returns

void

Implementation of

IRenderer.reset

Defined in

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


resetShadows

resetShadows(): void

Returns

void

Implementation of

IRenderer.resetShadows

Defined in

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


refreshPasses

refreshPasses(): void

Returns

void

Defined in

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


dispose

dispose(): void

Returns

void

Defined in

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


trackTarget

trackTarget(target): void

Parameters

NameType
targetIRenderTarget

Returns

void

Implementation of

IRenderer.trackTarget

Defined in

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


removeTrackedTarget

removeTrackedTarget(target): void

Parameters

NameType
targetIRenderTarget

Returns

void

Implementation of

IRenderer.removeTrackedTarget

Defined in

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


createTarget

createTarget(__namedParameters?, trackTarget?): IRenderTarget

Parameters

NameTypeDefault value
__namedParametersCreateRenderTargetOptions{}
trackTargetbooleantrue

Returns

IRenderTarget

Implementation of

IRenderer.createTarget

Defined in

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


disposeTarget

disposeTarget(target): void

Parameters

NameType
targetIRenderTarget

Returns

void

Implementation of

IRenderer.disposeTarget

Defined in

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


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:479


getTempTarget

getTempTarget(op?): IRenderTarget

Parameters

NameType
opCreateRenderTargetOptions

Returns

IRenderTarget

Implementation of

IRenderer.getTempTarget

Defined in

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


releaseTempTarget

releaseTempTarget(target): void

Parameters

NameType
targetIRenderTarget

Returns

void

Implementation of

IRenderer.releaseTempTarget

Defined in

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


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:601


renderTargetToDataUrl

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

Parameters

NameTypeDefault value
targetWebGLRenderTargetundefined
mimeTypestring'image/png'
qualitynumber90

Returns

string

Defined in

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


renderTargetToBuffer

renderTargetToBuffer(target): Uint8Array | Uint16Array

Parameters

NameType
targetWebGLRenderTarget

Returns

Uint8Array | Uint16Array

Defined in

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

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:204