mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2026-01-05 14:10:19 +03:00
731 lines
30 KiB
ReStructuredText
731 lines
30 KiB
ReStructuredText
:github_url: hide
|
|
|
|
.. _class_FastNoiseLite:
|
|
|
|
FastNoiseLite
|
|
=============
|
|
|
|
**繼承:** :ref:`Noise<class_Noise>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
|
|
|
使用 FastNoiseLite 庫生成雜訊。
|
|
|
|
.. rst-class:: classref-introduction-group
|
|
|
|
說明
|
|
----
|
|
|
|
該類使用 FastNoiseLite 庫生成雜訊,該庫是多種雜訊演算法的集合,包括 Cellular、Perlin、Value 等。
|
|
|
|
大多數生成的雜訊值都在 ``[-1,1]`` 範圍內,但並非總是如此。一些蜂窩噪聲演算法返回高於 ``1`` 的結果。
|
|
|
|
.. rst-class:: classref-reftable-group
|
|
|
|
屬性
|
|
----
|
|
|
|
.. table::
|
|
:widths: auto
|
|
|
|
+------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+
|
|
| :ref:`CellularDistanceFunction<enum_FastNoiseLite_CellularDistanceFunction>` | :ref:`cellular_distance_function<class_FastNoiseLite_property_cellular_distance_function>` | ``0`` |
|
|
+------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+
|
|
| :ref:`float<class_float>` | :ref:`cellular_jitter<class_FastNoiseLite_property_cellular_jitter>` | ``1.0`` |
|
|
+------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+
|
|
| :ref:`CellularReturnType<enum_FastNoiseLite_CellularReturnType>` | :ref:`cellular_return_type<class_FastNoiseLite_property_cellular_return_type>` | ``1`` |
|
|
+------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+
|
|
| :ref:`float<class_float>` | :ref:`domain_warp_amplitude<class_FastNoiseLite_property_domain_warp_amplitude>` | ``30.0`` |
|
|
+------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`domain_warp_enabled<class_FastNoiseLite_property_domain_warp_enabled>` | ``false`` |
|
|
+------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+
|
|
| :ref:`float<class_float>` | :ref:`domain_warp_fractal_gain<class_FastNoiseLite_property_domain_warp_fractal_gain>` | ``0.5`` |
|
|
+------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+
|
|
| :ref:`float<class_float>` | :ref:`domain_warp_fractal_lacunarity<class_FastNoiseLite_property_domain_warp_fractal_lacunarity>` | ``6.0`` |
|
|
+------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+
|
|
| :ref:`int<class_int>` | :ref:`domain_warp_fractal_octaves<class_FastNoiseLite_property_domain_warp_fractal_octaves>` | ``5`` |
|
|
+------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+
|
|
| :ref:`DomainWarpFractalType<enum_FastNoiseLite_DomainWarpFractalType>` | :ref:`domain_warp_fractal_type<class_FastNoiseLite_property_domain_warp_fractal_type>` | ``1`` |
|
|
+------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+
|
|
| :ref:`float<class_float>` | :ref:`domain_warp_frequency<class_FastNoiseLite_property_domain_warp_frequency>` | ``0.05`` |
|
|
+------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+
|
|
| :ref:`DomainWarpType<enum_FastNoiseLite_DomainWarpType>` | :ref:`domain_warp_type<class_FastNoiseLite_property_domain_warp_type>` | ``0`` |
|
|
+------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+
|
|
| :ref:`float<class_float>` | :ref:`fractal_gain<class_FastNoiseLite_property_fractal_gain>` | ``0.5`` |
|
|
+------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+
|
|
| :ref:`float<class_float>` | :ref:`fractal_lacunarity<class_FastNoiseLite_property_fractal_lacunarity>` | ``2.0`` |
|
|
+------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+
|
|
| :ref:`int<class_int>` | :ref:`fractal_octaves<class_FastNoiseLite_property_fractal_octaves>` | ``5`` |
|
|
+------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+
|
|
| :ref:`float<class_float>` | :ref:`fractal_ping_pong_strength<class_FastNoiseLite_property_fractal_ping_pong_strength>` | ``2.0`` |
|
|
+------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+
|
|
| :ref:`FractalType<enum_FastNoiseLite_FractalType>` | :ref:`fractal_type<class_FastNoiseLite_property_fractal_type>` | ``1`` |
|
|
+------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+
|
|
| :ref:`float<class_float>` | :ref:`fractal_weighted_strength<class_FastNoiseLite_property_fractal_weighted_strength>` | ``0.0`` |
|
|
+------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+
|
|
| :ref:`float<class_float>` | :ref:`frequency<class_FastNoiseLite_property_frequency>` | ``0.01`` |
|
|
+------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+
|
|
| :ref:`NoiseType<enum_FastNoiseLite_NoiseType>` | :ref:`noise_type<class_FastNoiseLite_property_noise_type>` | ``1`` |
|
|
+------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+
|
|
| :ref:`Vector3<class_Vector3>` | :ref:`offset<class_FastNoiseLite_property_offset>` | ``Vector3(0, 0, 0)`` |
|
|
+------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+
|
|
| :ref:`int<class_int>` | :ref:`seed<class_FastNoiseLite_property_seed>` | ``0`` |
|
|
+------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
列舉
|
|
----
|
|
|
|
.. _enum_FastNoiseLite_NoiseType:
|
|
|
|
.. rst-class:: classref-enumeration
|
|
|
|
enum **NoiseType**: :ref:`🔗<enum_FastNoiseLite_NoiseType>`
|
|
|
|
.. _class_FastNoiseLite_constant_TYPE_VALUE:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`NoiseType<enum_FastNoiseLite_NoiseType>` **TYPE_VALUE** = ``5``
|
|
|
|
點陣被分配隨機值,然後根據相鄰值進行插值。
|
|
|
|
.. _class_FastNoiseLite_constant_TYPE_VALUE_CUBIC:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`NoiseType<enum_FastNoiseLite_NoiseType>` **TYPE_VALUE_CUBIC** = ``4``
|
|
|
|
Similar to value noise (:ref:`TYPE_VALUE<class_FastNoiseLite_constant_TYPE_VALUE>`), but slower. Has more variance in peaks and valleys.
|
|
|
|
Cubic noise can be used to avoid certain artifacts when using value noise to create a bumpmap. In general, you should always use this mode if the value noise is being used for a heightmap or bumpmap.
|
|
|
|
.. _class_FastNoiseLite_constant_TYPE_PERLIN:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`NoiseType<enum_FastNoiseLite_NoiseType>` **TYPE_PERLIN** = ``3``
|
|
|
|
隨機漸變的一種格子。對它們的點積進行插值,以獲得格子之間的值。
|
|
|
|
.. _class_FastNoiseLite_constant_TYPE_CELLULAR:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`NoiseType<enum_FastNoiseLite_NoiseType>` **TYPE_CELLULAR** = ``2``
|
|
|
|
蜂窩包括 Worley 雜訊圖和 Voronoi 圖,它們建立了相同值的不同區域。
|
|
|
|
.. _class_FastNoiseLite_constant_TYPE_SIMPLEX:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`NoiseType<enum_FastNoiseLite_NoiseType>` **TYPE_SIMPLEX** = ``0``
|
|
|
|
As opposed to :ref:`TYPE_PERLIN<class_FastNoiseLite_constant_TYPE_PERLIN>`, gradients exist in a simplex lattice rather than a grid lattice, avoiding directional artifacts. Internally uses FastNoiseLite's OpenSimplex2 noise type.
|
|
|
|
.. _class_FastNoiseLite_constant_TYPE_SIMPLEX_SMOOTH:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`NoiseType<enum_FastNoiseLite_NoiseType>` **TYPE_SIMPLEX_SMOOTH** = ``1``
|
|
|
|
Modified, higher quality version of :ref:`TYPE_SIMPLEX<class_FastNoiseLite_constant_TYPE_SIMPLEX>`, but slower. Internally uses FastNoiseLite's OpenSimplex2S noise type.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _enum_FastNoiseLite_FractalType:
|
|
|
|
.. rst-class:: classref-enumeration
|
|
|
|
enum **FractalType**: :ref:`🔗<enum_FastNoiseLite_FractalType>`
|
|
|
|
.. _class_FastNoiseLite_constant_FRACTAL_NONE:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`FractalType<enum_FastNoiseLite_FractalType>` **FRACTAL_NONE** = ``0``
|
|
|
|
無分形雜訊。
|
|
|
|
.. _class_FastNoiseLite_constant_FRACTAL_FBM:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`FractalType<enum_FastNoiseLite_FractalType>` **FRACTAL_FBM** = ``1``
|
|
|
|
使用分形布朗運動將八度音階組合成分形的方法。
|
|
|
|
.. _class_FastNoiseLite_constant_FRACTAL_RIDGED:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`FractalType<enum_FastNoiseLite_FractalType>` **FRACTAL_RIDGED** = ``2``
|
|
|
|
將八度音階組合成分形的方法,從而產生一種“脊狀”外觀。
|
|
|
|
.. _class_FastNoiseLite_constant_FRACTAL_PING_PONG:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`FractalType<enum_FastNoiseLite_FractalType>` **FRACTAL_PING_PONG** = ``3``
|
|
|
|
將八度音階組合成具有乒乓效果的分形的方法。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _enum_FastNoiseLite_CellularDistanceFunction:
|
|
|
|
.. rst-class:: classref-enumeration
|
|
|
|
enum **CellularDistanceFunction**: :ref:`🔗<enum_FastNoiseLite_CellularDistanceFunction>`
|
|
|
|
.. _class_FastNoiseLite_constant_DISTANCE_EUCLIDEAN:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`CellularDistanceFunction<enum_FastNoiseLite_CellularDistanceFunction>` **DISTANCE_EUCLIDEAN** = ``0``
|
|
|
|
到最近點的歐幾裡得距離。
|
|
|
|
.. _class_FastNoiseLite_constant_DISTANCE_EUCLIDEAN_SQUARED:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`CellularDistanceFunction<enum_FastNoiseLite_CellularDistanceFunction>` **DISTANCE_EUCLIDEAN_SQUARED** = ``1``
|
|
|
|
到最近點的歐幾裡得距離的平方。
|
|
|
|
.. _class_FastNoiseLite_constant_DISTANCE_MANHATTAN:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`CellularDistanceFunction<enum_FastNoiseLite_CellularDistanceFunction>` **DISTANCE_MANHATTAN** = ``2``
|
|
|
|
到最近點的曼哈頓距離(計程車度量法)。
|
|
|
|
.. _class_FastNoiseLite_constant_DISTANCE_HYBRID:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`CellularDistanceFunction<enum_FastNoiseLite_CellularDistanceFunction>` **DISTANCE_HYBRID** = ``3``
|
|
|
|
Blend of :ref:`DISTANCE_EUCLIDEAN<class_FastNoiseLite_constant_DISTANCE_EUCLIDEAN>` and :ref:`DISTANCE_MANHATTAN<class_FastNoiseLite_constant_DISTANCE_MANHATTAN>` to give curved cell boundaries.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _enum_FastNoiseLite_CellularReturnType:
|
|
|
|
.. rst-class:: classref-enumeration
|
|
|
|
enum **CellularReturnType**: :ref:`🔗<enum_FastNoiseLite_CellularReturnType>`
|
|
|
|
.. _class_FastNoiseLite_constant_RETURN_CELL_VALUE:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`CellularReturnType<enum_FastNoiseLite_CellularReturnType>` **RETURN_CELL_VALUE** = ``0``
|
|
|
|
蜂窩儲存格距離函式,將為儲存格內的所有點返回相同的值。
|
|
|
|
.. _class_FastNoiseLite_constant_RETURN_DISTANCE:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`CellularReturnType<enum_FastNoiseLite_CellularReturnType>` **RETURN_DISTANCE** = ``1``
|
|
|
|
蜂窩儲存格距離函式,將返回一個由到最近點的距離確定的值。
|
|
|
|
.. _class_FastNoiseLite_constant_RETURN_DISTANCE2:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`CellularReturnType<enum_FastNoiseLite_CellularReturnType>` **RETURN_DISTANCE2** = ``2``
|
|
|
|
蜂窩儲存格距離函式,將返回到第二最近點的距離。
|
|
|
|
.. _class_FastNoiseLite_constant_RETURN_DISTANCE2_ADD:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`CellularReturnType<enum_FastNoiseLite_CellularReturnType>` **RETURN_DISTANCE2_ADD** = ``3``
|
|
|
|
將最近點的距離與次近點的距離相加。
|
|
|
|
.. _class_FastNoiseLite_constant_RETURN_DISTANCE2_SUB:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`CellularReturnType<enum_FastNoiseLite_CellularReturnType>` **RETURN_DISTANCE2_SUB** = ``4``
|
|
|
|
將最近點的距離與次近點的距離相減。
|
|
|
|
.. _class_FastNoiseLite_constant_RETURN_DISTANCE2_MUL:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`CellularReturnType<enum_FastNoiseLite_CellularReturnType>` **RETURN_DISTANCE2_MUL** = ``5``
|
|
|
|
將最近點的距離與次近點的距離相乘。
|
|
|
|
.. _class_FastNoiseLite_constant_RETURN_DISTANCE2_DIV:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`CellularReturnType<enum_FastNoiseLite_CellularReturnType>` **RETURN_DISTANCE2_DIV** = ``6``
|
|
|
|
將最近點的距離與次近點的距離相除。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _enum_FastNoiseLite_DomainWarpType:
|
|
|
|
.. rst-class:: classref-enumeration
|
|
|
|
enum **DomainWarpType**: :ref:`🔗<enum_FastNoiseLite_DomainWarpType>`
|
|
|
|
.. _class_FastNoiseLite_constant_DOMAIN_WARP_SIMPLEX:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`DomainWarpType<enum_FastNoiseLite_DomainWarpType>` **DOMAIN_WARP_SIMPLEX** = ``0``
|
|
|
|
使用單純形雜訊演算法,對域進行扭曲。
|
|
|
|
.. _class_FastNoiseLite_constant_DOMAIN_WARP_SIMPLEX_REDUCED:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`DomainWarpType<enum_FastNoiseLite_DomainWarpType>` **DOMAIN_WARP_SIMPLEX_REDUCED** = ``1``
|
|
|
|
使用簡化版的單純形雜訊演算法,對域進行扭曲。
|
|
|
|
.. _class_FastNoiseLite_constant_DOMAIN_WARP_BASIC_GRID:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`DomainWarpType<enum_FastNoiseLite_DomainWarpType>` **DOMAIN_WARP_BASIC_GRID** = ``2``
|
|
|
|
使用簡單的雜訊柵格(不像其他方法那樣平滑,但性能更高),對域進行扭曲。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _enum_FastNoiseLite_DomainWarpFractalType:
|
|
|
|
.. rst-class:: classref-enumeration
|
|
|
|
enum **DomainWarpFractalType**: :ref:`🔗<enum_FastNoiseLite_DomainWarpFractalType>`
|
|
|
|
.. _class_FastNoiseLite_constant_DOMAIN_WARP_FRACTAL_NONE:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`DomainWarpFractalType<enum_FastNoiseLite_DomainWarpFractalType>` **DOMAIN_WARP_FRACTAL_NONE** = ``0``
|
|
|
|
沒有用於扭曲空間的分形雜訊。
|
|
|
|
.. _class_FastNoiseLite_constant_DOMAIN_WARP_FRACTAL_PROGRESSIVE:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`DomainWarpFractalType<enum_FastNoiseLite_DomainWarpFractalType>` **DOMAIN_WARP_FRACTAL_PROGRESSIVE** = ``1``
|
|
|
|
逐漸扭曲空間,一個八度一個八度,導致更“液化”的失真。
|
|
|
|
.. _class_FastNoiseLite_constant_DOMAIN_WARP_FRACTAL_INDEPENDENT:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`DomainWarpFractalType<enum_FastNoiseLite_DomainWarpFractalType>` **DOMAIN_WARP_FRACTAL_INDEPENDENT** = ``2``
|
|
|
|
為每個八度音階獨立地扭曲空間,從而導致更混亂的失真。
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
屬性說明
|
|
--------
|
|
|
|
.. _class_FastNoiseLite_property_cellular_distance_function:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`CellularDistanceFunction<enum_FastNoiseLite_CellularDistanceFunction>` **cellular_distance_function** = ``0`` :ref:`🔗<class_FastNoiseLite_property_cellular_distance_function>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_cellular_distance_function**\ (\ value\: :ref:`CellularDistanceFunction<enum_FastNoiseLite_CellularDistanceFunction>`\ )
|
|
- :ref:`CellularDistanceFunction<enum_FastNoiseLite_CellularDistanceFunction>` **get_cellular_distance_function**\ (\ )
|
|
|
|
Determines how the distance to the nearest/second-nearest point is computed.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_FastNoiseLite_property_cellular_jitter:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`float<class_float>` **cellular_jitter** = ``1.0`` :ref:`🔗<class_FastNoiseLite_property_cellular_jitter>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_cellular_jitter**\ (\ value\: :ref:`float<class_float>`\ )
|
|
- :ref:`float<class_float>` **get_cellular_jitter**\ (\ )
|
|
|
|
一個點可以離開其柵格位置的最大距離。對於偶數柵格,設定為 ``0``\ 。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_FastNoiseLite_property_cellular_return_type:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`CellularReturnType<enum_FastNoiseLite_CellularReturnType>` **cellular_return_type** = ``1`` :ref:`🔗<class_FastNoiseLite_property_cellular_return_type>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_cellular_return_type**\ (\ value\: :ref:`CellularReturnType<enum_FastNoiseLite_CellularReturnType>`\ )
|
|
- :ref:`CellularReturnType<enum_FastNoiseLite_CellularReturnType>` **get_cellular_return_type**\ (\ )
|
|
|
|
Return type from cellular noise calculations.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_FastNoiseLite_property_domain_warp_amplitude:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`float<class_float>` **domain_warp_amplitude** = ``30.0`` :ref:`🔗<class_FastNoiseLite_property_domain_warp_amplitude>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_domain_warp_amplitude**\ (\ value\: :ref:`float<class_float>`\ )
|
|
- :ref:`float<class_float>` **get_domain_warp_amplitude**\ (\ )
|
|
|
|
設定距原點的最大扭曲距離。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_FastNoiseLite_property_domain_warp_enabled:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`bool<class_bool>` **domain_warp_enabled** = ``false`` :ref:`🔗<class_FastNoiseLite_property_domain_warp_enabled>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_domain_warp_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
|
|
- :ref:`bool<class_bool>` **is_domain_warp_enabled**\ (\ )
|
|
|
|
如果啟用,則另一個 FastNoiseLite 實例將被用於扭曲空間,從而導致雜訊失真。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_FastNoiseLite_property_domain_warp_fractal_gain:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`float<class_float>` **domain_warp_fractal_gain** = ``0.5`` :ref:`🔗<class_FastNoiseLite_property_domain_warp_fractal_gain>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_domain_warp_fractal_gain**\ (\ value\: :ref:`float<class_float>`\ )
|
|
- :ref:`float<class_float>` **get_domain_warp_fractal_gain**\ (\ )
|
|
|
|
確定用於扭曲空間的雜訊的每個後續層的強度。
|
|
|
|
較低的值更強調較低頻率的基礎層,而較高的值則更強調較高頻率的層。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_FastNoiseLite_property_domain_warp_fractal_lacunarity:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`float<class_float>` **domain_warp_fractal_lacunarity** = ``6.0`` :ref:`🔗<class_FastNoiseLite_property_domain_warp_fractal_lacunarity>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_domain_warp_fractal_lacunarity**\ (\ value\: :ref:`float<class_float>`\ )
|
|
- :ref:`float<class_float>` **get_domain_warp_fractal_lacunarity**\ (\ )
|
|
|
|
The change in frequency between octaves, also known as "lacunarity", of the fractal noise which warps the space. Increasing this value results in higher octaves, producing noise with finer details and a rougher appearance.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_FastNoiseLite_property_domain_warp_fractal_octaves:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`int<class_int>` **domain_warp_fractal_octaves** = ``5`` :ref:`🔗<class_FastNoiseLite_property_domain_warp_fractal_octaves>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_domain_warp_fractal_octaves**\ (\ value\: :ref:`int<class_int>`\ )
|
|
- :ref:`int<class_int>` **get_domain_warp_fractal_octaves**\ (\ )
|
|
|
|
為獲得扭曲空間的分形雜訊的最終值而取樣的雜訊層數。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_FastNoiseLite_property_domain_warp_fractal_type:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`DomainWarpFractalType<enum_FastNoiseLite_DomainWarpFractalType>` **domain_warp_fractal_type** = ``1`` :ref:`🔗<class_FastNoiseLite_property_domain_warp_fractal_type>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_domain_warp_fractal_type**\ (\ value\: :ref:`DomainWarpFractalType<enum_FastNoiseLite_DomainWarpFractalType>`\ )
|
|
- :ref:`DomainWarpFractalType<enum_FastNoiseLite_DomainWarpFractalType>` **get_domain_warp_fractal_type**\ (\ )
|
|
|
|
The method for combining octaves into a fractal which is used to warp the space.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_FastNoiseLite_property_domain_warp_frequency:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`float<class_float>` **domain_warp_frequency** = ``0.05`` :ref:`🔗<class_FastNoiseLite_property_domain_warp_frequency>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_domain_warp_frequency**\ (\ value\: :ref:`float<class_float>`\ )
|
|
- :ref:`float<class_float>` **get_domain_warp_frequency**\ (\ )
|
|
|
|
扭曲空間的噪音頻率。低頻產生平滑的雜訊,而高頻產生更粗糙、顆粒狀更明顯的噪聲。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_FastNoiseLite_property_domain_warp_type:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`DomainWarpType<enum_FastNoiseLite_DomainWarpType>` **domain_warp_type** = ``0`` :ref:`🔗<class_FastNoiseLite_property_domain_warp_type>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_domain_warp_type**\ (\ value\: :ref:`DomainWarpType<enum_FastNoiseLite_DomainWarpType>`\ )
|
|
- :ref:`DomainWarpType<enum_FastNoiseLite_DomainWarpType>` **get_domain_warp_type**\ (\ )
|
|
|
|
The warp algorithm.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_FastNoiseLite_property_fractal_gain:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`float<class_float>` **fractal_gain** = ``0.5`` :ref:`🔗<class_FastNoiseLite_property_fractal_gain>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_fractal_gain**\ (\ value\: :ref:`float<class_float>`\ )
|
|
- :ref:`float<class_float>` **get_fractal_gain**\ (\ )
|
|
|
|
確定分形雜訊中雜訊的每個後續層的強度。
|
|
|
|
較低的值更強調較低頻率的基礎層,而較高的值則更強調較高頻率的層。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_FastNoiseLite_property_fractal_lacunarity:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`float<class_float>` **fractal_lacunarity** = ``2.0`` :ref:`🔗<class_FastNoiseLite_property_fractal_lacunarity>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_fractal_lacunarity**\ (\ value\: :ref:`float<class_float>`\ )
|
|
- :ref:`float<class_float>` **get_fractal_lacunarity**\ (\ )
|
|
|
|
後續八度音階之間的倍頻器。增加該值,會產生更高的八度音階,從而產生細節更精細、外觀更粗糙的雜訊。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_FastNoiseLite_property_fractal_octaves:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`int<class_int>` **fractal_octaves** = ``5`` :ref:`🔗<class_FastNoiseLite_property_fractal_octaves>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_fractal_octaves**\ (\ value\: :ref:`int<class_int>`\ )
|
|
- :ref:`int<class_int>` **get_fractal_octaves**\ (\ )
|
|
|
|
為獲得分形雜訊型別的最終值而取樣的雜訊層數。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_FastNoiseLite_property_fractal_ping_pong_strength:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`float<class_float>` **fractal_ping_pong_strength** = ``2.0`` :ref:`🔗<class_FastNoiseLite_property_fractal_ping_pong_strength>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_fractal_ping_pong_strength**\ (\ value\: :ref:`float<class_float>`\ )
|
|
- :ref:`float<class_float>` **get_fractal_ping_pong_strength**\ (\ )
|
|
|
|
設定分形乒乓型別的強度。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_FastNoiseLite_property_fractal_type:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`FractalType<enum_FastNoiseLite_FractalType>` **fractal_type** = ``1`` :ref:`🔗<class_FastNoiseLite_property_fractal_type>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_fractal_type**\ (\ value\: :ref:`FractalType<enum_FastNoiseLite_FractalType>`\ )
|
|
- :ref:`FractalType<enum_FastNoiseLite_FractalType>` **get_fractal_type**\ (\ )
|
|
|
|
The method for combining octaves into a fractal.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_FastNoiseLite_property_fractal_weighted_strength:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`float<class_float>` **fractal_weighted_strength** = ``0.0`` :ref:`🔗<class_FastNoiseLite_property_fractal_weighted_strength>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_fractal_weighted_strength**\ (\ value\: :ref:`float<class_float>`\ )
|
|
- :ref:`float<class_float>` **get_fractal_weighted_strength**\ (\ )
|
|
|
|
較高的權重意味著如果較低的八度具有較大的影響,則較高的八度具有較小的影響。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_FastNoiseLite_property_frequency:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`float<class_float>` **frequency** = ``0.01`` :ref:`🔗<class_FastNoiseLite_property_frequency>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_frequency**\ (\ value\: :ref:`float<class_float>`\ )
|
|
- :ref:`float<class_float>` **get_frequency**\ (\ )
|
|
|
|
所有雜訊型別的頻率。低頻產生平滑的雜訊,而高頻產生更粗糙、顆粒狀更明顯的噪聲。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_FastNoiseLite_property_noise_type:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`NoiseType<enum_FastNoiseLite_NoiseType>` **noise_type** = ``1`` :ref:`🔗<class_FastNoiseLite_property_noise_type>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_noise_type**\ (\ value\: :ref:`NoiseType<enum_FastNoiseLite_NoiseType>`\ )
|
|
- :ref:`NoiseType<enum_FastNoiseLite_NoiseType>` **get_noise_type**\ (\ )
|
|
|
|
The noise algorithm used.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_FastNoiseLite_property_offset:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`Vector3<class_Vector3>` **offset** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_FastNoiseLite_property_offset>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_offset**\ (\ value\: :ref:`Vector3<class_Vector3>`\ )
|
|
- :ref:`Vector3<class_Vector3>` **get_offset**\ (\ )
|
|
|
|
使用給定的 :ref:`Vector3<class_Vector3>` 對雜訊輸入座標進行平移。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_FastNoiseLite_property_seed:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`int<class_int>` **seed** = ``0`` :ref:`🔗<class_FastNoiseLite_property_seed>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_seed**\ (\ value\: :ref:`int<class_int>`\ )
|
|
- :ref:`int<class_int>` **get_seed**\ (\ )
|
|
|
|
所有雜訊型別的亂數種子。
|
|
|
|
.. |virtual| replace:: :abbr:`virtual (本方法通常需要使用者覆寫才能生效。)`
|
|
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
|
.. |const| replace:: :abbr:`const (本方法沒有副作用。不會修改該實例的任何成員變數。)`
|
|
.. |vararg| replace:: :abbr:`vararg (本方法除了這裡描述的參數外,還可以接受任意數量的參數。)`
|
|
.. |constructor| replace:: :abbr:`constructor (本方法用於建構一個型別。)`
|
|
.. |static| replace:: :abbr:`static (本方法無需實例即可呼叫,因此可以直接使用類別名稱呼叫。)`
|
|
.. |operator| replace:: :abbr:`operator (本方法描述將本型別作為左運算元時可用的有效運算子。)`
|
|
.. |bitfield| replace:: :abbr:`BitField (此值是由下列旗標組成的位元遮罩整數。)`
|
|
.. |void| replace:: :abbr:`void (無回傳值。)`
|