Skip to main content

EdgeProjector

Component that generates 2D edge projections from fragment model items.

Extends​

Implements​

Properties​

cullerPixelsPerMeter​

cullerPixelsPerMeter: number = 0.05

Resolution of the visibility culler in pixels per meter. Higher values = more accurate occlusion but slower culling.


farPlane​

farPlane: number = Infinity

Far clipping plane along the projection direction. Meshes whose AABB is fully "beyond" this plane (farther from the viewer) are excluded. Set to Infinity to disable.


generator​

readonly generator: any

The underlying ProjectionGenerator from three-edge-projection. You can configure angleThreshold, iterationTime, includeIntersectionEdges, and useWebGPU.


nearPlane​

nearPlane: number = -Infinity

Near clipping plane along the projection direction. Meshes whose AABB is fully "behind" this plane (closer to the viewer) are excluded. Set to -Infinity to disable.


projectionDirection​

readonly projectionDirection: Vector3

The direction the projector looks along. Meshes are projected onto the plane perpendicular to this direction. Default is top-down (plan view).

Common values:

  • Top/Plan: (0, -1, 0)
  • Front: (0, 0, -1)
  • Back: (0, 0, 1)
  • Left: (-1, 0, 0)
  • Right: (1, 0, 0)

Methods​

get()​

get(modelIdMap, world, config?): Promise <EdgeProjectionResult>

Generates 2D edge projections for the given model items.

Parameters​

ParameterTypeDescription
modelIdMapModelIdMapA map of model IDs to sets of local IDs specifying items to project.
worldWorldThe world whose renderer will be used for visibility culling.
config?objectOptional configuration.
config.onProgress?(message, progress?) => voidOptional progress callback receiving (message, progress?, collector?).

Returns​

Promise <EdgeProjectionResult>

Visible/hidden geometries with a group vertex attribute, and a groups mapping.


isConfigurable()​

isConfigurable(): this is Configurable<any, any>

Whether is component is Configurable.

Returns​

this is Configurable<any, any>

Inherited from​

Component . isConfigurable


isDisposeable()​

isDisposeable(): this is Disposable

Whether is component is Disposable.

Returns​

this is Disposable

Inherited from​

Component . isDisposeable


isHideable()​

isHideable(): this is Hideable

Whether is component is Hideable.

Returns​

this is Hideable

Inherited from​

Component . isHideable


isResizeable()​

isResizeable(): this is Resizeable

Whether is component is Resizeable.

Returns​

this is Resizeable

Inherited from​

Component . isResizeable


isSerializable()​

isSerializable(): this is Serializable<any, Record<string, any>>

Whether is component is Serializable.

Returns​

this is Serializable<any, Record<string, any>>

Inherited from​

Component . isSerializable


isUpdateable()​

isUpdateable(): this is Updateable

Whether is component is Updateable.

Returns​

this is Updateable

Inherited from​

Component . isUpdateable