API Docs for: 2.7.3
Show:

WallComponent3D Class

Extends BaseComponent3D
Module: Component
Parent Module: Wanaplan

3D Walls management.

Constructor

WallComponent3D

()

Methods

compute

() private

Inherited from BaseComponent3D:

Recompute of the component.

decorate

(
  • material
  • collisionInfo
)
BABYLON.Material private

Decoration function. Cannot be used except by the decoration component.

Parameters:

  • material BABYLON.Material

    New material.

  • collisionInfo BABYLON.PickingInfo

    Picking info for the decoration.

Returns:

BABYLON.Material:

The former material.

destroy

()

Inherited from BaseComponent3D:

Destructor.

disable

()

Inherited from BaseComponent3D:

Disables the component

draw

(
  • structure
)
BABYLON.Mesh private

Draw all the walls for a floor

Parameters:

Returns:

BABYLON.Mesh:

The built mesh.

enable

()

Inherited from BaseComponent3D:

Enables the component

get3DWallFrom2D

(
  • structure
)
BABYLON.Mesh

Returns a 3D mesh corresponding to a 2D wall structure.

Parameters:

Returns:

BABYLON.Mesh:

A wall mesh. Be careful, all wall meshes for 1 floor are merged together.

getFloor

(
  • [structure]
)
BABYLON.Mesh

Inherited from BaseComponent3D:

Gets the 3D mesh of the floor structure in parameter (by default current floor).

Parameters:

Returns:

BABYLON.Mesh:

The floor mesh in 3D.

initialize

()

Inherited from BaseComponent3D:

Method called when Wanaplan is initialized. You don't need to call this method manually.

onContextChanged

(
  • context
)

Inherited from BaseComponent3D:

Method called when the context is switched (2D -> 3D or 3D -> 2D)

Parameters:

  • context String

    The new context

replaceWall

(
  • oldWall
  • newWall
)
private

Replaces one wall mesh with another, copying important data along.
The old wall mesh is disposed during the process.
Used mainly by the CSG operations.

Parameters:

  • oldWall BABYLON.Mesh

    Old wall.

  • newWall BABYLON.Mesh

    New wall.

startListening

()

Inherited from BaseComponent3D:

Calls all the event listeners.

stopListening

()

Inherited from BaseComponent3D:

Removes all the event listeners.

update

(
  • deltaTime
)

Inherited from BaseComponent3D:

Updates the dynamic part of the component.

Parameters:

  • deltaTime Number
    The time interval.

Properties

_defaultMaterial

BABYLON.StandardMaterial

Default wall material.

Default: wnp.WhiteMaterial

keyboardManager

wnp.KeyboardManager

Inherited from BaseComponent3D:

Instance of the Keyboard Manager (shortcut to wanaplan.keyboardManager).

name

String

Inherited from BaseComponent3D:

Name of the component.

structure

wnp.Structure

Inherited from BaseComponent3D:

Instance of the structure (shortcut to wanaplan.structure).

Events

wnp.engine3D.wallsReady

Fired when all 3D wall meshes are ready.