Class: BaseRenderer
Core-API.BaseRenderer
Hierarchy
SimpleEventDispatcher
<"animationLoop"
|"update"
|"resize"
|"contextLost"
|"contextRestored"
>↳
BaseRenderer
Implements
Accessors
composer
• get
composer(): EffectComposer2
Returns
Implementation of
Defined in
webgi/src/core/threejs/BaseRenderer.ts:48
passes
• get
passes(): IFilter
<IPass
, string
>[]
Returns
Implementation of
Defined in
webgi/src/core/threejs/BaseRenderer.ts:52
isWebGL2
• get
isWebGL2(): boolean
Returns
boolean
Implementation of
Defined in
webgi/src/core/threejs/BaseRenderer.ts:56
composerTarget
• get
composerTarget(): IRenderTarget
Returns
Implementation of
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
Name | Type |
---|---|
value | number |
Returns
void
Implementation of
IRenderer.displayCanvasScaling
Defined in
webgi/src/core/threejs/BaseRenderer.ts:77
frameCount
• get
frameCount(): number
Returns
number
Implementation of
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
Defined in
webgi/src/core/threejs/BaseRenderer.ts:99
• set
pipeline(value
): void
Parameters
Name | Type |
---|---|
value | string [] |
Returns
void
Implementation of
Defined in
webgi/src/core/threejs/BaseRenderer.ts:94
context
• get
context(): WebGLRenderingContext
Returns
WebGLRenderingContext
Implementation of
Defined in
webgi/src/core/threejs/BaseRenderer.ts:161
rendererObject
• get
rendererObject(): WebGLRenderer
& { outputColorSpace
: ColorSpace
}
Returns
WebGLRenderer
& { outputColorSpace
: ColorSpace
}
Implementation of
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
Name | Type |
---|---|
v | boolean |
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
Name | Type |
---|---|
v | boolean |
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
Name | Type |
---|---|
value | number |
Returns
void
Defined in
webgi/src/core/threejs/BaseRenderer.ts:765
Properties
dirty
• dirty: boolean
= true
Implementation of
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
Defined in
webgi/src/core/threejs/BaseRenderer.ts:103
registerPass
▸ registerPass(pass
, replaceId?
): void
Parameters
Name | Type | Default value |
---|---|---|
pass | IFilter <IPass , string > | undefined |
replaceId | boolean | true |
Returns
void
Implementation of
Defined in
webgi/src/core/threejs/BaseRenderer.ts:196
unregisterPass
▸ unregisterPass(pass
): void
Parameters
Name | Type |
---|---|
pass | IFilter <IPass , string > |
Returns
void
Implementation of
Defined in
webgi/src/core/threejs/BaseRenderer.ts:208
setSize
▸ setSize(width?
, height?
, force?
): void
Parameters
Name | Type | Default value |
---|---|---|
width? | number | undefined |
height? | number | undefined |
force | boolean | false |
Returns
void
Defined in
webgi/src/core/threejs/BaseRenderer.ts:291
blit
▸ blit(source
, destination
, __namedParameters?
): void
Parameters
Name | Type |
---|---|
source | undefined | ITexture <any > |
destination | undefined | IRenderTarget |
__namedParameters | IRenderOptions |
Returns
void
Implementation of
Defined in
webgi/src/core/threejs/BaseRenderer.ts:325
clearColor
▸ clearColor(__namedParameters
): void
Parameters
Name | Type |
---|---|
__namedParameters | Object |
__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
Defined in
webgi/src/core/threejs/BaseRenderer.ts:367
renderModel
▸ renderModel(model
, camera
): void
Parameters
Name | Type |
---|---|
model | IModel <any > |
camera | ICamera <ICameraOptions , any , any > |
Returns
void
Implementation of
Defined in
webgi/src/core/threejs/BaseRenderer.ts:394
renderScene
▸ renderScene(scene
): void
Parameters
Name | Type |
---|---|
scene | IScene <any , ICamera <ICameraOptions , any , any >> |
Returns
void
Implementation of
Defined in
webgi/src/core/threejs/BaseRenderer.ts:398
render
▸ render(renderToScreen?
): void
Parameters
Name | Type |
---|---|
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
Defined in
webgi/src/core/threejs/BaseRenderer.ts:437
resetShadows
▸ resetShadows(): void
Returns
void
Implementation of
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
Name | Type |
---|---|
target | IRenderTarget |
Returns
void
Implementation of
Defined in
webgi/src/core/threejs/BaseRenderer.ts:472
removeTrackedTarget
▸ removeTrackedTarget(target
): void
Parameters
Name | Type |
---|---|
target | IRenderTarget |
Returns
void
Implementation of
Defined in
webgi/src/core/threejs/BaseRenderer.ts:476
createTarget
▸ createTarget(__namedParameters?
, trackTarget?
): IRenderTarget
Parameters
Name | Type | Default value |
---|---|---|
__namedParameters | CreateRenderTargetOptions | {} |
trackTarget | boolean | true |
Returns
Implementation of
Defined in
webgi/src/core/threejs/BaseRenderer.ts:482
disposeTarget
▸ disposeTarget(target
): void
Parameters
Name | Type |
---|---|
target | IRenderTarget |
Returns
void
Implementation of
Defined in
webgi/src/core/threejs/BaseRenderer.ts:527
createTargetCustom
▸ createTargetCustom<T
>(__namedParameters
, options?
, clazz?
): T
Type parameters
Name | Type |
---|---|
T | extends IRenderTarget <T > |
Parameters
Name | Type |
---|---|
__namedParameters | Object |
__namedParameters.width | number |
__namedParameters.height | number |
__namedParameters.count? | number |
options | WebGLRenderTargetOptions |
clazz? | Class <T > |
Returns
T
Implementation of
Defined in
webgi/src/core/threejs/BaseRenderer.ts:534
getTempTarget
▸ getTempTarget(op?
): IRenderTarget
Parameters
Name | Type |
---|---|
op | CreateRenderTargetOptions |
Returns
Implementation of
Defined in
webgi/src/core/threejs/BaseRenderer.ts:622
releaseTempTarget
▸ releaseTempTarget(target
): void
Parameters
Name | Type |
---|---|
target | IRenderTarget |
Returns
void
Implementation of
Defined in
webgi/src/core/threejs/BaseRenderer.ts:645
updateShaderProperties
▸ updateShaderProperties(material
): BaseRenderer
Parameters
Name | Type |
---|---|
material | Object |
material.defines | Record <string , undefined | string | number > |
material.uniforms | Object |
Returns
Implementation of
IRenderer.updateShaderProperties
Defined in
webgi/src/core/threejs/BaseRenderer.ts:665
renderTargetToDataUrl
▸ renderTargetToDataUrl(target
, mimeType?
, quality?
, textureIndex?
): string
Parameters
Name | Type | Default value |
---|---|---|
target | WebGLMultipleRenderTargets | WebGLRenderTarget | undefined |
mimeType | string | 'image/png' |
quality | number | 90 |
textureIndex | number | 0 |
Returns
string
Defined in
webgi/src/core/threejs/BaseRenderer.ts:691
renderTargetToBuffer
▸ renderTargetToBuffer(target
, textureIndex?
): Uint8Array
| Uint16Array
Parameters
Name | Type | Default value |
---|---|---|
target | WebGLMultipleRenderTargets | WebGLRenderTarget | undefined |
textureIndex | number | 0 |
Returns
Uint8Array
| Uint16Array
Defined in
webgi/src/core/threejs/BaseRenderer.ts:725
Constructors
constructor
• new BaseRenderer(__namedParameters
)
Parameters
Name | Type |
---|---|
__namedParameters | Object |
__namedParameters.animationLoop? | (ev : any ) => void |
__namedParameters.antialias? | boolean |
__namedParameters.alpha? | boolean |
__namedParameters.canvas | HTMLCanvasElement |
__namedParameters.targetOptions | CreateRenderTargetOptions |
Overrides
SimpleEventDispatcher<'animationLoop' | 'update' | 'resize' | 'contextLost' | 'contextRestored'\>.constructor