Updated Markdown API
This commit is contained in:
parent
1f6eec17fb
commit
66f070096c
@ -58,6 +58,7 @@ nav:
|
||||
- api/VoxelStream.md
|
||||
- api/VoxelStreamBlockFiles.md
|
||||
- api/VoxelStreamRegionFiles.md
|
||||
- api/VoxelStreamSQLite.md
|
||||
- api/VoxelStreamScript.md
|
||||
- api/VoxelTerrain.md
|
||||
- api/VoxelTool.md
|
||||
|
@ -3,7 +3,7 @@
|
||||
Inherits: [Resource](https://docs.godotengine.org/en/stable/classes/class_resource.html)
|
||||
|
||||
|
||||
Generates coherent and fractal noise using the FastNoiseLite library.
|
||||
Generates coherent and fractal noise using the [url=https://github.com/Auburn/FastNoise](https://docs.godotengine.org/en/stable/classes/class_url=https://github.com/auburn/fastnoise.html)FastNoiseLite[/url](https://docs.godotengine.org/en/stable/classes/class_/url.html) library.
|
||||
|
||||
## Properties:
|
||||
|
||||
@ -128,17 +128,13 @@ enum **CellularReturnType**:
|
||||
- [float](https://docs.godotengine.org/en/stable/classes/class_float.html)<span id="i_get_noise_2d"></span> **get_noise_2d**( [float](https://docs.godotengine.org/en/stable/classes/class_float.html) x, [float](https://docs.godotengine.org/en/stable/classes/class_float.html) y )
|
||||
|
||||
|
||||
|
||||
- [float](https://docs.godotengine.org/en/stable/classes/class_float.html)<span id="i_get_noise_2dv"></span> **get_noise_2dv**( [Vector2](https://docs.godotengine.org/en/stable/classes/class_vector2.html) position )
|
||||
|
||||
|
||||
|
||||
- [float](https://docs.godotengine.org/en/stable/classes/class_float.html)<span id="i_get_noise_3d"></span> **get_noise_3d**( [float](https://docs.godotengine.org/en/stable/classes/class_float.html) x, [float](https://docs.godotengine.org/en/stable/classes/class_float.html) y, [float](https://docs.godotengine.org/en/stable/classes/class_float.html) z )
|
||||
|
||||
|
||||
|
||||
- [float](https://docs.godotengine.org/en/stable/classes/class_float.html)<span id="i_get_noise_3dv"></span> **get_noise_3dv**( [Vector3](https://docs.godotengine.org/en/stable/classes/class_vector3.html) position )
|
||||
|
||||
|
||||
|
||||
_Generated on Jan 24, 2021_
|
||||
_Generated on Feb 16, 2021_
|
||||
|
@ -3,7 +3,7 @@
|
||||
Inherits: [Resource](https://docs.godotengine.org/en/stable/classes/class_resource.html)
|
||||
|
||||
|
||||
Generates coherent and fractal noise gradients using the FastNoiseLite library.
|
||||
Generates coherent and fractal noise gradients using the [url=https://github.com/Auburn/FastNoise](https://docs.godotengine.org/en/stable/classes/class_url=https://github.com/auburn/fastnoise.html)FastNoiseLite[/url](https://docs.godotengine.org/en/stable/classes/class_/url.html) library.
|
||||
|
||||
## Properties:
|
||||
|
||||
@ -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 24, 2021_
|
||||
_Generated on Feb 16, 2021_
|
||||
|
@ -76,9 +76,11 @@ enum **Side**:
|
||||
|
||||
|
||||
- [int](https://docs.godotengine.org/en/stable/classes/class_int.html)<span id="i_material_id"></span> **material_id** = 0
|
||||
|
||||
ID of the material that will be used. It corresponds to the index of materials found on [VoxelTerrain](VoxelTerrain.md).
|
||||
|
||||
- [bool](https://docs.godotengine.org/en/stable/classes/class_bool.html)<span id="i_random_tickable"></span> **random_tickable** = false
|
||||
|
||||
If enabled, voxels having this ID in the TYPE channel will be used by method VoxelToolTerrain.run_blocky_random_tick.
|
||||
|
||||
- [int](https://docs.godotengine.org/en/stable/classes/class_int.html)<span id="i_transparency_index"></span> **transparency_index** = 0
|
||||
@ -88,6 +90,7 @@ If enabled, voxels having this ID in the TYPE channel will be used by method Vox
|
||||
|
||||
|
||||
- [String](https://docs.godotengine.org/en/stable/classes/class_string.html)<span id="i_voxel_name"></span> **voxel_name** = ""
|
||||
|
||||
Name that can be used for convenience, when looking up a specific [Voxel](Voxel.md) from [VoxelLibrary](VoxelLibrary.md).
|
||||
|
||||
## Method Descriptions
|
||||
@ -95,13 +98,10 @@ Name that can be used for convenience, when looking up a specific [Voxel](Voxel.
|
||||
- [int](https://docs.godotengine.org/en/stable/classes/class_int.html)<span id="i_get_id"></span> **get_id**( )
|
||||
|
||||
|
||||
|
||||
- [bool](https://docs.godotengine.org/en/stable/classes/class_bool.html)<span id="i_is_empty"></span> **is_empty**( )
|
||||
|
||||
|
||||
|
||||
- [void](#)<span id="i_set_id"></span> **set_id**( [int](https://docs.godotengine.org/en/stable/classes/class_int.html) id )
|
||||
|
||||
|
||||
|
||||
_Generated on Jan 24, 2021_
|
||||
_Generated on Feb 16, 2021_
|
||||
|
@ -50,6 +50,6 @@ Reads the data of a [VoxelBuffer](VoxelBuffer.md) from a [StreamPeer](https://do
|
||||
|
||||
- [int](https://docs.godotengine.org/en/stable/classes/class_int.html)<span id="i_serialize"></span> **serialize**( [StreamPeer](https://docs.godotengine.org/en/stable/classes/class_streampeer.html) peer, [VoxelBuffer](VoxelBuffer.md) voxel_buffer, [bool](https://docs.godotengine.org/en/stable/classes/class_bool.html) compress )
|
||||
|
||||
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
|
||||
Stores the data of a [VoxelBuffer](VoxelBuffer.md) into a [StreamPeer](https://docs.godotengine.org/en/stable/classes/class_streampeer.html).
|
||||
|
||||
_Generated on Jan 24, 2021_
|
||||
_Generated on Feb 16, 2021_
|
||||
|
@ -33,7 +33,6 @@ Return |
|
||||
- [int](https://docs.godotengine.org/en/stable/classes/class_int.html)<span id="i_get_collision_mask"></span> **get_collision_mask**( )
|
||||
|
||||
|
||||
|
||||
- [Vector3](https://docs.godotengine.org/en/stable/classes/class_vector3.html)<span id="i_get_motion"></span> **get_motion**( [Vector3](https://docs.godotengine.org/en/stable/classes/class_vector3.html) pos, [Vector3](https://docs.godotengine.org/en/stable/classes/class_vector3.html) motion, [AABB](https://docs.godotengine.org/en/stable/classes/class_aabb.html) aabb, [Node](https://docs.godotengine.org/en/stable/classes/class_node.html) terrain )
|
||||
|
||||
Given a motion vector, returns a modified vector telling you by how much to move your character. This is similar to method KinematicBody.move_and_slide, except you have to apply the movement.
|
||||
@ -41,5 +40,4 @@ Given a motion vector, returns a modified vector telling you by how much to move
|
||||
- [void](#)<span id="i_set_collision_mask"></span> **set_collision_mask**( [int](https://docs.godotengine.org/en/stable/classes/class_int.html) mask )
|
||||
|
||||
|
||||
|
||||
_Generated on Jan 24, 2021_
|
||||
_Generated on Feb 16, 2021_
|
||||
|
@ -198,7 +198,6 @@ Checks if every voxel within a channel has the same value.
|
||||
- [void](#)<span id="i_optimize"></span> **optimize**( )
|
||||
|
||||
|
||||
|
||||
- [void](#)<span id="i_set_block_metadata"></span> **set_block_metadata**( [Variant](https://docs.godotengine.org/en/stable/classes/class_variant.html) meta )
|
||||
|
||||
Sets arbitrary data on this buffer. Old data is replaced. Note, this is separate storage from per-voxel metadata.
|
||||
@ -226,5 +225,4 @@ If this [VoxelBuffer](VoxelBuffer.md) is saved, this metadata will also be saved
|
||||
- [void](#)<span id="i_set_voxel_v"></span> **set_voxel_v**( [int](https://docs.godotengine.org/en/stable/classes/class_int.html) value, [Vector3](https://docs.godotengine.org/en/stable/classes/class_vector3.html) pos, [int](https://docs.godotengine.org/en/stable/classes/class_int.html) channel=0 )
|
||||
|
||||
|
||||
|
||||
_Generated on Jan 24, 2021_
|
||||
_Generated on Feb 16, 2021_
|
||||
|
@ -36,9 +36,7 @@ Return | Sign
|
||||
- [Color](https://docs.godotengine.org/en/stable/classes/class_color.html)<span id="i_get_color"></span> **get_color**( [int](https://docs.godotengine.org/en/stable/classes/class_int.html) arg0 )
|
||||
|
||||
|
||||
|
||||
- [void](#)<span id="i_set_color"></span> **set_color**( [int](https://docs.godotengine.org/en/stable/classes/class_int.html) color, [Color](https://docs.godotengine.org/en/stable/classes/class_color.html) arg1 )
|
||||
|
||||
|
||||
|
||||
_Generated on Jan 24, 2021_
|
||||
_Generated on Feb 16, 2021_
|
||||
|
@ -3,9 +3,7 @@
|
||||
Inherits: [Resource](https://docs.godotengine.org/en/stable/classes/class_resource.html)
|
||||
|
||||
|
||||
Base class to all voxel procedural generators. If you want to define a custom one with a script, this is the class you should extend from.
|
||||
|
||||
Important: this engine makes heavy use of threads. Generators will run in one of them, so make sure you don't access the scene tree or other unsafe APIs from within a generator.
|
||||
Base class to all voxel procedural generators. If you want to define a custom one with a script, this is the class you should extend from. All implementations must be thread safe.
|
||||
|
||||
## Methods:
|
||||
|
||||
@ -21,4 +19,10 @@ Return | Signature
|
||||
|
||||
Generates a block of voxels within the specified world area.
|
||||
|
||||
_Generated on Jan 24, 2021_
|
||||
`out_buffer`: Buffer in which voxel data will be generated. It should not be `null` and should be given the requested size. Do not keep a reference on it after the call.
|
||||
|
||||
`origin_in_voxels`: Coordinates of the lower corner of the box to generate, relative to LOD0.
|
||||
|
||||
`lod`: Level of detail index to use for this block. Some generators might not support LOD, in which case it can be left 0.
|
||||
|
||||
_Generated on Feb 16, 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 24, 2021_
|
||||
_Generated on Feb 16, 2021_
|
||||
|
@ -92,101 +92,76 @@ enum **NodeTypeID**:
|
||||
- [void](#)<span id="i_add_connection"></span> **add_connection**( [int](https://docs.godotengine.org/en/stable/classes/class_int.html) src_node_id, [int](https://docs.godotengine.org/en/stable/classes/class_int.html) src_port_index, [int](https://docs.godotengine.org/en/stable/classes/class_int.html) dst_node_id, [int](https://docs.godotengine.org/en/stable/classes/class_int.html) dst_port_index )
|
||||
|
||||
|
||||
|
||||
- [void](#)<span id="i_bake_sphere_bumpmap"></span> **bake_sphere_bumpmap**( [Image](https://docs.godotengine.org/en/stable/classes/class_image.html) im, [float](https://docs.godotengine.org/en/stable/classes/class_float.html) ref_radius, [float](https://docs.godotengine.org/en/stable/classes/class_float.html) sdf_min, [float](https://docs.godotengine.org/en/stable/classes/class_float.html) sdf_max )
|
||||
|
||||
|
||||
|
||||
- [void](#)<span id="i_bake_sphere_normalmap"></span> **bake_sphere_normalmap**( [Image](https://docs.godotengine.org/en/stable/classes/class_image.html) im, [float](https://docs.godotengine.org/en/stable/classes/class_float.html) ref_radius, [float](https://docs.godotengine.org/en/stable/classes/class_float.html) strength )
|
||||
|
||||
|
||||
|
||||
- [bool](https://docs.godotengine.org/en/stable/classes/class_bool.html)<span id="i_can_connect"></span> **can_connect**( [int](https://docs.godotengine.org/en/stable/classes/class_int.html) src_node_id, [int](https://docs.godotengine.org/en/stable/classes/class_int.html) src_port_index, [int](https://docs.godotengine.org/en/stable/classes/class_int.html) dst_node_id, [int](https://docs.godotengine.org/en/stable/classes/class_int.html) dst_port_index )
|
||||
|
||||
|
||||
|
||||
- [void](#)<span id="i_clear"></span> **clear**( )
|
||||
|
||||
|
||||
|
||||
- [Dictionary](https://docs.godotengine.org/en/stable/classes/class_dictionary.html)<span id="i_compile"></span> **compile**( )
|
||||
|
||||
|
||||
|
||||
- [int](https://docs.godotengine.org/en/stable/classes/class_int.html)<span id="i_create_node"></span> **create_node**( [int](https://docs.godotengine.org/en/stable/classes/class_int.html) type_id, [Vector2](https://docs.godotengine.org/en/stable/classes/class_vector2.html) position, [int](https://docs.godotengine.org/en/stable/classes/class_int.html) id=0 )
|
||||
|
||||
|
||||
|
||||
- [void](#)<span id="i_debug_load_waves_preset"></span> **debug_load_waves_preset**( )
|
||||
|
||||
|
||||
|
||||
- [float](https://docs.godotengine.org/en/stable/classes/class_float.html)<span id="i_debug_measure_microseconds_per_voxel"></span> **debug_measure_microseconds_per_voxel**( [bool](https://docs.godotengine.org/en/stable/classes/class_bool.html) use_singular_queries )
|
||||
|
||||
|
||||
|
||||
- [int](https://docs.godotengine.org/en/stable/classes/class_int.html)<span id="i_find_node_by_name"></span> **find_node_by_name**( [String](https://docs.godotengine.org/en/stable/classes/class_string.html) name )
|
||||
|
||||
|
||||
|
||||
- [float](https://docs.godotengine.org/en/stable/classes/class_float.html)<span id="i_generate_single"></span> **generate_single**( [Vector3](https://docs.godotengine.org/en/stable/classes/class_vector3.html) arg0 )
|
||||
|
||||
|
||||
|
||||
- [Array](https://docs.godotengine.org/en/stable/classes/class_array.html)<span id="i_get_connections"></span> **get_connections**( )
|
||||
|
||||
|
||||
|
||||
- [Variant](https://docs.godotengine.org/en/stable/classes/class_variant.html)<span id="i_get_node_default_input"></span> **get_node_default_input**( [int](https://docs.godotengine.org/en/stable/classes/class_int.html) node_id, [int](https://docs.godotengine.org/en/stable/classes/class_int.html) input_index )
|
||||
|
||||
|
||||
|
||||
- [Vector2](https://docs.godotengine.org/en/stable/classes/class_vector2.html)<span id="i_get_node_gui_position"></span> **get_node_gui_position**( [int](https://docs.godotengine.org/en/stable/classes/class_int.html) node_id )
|
||||
|
||||
|
||||
|
||||
- [PoolIntArray](https://docs.godotengine.org/en/stable/classes/class_poolintarray.html)<span id="i_get_node_ids"></span> **get_node_ids**( )
|
||||
|
||||
|
||||
|
||||
- [Variant](https://docs.godotengine.org/en/stable/classes/class_variant.html)<span id="i_get_node_param"></span> **get_node_param**( [int](https://docs.godotengine.org/en/stable/classes/class_int.html) node_id, [int](https://docs.godotengine.org/en/stable/classes/class_int.html) param_index )
|
||||
|
||||
|
||||
|
||||
- [int](https://docs.godotengine.org/en/stable/classes/class_int.html)<span id="i_get_node_type_count"></span> **get_node_type_count**( )
|
||||
|
||||
|
||||
|
||||
- [int](https://docs.godotengine.org/en/stable/classes/class_int.html)<span id="i_get_node_type_id"></span> **get_node_type_id**( [int](https://docs.godotengine.org/en/stable/classes/class_int.html) node_id )
|
||||
|
||||
|
||||
|
||||
- [Dictionary](https://docs.godotengine.org/en/stable/classes/class_dictionary.html)<span id="i_get_node_type_info"></span> **get_node_type_info**( [int](https://docs.godotengine.org/en/stable/classes/class_int.html) type_id )
|
||||
|
||||
|
||||
|
||||
- [void](#)<span id="i_remove_connection"></span> **remove_connection**( [int](https://docs.godotengine.org/en/stable/classes/class_int.html) src_node_id, [int](https://docs.godotengine.org/en/stable/classes/class_int.html) src_port_index, [int](https://docs.godotengine.org/en/stable/classes/class_int.html) dst_node_id, [int](https://docs.godotengine.org/en/stable/classes/class_int.html) dst_port_index )
|
||||
|
||||
|
||||
|
||||
- [void](#)<span id="i_remove_node"></span> **remove_node**( [int](https://docs.godotengine.org/en/stable/classes/class_int.html) node_id )
|
||||
|
||||
|
||||
|
||||
- [void](#)<span id="i_set_node_default_input"></span> **set_node_default_input**( [int](https://docs.godotengine.org/en/stable/classes/class_int.html) node_id, [int](https://docs.godotengine.org/en/stable/classes/class_int.html) input_index, [Variant](https://docs.godotengine.org/en/stable/classes/class_variant.html) value )
|
||||
|
||||
|
||||
|
||||
- [void](#)<span id="i_set_node_gui_position"></span> **set_node_gui_position**( [int](https://docs.godotengine.org/en/stable/classes/class_int.html) node_id, [Vector2](https://docs.godotengine.org/en/stable/classes/class_vector2.html) position )
|
||||
|
||||
|
||||
|
||||
- [void](#)<span id="i_set_node_param"></span> **set_node_param**( [int](https://docs.godotengine.org/en/stable/classes/class_int.html) node_id, [int](https://docs.godotengine.org/en/stable/classes/class_int.html) param_index, [Variant](https://docs.godotengine.org/en/stable/classes/class_variant.html) value )
|
||||
|
||||
|
||||
|
||||
- [void](#)<span id="i_set_node_param_null"></span> **set_node_param_null**( [int](https://docs.godotengine.org/en/stable/classes/class_int.html) node_id, [int](https://docs.godotengine.org/en/stable/classes/class_int.html) param_index )
|
||||
|
||||
|
||||
|
||||
_Generated on Jan 24, 2021_
|
||||
_Generated on Feb 16, 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 24, 2021_
|
||||
_Generated on Feb 16, 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 24, 2021_
|
||||
_Generated on Feb 16, 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 24, 2021_
|
||||
_Generated on Feb 16, 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 24, 2021_
|
||||
_Generated on Feb 16, 2021_
|
||||
|
@ -5,6 +5,8 @@ Inherits: [VoxelGenerator](VoxelGenerator.md)
|
||||
|
||||
Base class for custom generators defined with a script.
|
||||
|
||||
Important: this engine makes heavy use of threads. Generators will run in one of them, so make sure you don't access the scene tree or other unsafe APIs from within a generator.
|
||||
|
||||
## Methods:
|
||||
|
||||
|
||||
@ -18,10 +20,14 @@ Return | Signatur
|
||||
|
||||
- [void](#)<span id="i__generate_block"></span> **_generate_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 )
|
||||
|
||||
`out_buffer`: Buffer in which to populate voxel data. It will never be `null` and will have the requested size. It is only valid for this function, do not store it anywhere after the end.
|
||||
|
||||
`origin_in_voxels`: Coordinates of the lower corner of the box to generate, relative to LOD0. The size of the box is known from `out_buffer`.
|
||||
|
||||
`lod`: Level of detail index to use for this block. It can be ignored if you don't use LOD. This may be used as a power of two, telling how big is one voxel. For example, if you use a loop to fill the buffer using noise, you should sample that noise at steps of 2^lod, starting from `origin_in_voxels` (in code you can use `1 << lod` for fast computation, instead of `pow(2, lod)`). You may want to separate variables that iterate the coordinates in `out_buffer` and variables used to generate voxel values in space.
|
||||
|
||||
- [int](https://docs.godotengine.org/en/stable/classes/class_int.html)<span id="i__get_used_channels_mask"></span> **_get_used_channels_mask**( )
|
||||
|
||||
Use this to indicate which channels your generator will use. It returns a bitmask, so for example you may provide information like this: `(1 << channel1) | (1 << channel2)`
|
||||
|
||||
|
||||
_Generated on Jan 24, 2021_
|
||||
_Generated on Feb 16, 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 24, 2021_
|
||||
_Generated on Feb 16, 2021_
|
||||
|
91
doc/source/api/VoxelInstanceGenerator.md
Normal file
91
doc/source/api/VoxelInstanceGenerator.md
Normal file
@ -0,0 +1,91 @@
|
||||
# VoxelInstanceGenerator
|
||||
|
||||
Inherits: [Resource](https://docs.godotengine.org/en/stable/classes/class_resource.html)
|
||||
|
||||
|
||||
Decides where to spawn instances on top of a voxel surface.
|
||||
|
||||
## Description:
|
||||
|
||||
Generates the necessry information to spawn instances on top of a voxel surface. This may be used by a [VoxelInstancer](VoxelInstancer.md).
|
||||
|
||||
Note: to generate voxels, see [VoxelGenerator](VoxelGenerator.md).
|
||||
|
||||
## Properties:
|
||||
|
||||
|
||||
Type | Name | Default
|
||||
---------------- | ------------------------------------------------ | ------------
|
||||
`float` | [density](#i_density) | 0.1
|
||||
`int` | [emit_mode](#i_emit_mode) | 0
|
||||
`float` | [max_height](#i_max_height) | 3.40282e+38
|
||||
`float` | [max_scale](#i_max_scale) | 1.0
|
||||
`float` | [max_slope_degrees](#i_max_slope_degrees) | 180.0
|
||||
`float` | [min_height](#i_min_height) | 1.17549e-38
|
||||
`float` | [min_scale](#i_min_scale) | 1.0
|
||||
`float` | [min_slope_degrees](#i_min_slope_degrees) | 0.0
|
||||
`FastNoiseLite` | [noise](#i_noise) |
|
||||
`int` | [noise_dimension](#i_noise_dimension) | 1
|
||||
`float` | [noise_on_scale](#i_noise_on_scale) | 0.0
|
||||
`float` | [offset_along_normal](#i_offset_along_normal) | 0.0
|
||||
`bool` | [random_vertical_flip](#i_random_vertical_flip) | false
|
||||
`int` | [scale_distribution](#i_scale_distribution) | 1
|
||||
`float` | [vertical_alignment](#i_vertical_alignment) | 1.0
|
||||
<p></p>
|
||||
|
||||
## Enumerations:
|
||||
|
||||
enum **EmitMode**:
|
||||
|
||||
- **EMIT_FROM_VERTICES** = **0**
|
||||
- **EMIT_FROM_FACES** = **1**
|
||||
|
||||
|
||||
## Property Descriptions
|
||||
|
||||
- [float](https://docs.godotengine.org/en/stable/classes/class_float.html)<span id="i_density"></span> **density** = 0.1
|
||||
|
||||
|
||||
- [int](https://docs.godotengine.org/en/stable/classes/class_int.html)<span id="i_emit_mode"></span> **emit_mode** = 0
|
||||
|
||||
|
||||
- [float](https://docs.godotengine.org/en/stable/classes/class_float.html)<span id="i_max_height"></span> **max_height** = 3.40282e+38
|
||||
|
||||
|
||||
- [float](https://docs.godotengine.org/en/stable/classes/class_float.html)<span id="i_max_scale"></span> **max_scale** = 1.0
|
||||
|
||||
|
||||
- [float](https://docs.godotengine.org/en/stable/classes/class_float.html)<span id="i_max_slope_degrees"></span> **max_slope_degrees** = 180.0
|
||||
|
||||
|
||||
- [float](https://docs.godotengine.org/en/stable/classes/class_float.html)<span id="i_min_height"></span> **min_height** = 1.17549e-38
|
||||
|
||||
|
||||
- [float](https://docs.godotengine.org/en/stable/classes/class_float.html)<span id="i_min_scale"></span> **min_scale** = 1.0
|
||||
|
||||
|
||||
- [float](https://docs.godotengine.org/en/stable/classes/class_float.html)<span id="i_min_slope_degrees"></span> **min_slope_degrees** = 0.0
|
||||
|
||||
|
||||
- [FastNoiseLite](FastNoiseLite.md)<span id="i_noise"></span> **noise**
|
||||
|
||||
|
||||
- [int](https://docs.godotengine.org/en/stable/classes/class_int.html)<span id="i_noise_dimension"></span> **noise_dimension** = 1
|
||||
|
||||
|
||||
- [float](https://docs.godotengine.org/en/stable/classes/class_float.html)<span id="i_noise_on_scale"></span> **noise_on_scale** = 0.0
|
||||
|
||||
|
||||
- [float](https://docs.godotengine.org/en/stable/classes/class_float.html)<span id="i_offset_along_normal"></span> **offset_along_normal** = 0.0
|
||||
|
||||
|
||||
- [bool](https://docs.godotengine.org/en/stable/classes/class_bool.html)<span id="i_random_vertical_flip"></span> **random_vertical_flip** = false
|
||||
|
||||
|
||||
- [int](https://docs.godotengine.org/en/stable/classes/class_int.html)<span id="i_scale_distribution"></span> **scale_distribution** = 1
|
||||
|
||||
|
||||
- [float](https://docs.godotengine.org/en/stable/classes/class_float.html)<span id="i_vertical_alignment"></span> **vertical_alignment** = 1.0
|
||||
|
||||
|
||||
_Generated on Feb 16, 2021_
|
41
doc/source/api/VoxelInstanceLibrary.md
Normal file
41
doc/source/api/VoxelInstanceLibrary.md
Normal file
@ -0,0 +1,41 @@
|
||||
# VoxelInstanceLibrary
|
||||
|
||||
Inherits: [Resource](https://docs.godotengine.org/en/stable/classes/class_resource.html)
|
||||
|
||||
|
||||
Contains a list of models that can be used by [VoxelInstancer](VoxelInstancer.md), associated with a unique ID
|
||||
|
||||
## Methods:
|
||||
|
||||
|
||||
Return | Signature
|
||||
--------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
[void](#) | [add_item](#i_add_item) ( [int](https://docs.godotengine.org/en/stable/classes/class_int.html) id, [VoxelInstanceLibraryItem](VoxelInstanceLibraryItem.md) arg1 )
|
||||
[void](#) | [clear](#i_clear) ( )
|
||||
[int](https://docs.godotengine.org/en/stable/classes/class_int.html) | [find_item_by_name](#i_find_item_by_name) ( [String](https://docs.godotengine.org/en/stable/classes/class_string.html) name ) const
|
||||
[VoxelInstanceLibraryItem](VoxelInstanceLibraryItem.md) | [get_item](#i_get_item) ( [int](https://docs.godotengine.org/en/stable/classes/class_int.html) id )
|
||||
[void](#) | [remove_item](#i_remove_item) ( [int](https://docs.godotengine.org/en/stable/classes/class_int.html) id )
|
||||
<p></p>
|
||||
|
||||
## Constants:
|
||||
|
||||
- **MAX_ID** = **65535**
|
||||
|
||||
## Method Descriptions
|
||||
|
||||
- [void](#)<span id="i_add_item"></span> **add_item**( [int](https://docs.godotengine.org/en/stable/classes/class_int.html) id, [VoxelInstanceLibraryItem](VoxelInstanceLibraryItem.md) arg1 )
|
||||
|
||||
|
||||
- [void](#)<span id="i_clear"></span> **clear**( )
|
||||
|
||||
|
||||
- [int](https://docs.godotengine.org/en/stable/classes/class_int.html)<span id="i_find_item_by_name"></span> **find_item_by_name**( [String](https://docs.godotengine.org/en/stable/classes/class_string.html) name )
|
||||
|
||||
|
||||
- [VoxelInstanceLibraryItem](VoxelInstanceLibraryItem.md)<span id="i_get_item"></span> **get_item**( [int](https://docs.godotengine.org/en/stable/classes/class_int.html) id )
|
||||
|
||||
|
||||
- [void](#)<span id="i_remove_item"></span> **remove_item**( [int](https://docs.godotengine.org/en/stable/classes/class_int.html) id )
|
||||
|
||||
|
||||
_Generated on Feb 16, 2021_
|
94
doc/source/api/VoxelInstanceLibraryItem.md
Normal file
94
doc/source/api/VoxelInstanceLibraryItem.md
Normal file
@ -0,0 +1,94 @@
|
||||
# VoxelInstanceLibraryItem
|
||||
|
||||
Inherits: [Resource](https://docs.godotengine.org/en/stable/classes/class_resource.html)
|
||||
|
||||
|
||||
Settings for a model that can be used by [VoxelInstancer](VoxelInstancer.md)
|
||||
|
||||
## Properties:
|
||||
|
||||
|
||||
Type | Name | Default
|
||||
------------------------- | ------------------------------------------ | --------
|
||||
`int` | [collision_layer](#i_collision_layer) | 1
|
||||
`int` | [collision_mask](#i_collision_mask) | 1
|
||||
`VoxelInstanceGenerator` | [generator](#i_generator) |
|
||||
`int` | [lod_index](#i_lod_index) | 0
|
||||
`Material` | [material_override](#i_material_override) |
|
||||
`Mesh` | [mesh](#i_mesh) |
|
||||
`Mesh` | [mesh_lod1](#i_mesh_lod1) |
|
||||
`Mesh` | [mesh_lod2](#i_mesh_lod2) |
|
||||
`Mesh` | [mesh_lod3](#i_mesh_lod3) |
|
||||
`String` | [name](#i_name) | ""
|
||||
`bool` | [persistent](#i_persistent) | false
|
||||
<p></p>
|
||||
|
||||
## Methods:
|
||||
|
||||
|
||||
Return | Signature
|
||||
------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
[Array](https://docs.godotengine.org/en/stable/classes/class_array.html) | [get_collision_shapes](#i_get_collision_shapes) ( ) const
|
||||
[Mesh](https://docs.godotengine.org/en/stable/classes/class_mesh.html) | [get_mesh](#i_get_mesh) ( [int](https://docs.godotengine.org/en/stable/classes/class_int.html) mesh_lod_index ) const
|
||||
[void](#) | [set_collision_shapes](#i_set_collision_shapes) ( [Array](https://docs.godotengine.org/en/stable/classes/class_array.html) shape_infos )
|
||||
[void](#) | [set_mesh](#i_set_mesh) ( [Mesh](https://docs.godotengine.org/en/stable/classes/class_mesh.html) mesh, [int](https://docs.godotengine.org/en/stable/classes/class_int.html) mesh_lod_index )
|
||||
[void](#) | [setup_from_template](#i_setup_from_template) ( [Node](https://docs.godotengine.org/en/stable/classes/class_node.html) node )
|
||||
<p></p>
|
||||
|
||||
## Constants:
|
||||
|
||||
- **MAX_MESH_LODS** = **4**
|
||||
|
||||
## Property Descriptions
|
||||
|
||||
- [int](https://docs.godotengine.org/en/stable/classes/class_int.html)<span id="i_collision_layer"></span> **collision_layer** = 1
|
||||
|
||||
|
||||
- [int](https://docs.godotengine.org/en/stable/classes/class_int.html)<span id="i_collision_mask"></span> **collision_mask** = 1
|
||||
|
||||
|
||||
- [VoxelInstanceGenerator](VoxelInstanceGenerator.md)<span id="i_generator"></span> **generator**
|
||||
|
||||
|
||||
- [int](https://docs.godotengine.org/en/stable/classes/class_int.html)<span id="i_lod_index"></span> **lod_index** = 0
|
||||
|
||||
|
||||
- [Material](https://docs.godotengine.org/en/stable/classes/class_material.html)<span id="i_material_override"></span> **material_override**
|
||||
|
||||
|
||||
- [Mesh](https://docs.godotengine.org/en/stable/classes/class_mesh.html)<span id="i_mesh"></span> **mesh**
|
||||
|
||||
|
||||
- [Mesh](https://docs.godotengine.org/en/stable/classes/class_mesh.html)<span id="i_mesh_lod1"></span> **mesh_lod1**
|
||||
|
||||
|
||||
- [Mesh](https://docs.godotengine.org/en/stable/classes/class_mesh.html)<span id="i_mesh_lod2"></span> **mesh_lod2**
|
||||
|
||||
|
||||
- [Mesh](https://docs.godotengine.org/en/stable/classes/class_mesh.html)<span id="i_mesh_lod3"></span> **mesh_lod3**
|
||||
|
||||
|
||||
- [String](https://docs.godotengine.org/en/stable/classes/class_string.html)<span id="i_name"></span> **name** = ""
|
||||
|
||||
|
||||
- [bool](https://docs.godotengine.org/en/stable/classes/class_bool.html)<span id="i_persistent"></span> **persistent** = false
|
||||
|
||||
|
||||
## Method Descriptions
|
||||
|
||||
- [Array](https://docs.godotengine.org/en/stable/classes/class_array.html)<span id="i_get_collision_shapes"></span> **get_collision_shapes**( )
|
||||
|
||||
|
||||
- [Mesh](https://docs.godotengine.org/en/stable/classes/class_mesh.html)<span id="i_get_mesh"></span> **get_mesh**( [int](https://docs.godotengine.org/en/stable/classes/class_int.html) mesh_lod_index )
|
||||
|
||||
|
||||
- [void](#)<span id="i_set_collision_shapes"></span> **set_collision_shapes**( [Array](https://docs.godotengine.org/en/stable/classes/class_array.html) shape_infos )
|
||||
|
||||
|
||||
- [void](#)<span id="i_set_mesh"></span> **set_mesh**( [Mesh](https://docs.godotengine.org/en/stable/classes/class_mesh.html) mesh, [int](https://docs.godotengine.org/en/stable/classes/class_int.html) mesh_lod_index )
|
||||
|
||||
|
||||
- [void](#)<span id="i_setup_from_template"></span> **setup_from_template**( [Node](https://docs.godotengine.org/en/stable/classes/class_node.html) node )
|
||||
|
||||
|
||||
_Generated on Feb 16, 2021_
|
54
doc/source/api/VoxelInstancer.md
Normal file
54
doc/source/api/VoxelInstancer.md
Normal file
@ -0,0 +1,54 @@
|
||||
# VoxelInstancer
|
||||
|
||||
Inherits: [Spatial](https://docs.godotengine.org/en/stable/classes/class_spatial.html)
|
||||
|
||||
|
||||
Spawns items on top of voxel surfaces.
|
||||
|
||||
## 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.
|
||||
|
||||
## Properties:
|
||||
|
||||
|
||||
Type | Name | Default
|
||||
----------------------- | ---------------------- | --------
|
||||
`VoxelInstanceLibrary` | [library](#i_library) |
|
||||
`int` | [up_mode](#i_up_mode) | 0
|
||||
<p></p>
|
||||
|
||||
## Methods:
|
||||
|
||||
|
||||
Return | Signature
|
||||
--------------------------------------------------------------------- | ------------------------------------------------------------
|
||||
[int](https://docs.godotengine.org/en/stable/classes/class_int.html) | [debug_get_block_count](#i_debug_get_block_count) ( ) const
|
||||
<p></p>
|
||||
|
||||
## Enumerations:
|
||||
|
||||
enum **UpMode**:
|
||||
|
||||
- **UP_MODE_POSITIVE_Y** = **0**
|
||||
- **UP_MODE_SPHERE** = **1**
|
||||
|
||||
|
||||
## Constants:
|
||||
|
||||
- **MAX_LOD** = **8**
|
||||
|
||||
## Property Descriptions
|
||||
|
||||
- [VoxelInstanceLibrary](VoxelInstanceLibrary.md)<span id="i_library"></span> **library**
|
||||
|
||||
|
||||
- [int](https://docs.godotengine.org/en/stable/classes/class_int.html)<span id="i_up_mode"></span> **up_mode** = 0
|
||||
|
||||
|
||||
## Method Descriptions
|
||||
|
||||
- [int](https://docs.godotengine.org/en/stable/classes/class_int.html)<span id="i_debug_get_block_count"></span> **debug_get_block_count**( )
|
||||
|
||||
|
||||
_Generated on Feb 16, 2021_
|
@ -37,6 +37,7 @@ Return | Signatur
|
||||
|
||||
|
||||
- [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
|
||||
@ -47,21 +48,16 @@ Enable this option if you need normal mapping on your voxels. If you don't need
|
||||
- [void](#)<span id="i_bake"></span> **bake**( )
|
||||
|
||||
|
||||
|
||||
- [Voxel](Voxel.md)<span id="i_create_voxel"></span> **create_voxel**( [int](https://docs.godotengine.org/en/stable/classes/class_int.html) id, [String](https://docs.godotengine.org/en/stable/classes/class_string.html) name )
|
||||
|
||||
|
||||
|
||||
- [Voxel](Voxel.md)<span id="i_get_voxel"></span> **get_voxel**( [int](https://docs.godotengine.org/en/stable/classes/class_int.html) id )
|
||||
|
||||
|
||||
|
||||
- [Voxel](Voxel.md)<span id="i_get_voxel_by_name"></span> **get_voxel_by_name**( [String](https://docs.godotengine.org/en/stable/classes/class_string.html) name )
|
||||
|
||||
|
||||
|
||||
- [int](https://docs.godotengine.org/en/stable/classes/class_int.html)<span id="i_get_voxel_index_from_name"></span> **get_voxel_index_from_name**( [String](https://docs.godotengine.org/en/stable/classes/class_string.html) name )
|
||||
|
||||
|
||||
|
||||
_Generated on Jan 24, 2021_
|
||||
_Generated on Feb 16, 2021_
|
||||
|
@ -85,39 +85,30 @@ enum **ProcessMode**:
|
||||
- [int](https://docs.godotengine.org/en/stable/classes/class_int.html)<span id="i_debug_dump_as_scene"></span> **debug_dump_as_scene**( [String](https://docs.godotengine.org/en/stable/classes/class_string.html) path )
|
||||
|
||||
|
||||
|
||||
- [int](https://docs.godotengine.org/en/stable/classes/class_int.html)<span id="i_debug_get_block_count"></span> **debug_get_block_count**( )
|
||||
|
||||
|
||||
|
||||
- [Dictionary](https://docs.godotengine.org/en/stable/classes/class_dictionary.html)<span id="i_debug_get_block_info"></span> **debug_get_block_info**( [Vector3](https://docs.godotengine.org/en/stable/classes/class_vector3.html) block_pos, [int](https://docs.godotengine.org/en/stable/classes/class_int.html) lod )
|
||||
|
||||
|
||||
|
||||
- [Array](https://docs.godotengine.org/en/stable/classes/class_array.html)<span id="i_debug_get_octrees"></span> **debug_get_octrees**( )
|
||||
|
||||
|
||||
|
||||
- [Array](https://docs.godotengine.org/en/stable/classes/class_array.html)<span id="i_debug_print_sdf_top_down"></span> **debug_print_sdf_top_down**( [Vector3](https://docs.godotengine.org/en/stable/classes/class_vector3.html) center, [Vector3](https://docs.godotengine.org/en/stable/classes/class_vector3.html) extents )
|
||||
|
||||
|
||||
|
||||
- [Array](https://docs.godotengine.org/en/stable/classes/class_array.html)<span id="i_debug_raycast_block"></span> **debug_raycast_block**( [Vector3](https://docs.godotengine.org/en/stable/classes/class_vector3.html) origin, [Vector3](https://docs.godotengine.org/en/stable/classes/class_vector3.html) dir )
|
||||
|
||||
|
||||
|
||||
- [int](https://docs.godotengine.org/en/stable/classes/class_int.html)<span id="i_get_block_region_extent"></span> **get_block_region_extent**( )
|
||||
|
||||
|
||||
|
||||
- [int](https://docs.godotengine.org/en/stable/classes/class_int.html)<span id="i_get_block_size"></span> **get_block_size**( )
|
||||
|
||||
|
||||
|
||||
- [int](https://docs.godotengine.org/en/stable/classes/class_int.html)<span id="i_get_process_mode"></span> **get_process_mode**( )
|
||||
|
||||
|
||||
|
||||
- [Dictionary](https://docs.godotengine.org/en/stable/classes/class_dictionary.html)<span id="i_get_statistics"></span> **get_statistics**( )
|
||||
|
||||
Gets debug information about how much time is spent processing the terrain.
|
||||
@ -143,17 +134,13 @@ The returned dictionary has the following structure:
|
||||
- [VoxelTool](VoxelTool.md)<span id="i_get_voxel_tool"></span> **get_voxel_tool**( )
|
||||
|
||||
|
||||
|
||||
- [void](#)<span id="i_save_modified_blocks"></span> **save_modified_blocks**( )
|
||||
|
||||
|
||||
|
||||
- [void](#)<span id="i_set_process_mode"></span> **set_process_mode**( [int](https://docs.godotengine.org/en/stable/classes/class_int.html) mode )
|
||||
|
||||
|
||||
|
||||
- [Vector3](https://docs.godotengine.org/en/stable/classes/class_vector3.html)<span id="i_voxel_to_block_position"></span> **voxel_to_block_position**( [Vector3](https://docs.godotengine.org/en/stable/classes/class_vector3.html) lod_index, [int](https://docs.godotengine.org/en/stable/classes/class_int.html) arg1 )
|
||||
|
||||
|
||||
|
||||
_Generated on Jan 24, 2021_
|
||||
_Generated on Feb 16, 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 24, 2021_
|
||||
_Generated on Feb 16, 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 24, 2021_
|
||||
_Generated on Feb 16, 2021_
|
||||
|
@ -41,4 +41,4 @@ enum **ColorMode**:
|
||||
- [VoxelColorPalette](VoxelColorPalette.md)<span id="i_palette"></span> **palette**
|
||||
|
||||
|
||||
_Generated on Jan 24, 2021_
|
||||
_Generated on Feb 16, 2021_
|
||||
|
@ -66,13 +66,10 @@ enum **SeamMode**:
|
||||
- [float](https://docs.godotengine.org/en/stable/classes/class_float.html)<span id="i_get_geometric_error"></span> **get_geometric_error**( )
|
||||
|
||||
|
||||
|
||||
- [Dictionary](https://docs.godotengine.org/en/stable/classes/class_dictionary.html)<span id="i_get_statistics"></span> **get_statistics**( )
|
||||
|
||||
|
||||
|
||||
- [void](#)<span id="i_set_geometric_error"></span> **set_geometric_error**( [float](https://docs.godotengine.org/en/stable/classes/class_float.html) error )
|
||||
|
||||
|
||||
|
||||
_Generated on Jan 24, 2021_
|
||||
_Generated on Feb 16, 2021_
|
||||
|
@ -18,5 +18,4 @@ Return
|
||||
- [ArrayMesh](https://docs.godotengine.org/en/stable/classes/class_arraymesh.html)<span id="i_build_transition_mesh"></span> **build_transition_mesh**( [VoxelBuffer](VoxelBuffer.md) voxel_buffer, [int](https://docs.godotengine.org/en/stable/classes/class_int.html) direction )
|
||||
|
||||
|
||||
|
||||
_Generated on Jan 24, 2021_
|
||||
_Generated on Feb 16, 2021_
|
||||
|
@ -18,12 +18,15 @@ Type | Name | Default
|
||||
## Property Descriptions
|
||||
|
||||
- [VoxelGenerator](VoxelGenerator.md)<span id="i_generator"></span> **generator**
|
||||
|
||||
Procedural generator used to load voxel blocks when not present in the stream.
|
||||
|
||||
- [VoxelMesher](VoxelMesher.md)<span id="i_mesher"></span> **mesher**
|
||||
|
||||
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 24, 2021_
|
||||
_Generated on Feb 16, 2021_
|
||||
|
@ -17,9 +17,11 @@ Type | Name | Default
|
||||
## Property Descriptions
|
||||
|
||||
- [Vector3](https://docs.godotengine.org/en/stable/classes/class_vector3.html)<span id="i_position"></span> **position** = Vector3( 0, 0, 0 )
|
||||
|
||||
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 24, 2021_
|
||||
_Generated on Feb 16, 2021_
|
||||
|
@ -37,4 +37,4 @@ The returned dictionary has the following structure:
|
||||
|
||||
```
|
||||
|
||||
_Generated on Jan 24, 2021_
|
||||
_Generated on Feb 16, 2021_
|
||||
|
@ -36,24 +36,22 @@ enum **Result**:
|
||||
## Property Descriptions
|
||||
|
||||
- [bool](https://docs.godotengine.org/en/stable/classes/class_bool.html)<span id="i_save_generator_output"></span> **save_generator_output** = false
|
||||
When this is enabled, if a block cannot be found in the stream and it gets generated, then the generated block will immediately be saved into the stream. This can be used if the generator is too expensive to run on the fly (like Minecraft does), but it will require more disk space and eventual network traffic. If this setting is off, only modified blocks will be saved.
|
||||
|
||||
When this is enabled, if a block cannot be found in the stream and it gets generated, then the generated block will immediately be saved into the stream. This can be used if the generator is too expensive to run on the fly (like Minecraft does), but it will require more disk usage (amount of I/Os and space) and eventual network traffic. If this setting is off, only modified blocks will be saved.
|
||||
|
||||
## Method Descriptions
|
||||
|
||||
- [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 )
|
||||
|
||||
|
||||
|
||||
- [Vector3](https://docs.godotengine.org/en/stable/classes/class_vector3.html)<span id="i_get_block_size"></span> **get_block_size**( )
|
||||
|
||||
|
||||
|
||||
- [int](https://docs.godotengine.org/en/stable/classes/class_int.html)<span id="i_get_used_channels_mask"></span> **get_used_channels_mask**( )
|
||||
|
||||
|
||||
|
||||
- [void](#)<span id="i_immerge_block"></span> **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 )
|
||||
|
||||
`buffer`: Block of voxels to save. It is strongly recommended to not keep a reference to that data afterward, because streams are allowed to cache it, and saved data must represent either snapshots (copies) or last references to the data after the volume they belonged to is destroyed.
|
||||
|
||||
|
||||
_Generated on Jan 24, 2021_
|
||||
_Generated on Feb 16, 2021_
|
||||
|
@ -1,6 +1,6 @@
|
||||
# VoxelStreamBlockFiles
|
||||
|
||||
Inherits: [VoxelStreamFile](VoxelStreamFile.md)
|
||||
Inherits: [VoxelStream](VoxelStream.md)
|
||||
|
||||
|
||||
Loads and saves blocks as individual files under a directory.
|
||||
@ -20,6 +20,7 @@ Type | Name | Default
|
||||
## Property Descriptions
|
||||
|
||||
- [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 24, 2021_
|
||||
_Generated on Feb 16, 2021_
|
||||
|
@ -1,8 +0,0 @@
|
||||
# VoxelStreamFile
|
||||
|
||||
Inherits: [VoxelStream](VoxelStream.md)
|
||||
|
||||
|
||||
|
||||
|
||||
_Generated on Jan 24, 2021_
|
@ -1,6 +1,6 @@
|
||||
# VoxelStreamRegionFiles
|
||||
|
||||
Inherits: [VoxelStreamFile](VoxelStreamFile.md)
|
||||
Inherits: [VoxelStream](VoxelStream.md)
|
||||
|
||||
|
||||
Loads and saves blocks to region files indexed by world position, under a directory.
|
||||
@ -39,6 +39,7 @@ Return |
|
||||
|
||||
|
||||
- [String](https://docs.godotengine.org/en/stable/classes/class_string.html)<span id="i_directory"></span> **directory** = ""
|
||||
|
||||
Directory under which the data is saved.
|
||||
|
||||
- [int](https://docs.godotengine.org/en/stable/classes/class_int.html)<span id="i_lod_count"></span> **lod_count** = 1
|
||||
@ -55,13 +56,10 @@ Directory under which the data is saved.
|
||||
- [void](#)<span id="i_convert_files"></span> **convert_files**( [Dictionary](https://docs.godotengine.org/en/stable/classes/class_dictionary.html) new_settings )
|
||||
|
||||
|
||||
|
||||
- [int](https://docs.godotengine.org/en/stable/classes/class_int.html)<span id="i_get_block_size_po2"></span> **get_block_size_po2**( )
|
||||
|
||||
|
||||
|
||||
- [Vector3](https://docs.godotengine.org/en/stable/classes/class_vector3.html)<span id="i_get_region_size"></span> **get_region_size**( )
|
||||
|
||||
|
||||
|
||||
_Generated on Jan 24, 2021_
|
||||
_Generated on Feb 16, 2021_
|
||||
|
21
doc/source/api/VoxelStreamSQLite.md
Normal file
21
doc/source/api/VoxelStreamSQLite.md
Normal file
@ -0,0 +1,21 @@
|
||||
# VoxelStreamSQLite
|
||||
|
||||
Inherits: [VoxelStream](VoxelStream.md)
|
||||
|
||||
|
||||
|
||||
|
||||
## Properties:
|
||||
|
||||
|
||||
Type | Name | Default
|
||||
--------- | ---------------------------------- | --------
|
||||
`String` | [database_path](#i_database_path) | ""
|
||||
<p></p>
|
||||
|
||||
## Property Descriptions
|
||||
|
||||
- [String](https://docs.godotengine.org/en/stable/classes/class_string.html)<span id="i_database_path"></span> **database_path** = ""
|
||||
|
||||
|
||||
_Generated on Feb 16, 2021_
|
@ -19,14 +19,13 @@ Return | Signatur
|
||||
|
||||
- [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 )
|
||||
|
||||
|
||||
`out_buffer`: Buffer in which to populate voxel data. It will never be `null` and will have the requested size. It is only valid for this function, do not store it anywhere after the end.
|
||||
|
||||
- [int](https://docs.godotengine.org/en/stable/classes/class_int.html)<span id="i__get_used_channels_mask"></span> **_get_used_channels_mask**( )
|
||||
|
||||
|
||||
|
||||
- [void](#)<span id="i__immerge_block"></span> **_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 )
|
||||
|
||||
`buffer`: Buffer of voxel data to save. It is allowed to keep a reference to it for caching purposes, as saved data will either be snapshots or only references left after removal of a volume.
|
||||
|
||||
|
||||
_Generated on Jan 24, 2021_
|
||||
_Generated on Feb 16, 2021_
|
||||
|
@ -46,9 +46,11 @@ Emitted when a block unloaded due to being outside view distance.
|
||||
## Property Descriptions
|
||||
|
||||
- [AABB](https://docs.godotengine.org/en/stable/classes/class_aabb.html)<span id="i_bounds"></span> **bounds** = AABB( -5.36871e+08, -5.36871e+08, -5.36871e+08, 1.07374e+09, 1.07374e+09, 1.07374e+09 )
|
||||
|
||||
Defines the bounds within which the terrain is allowed to have voxels. If an infinite world generator is used, blocks will only generate within this region. Everything outside will be left empty.
|
||||
|
||||
- [bool](https://docs.godotengine.org/en/stable/classes/class_bool.html)<span id="i_generate_collisions"></span> **generate_collisions** = true
|
||||
|
||||
Enables the generation of collision shapes using the classic physics engine. Use this feature if you need realistic or non-trivial collisions or physics.
|
||||
|
||||
Note 1: you also need [VoxelViewer](VoxelViewer.md) to request collisions, otherwise they won't generate.
|
||||
@ -56,11 +58,13 @@ Note 1: you also need [VoxelViewer](VoxelViewer.md) to request collisions, other
|
||||
Note 2: If you need simple Minecraft/AABB physics, you can use [VoxelBoxMover](VoxelBoxMover.md) which may perform better in blocky worlds.
|
||||
|
||||
- [int](https://docs.godotengine.org/en/stable/classes/class_int.html)<span id="i_max_view_distance"></span> **max_view_distance** = 128
|
||||
|
||||
Sets the maximum distance this terrain can support. If a [VoxelViewer](VoxelViewer.md) requests more, it will be clamped.
|
||||
|
||||
Note: there is an internal limit of 512 for constant LOD terrains, because going further can affect performance and memory very badly at the moment.
|
||||
|
||||
- [bool](https://docs.godotengine.org/en/stable/classes/class_bool.html)<span id="i_run_stream_in_editor"></span> **run_stream_in_editor** = true
|
||||
|
||||
Makes the terrain appear in the editor.
|
||||
|
||||
Important: this option will turn off automatically if you setup a script world generator. Modifying scripts while they are in use by threads causes undefined behaviors. You can still turn on this option if you need a preview, but it is strongly advised to turn it back off and wait until all generation has finished before you edit the script again.
|
||||
@ -74,7 +78,6 @@ Converts block coordinates into voxel coordinates. Voxel coordinates of a block
|
||||
- [Material](https://docs.godotengine.org/en/stable/classes/class_material.html)<span id="i_get_material"></span> **get_material**( [int](https://docs.godotengine.org/en/stable/classes/class_int.html) id )
|
||||
|
||||
|
||||
|
||||
- [Dictionary](https://docs.godotengine.org/en/stable/classes/class_dictionary.html)<span id="i_get_statistics"></span> **get_statistics**( )
|
||||
|
||||
Gets debug information about how much time is spent processing the terrain.
|
||||
@ -125,9 +128,8 @@ Note 3: saving is asynchronous and won't block the game. the save may complete o
|
||||
- [void](#)<span id="i_set_material"></span> **set_material**( [int](https://docs.godotengine.org/en/stable/classes/class_int.html) id, [Material](https://docs.godotengine.org/en/stable/classes/class_material.html) material )
|
||||
|
||||
|
||||
|
||||
- [Vector3](https://docs.godotengine.org/en/stable/classes/class_vector3.html)<span id="i_voxel_to_block"></span> **voxel_to_block**( [Vector3](https://docs.godotengine.org/en/stable/classes/class_vector3.html) voxel_pos )
|
||||
|
||||
Converts voxel coordinates into block coordinates.
|
||||
|
||||
_Generated on Jan 24, 2021_
|
||||
_Generated on Feb 16, 2021_
|
||||
|
@ -19,7 +19,7 @@ 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
|
||||
`float` | [sdf_scale](#i_sdf_scale) | 0.002
|
||||
`int` | [value](#i_value) | 0
|
||||
<p></p>
|
||||
|
||||
@ -54,15 +54,19 @@ enum **Mode**:
|
||||
## 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
|
||||
- [float](https://docs.godotengine.org/en/stable/classes/class_float.html)<span id="i_sdf_scale"></span> **sdf_scale** = 0.002
|
||||
|
||||
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.
|
||||
|
||||
|
||||
@ -70,6 +74,7 @@ When working with smooth voxels, applies a scale to the signed distance field. A
|
||||
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
|
||||
@ -81,45 +86,34 @@ Operate on a rectangular cuboid section of the terrain. `begin` and `end` are in
|
||||
- [void](#)<span id="i_do_point"></span> **do_point**( [Vector3](https://docs.godotengine.org/en/stable/classes/class_vector3.html) pos )
|
||||
|
||||
|
||||
|
||||
- [void](#)<span id="i_do_sphere"></span> **do_sphere**( [Vector3](https://docs.godotengine.org/en/stable/classes/class_vector3.html) center, [float](https://docs.godotengine.org/en/stable/classes/class_float.html) radius )
|
||||
|
||||
|
||||
|
||||
- [int](https://docs.godotengine.org/en/stable/classes/class_int.html)<span id="i_get_voxel"></span> **get_voxel**( [Vector3](https://docs.godotengine.org/en/stable/classes/class_vector3.html) pos )
|
||||
|
||||
|
||||
|
||||
- [float](https://docs.godotengine.org/en/stable/classes/class_float.html)<span id="i_get_voxel_f"></span> **get_voxel_f**( [Vector3](https://docs.godotengine.org/en/stable/classes/class_vector3.html) pos )
|
||||
|
||||
|
||||
|
||||
- [Variant](https://docs.godotengine.org/en/stable/classes/class_variant.html)<span id="i_get_voxel_metadata"></span> **get_voxel_metadata**( [Vector3](https://docs.godotengine.org/en/stable/classes/class_vector3.html) pos )
|
||||
|
||||
|
||||
|
||||
- [bool](https://docs.godotengine.org/en/stable/classes/class_bool.html)<span id="i_is_area_editable"></span> **is_area_editable**( [AABB](https://docs.godotengine.org/en/stable/classes/class_aabb.html) box )
|
||||
|
||||
|
||||
|
||||
- [void](#)<span id="i_paste"></span> **paste**( [Vector3](https://docs.godotengine.org/en/stable/classes/class_vector3.html) dst_pos, [Reference](https://docs.godotengine.org/en/stable/classes/class_reference.html) src_buffer, [int](https://docs.godotengine.org/en/stable/classes/class_int.html) src_mask_value )
|
||||
|
||||
|
||||
|
||||
- [VoxelRaycastResult](VoxelRaycastResult.md)<span id="i_raycast"></span> **raycast**( [Vector3](https://docs.godotengine.org/en/stable/classes/class_vector3.html) origin, [Vector3](https://docs.godotengine.org/en/stable/classes/class_vector3.html) direction, [float](https://docs.godotengine.org/en/stable/classes/class_float.html) max_distance=10.0, [int](https://docs.godotengine.org/en/stable/classes/class_int.html) collision_mask=4294967295 )
|
||||
|
||||
|
||||
|
||||
- [void](#)<span id="i_set_voxel"></span> **set_voxel**( [Vector3](https://docs.godotengine.org/en/stable/classes/class_vector3.html) pos, [int](https://docs.godotengine.org/en/stable/classes/class_int.html) v )
|
||||
|
||||
|
||||
|
||||
- [void](#)<span id="i_set_voxel_f"></span> **set_voxel_f**( [Vector3](https://docs.godotengine.org/en/stable/classes/class_vector3.html) pos, [float](https://docs.godotengine.org/en/stable/classes/class_float.html) v )
|
||||
|
||||
|
||||
|
||||
- [void](#)<span id="i_set_voxel_metadata"></span> **set_voxel_metadata**( [Vector3](https://docs.godotengine.org/en/stable/classes/class_vector3.html) pos, [Variant](https://docs.godotengine.org/en/stable/classes/class_variant.html) meta )
|
||||
|
||||
|
||||
|
||||
_Generated on Jan 24, 2021_
|
||||
_Generated on Feb 16, 2021_
|
||||
|
@ -5,4 +5,4 @@ Inherits: [VoxelTool](VoxelTool.md)
|
||||
|
||||
|
||||
|
||||
_Generated on Jan 24, 2021_
|
||||
_Generated on Feb 16, 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 24, 2021_
|
||||
_Generated on Feb 16, 2021_
|
||||
|
@ -24,12 +24,15 @@ Type | Name | Default
|
||||
## Property Descriptions
|
||||
|
||||
- [bool](https://docs.godotengine.org/en/stable/classes/class_bool.html)<span id="i_requires_collisions"></span> **requires_collisions** = false
|
||||
|
||||
If set to `true`, the engine will generate classic collision shapes around this viewer.
|
||||
|
||||
- [bool](https://docs.godotengine.org/en/stable/classes/class_bool.html)<span id="i_requires_visuals"></span> **requires_visuals** = true
|
||||
|
||||
If set to `true`, the engine will generate meshes around this viewer. This may be enabled for the local player.
|
||||
|
||||
- [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 24, 2021_
|
||||
_Generated on Feb 16, 2021_
|
||||
|
@ -18,5 +18,4 @@ Return | Signatur
|
||||
- [int](https://docs.godotengine.org/en/stable/classes/class_int.html)<span id="i_load_from_file"></span> **load_from_file**( [String](https://docs.godotengine.org/en/stable/classes/class_string.html) fpath, [VoxelBuffer](VoxelBuffer.md) voxels, [VoxelColorPalette](VoxelColorPalette.md) arg2 )
|
||||
|
||||
|
||||
|
||||
_Generated on Jan 24, 2021_
|
||||
_Generated on Feb 16, 2021_
|
||||
|
Loading…
x
Reference in New Issue
Block a user