Rename 2D NoiseTexture to NoiseTexture2D
This commit is contained in:
@ -1,14 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="NoiseTexture" inherits="Texture2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
|
||||
<class name="NoiseTexture2D" inherits="Texture2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
|
||||
<brief_description>
|
||||
A texture filled with noise generated by a [Noise] object.
|
||||
</brief_description>
|
||||
<description>
|
||||
Uses [FastNoiseLite] or other libraries to fill the texture data of your desired size.
|
||||
NoiseTexture can also generate normalmap textures.
|
||||
NoiseTexture2D can also generate normalmap 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 = NoiseTexture.new()
|
||||
var texture = NoiseTexture2D.new()
|
||||
texture.noise = FastNoiseLite.new()
|
||||
await texture.changed
|
||||
var image = texture.get_image()
|
||||
Reference in New Issue
Block a user