NoiseTexture

OpenSimplexNoise filled texture.

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 normalmap textures. The class uses Threads to generate the texture data internally, so Texture.getData 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:

More...

Members

Aliases

BaseClasses
alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses)
Undocumented in source.

Functions

_generateTexture
Ref!Image _generateTexture()
_queueUpdate
void _queueUpdate()
_threadDone
void _threadDone(Image image)
_updateTexture
void _updateTexture()
getBumpStrength
double getBumpStrength()
getNoise
Ref!OpenSimplexNoise getNoise()
getSeamless
bool getSeamless()
isNormalmap
bool isNormalmap()
opAssign
typeof(null) opAssign(typeof(null) n)
opEquals
bool opEquals(NoiseTexture other)
opEquals
bool opEquals(typeof(null) n)
setAsNormalmap
void setAsNormalmap(bool as_normalmap)
setBumpStrength
void setBumpStrength(double bump_strength)
setHeight
void setHeight(long height)
setNoise
void setNoise(OpenSimplexNoise noise)
setSeamless
void setSeamless(bool seamless)
setWidth
void setWidth(long width)
toHash
size_t toHash()

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Properties

asNormalmap
bool asNormalmap [@property getter]
bool asNormalmap [@property setter]

If true, the resulting texture contains a normal map created from the original noise interpreted as a bump map.

bumpStrength
double bumpStrength [@property getter]
double bumpStrength [@property setter]

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.

height
long height [@property getter]
long height [@property setter]

Height of the generated texture.

noise
OpenSimplexNoise noise [@property getter]
OpenSimplexNoise noise [@property setter]

The OpenSimplexNoise instance used to generate the noise.

seamless
bool seamless [@property getter]
bool seamless [@property setter]

Whether the texture can be tiled without visible seams or not. Seamless textures take longer to generate. Note: Seamless noise has a lower contrast compared to non-seamless noise. This is due to the way noise uses higher dimensions for generating seamless noise.

width
long width [@property getter]
long width [@property setter]

Width of the generated texture.

Static functions

_new
NoiseTexture _new()

Construct a new instance of NoiseTexture. Note: use memnew!NoiseTexture instead.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

GDNativeClassBinding
struct GDNativeClassBinding
Undocumented in source.

Unions

__anonymous
union __anonymous
Undocumented in source.

Variables

_GODOT_internal_name
enum string _GODOT_internal_name;
Undocumented in source.

Mixed In Members

From mixin baseCasts

as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(ToRef) as()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(ToRef)
Undocumented in source.
opCast
void* opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
godot_object opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
bool opCast()
Undocumented in source. Be warned that the author may not have intended to support it.

Detailed Description

var texture = preload("res://noise.tres") yield(texture, "changed") var image = texture.get_data()

Meta