Fix wrong folder in API generator and updated some docs
This commit is contained in:
parent
37c7b3b209
commit
3ccf85bbdd
@ -51,6 +51,9 @@
|
||||
<members>
|
||||
<member name="atlas_size" type="int" setter="set_atlas_size" getter="get_atlas_size" default="16">
|
||||
</member>
|
||||
<member name="bake_tangents" type="bool" setter="set_bake_tangents" getter="get_bake_tangents" default="true">
|
||||
Enable this option if you need normal mapping on your voxels. If you don't need it, disabling can reduce memory usage and give a small speed boost.
|
||||
</member>
|
||||
<member name="voxel_count" type="int" setter="set_voxel_count" getter="get_voxel_count" default="0">
|
||||
</member>
|
||||
</members>
|
||||
|
@ -9,7 +9,7 @@
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="emerge_block">
|
||||
<return type="void">
|
||||
<return type="int" enum="VoxelStream.Result">
|
||||
</return>
|
||||
<argument index="0" name="out_buffer" type="VoxelBuffer">
|
||||
</argument>
|
||||
|
@ -4,6 +4,8 @@
|
||||
Helper class to easily access and modify voxels
|
||||
</brief_description>
|
||||
<description>
|
||||
Abstract interface to access and edit voxels. It allows accessing individual voxels, or doing bulk operations such as carving large chunks or copy/paste boxes.
|
||||
It's not a class to instantiate alone, you may get it from the voxel objects you want to work with.
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
@ -128,20 +130,32 @@
|
||||
</methods>
|
||||
<members>
|
||||
<member name="channel" type="int" setter="set_channel" getter="get_channel" default="0">
|
||||
Set which channel will be edited. When used on a terrain node, it will default to the first available channel, based on the stream and generator.
|
||||
</member>
|
||||
<member name="eraser_value" type="int" setter="set_eraser_value" getter="get_eraser_value" default="0">
|
||||
Sets which value will be used to erase voxels when editing the [enum VoxelBuffer.CHANNEL_TYPE] channel in [enum MODE_REMOVE] mode.
|
||||
</member>
|
||||
<member name="mode" type="int" setter="set_mode" getter="get_mode" enum="VoxelTool.Mode" default="0">
|
||||
Sets how [code]do_*[/code] functions will behave. This may vary depending on the channel.
|
||||
</member>
|
||||
<member name="sdf_scale" type="float" setter="set_sdf_scale" getter="get_sdf_scale" default="0.1">
|
||||
When working with smooth voxels, applies a scale to the signed distance field. A high scale (1 or higher) will tend to produce blocky results, and a low scale (below 1, but not too close to zero) will tend to be smoother.
|
||||
|
||||
This is related to the [enum VoxelBuffer.Depth] configuration on voxels. For 8-bit and 16-bit, there is a limited range of values the Signed Distance Field can take, and by default it is clamped to -1..1, so the gradient can only range across 2 voxels. But when LOD is used, it is better to stretch that range over a longer distance, and this is achieved by scaling SDF values.
|
||||
</member>
|
||||
<member name="value" type="int" setter="set_value" getter="get_value" default="0">
|
||||
Sets which voxel value will be used. This is not relevant when editing [enum VoxelBuffer.CHANNEL_SDF].
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
<constant name="MODE_ADD" value="0" enum="Mode">
|
||||
When editing [enum VoxelBuffer.CHANNEL_SDF], will add matter. Useful for building.
|
||||
</constant>
|
||||
<constant name="MODE_REMOVE" value="1" enum="Mode">
|
||||
When editing [enum VoxelBuffer.CHANNEL_SDF], will subtract matter. Useful for digging.
|
||||
</constant>
|
||||
<constant name="MODE_SET" value="2" enum="Mode">
|
||||
Replace voxel values without any blending. Useful for blocky voxels.
|
||||
</constant>
|
||||
</constants>
|
||||
</class>
|
||||
|
@ -141,4 +141,4 @@ enum **CellularReturnType**:
|
||||
|
||||
|
||||
|
||||
_Generated on Jan 21, 2021_
|
||||
_Generated on Jan 24, 2021_
|
||||
|
@ -71,4 +71,4 @@ enum **RotationType3D**:
|
||||
- [int](https://docs.godotengine.org/en/stable/classes/class_int.html)<span id="i_seed"></span> **seed** = 0
|
||||
|
||||
|
||||
_Generated on Jan 21, 2021_
|
||||
_Generated on Jan 24, 2021_
|
||||
|
@ -104,4 +104,4 @@ Name that can be used for convenience, when looking up a specific [Voxel](Voxel.
|
||||
|
||||
|
||||
|
||||
_Generated on Jan 21, 2021_
|
||||
_Generated on Jan 24, 2021_
|
||||
|
@ -52,4 +52,4 @@ Reads the data of a [VoxelBuffer](VoxelBuffer.md) from a [StreamPeer](https://do
|
||||
|
||||
Stores the data of a [VoxelBuffer](VoxelBuffer.md) into a [StreamPeer](https://docs.godotengine.org/en/stable/classes/class_streampeer.html). To be able to read it back, you should use the
|
||||
|
||||
_Generated on Jan 21, 2021_
|
||||
_Generated on Jan 24, 2021_
|
||||
|
@ -42,4 +42,4 @@ Given a motion vector, returns a modified vector telling you by how much to move
|
||||
|
||||
|
||||
|
||||
_Generated on Jan 21, 2021_
|
||||
_Generated on Jan 24, 2021_
|
||||
|
@ -227,4 +227,4 @@ If this [VoxelBuffer](VoxelBuffer.md) is saved, this metadata will also be saved
|
||||
|
||||
|
||||
|
||||
_Generated on Jan 21, 2021_
|
||||
_Generated on Jan 24, 2021_
|
||||
|
@ -41,4 +41,4 @@ Return | Sign
|
||||
|
||||
|
||||
|
||||
_Generated on Jan 21, 2021_
|
||||
_Generated on Jan 24, 2021_
|
||||
|
@ -21,4 +21,4 @@ Return | Signature
|
||||
|
||||
Generates a block of voxels within the specified world area.
|
||||
|
||||
_Generated on Jan 21, 2021_
|
||||
_Generated on Jan 24, 2021_
|
||||
|
@ -26,4 +26,4 @@ Type | Name | Default
|
||||
- [int](https://docs.godotengine.org/en/stable/classes/class_int.html)<span id="i_voxel_type"></span> **voxel_type** = 1
|
||||
|
||||
|
||||
_Generated on Jan 21, 2021_
|
||||
_Generated on Jan 24, 2021_
|
||||
|
@ -189,4 +189,4 @@ enum **NodeTypeID**:
|
||||
|
||||
|
||||
|
||||
_Generated on Jan 21, 2021_
|
||||
_Generated on Jan 24, 2021_
|
||||
|
@ -30,4 +30,4 @@ Type | Name | Default
|
||||
- [float](https://docs.godotengine.org/en/stable/classes/class_float.html)<span id="i_iso_scale"></span> **iso_scale** = 0.1
|
||||
|
||||
|
||||
_Generated on Jan 21, 2021_
|
||||
_Generated on Jan 24, 2021_
|
||||
|
@ -22,4 +22,4 @@ Type | Name | Default
|
||||
- [Image](https://docs.godotengine.org/en/stable/classes/class_image.html)<span id="i_image"></span> **image**
|
||||
|
||||
|
||||
_Generated on Jan 21, 2021_
|
||||
_Generated on Jan 24, 2021_
|
||||
|
@ -30,4 +30,4 @@ Type | Name | Default
|
||||
- [OpenSimplexNoise](https://docs.godotengine.org/en/stable/classes/class_opensimplexnoise.html)<span id="i_noise"></span> **noise**
|
||||
|
||||
|
||||
_Generated on Jan 21, 2021_
|
||||
_Generated on Jan 24, 2021_
|
||||
|
@ -22,4 +22,4 @@ Type | Name | Default
|
||||
- [OpenSimplexNoise](https://docs.godotengine.org/en/stable/classes/class_opensimplexnoise.html)<span id="i_noise"></span> **noise**
|
||||
|
||||
|
||||
_Generated on Jan 21, 2021_
|
||||
_Generated on Jan 24, 2021_
|
||||
|
@ -24,4 +24,4 @@ Return | Signatur
|
||||
|
||||
|
||||
|
||||
_Generated on Jan 21, 2021_
|
||||
_Generated on Jan 24, 2021_
|
||||
|
@ -26,4 +26,4 @@ Type | Name | Default
|
||||
- [Vector2](https://docs.godotengine.org/en/stable/classes/class_vector2.html)<span id="i_pattern_size"></span> **pattern_size** = Vector2( 30, 30 )
|
||||
|
||||
|
||||
_Generated on Jan 21, 2021_
|
||||
_Generated on Jan 24, 2021_
|
||||
|
@ -8,10 +8,11 @@ Inherits: [Resource](https://docs.godotengine.org/en/stable/classes/class_resour
|
||||
## Properties:
|
||||
|
||||
|
||||
Type | Name | Default
|
||||
------ | ------------------------------ | --------
|
||||
`int` | [atlas_size](#i_atlas_size) | 16
|
||||
`int` | [voxel_count](#i_voxel_count) | 0
|
||||
Type | Name | Default
|
||||
------- | ---------------------------------- | --------
|
||||
`int` | [atlas_size](#i_atlas_size) | 16
|
||||
`bool` | [bake_tangents](#i_bake_tangents) | true
|
||||
`int` | [voxel_count](#i_voxel_count) | 0
|
||||
<p></p>
|
||||
|
||||
## Methods:
|
||||
@ -35,6 +36,9 @@ Return | Signatur
|
||||
- [int](https://docs.godotengine.org/en/stable/classes/class_int.html)<span id="i_atlas_size"></span> **atlas_size** = 16
|
||||
|
||||
|
||||
- [bool](https://docs.godotengine.org/en/stable/classes/class_bool.html)<span id="i_bake_tangents"></span> **bake_tangents** = true
|
||||
Enable this option if you need normal mapping on your voxels. If you don't need it, disabling can reduce memory usage and give a small speed boost.
|
||||
|
||||
- [int](https://docs.godotengine.org/en/stable/classes/class_int.html)<span id="i_voxel_count"></span> **voxel_count** = 0
|
||||
|
||||
|
||||
@ -60,4 +64,4 @@ Return | Signatur
|
||||
|
||||
|
||||
|
||||
_Generated on Jan 21, 2021_
|
||||
_Generated on Jan 24, 2021_
|
||||
|
@ -156,4 +156,4 @@ The returned dictionary has the following structure:
|
||||
|
||||
|
||||
|
||||
_Generated on Jan 21, 2021_
|
||||
_Generated on Jan 24, 2021_
|
||||
|
@ -33,4 +33,4 @@ Gets by how much voxels must be padded before their lower corner in order for th
|
||||
|
||||
Gets by how much voxels must be padded after their upper corner in order for the mesher to work.
|
||||
|
||||
_Generated on Jan 21, 2021_
|
||||
_Generated on Jan 24, 2021_
|
||||
|
@ -30,4 +30,4 @@ Type | Name | Default
|
||||
- [bool](https://docs.godotengine.org/en/stable/classes/class_bool.html)<span id="i_occlusion_enabled"></span> **occlusion_enabled** = true
|
||||
|
||||
|
||||
_Generated on Jan 21, 2021_
|
||||
_Generated on Jan 24, 2021_
|
||||
|
@ -41,4 +41,4 @@ enum **ColorMode**:
|
||||
- [VoxelColorPalette](VoxelColorPalette.md)<span id="i_palette"></span> **palette**
|
||||
|
||||
|
||||
_Generated on Jan 21, 2021_
|
||||
_Generated on Jan 24, 2021_
|
||||
|
@ -75,4 +75,4 @@ enum **SeamMode**:
|
||||
|
||||
|
||||
|
||||
_Generated on Jan 21, 2021_
|
||||
_Generated on Jan 24, 2021_
|
||||
|
@ -19,4 +19,4 @@ Return
|
||||
|
||||
|
||||
|
||||
_Generated on Jan 21, 2021_
|
||||
_Generated on Jan 24, 2021_
|
||||
|
@ -26,4 +26,4 @@ Defines how voxels are transformed into visible meshes.
|
||||
- [VoxelStream](VoxelStream.md)<span id="i_stream"></span> **stream**
|
||||
Primary source of persistent voxel data. If left unassigned, the whole volume will use the generator.
|
||||
|
||||
_Generated on Jan 21, 2021_
|
||||
_Generated on Jan 24, 2021_
|
||||
|
@ -22,4 +22,4 @@ Integer position of the voxel that was hit.
|
||||
- [Vector3](https://docs.godotengine.org/en/stable/classes/class_vector3.html)<span id="i_previous_position"></span> **previous_position** = Vector3( 0, 0, 0 )
|
||||
Integer position of the previous voxel along the ray before the final hit.
|
||||
|
||||
_Generated on Jan 21, 2021_
|
||||
_Generated on Jan 24, 2021_
|
||||
|
@ -37,4 +37,4 @@ The returned dictionary has the following structure:
|
||||
|
||||
```
|
||||
|
||||
_Generated on Jan 21, 2021_
|
||||
_Generated on Jan 24, 2021_
|
||||
|
@ -18,7 +18,7 @@ Type | Name | Default
|
||||
|
||||
Return | Signature
|
||||
----------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
[void](#) | [emerge_block](#i_emerge_block) ( [VoxelBuffer](VoxelBuffer.md) out_buffer, [Vector3](https://docs.godotengine.org/en/stable/classes/class_vector3.html) origin_in_voxels, [int](https://docs.godotengine.org/en/stable/classes/class_int.html) lod )
|
||||
[int](https://docs.godotengine.org/en/stable/classes/class_int.html) | [emerge_block](#i_emerge_block) ( [VoxelBuffer](VoxelBuffer.md) out_buffer, [Vector3](https://docs.godotengine.org/en/stable/classes/class_vector3.html) origin_in_voxels, [int](https://docs.godotengine.org/en/stable/classes/class_int.html) lod )
|
||||
[Vector3](https://docs.godotengine.org/en/stable/classes/class_vector3.html) | [get_block_size](#i_get_block_size) ( ) const
|
||||
[int](https://docs.godotengine.org/en/stable/classes/class_int.html) | [get_used_channels_mask](#i_get_used_channels_mask) ( ) const
|
||||
[void](#) | [immerge_block](#i_immerge_block) ( [VoxelBuffer](VoxelBuffer.md) buffer, [Vector3](https://docs.godotengine.org/en/stable/classes/class_vector3.html) origin_in_voxels, [int](https://docs.godotengine.org/en/stable/classes/class_int.html) lod )
|
||||
@ -40,7 +40,7 @@ When this is enabled, if a block cannot be found in the stream and it gets gener
|
||||
|
||||
## Method Descriptions
|
||||
|
||||
- [void](#)<span id="i_emerge_block"></span> **emerge_block**( [VoxelBuffer](VoxelBuffer.md) out_buffer, [Vector3](https://docs.godotengine.org/en/stable/classes/class_vector3.html) origin_in_voxels, [int](https://docs.godotengine.org/en/stable/classes/class_int.html) lod )
|
||||
- [int](https://docs.godotengine.org/en/stable/classes/class_int.html)<span id="i_emerge_block"></span> **emerge_block**( [VoxelBuffer](VoxelBuffer.md) out_buffer, [Vector3](https://docs.godotengine.org/en/stable/classes/class_vector3.html) origin_in_voxels, [int](https://docs.godotengine.org/en/stable/classes/class_int.html) lod )
|
||||
|
||||
|
||||
|
||||
@ -56,4 +56,4 @@ When this is enabled, if a block cannot be found in the stream and it gets gener
|
||||
|
||||
|
||||
|
||||
_Generated on Jan 21, 2021_
|
||||
_Generated on Jan 24, 2021_
|
||||
|
@ -22,4 +22,4 @@ Type | Name | Default
|
||||
- [String](https://docs.godotengine.org/en/stable/classes/class_string.html)<span id="i_directory"></span> **directory** = ""
|
||||
Directory under which the data is saved.
|
||||
|
||||
_Generated on Jan 21, 2021_
|
||||
_Generated on Jan 24, 2021_
|
||||
|
@ -5,4 +5,4 @@ Inherits: [VoxelStream](VoxelStream.md)
|
||||
|
||||
|
||||
|
||||
_Generated on Jan 21, 2021_
|
||||
_Generated on Jan 24, 2021_
|
||||
|
@ -64,4 +64,4 @@ Directory under which the data is saved.
|
||||
|
||||
|
||||
|
||||
_Generated on Jan 21, 2021_
|
||||
_Generated on Jan 24, 2021_
|
||||
|
@ -29,4 +29,4 @@ Return | Signatur
|
||||
|
||||
|
||||
|
||||
_Generated on Jan 21, 2021_
|
||||
_Generated on Jan 24, 2021_
|
||||
|
@ -130,4 +130,4 @@ Note 3: saving is asynchronous and won't block the game. the save may complete o
|
||||
|
||||
Converts voxel coordinates into block coordinates.
|
||||
|
||||
_Generated on Jan 21, 2021_
|
||||
_Generated on Jan 24, 2021_
|
||||
|
@ -5,15 +5,22 @@ Inherits: [Reference](https://docs.godotengine.org/en/stable/classes/class_refer
|
||||
|
||||
Helper class to easily access and modify voxels
|
||||
|
||||
## Description:
|
||||
|
||||
Abstract interface to access and edit voxels. It allows accessing individual voxels, or doing bulk operations such as carving large chunks or copy/paste boxes.
|
||||
|
||||
It's not a class to instantiate alone, you may get it from the voxel objects you want to work with.
|
||||
|
||||
## Properties:
|
||||
|
||||
|
||||
Type | Name | Default
|
||||
------ | -------------------------------- | --------
|
||||
`int` | [channel](#i_channel) | 0
|
||||
`int` | [eraser_value](#i_eraser_value) | 0
|
||||
`int` | [mode](#i_mode) | 0
|
||||
`int` | [value](#i_value) | 0
|
||||
Type | Name | Default
|
||||
-------- | -------------------------------- | --------
|
||||
`int` | [channel](#i_channel) | 0
|
||||
`int` | [eraser_value](#i_eraser_value) | 0
|
||||
`int` | [mode](#i_mode) | 0
|
||||
`float` | [sdf_scale](#i_sdf_scale) | 0.1
|
||||
`int` | [value](#i_value) | 0
|
||||
<p></p>
|
||||
|
||||
## Methods:
|
||||
@ -39,24 +46,31 @@ Return |
|
||||
|
||||
enum **Mode**:
|
||||
|
||||
- **MODE_ADD** = **0**
|
||||
- **MODE_REMOVE** = **1**
|
||||
- **MODE_SET** = **2**
|
||||
- **MODE_ADD** = **0** --- When editing [enum VoxelBuffer.CHANNEL_SDF], will add matter. Useful for building.
|
||||
- **MODE_REMOVE** = **1** --- When editing [enum VoxelBuffer.CHANNEL_SDF], will subtract matter. Useful for digging.
|
||||
- **MODE_SET** = **2** --- Replace voxel values without any blending. Useful for blocky voxels.
|
||||
|
||||
|
||||
## Property Descriptions
|
||||
|
||||
- [int](https://docs.godotengine.org/en/stable/classes/class_int.html)<span id="i_channel"></span> **channel** = 0
|
||||
|
||||
Set which channel will be edited. When used on a terrain node, it will default to the first available channel, based on the stream and generator.
|
||||
|
||||
- [int](https://docs.godotengine.org/en/stable/classes/class_int.html)<span id="i_eraser_value"></span> **eraser_value** = 0
|
||||
|
||||
Sets which value will be used to erase voxels when editing the enum VoxelBuffer.CHANNEL_TYPE channel in enum MODE_REMOVE mode.
|
||||
|
||||
- [int](https://docs.godotengine.org/en/stable/classes/class_int.html)<span id="i_mode"></span> **mode** = 0
|
||||
Sets how `do_*` functions will behave. This may vary depending on the channel.
|
||||
|
||||
- [float](https://docs.godotengine.org/en/stable/classes/class_float.html)<span id="i_sdf_scale"></span> **sdf_scale** = 0.1
|
||||
When working with smooth voxels, applies a scale to the signed distance field. A high scale (1 or higher) will tend to produce blocky results, and a low scale (below 1, but not too close to zero) will tend to be smoother.
|
||||
|
||||
|
||||
|
||||
This is related to the enum VoxelBuffer.Depth configuration on voxels. For 8-bit and 16-bit, there is a limited range of values the Signed Distance Field can take, and by default it is clamped to -1..1, so the gradient can only range across 2 voxels. But when LOD is used, it is better to stretch that range over a longer distance, and this is achieved by scaling SDF values.
|
||||
|
||||
- [int](https://docs.godotengine.org/en/stable/classes/class_int.html)<span id="i_value"></span> **value** = 0
|
||||
|
||||
Sets which voxel value will be used. This is not relevant when editing enum VoxelBuffer.CHANNEL_SDF.
|
||||
|
||||
## Method Descriptions
|
||||
|
||||
@ -108,4 +122,4 @@ Operate on a rectangular cuboid section of the terrain. `begin` and `end` are in
|
||||
|
||||
|
||||
|
||||
_Generated on Jan 21, 2021_
|
||||
_Generated on Jan 24, 2021_
|
||||
|
@ -5,4 +5,4 @@ Inherits: [VoxelTool](VoxelTool.md)
|
||||
|
||||
|
||||
|
||||
_Generated on Jan 21, 2021_
|
||||
_Generated on Jan 24, 2021_
|
||||
|
@ -19,4 +19,4 @@ Return | Signature
|
||||
|
||||
Picks random voxels within the specified area and executes a function on them. This only works for terrains using [VoxelMesherBlocky](VoxelMesherBlocky.md). Only voxels where member Voxel.random_tickable is `true` will be picked.
|
||||
|
||||
_Generated on Jan 21, 2021_
|
||||
_Generated on Jan 24, 2021_
|
||||
|
@ -32,4 +32,4 @@ If set to `true`, the engine will generate meshes around this viewer. This may b
|
||||
- [int](https://docs.godotengine.org/en/stable/classes/class_int.html)<span id="i_view_distance"></span> **view_distance** = 128
|
||||
How far should voxels generate around this viewer.
|
||||
|
||||
_Generated on Jan 21, 2021_
|
||||
_Generated on Jan 24, 2021_
|
||||
|
@ -19,4 +19,4 @@ Return | Signatur
|
||||
|
||||
|
||||
|
||||
_Generated on Jan 21, 2021_
|
||||
_Generated on Jan 24, 2021_
|
||||
|
@ -22,7 +22,7 @@ import glob
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
SOURCES = "docs"
|
||||
SOURCES = "source"
|
||||
|
||||
|
||||
def update_classes_xml(custom_godot_path, godot_repo_root, verbose=False):
|
||||
|
Loading…
x
Reference in New Issue
Block a user