WanaPlan

API Docs for: 2.7.0
Show:

SpiralStairwayStructure

Module: Component
Parent Module: Wanaplan

Summary

Stairway structure for the spiral stairway.

Constructor

SpiralStairwayStructure

Syntax

SpiralStairwayStructure

()

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

Inherited from StairwayStructure:

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.

computeSpiralPoints

Syntax

computeSpiralPoints

() private

Summary

Computes the points of the spiral stairway.

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

draw

Syntax

draw

(
  • ctx
  • _temp
)
private

Summary

Draws the spiral stairway.

Parameters:

  • ctx CanvasRenderingContext2D

    Context 2D of the canvas.

  • _temp BABYLON.Vector2

    The temporary position of the stairway.

getAvailableProperties

Inherited from StairwayStructure:

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

Inherited from StairwayStructure

Syntax

getHopperPoints

() BABYLON.Vector2

Summary

Gets the point of the hopper in the upper floor, induced by the stairway.

Returns:

BABYLON.Vector2:

The points of the hopper.

getNormalAtPoint

Inherited from StairwayStructure:

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

Inherited from StairwayStructure:

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

Inherited from StairwayStructure:

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

Inherited from StairwayStructure:

Syntax

bearing

Boolean

Summary

Has a bearing.

Default: true

diameter

Inherited from StairwayStructure:

Syntax

diameter

Number

Summary

The diameter of the middle of the stairway.

Default: 6

elevation

Inherited from StairwayStructure:

Syntax

elevation

Number

Summary

The elevation of the stairway.

Default: 0

have_contremarche

Inherited from StairwayStructure:

Syntax

have_contremarche

Boolean

Summary

Has a riser

Default: true

height

Inherited from StairwayStructure:

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

Inherited from StairwayStructure:

Syntax

limon

Number

Summary

Has a limon.

Default: -1

materials

Inherited from StairwayStructure:

Syntax

materials

Object

Summary

The materials of the stairway. Nested object.

name

Inherited from BaseStructure:

Syntax

name

String

Summary

Structure name

orientation

Inherited from StairwayStructure:

Syntax

orientation

Boolean

Summary

The orientation of the stairway.

Default: true

points

Inherited from StairwayStructure:

Syntax

points

BABYLON.Vector3

Summary

The points defining the path of the stairway.

rail_a

Inherited from StairwayStructure:

Syntax

rail_a

Boolean

Summary

Has a rail on the 'a' side.

Default: true

rail_b

Inherited from StairwayStructure:

Syntax

rail_b

Boolean

Summary

Has a rail on the 'b' side.

Default: true

room

Inherited from StairwayStructure:

Syntax

Summary

The parent room.

stair_height

Inherited from StairwayStructure:

Syntax

stair_height

Number

Summary

The stair height.

Default: 20

stair_offset

Inherited from StairwayStructure:

Syntax

stair_offset

Number

Summary

The stair offset.

Default: 3

stair_thickness

Inherited from StairwayStructure:

Syntax

stair_thickness

Number

Summary

The stair thickness.

Default: 3

stair_width

Inherited from StairwayStructure:

Syntax

stair_width

Number

Summary

The stair width.

Default: 25

stick_spacement

Inherited from StairwayStructure:

Syntax

stick_spacement

Number

Summary

The stick spacement.

Default: 20

type

Inherited from StairwayStructure:

Syntax

type

String

Summary

Type of the stairway (straight or spiral).

Default: "straight"

width

Inherited from StairwayStructure:

Syntax

width

Number

Summary

Width of the stairway.

Default: 90