Skip to main content

@novorender/api / RenderStateOutlines

Interface: RenderStateOutlines

Defined in: @novorender/src/core3d/state/index.ts:755

Outline related render state.

Remarks

Enabling this feature will render the intersection of geometry surface with the specified plane as lines. This is particularly useful when in orthographic mode on surfaces that are perfectly perpendicular to the image plane. These surfaces would otherwise be invisible and unpickable.

Due to limitations of WebGL2, outline rendering comes as at potentially significant performance and memory cost. Thus, is may be unavailable on weaker devices and should be used sparingly otherwise.

Properties

breakingPointAngleThreshold

readonly breakingPointAngleThreshold: number;

Defined in: @novorender/src/core3d/state/index.ts:818

Minimum angle to create breaking points from outlines in degrees


enabled

readonly enabled: boolean;

Defined in: @novorender/src/core3d/state/index.ts:767

Whether to do outline rendering.


hidden

readonly hidden: boolean;

Defined in: @novorender/src/core3d/state/index.ts:764

Hide outline on screen, it can still be used for measurement


intersectionOffsets

readonly intersectionOffsets: undefined | number[];

Defined in: @novorender/src/core3d/state/index.ts:778

Plane intersection with triangles will also be checked at those offsets. In meters. Used for laser to hit the surfaces which are very close to the plane, but not exactly intersect it.

Default

undefined

linearThickness

readonly linearThickness: number;

Defined in: @novorender/src/core3d/state/index.ts:772

Outline thickness, in meters.

Default

0.01

lineColor

readonly lineColor: RGB;

Defined in: @novorender/src/core3d/state/index.ts:805

Color of outline lines.

Remarks

Due to tone mapping the color displayed on screen will a bit duller. If you require bright colors, you may "overexpose" them, e.g. [10,0,0] for bright red.


maxPixelThickness

readonly maxPixelThickness: number;

Defined in: @novorender/src/core3d/state/index.ts:788

Outline maximum thickness, in pixels.

Default

9

minPixelThickness

readonly minPixelThickness: number;

Defined in: @novorender/src/core3d/state/index.ts:783

Outline minimum thickness, in pixels.

Default

3

planes

readonly planes: ReadonlyVec4[];

Defined in: @novorender/src/core3d/state/index.ts:815

The outline intersection plane.


relativePointSize

readonly relativePointSize: number;

Defined in: @novorender/src/core3d/state/index.ts:793

Outline relative size between lines and points.

Default

2

vertexColor

readonly vertexColor: RGB;

Defined in: @novorender/src/core3d/state/index.ts:812

Color of outline vertices.

Remarks

Due to tone mapping the color displayed on screen will a bit duller. If you require bright colors, you may "overexpose" them, e.g. [10,0,0] for bright red.


vertexObjectIdBase

readonly vertexObjectIdBase: number;

Defined in: @novorender/src/core3d/state/index.ts:798

Outline vertex base object id value.

Default

0x7000_0000