Reference·JavaScript · @bimworks/viewer3dJavaScript

MovablePlane

Class in @bimworks/viewer3d.

API catalogue · @bimworks/viewer3d · Class

TypeScript#
class MovablePlane

A plane with a drag icon that does not cut anything: the user drags it along its normal (left button on the icon or the rectangle), the middle button on the icon removes it. Coordinates are render space: millimetres, globalBaseTranslation included.

Members#

Member Kind Description
constructor Method
coordinate Property A point on the plane, render space mm; do not modify, use setCoordinate/setOffset
id Property
normal Property Unit normal
offset Property dot(coordinate, normal): the plane's position along its normal
addListener Method
remove Method
removeListener Method
setCoordinate Method Moves the plane to a point (the normal stays); fires "moveEnd"
setOffset Method Moves the plane along its normal so that offset becomes the given value; fires "moveEnd"

constructor#

TypeScript#
constructor()

coordinate#

TypeScript#
readonly coordinate: Float32Array

A point on the plane, render space mm; do not modify, use setCoordinate/setOffset

id#

TypeScript#
readonly id: number

normal#

TypeScript#
readonly normal: Float32Array

Unit normal

offset#

TypeScript#
readonly offset: number

dot(coordinate, normal): the plane's position along its normal

addListener#

TypeScript#
addListener(listener: (event: MovablePlaneEvent) => void): (event: MovablePlaneEvent) => void

Parameters#

Name Type Description
listener (event: MovablePlaneEvent) => void

remove#

TypeScript#
remove(): void

removeListener#

TypeScript#
removeListener(listener: (event: MovablePlaneEvent) => void): void

Parameters#

Name Type Description
listener (event: MovablePlaneEvent) => void

setCoordinate#

TypeScript#
setCoordinate(coordinate: (number)[] | Float32Array<ArrayBuffer>): void

Moves the plane to a point (the normal stays); fires "moveEnd"

Parameters#

Name Type Description
coordinate (number)[] | Float32Array<ArrayBuffer>

setOffset#

TypeScript#
setOffset(offset: number): void

Moves the plane along its normal so that offset becomes the given value; fires "moveEnd"

Parameters#

Name Type Description
offset number