diff options
author | Marcel Admiraal <madmiraal@users.noreply.github.com> | 2021-03-28 12:32:17 +0100 |
---|---|---|
committer | Marcel Admiraal <madmiraal@users.noreply.github.com> | 2021-03-28 13:00:46 +0100 |
commit | fd30c36985c6a5de09daf897800c36acb8c2c49a (patch) | |
tree | 31119051e0aa93211ea6cb81e6192a2e4afd41ea /modules/opensimplex/doc_classes/NoiseTexture.xml | |
parent | f8442b97bf7f2b445b0aca9c02629277c11064d6 (diff) |
Rename Texture.get_data() to get_image()
Diffstat (limited to 'modules/opensimplex/doc_classes/NoiseTexture.xml')
-rw-r--r-- | modules/opensimplex/doc_classes/NoiseTexture.xml | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/opensimplex/doc_classes/NoiseTexture.xml b/modules/opensimplex/doc_classes/NoiseTexture.xml index 86e7f9cc08..38c5138482 100644 --- a/modules/opensimplex/doc_classes/NoiseTexture.xml +++ b/modules/opensimplex/doc_classes/NoiseTexture.xml @@ -6,11 +6,12 @@ <description> Uses an [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 normal map textures. - The class uses [Thread]s to generate the texture data internally, so [method Texture2D.get_data] 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 data: + 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 image = texture.get_data() + var image = texture.get_image() + var data = image.get_data() [/codeblock] </description> <tutorials> |