Package net.risingworld.api.assets
Klasse MaterialAsset
java.lang.Object
net.risingworld.api.assets.Asset
net.risingworld.api.assets.MaterialAsset
Represents a material, which descibes the visual appearance of a game object.
-
Verschachtelte Klassen - Übersicht
Modifizierer und TypKlasseBeschreibungstatic enum
static enum
Von Klasse geerbte verschachtelte Klassen/Schnittstellen net.risingworld.api.assets.Asset
Asset.Source, Asset.Type
-
Feldübersicht
Von Klasse geerbte Felder net.risingworld.api.assets.Asset
DEFAULT_EXTENSION
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoid
Applies all changes done to the material, i.e syncs the material with all players.static MaterialAsset
Creates a new material instance.void
setAlphaThreshold
(float threshold) void
setColor
(float r, float g, float b, float a) void
setColor
(int rgba) void
setFlags
(MaterialAsset.Flags... flags) void
setMetallic
(float metallic) void
setNormalMap
(TextureAsset normalMap) void
setNormalMapStrength
(float strength) void
setSmoothness
(float smoothness) void
setTexture
(TextureAsset texture) void
setTextureScale
(float sx, float sy) Von Klasse geerbte Methoden net.risingworld.api.assets.Asset
dispose, equals, getChecksum, getDependency, getExtension, getHandle, getPath, getSource, getType, hashCode, isDisposed
-
Methodendetails
-
create
Creates a new material instance. You can change individual properties and assign textures (represented by the TextureAsset class) to it.- Parameter:
name
- a custom name for the material.- Gibt zurück:
- a new material asset instance.
-
setTexture
-
setNormalMap
-
setNormalMapStrength
public void setNormalMapStrength(float strength) -
setTextureScale
public void setTextureScale(float sx, float sy) -
getTextureScale
-
setColor
public void setColor(float r, float g, float b, float a) -
setColor
public void setColor(int rgba) -
setSmoothness
public void setSmoothness(float smoothness) -
setMetallic
public void setMetallic(float metallic) -
setAlphaThreshold
public void setAlphaThreshold(float threshold) -
setFlags
-
applyChanges
public void applyChanges()Applies all changes done to the material, i.e syncs the material with all players. Note: When assigning the material to an object, this happens automatically.
-