API Docs for: 2.7.3
Show:

StairwayStructure Class

Extends BaseStructure
Module: Component
Parent Module: Wanaplan

The structure of a stairway.

Constructor

StairwayStructure

()

Methods

add

(
  • propertyName
  • value
)
private

Inherited from BaseStructure:

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

(
  • parent
  • mesh
  • materialItem
)
private

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

(
  • hybrid
)
Object

Inherited from BaseStructure:

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

() Object[]

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

Returns:

Object[]:

An array containing several properties of the object.

getElementByName

(
  • name
  • collection
)
Object private

Inherited from BaseStructure:

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

(
  • collection
)
FloorStructure

Inherited from BaseStructure:

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

() BABYLON.Vector2

Gets the hopper points created by the stairway.

Returns:

BABYLON.Vector2:

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

getNormalAtPoint

(
  • index
)
BABYLON.Vector3 deprecated

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

(
  • bottomIndex
)
BABYLON.Vector3 private

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

() private

Inherited from BaseStructure:

Method called after the loading of the component

remove

(
  • structure
)

Deletes the stairway.

Parameters:

serialize

() Object

Inherited from BaseStructure:

Serializes the object (to JSON)

Returns:

Object: The serialization result, null if nothing is serialized

update

()

Inherited from BaseStructure:

Generic update method, must be overridden.

updateReferences

(
  • structure
)

Inherited from BaseStructure:

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

Boolean

Has a bearing.

Default: true

diameter

Number

The diameter of the middle of the stairway.

Default: 6

elevation

Number

The elevation of the stairway.

Default: 0

have_contremarche

Boolean

Has a riser

Default: true

height

Number

Height of the stairway.

Default: 250

id

Number

Inherited from BaseStructure:

Unique ID for the structure set up automatically

limon

Number

Has a limon.

Default: -1

materials

Object

The materials of the stairway. Nested object.

name

String

Inherited from BaseStructure:

Structure name

orientation

Boolean

The orientation of the stairway.

Default: true

points

BABYLON.Vector3

The points defining the path of the stairway.

rail_a

Boolean

Has a rail on the 'a' side.

Default: true

rail_b

Boolean

Has a rail on the 'b' side.

Default: true

room

RoomStructure

The parent room.

stair_height

Number

The stair height.

Default: 20

stair_offset

Number

The stair offset.

Default: 3

stair_thickness

Number

The stair thickness.

Default: 3

stair_width

Number

The stair width.

Default: 25

stick_spacement

Number

The stick spacement.

Default: 20

type

String

Type of the stairway (straight or spiral).

Default: "straight"

width

Number

Width of the stairway.

Default: 90