summaryrefslogtreecommitdiff
path: root/modules/opensimplex/doc_classes/NoiseTexture.xml
diff options
context:
space:
mode:
Diffstat (limited to 'modules/opensimplex/doc_classes/NoiseTexture.xml')
-rw-r--r--modules/opensimplex/doc_classes/NoiseTexture.xml9
1 files changed, 3 insertions, 6 deletions
diff --git a/modules/opensimplex/doc_classes/NoiseTexture.xml b/modules/opensimplex/doc_classes/NoiseTexture.xml
index 2ae7f8cad9..16fea228b1 100644
--- a/modules/opensimplex/doc_classes/NoiseTexture.xml
+++ b/modules/opensimplex/doc_classes/NoiseTexture.xml
@@ -8,16 +8,15 @@
NoiseTexture can also generate normal map textures.
The class uses [Thread]s to generate the texture data internally, so [method Texture2D.get_image] may return [code]null[/code] if the generation process has not completed yet. In that case, you need to wait for the texture to be generated before accessing the image and the generated byte data:
[codeblock]
- var texture = preload("res://noise.tres")
- yield(texture, "changed")
+ var texture = NoiseTexture.new()
+ texture.noise = OpenSimplexNoise.new()
+ await texture.changed
var image = texture.get_image()
var data = image.get_data()
[/codeblock]
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="as_normal_map" type="bool" setter="set_as_normal_map" getter="is_normal_map" default="false">
If [code]true[/code], the resulting texture contains a normal map created from the original noise interpreted as a bump map.
@@ -42,6 +41,4 @@
Width of the generated texture.
</member>
</members>
- <constants>
- </constants>
</class>