PointComponent2D Class
Class managing the 2D wall points.
Constructor
PointComponent2D
-
core
Parameters:
-
core
CoreThe main engine.
Item Index
Methods
Properties
Methods
destroy
()
disable
()
drawAngle
-
ctx
-
translation
-
zoom
Draws the angle between the two parent walls of a point.
Parameters:
-
ctx
CanvasRenderingContext2D2D canvas context.
-
translation
BABYLON.vector2The canvas translation.
-
zoom
NumberThe canvas zoom.
enable
()
getTargeted
-
vector
Parameters:
-
vector
VectorA position, usually the cursor's one.
Returns:
The targeted element, or null if nothing is found.
initialize
()
onContextChanged
-
context
Parameters:
-
context
StringThe new context
onDoubleClick
-
event
-
target
-
mstate
-
data
Called when the mouse double clicks on a point.
Parameters:
-
event
EventThe JS event.
-
target
PointStructureThe point structure dragged by the mouse.
-
mstate
ObjectThe state of the mouse.
-
data
ObjectData used for drawing. Can be null or something else if you wish to override the function.
onDragEnd
-
event
-
target
-
mstate
-
data
Called when the mouse releases the point.
Parameters:
-
event
EventThe JS event.
-
target
PointStructureThe point structure dragged by the mouse.
-
mstate
ObjectThe state of the mouse.
-
data
ObjectData used for drawing. Can be null or something else if you wish to override the function.
onDragging
-
event
-
target
-
mstate
-
data
Called when the mouse is dragging the point.
Parameters:
-
event
EventThe JS event.
-
target
PointStructureThe point structure dragged by the mouse.
-
mstate
ObjectThe state of the mouse.
-
data
ObjectData used for drawing. Can be null or something else if you wish to override the function.
onDragStart
-
event
-
target
-
mstate
-
data
Called when the mouse starts dragging a point.
Parameters:
-
event
EventThe JS event.
-
target
PointStructureThe point structure dragged by the mouse.
-
mstate
ObjectThe state of the mouse.
-
data
ObjectData used for drawing. Can be null or something else if you wish to override the function.
onHover
-
event
-
target
-
mstate
-
data
Called when the mouse hovers over a point.
Parameters:
-
event
EventThe JS event.
-
target
PointStructureThe point structure dragged by the mouse.
-
mstate
ObjectThe state of the mouse.
-
data
ObjectData used for drawing. Can be null or something else if you wish to override the function.
onLeave
-
event
-
target
-
mstate
-
data
Called when the mouse leaves the point.
Parameters:
-
event
EventThe JS event.
-
target
PointStructureThe point structure dragged by the mouse.
-
mstate
ObjectThe state of the mouse.
-
data
ObjectData used for drawing. Can be null or something else if you wish to override the function.
startListening
()
stopListening
()
tryMergeAttachAll
-
[force]
Processes all points which have the needsUpdate
flag set to true.
This method tries to merge points or attach them to surrounding walls.
Parameters:
-
[force]
Boolean optionalForces the update of all points.