Class Stairs
- Inheritance
-
Node3DObjectStairs
Properties
num_step
Number of steps to include
var num_step : int = 10
Property Value
- int
Remarks
- void @num_step_setter(int value)
- int @num_step_getter
step_height
Height of each step
var step_height : float = 0.2
Property Value
- float
Remarks
- void @step_height_setter(float value)
- float @step_height_getter
step_depth
Depth of each step
var step_depth : float = 0.35
Property Value
- float
Remarks
- void @step_depth_setter(float value)
- float @step_depth_getter
step_width
Width of each step
var step_width : float = 1.0
Property Value
- float
Remarks
- void @step_width_setter(float value)
- float @step_width_getter
include_side_faces
Include sides for each step
var include_side_faces : bool = true
Property Value
- bool
Remarks
- void @include_side_faces_setter(bool value)
- bool @include_side_faces_getter
include_back_face
Include square for back of staircase
var include_back_face : bool = true
Property Value
- bool
Remarks
- void @include_back_face_setter(bool value)
- bool @include_back_face_getter
include_bottom_face
Include bottom face for staircase
var include_bottom_face : bool = false
Property Value
- bool
Remarks
- void @include_bottom_face_setter(bool value)
- bool @include_bottom_face_getter
save_mesh
Should the mesh be saved to the scene. Enabling this option saves the mesh data to the .tscn file. This will speed up loading times and allow for the mesh to be loaded instantly with the scene and not need to be re-generated every time this object is created. However, this mesh data can be qutie large and make the scene file much larger than expected. Enabled by default to allow for fast loading
var save_mesh : bool = true
Property Value
- bool
Remarks
- void @save_mesh_setter(bool value)
- bool @save_mesh_getter
texture
Texture for stairs
var texture : Texture2D
Property Value
- Texture2D
Remarks
- void @texture_setter(Texture2D value)
- Texture2D @texture_getter
_update_on_set
Debug value to control whether the mesh is updated time a value is set.
var _update_on_set : Variant = true
Property Value
- Variant
Methods
force_update_mesh
void force_update_mesh
_ready
Upon object entering the scene, build the mesh.
void _ready
_build_on_set(Variant, Variant)
Check if property has changed and update if configured.
void _build_on_set(Variant previous, Variant new)
Parameters
previousVariantnewVariant
_add_square(PackedVector3Array, Vector3, Vector3, Vector3, Vector3)
Helper method to add a square to a set of PackedVector3Array as two triangles.
void _add_square(PackedVector3Array vertices, Vector3 v1, Vector3 v2, Vector3 v3, Vector3 v4)
Parameters
verticesPackedVector3Arrayv1Vector3v2Vector3v3Vector3v4Vector3
_add_square_uv(PackedVector2Array, Vector2, Vector2, Vector2, Vector2, Vector2)
Helper method to add a square to a UV map as two triangles.
void _add_square_uv(PackedVector2Array uvs, Vector2 v1, Vector2 v2, Vector2 v3, Vector2 v4, Vector2 uv_offset)
Parameters
uvsPackedVector2Arrayv1Vector2v2Vector2v3Vector2v4Vector2uv_offsetVector2
_build_mesh
Create mesh if node is ready, cancel otherwise.
void _build_mesh