Skip to content

Commit

Permalink
Document a few things
Browse files Browse the repository at this point in the history
  • Loading branch information
Zylann committed Aug 30, 2024
1 parent 1f9938e commit 87975a9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 2 additions & 0 deletions doc/classes/VoxelGeneratorWaves.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@
</tutorials>
<members>
<member name="pattern_offset" type="Vector2" setter="set_pattern_offset" getter="get_pattern_offset" default="Vector2(0, 0)">
Offset (or phase) of the waves.
</member>
<member name="pattern_size" type="Vector2" setter="set_pattern_size" getter="get_pattern_size" default="Vector2(30, 30)">
Length of the waves. Note that this only controls length across the X and Z axes. Height is controlled by [member VoxelGeneratorHeightmap.height_start] and [member VoxelGeneratorHeightmap.height_range].
</member>
</members>
</class>
8 changes: 8 additions & 0 deletions doc/classes/VoxelGraphFunction.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
<return type="int" />
<param index="0" name="name" type="StringName" />
<description>
Finds a node with the specified name and returns its ID. If the node is not found, returns 0.
</description>
</method>
<method name="get_connections" qualifiers="const">
Expand All @@ -86,23 +87,27 @@
<return type="Vector2" />
<param index="0" name="node_id" type="int" />
<description>
Get the position of the node in the graph editor.
</description>
</method>
<method name="get_node_gui_size" qualifiers="const">
<return type="Vector2" />
<param index="0" name="node_id" type="int" />
<description>
Get the size of the node in the graph editor.
</description>
</method>
<method name="get_node_ids" qualifiers="const">
<return type="PackedInt32Array" />
<description>
Get a list of IDs of all the nodes in the graph.
</description>
</method>
<method name="get_node_name" qualifiers="const">
<return type="StringName" />
<param index="0" name="node_id" type="int" />
<description>
Gets the user-defined name of the node.
</description>
</method>
<method name="get_node_param" qualifiers="const">
Expand Down Expand Up @@ -222,6 +227,7 @@
<param index="0" name="node_id" type="int" />
<param index="1" name="size" type="Vector2" />
<description>
Sets the visual size of a node of the graph, as it will appear in the editor.
</description>
</method>
<method name="set_node_name">
Expand All @@ -238,13 +244,15 @@
<param index="1" name="param_index" type="int" />
<param index="2" name="value" type="Variant" />
<description>
Set a parameter of a node. The parameter index corresponds to the position that parameter comes in when seen in the editor.
</description>
</method>
<method name="set_node_param_null">
<return type="void" />
<param index="0" name="node_id" type="int" />
<param index="1" name="param_index" type="int" />
<description>
Set a parameter of a node to null. This method only exists to workaround an issue with Godot's UndoRedo system. Prefer using [method set_node_param].
</description>
</method>
</methods>
Expand Down
6 changes: 5 additions & 1 deletion doc/classes/VoxelInstancer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Spawns items on top of voxel surfaces.
</brief_description>
<description>
Add-on to voxel nodes, allowing to spawn elements on the surface. These elements are rendered with hardware instancing, can have collisions, and also be persistent. It must be child of a voxel node.
Add-on to voxel nodes, allowing to spawn static elements on the surface. These elements are rendered with hardware instancing, can have collisions, and also be persistent. It must be child of a voxel node.
</description>
<tutorials>
</tutorials>
Expand Down Expand Up @@ -52,16 +52,20 @@
</methods>
<members>
<member name="library" type="VoxelInstanceLibrary" setter="set_library" getter="get_library">
Library from which instances to spawn will be taken from.
</member>
<member name="up_mode" type="int" setter="set_up_mode" getter="get_up_mode" enum="VoxelInstancer.UpMode" default="0">
Where to consider the "up" direction is on the terrain when generating instances. See also [VoxelInstanceGenerator].
</member>
</members>
<constants>
<constant name="MAX_LOD" value="8">
</constant>
<constant name="UP_MODE_POSITIVE_Y" value="0" enum="UpMode">
Up is towards the positive Y axis. This is the default assumption in Godot.
</constant>
<constant name="UP_MODE_SPHERE" value="1" enum="UpMode">
Up is opposite from the direction where the terrain's origin is. May be used if your terrain is a planet for example.
</constant>
<constant name="DEBUG_DRAW_ALL_BLOCKS" value="0" enum="DebugDrawFlag">
</constant>
Expand Down

0 comments on commit 87975a9

Please sign in to comment.