-
Notifications
You must be signed in to change notification settings - Fork 2
Textures documentation
This page covers the TextureRegistry
, Texture
, and ParticleTexture
classes.
This purely static class is used to load textures from the assets/texture
sub-directory within a mod's folder.
Name | Arguments | Return type | Description |
---|---|---|---|
load |
String |
Texture |
Uses the Equilinox texture loader to load the given PNG texture from the mod's assets. |
load |
String, {} |
Texture |
Uses the Equilinox texture loader to load the given PNG texture from the mod's assets, loading with the settings provided by the settings object. |
The overloaded method for load
takes a JavaScript object which can have the following properties:
Name | Type | Description |
---|---|---|
clampEdges |
boolean |
Determines whether the edges of the texture should be clamped. |
nearestFiltering |
boolean |
Determines whether nearest-neighbour filtering should be applied to the texture. |
noFiltering |
boolean |
Determines whether any filtering should be applied to the texture. |
noMipMap |
boolean |
Determines whether mip-mapping should be disabled for the texture. |
Represents an in-game texture that has been loaded by the Equilinox system.
Name | Arguments | Return type | Description |
---|---|---|---|
isLoaded |
None | boolean |
Returns true if the texture has been fully loaded. |
getID |
None | int |
Returns the internal OpenGL texture handle for the texture. |
delete |
None | void |
Requests that the texture be deleted as soon as possible. |
Represents an in-game texture atlas used for a particle system.
The constructor takes three arguments: a Texture
, an int, and a boolean. The texture defines the actual texture that is rendered, the int states how many rows there are in the atlas (the number of rows has to equal the number of columns as well), and the boolean states whether additive blending is used.
For example, new ParticleTexture(TextureRegistry.load("test.png"), 3, true)
loads the test.png
texture (which has 3 rows and columns) with additive blending.
Name | Arguments | Return type | Description |
---|---|---|---|
setGlowy |
None | ParticleTexture |
Sets the particle texture to have a glow effect, and returns the object for chaining. |
glows |
None | boolean |
Returns true if the texture has a glow effect. |
Thanks for visiting this wiki. Don't forget to check out Equilinox!
The wiki and the modding framework are still heavily under development, so not all content is available yet.