123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148 |
- :github_url: hide
- .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
- .. DO NOT EDIT THIS FILE, but the NoiseTexture.xml source instead.
- .. The source is found in doc/classes or modules/<name>/doc_classes.
- .. _class_NoiseTexture:
- NoiseTexture
- ============
- **Inherits:** :ref:`Texture<class_Texture>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
- :ref:`OpenSimplexNoise<class_OpenSimplexNoise>` filled texture.
- Description
- -----------
- Uses an :ref:`OpenSimplexNoise<class_OpenSimplexNoise>` to fill the texture data. You can specify the texture size but keep in mind that larger textures will take longer to generate and seamless noise only works with square sized textures.
- NoiseTexture can also generate normalmap textures.
- The class uses :ref:`Thread<class_Thread>`\ s to generate the texture data internally, so :ref:`Texture.get_data<class_Texture_method_get_data>` may return ``null`` if the generation process has not completed yet. In that case, you need to wait for the texture to be generated before accessing the data:
- ::
- var texture = preload("res://noise.tres")
- yield(texture, "changed")
- var image = texture.get_data()
- Properties
- ----------
- +-------------------------------------------------+-----------------------------------------------------------------+---------------------------+
- | :ref:`bool<class_bool>` | :ref:`as_normalmap<class_NoiseTexture_property_as_normalmap>` | ``false`` |
- +-------------------------------------------------+-----------------------------------------------------------------+---------------------------+
- | :ref:`float<class_float>` | :ref:`bump_strength<class_NoiseTexture_property_bump_strength>` | ``8.0`` |
- +-------------------------------------------------+-----------------------------------------------------------------+---------------------------+
- | :ref:`int<class_int>` | flags | ``7`` *(parent override)* |
- +-------------------------------------------------+-----------------------------------------------------------------+---------------------------+
- | :ref:`int<class_int>` | :ref:`height<class_NoiseTexture_property_height>` | ``512`` |
- +-------------------------------------------------+-----------------------------------------------------------------+---------------------------+
- | :ref:`OpenSimplexNoise<class_OpenSimplexNoise>` | :ref:`noise<class_NoiseTexture_property_noise>` | |
- +-------------------------------------------------+-----------------------------------------------------------------+---------------------------+
- | :ref:`bool<class_bool>` | :ref:`seamless<class_NoiseTexture_property_seamless>` | ``false`` |
- +-------------------------------------------------+-----------------------------------------------------------------+---------------------------+
- | :ref:`int<class_int>` | :ref:`width<class_NoiseTexture_property_width>` | ``512`` |
- +-------------------------------------------------+-----------------------------------------------------------------+---------------------------+
- Property Descriptions
- ---------------------
- .. _class_NoiseTexture_property_as_normalmap:
- - :ref:`bool<class_bool>` **as_normalmap**
- +-----------+-------------------------+
- | *Default* | ``false`` |
- +-----------+-------------------------+
- | *Setter* | set_as_normalmap(value) |
- +-----------+-------------------------+
- | *Getter* | is_normalmap() |
- +-----------+-------------------------+
- If ``true``, the resulting texture contains a normal map created from the original noise interpreted as a bump map.
- ----
- .. _class_NoiseTexture_property_bump_strength:
- - :ref:`float<class_float>` **bump_strength**
- +-----------+--------------------------+
- | *Default* | ``8.0`` |
- +-----------+--------------------------+
- | *Setter* | set_bump_strength(value) |
- +-----------+--------------------------+
- | *Getter* | get_bump_strength() |
- +-----------+--------------------------+
- Strength of the bump maps used in this texture. A higher value will make the bump maps appear larger while a lower value will make them appear softer.
- ----
- .. _class_NoiseTexture_property_height:
- - :ref:`int<class_int>` **height**
- +-----------+-------------------+
- | *Default* | ``512`` |
- +-----------+-------------------+
- | *Setter* | set_height(value) |
- +-----------+-------------------+
- | *Getter* | get_height() |
- +-----------+-------------------+
- Height of the generated texture.
- ----
- .. _class_NoiseTexture_property_noise:
- - :ref:`OpenSimplexNoise<class_OpenSimplexNoise>` **noise**
- +----------+------------------+
- | *Setter* | set_noise(value) |
- +----------+------------------+
- | *Getter* | get_noise() |
- +----------+------------------+
- The :ref:`OpenSimplexNoise<class_OpenSimplexNoise>` instance used to generate the noise.
- ----
- .. _class_NoiseTexture_property_seamless:
- - :ref:`bool<class_bool>` **seamless**
- +-----------+---------------------+
- | *Default* | ``false`` |
- +-----------+---------------------+
- | *Setter* | set_seamless(value) |
- +-----------+---------------------+
- | *Getter* | get_seamless() |
- +-----------+---------------------+
- Whether the texture can be tiled without visible seams or not. Seamless textures take longer to generate.
- ----
- .. _class_NoiseTexture_property_width:
- - :ref:`int<class_int>` **width**
- +-----------+------------------+
- | *Default* | ``512`` |
- +-----------+------------------+
- | *Setter* | set_width(value) |
- +-----------+------------------+
- | *Getter* | get_width() |
- +-----------+------------------+
- Width of the generated texture.
- .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
- .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
- .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|