WanaPlan

API Docs for: 2.7.0
Show:

StairwayComponent3D

Extends BaseComponent3D
Module: Component
Parent Module: Wanaplan

Summary

Stairway component 3D.

Constructor

StairwayComponent3D

Syntax

StairwayComponent3D

(
  • core
)

Summary

Parameters:

  • core wnp.Core

    Wanaplan.

Methods

compute

Inherited from BaseComponent3D:

Syntax

compute

() private

Summary

Recompute of the component.

createScene

Syntax

createScene

()

Summary

Creates all the stairways of the scene.

createStairway

Syntax

createStairway

(
  • stairway
  • sceneF
  • scene
)

Summary

Creates the mesh of a stairway.

Parameters:

  • stairway StairwayStructure

    The structure of the stairway.

  • sceneF BABYLON.Mesh

    The mesh of the floor.

  • scene BABYLON.Scene

    The global scene.

destroy

Inherited from BaseComponent3D:

Syntax

destroy

()

Summary

Destructor.

disable

Inherited from BaseComponent3D:

Syntax

disable

()

Summary

Disables the component

enable

Inherited from BaseComponent3D:

Syntax

enable

()

Summary

Enables the component

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.

initMaterials

Syntax

initMaterials

(
  • object3d
  • materials
)
private

Summary

Puts the material on the good mesh.

Parameters:

  • object3d BABYLON.Mesh

    The mesh of the stairway.

  • materials wnp.standardMaterial

    The materials of the stairway.

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

onFloorReady

Syntax

onFloorReady

(
  • event
)
private

Summary

When the floor is ready, we can create all the floor of the stage.

Parameters:

  • event Event

    The event with the important informations (The scene and the current structure).

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

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).