WanaPlan

API Docs for: 2.7.0
Show:

WallComponent3D

Extends BaseComponent3D
Module: Component
Parent Module: Wanaplan

Summary

3D Walls management.

Constructor

WallComponent3D

Syntax

WallComponent3D

()

Summary

Methods

compute

Inherited from BaseComponent3D:

Syntax

compute

() private

Summary

Recompute of the component.

decorate

Syntax

decorate

(
  • material
  • collisionInfo
)
BABYLON.Material private

Summary

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:

Syntax

destroy

()

Summary

Destructor.

disable

Inherited from BaseComponent3D:

Syntax

disable

()

Summary

Disables the component

draw

Syntax

draw

(
  • structure
)
BABYLON.Mesh private

Summary

Draw all the walls for a floor

Parameters:

Returns:

BABYLON.Mesh:

The built mesh.

enable

Inherited from BaseComponent3D:

Syntax

enable

()

Summary

Enables the component

get3DWallFrom2D

Syntax

get3DWallFrom2D

(
  • structure
)
BABYLON.Mesh

Summary

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

Inherited from BaseComponent3D:

Syntax

getFloor

(
  • [structure]
)
BABYLON.Mesh

Summary

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:

Syntax

initialize

()

Summary

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

onContextChanged

Inherited from BaseComponent3D:

Syntax

onContextChanged

(
  • context
)

Summary

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

Parameters:

  • context String

    The new context

replaceWall

Syntax

replaceWall

(
  • oldWall
  • newWall
)
private

Summary

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:

Syntax

startListening

()

Summary

Calls all the event listeners.

stopListening

Inherited from BaseComponent3D:

Syntax

stopListening

()

Summary

Removes all the event listeners.

update

Inherited from BaseComponent3D:

Syntax

update

(
  • deltaTime
)

Summary

Updates the dynamic part of the component.

Parameters:

  • deltaTime Number
    The time interval.

Properties

_defaultMaterial

Syntax

_defaultMaterial

BABYLON.StandardMaterial

Summary

Default wall material.

Default: wnp.WhiteMaterial

keyboardManager

Inherited from BaseComponent3D:

Syntax

keyboardManager

wnp.KeyboardManager

Summary

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

name

Inherited from BaseComponent3D:

Syntax

name

String

Summary

Name of the component.

structure

Inherited from BaseComponent3D:

Syntax

structure

wnp.Structure

Summary

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

Events

wnp.engine3D.wallsReady

Syntax

wnp.engine3D.wallsReady

Summary

Fired when all 3D wall meshes are ready.