Skip to main content

WebGL API

NovoRender.RenderOutput

Properties​

hasViewChanged​

• Readonly hasViewChanged: boolean


renderSettings​

• Readonly renderSettings: RenderSettings

The settings for this render.

Remarks

These are a copy of the view rendersettings at the time of the render. Some values may have been modified to reflect computations, such as effective resolution.


statistics​

• Readonly statistics: PerformanceStatistics

The statisics for this render.


viewClipMatrix​

• Readonly viewClipMatrix: ReadonlyMat4


viewWorldMatrix​

• Readonly viewWorldMatrix: ReadonlyMat4


worldViewMatrix​

• Readonly worldViewMatrix: ReadonlyMat4

Methods​

applyPostEffect​

â–¸ applyPostEffect(params): Promise<boolean | void>

Parameters​

NameType
paramsPostEffectParams

Returns​

Promise<boolean | void>

â–¸ applyPostEffect(params): Promise<boolean | void>

Apply post effect to output image.

Parameters​

NameTypeDescription
paramsPostEffectParamsPost effect type and related parameters.

Returns​

Promise<boolean | void>


getImage​

â–¸ getImage(): Promise<ImageBitmap>

Returns​

Promise<ImageBitmap>

â–¸ getImage(): Promise<ImageBitmap>

Get rendered image.

Returns​

Promise<ImageBitmap>

Remarks

Please note that this function only works/makes sense if you did not specify your own canvas in createView! It is intended for retrieving the rendered image from the OffscreenCanvas created on browsers that supports it. In this case,the Image is tranferred to the calling worker and no longer available for post effects, etc.


hasChanged​

â–¸ hasChanged(): Promise<RenderChanges>

Check if there are any changes since this render.

Returns​

Promise<RenderChanges>


isIdleFrame​

â–¸ isIdleFrame(): boolean

Returns true if this is an idle frame, delayed after camera movement

Returns​

boolean


measure​

â–¸ measure(x, y): Promise<MeasureInfo>

Get MeasureInfo of nearest object (if any) at the specified pixel coordinate. updatePickBuffers() must be called on view to get updated pick information

Parameters​

NameTypeDescription
xnumberview x coordinate (0=left)
ynumberview y coordinate (0=top)

Returns​

Promise<MeasureInfo>

undefined if no object intersection was found.

â–¸ measure(x, y): Promise<MeasureInfo>

Get MeasureInfo of nearest object (if any) at the specified pixel coordinate.

Parameters​

NameTypeDescription
xnumberview x coordinate (0=left) in css pixels.
ynumberview y coordinate (0=top) in css pixels.

Returns​

Promise<MeasureInfo>

undefined if no object intersection was found.

Remarks

X and Y coordinates are relative to the display size. If you set this using clientWidth and clientHeight, you can use the x and y coordinates from html events directly, as everything is in css pixels. If you multiplied size with devicePixelRatio, you must also multiply this with mouse event coordinates to get physical pixels, not css pixels.


pick​

â–¸ pick(x, y): Promise<PickInfo>

Pick nearest object (if any) at the specified pixel coordinate. updatePickBuffers() must be called on view to get updated pick information

Parameters​

NameTypeDescription
xnumberview x coordinate (0=left)
ynumberview y coordinate (0=top)

Returns​

Promise<PickInfo>

undefined if no object intersection was found.

â–¸ pick(x, y, pickCameraPlane?): Promise<PickInfo>

Pick nearest object (if any) at the specified pixel coordinate.

Parameters​

NameTypeDefault valueDescription
xnumberundefinedview x coordinate (0=left) in css pixels.
ynumberundefinedview y coordinate (0=top) in css pixels.
pickCameraPlanebooleanfalse-

Returns​

Promise<PickInfo>

undefined if no object intersection was found.

Remarks

X and Y coordinates are relative to the display size. If you set this using clientWidth and clientHeight, you can use the x and y coordinates from html events directly, as everything is in css pixels. If you multiplied size with devicePixelRatio, you must also multiply this with mouse event coordinates to get physical pixels, not css pixels.