WanaPlan

API Docs for: 2.7.0
Show:

StairwayStructure

Extends BaseStructure
Module: Component
Parent Module: Wanaplan

Summary

The structure of a stairway.

Constructor

StairwayStructure

Syntax

StairwayStructure

()

Summary

Methods

add

Inherited from BaseStructure:

Syntax

add

(
  • propertyName
  • value
)
private

Summary

Adds an element to the collection in parameter.

Parameters:

  • propertyName String
    Name of the dictionnary.
  • value Object
    Value to distribute.

Returns:

Returns true if the value is added else returns false.

addMaterial

Syntax

addMaterial

(
  • parent
  • mesh
  • materialItem
)
private

Summary

Adds a material.

Parameters:

  • parent BABYLON.Mesh

    The parent of the mesh.

  • mesh BABYLON.Mesh

    The stairway mesh.

  • materialItem wnp.StandardMaterial

    The item material.

deserialize

Inherited from BaseStructure:

Syntax

deserialize

(
  • hybrid
)
Object

Summary

Deserializes the object (from JSON).

Parameters:

  • hybrid Object

    JSON describing the object, built with the method serialize.

Returns:

Object:

The Structure object built from the deserialization

getAvailableProperties

Syntax

getAvailableProperties

() Object[]

Summary

Gets the available properties of the object (user-customizable).

Returns:

Object[]:

An array containing several properties of the object.

getElementByName

Inherited from BaseStructure:

Syntax

getElementByName

(
  • name
  • collection
)
Object private

Summary

Gets an element of the collection by its name.

Parameters:

  • name String
    The name of the element to search.
  • collection String
    The name of the collection in which we want to search. If this parameter is not defined, the search is done in all the collection of type array.

Returns:

Object:
Returns the needed element if it exists, else returns null.

getFloor

Inherited from BaseStructure:

Syntax

getFloor

(
  • collection
)
FloorStructure

Summary

Gets the floor referencing this object

Parameters:

  • collection String

    Collection to search within.

Returns:

FloorStructure:

The floor containing this structure, -1 if the object has not been added to any floor collection.

getHopperPoints

Syntax

getHopperPoints

() BABYLON.Vector2

Summary

Gets the hopper points created by the stairway.

Returns:

BABYLON.Vector2:

The four points of the hopper carved in the upper floor.

getNormalAtPoint

Syntax

getNormalAtPoint

(
  • index
)
BABYLON.Vector3 deprecated

Summary

Gets the normal at the given index point.

Parameters:

  • index Number

    The index of the point.

Returns:

BABYLON.Vector3:

The normal at the point.

getStepBoundPoints

Syntax

getStepBoundPoints

(
  • bottomIndex
)
BABYLON.Vector3 private

Summary

Returns the 4 points of the step.

Parameters:

  • bottomIndex Number

    The index of the bottom point of the step.

Returns:

BABYLON.Vector3:

The four points of a step.

initialize

Inherited from BaseStructure:

Syntax

initialize

() private

Summary

Method called after the loading of the component

remove

Syntax

remove

(
  • structure
)

Summary

Deletes the stairway.

Parameters:

serialize

Inherited from BaseStructure:

Syntax

serialize

() Object

Summary

Serializes the object (to JSON)

Returns:

Object:
The serialization result, null if nothing is serialized

update

Inherited from BaseStructure:

Syntax

update

()

Summary

Generic update method, must be overridden.

updateReferences

Inherited from BaseStructure:

Syntax

updateReferences

(
  • structure
)

Summary

Generic method for rebuilding references after the deserialization. For example : restoring the link between a PointStructure and its parent WallStructure

Parameters:

  • structure wnp.Structure

    Floor Structure to work with

Properties

bearing

Syntax

bearing

Boolean

Summary

Has a bearing.

Default: true

diameter

Syntax

diameter

Number

Summary

The diameter of the middle of the stairway.

Default: 6

elevation

Syntax

elevation

Number

Summary

The elevation of the stairway.

Default: 0

have_contremarche

Syntax

have_contremarche

Boolean

Summary

Has a riser

Default: true

height

Syntax

height

Number

Summary

Height of the stairway.

Default: 250

id

Inherited from BaseStructure:

Syntax

id

Number

Summary

Unique ID for the structure set up automatically

limon

Syntax

limon

Number

Summary

Has a limon.

Default: -1

materials

Syntax

materials

Object

Summary

The materials of the stairway. Nested object.

name

Inherited from BaseStructure:

Syntax

name

String

Summary

Structure name

orientation

Syntax

orientation

Boolean

Summary

The orientation of the stairway.

Default: true

points

Syntax

points

BABYLON.Vector3

Summary

The points defining the path of the stairway.

rail_a

Syntax

rail_a

Boolean

Summary

Has a rail on the 'a' side.

Default: true

rail_b

Syntax

rail_b

Boolean

Summary

Has a rail on the 'b' side.

Default: true

room

Syntax

Summary

The parent room.

stair_height

Syntax

stair_height

Number

Summary

The stair height.

Default: 20

stair_offset

Syntax

stair_offset

Number

Summary

The stair offset.

Default: 3

stair_thickness

Syntax

stair_thickness

Number

Summary

The stair thickness.

Default: 3

stair_width

Syntax

stair_width

Number

Summary

The stair width.

Default: 25

stick_spacement

Syntax

stick_spacement

Number

Summary

The stick spacement.

Default: 20

type

Syntax

type

String

Summary

Type of the stairway (straight or spiral).

Default: "straight"

width

Syntax

width

Number

Summary

Width of the stairway.

Default: 90