|
Drag[en]gine Script Module DragonScript 1.35
|
Public Member Functions | |
Constructors | |
| SkinBuilder | new () |
| Create skin builder. | |
Management | |
| Skin | build (String filename) |
| Build skin using filename. | |
| void | buildSkin () |
| Build skin. | |
| void | addTexture (String name) |
| Add texture. | |
| void | addPropertyValue (int texture, String type, String texCoordSet, String renderable, float value) |
| Add value texture property. | |
| void | addPropertyColor (int texture, String type, String texCoordSet, String renderable, Color color) |
| Add color texture property. | |
| void | addPropertyImage (int texture, String type, String texCoordSet, String renderable, String pathImage, Image image) |
| Add image texture property. | |
| void | addPropertyVideo (int texture, String type, String texCoordSet, String renderable, String pathVideo, Video video, bool sharedTime) |
| Add video texture property. | |
| void | addPropertyConstructed (int texture, String type, String texCoordSet, String renderable, Color color, bool tileX, bool tileY, Point3 size) |
| Add constructed texture property. | |
| void | addPropertyMapped (int texture, String type, String texCoordSet, String renderable, CurveBezier redCurve, SkinPropertyMappedInputType redInputType, Vector2 redInputRange, bool redInputClamped, String redBone, CurveBezier greenCurve, SkinPropertyMappedInputType greenInputType, Vector2 greenInputRange, bool greenInputClamped, String greenBone, CurveBezier blueCurve, SkinPropertyMappedInputType blueInputType, Vector2 blueInputRange, bool blueInputClamped, String blueBone, CurveBezier alphaCurve, SkinPropertyMappedInputType alphaInputType, Vector2 alphaInputRange, bool alphaInputClamped, String alphaBone) |
| Add mapped texture property. | |
| void | addPropertyMapped (int texture, String type, String texCoordSet, String renderable, int red, int green, int blue, int alpha) |
| Add mapped texture property. | |
| void | setPropertyBone (int texture, int property, String bone) |
| Set bone name of texture property. | |
| void | constructedOpenContent (int texture, int property) |
| Open constructed property content node. | |
| void | addNodeImage (Point3 position, Point3 size, float rotation, float shear, float brightness, float contrast, float gamma, Color colorize, float transparency, SkinPropertyNodeCombineMode combineMode, String path, Image image, Point repeat) |
| Add image node to open node. | |
| void | addNodeText (Point3 position, Point3 size, float rotation, float shear, float brightness, float contrast, float gamma, Color colorize, float transparency, SkinPropertyNodeCombineMode combineMode, String path, Font font, float fontSize, String text, Color color) |
| Add text node to open node. | |
| void | addNodeShape (Point3 position, Point3 size, float rotation, float shear, float brightness, float contrast, float gamma, Color colorize, float transparency, SkinPropertyNodeCombineMode combineMode, int shapeType, Color fillColor, Color lineColor, float thickness) |
| Add shape node to open node. | |
| void | addNodeGroup (Point3 position, Point3 size, float rotation, float shear, float brightness, float contrast, float gamma, Color colorize, float transparency, SkinPropertyNodeCombineMode combineMode) |
| Add group node to open node. | |
| void | nextNodeAsMask () |
| Set the next node created using addNode*() call as node mask. | |
| void | closeNode () |
| Close open node. | |
Skin builder.
Builds skin resource without requiring a skin resource file. The created skin can either be unnamed (if filename is empty string) or named (if filename is not empty string). Named skins can not clash with filenames present in the virtual file system. For this reason use unnamed skins if possible. Using named skins though can be useful if you want to provide skin resources to scripts not needing to know if the path they try to load is a build skin instead of a resource one.
To use the skin builder create a subclass and implement SkinBuilder.buildSkin() . You are only allowed to call methods from SkinBuilder from inside this function call. To create the skin call SkinBuilder.build() . This will call SkinBuilder.buildSkin() to fill a new skin resource with content. Once finished the build method returns the ready to use skin resource. Otherwise an exception is thrown.
This is a native class.
|
protected |
Add group node to open node.
Sets created group node as new open node to operate on.
References setPropertyBone().
Referenced by closeNode().
|
protected |
Add image node to open node.
Referenced by closeNode().
|
protected |
|
protected |
Add text node to open node.
Referenced by closeNode().
|
protected |
|
protected |
|
protected |
Add mapped texture property.
References addPropertyImage(), and addPropertyVideo().
Referenced by addNodeShape(), and setPropertyBone().
|
protected |
Add mapped texture property.
Red, green, blue and alpha are indices into added mapped values (addMapped) or -1 to disable. Throws EInvalidParam if indices are less than -1 or larger than or equal to the count of mapped values.
References addPropertyConstructed().
|
protected |
Add value texture property.
Referenced by addPropertyImage().
|
protected |
Add video texture property.
Referenced by addPropertyMapped().
|
protected |
Add texture.
Referenced by addPropertyColor().
| Skin Dragengine.Scenery.SkinBuilder.build | ( | String | filename | ) |
Build skin using filename.
The created skin can either be unnamed (if filename is empty string) or named (if filename is not empty string). Named skins can not clash with filenames present in the virtual file system. For this reason use unnamed skins if possible. Using named skins though can be useful if you want to provide skin resources to scripts not needing to know if the path they try to load is a build skin instead of a resource one.
To create the skin call build() . This will call buildSkin() to fill a new skin resource with content. Once finished the build method returns the ready to use skin resource. Otherwise an exception is thrown.
References build().
Referenced by build().
|
protected |
Build skin.
Called by build(String) to fill a new skin resource with content. You are only allowed to call methods from SkinBuilder from inside this function call.
References buildSkin().
Referenced by buildSkin().
|
protected |
Close open node.
Sets the previous open node as the open node to operate on.
References addNodeGroup(), addNodeImage(), addNodeShape(), addNodeText(), closeNode(), constructedOpenContent(), and nextNodeAsMask().
Referenced by closeNode().
|
protected |
Open constructed property content node.
Content node becomes open node to operate on. Call closeNode() to close it.
Referenced by closeNode().
| SkinBuilder Dragengine.Scenery.SkinBuilder.new | ( | ) |
|
protected |
Set the next node created using addNode*() call as node mask.
Referenced by closeNode().
|
protected |
Set bone name of texture property.
Used by texture properties using vertex position instead of texture coordinates. The vertex position is evaluated relative to the bone coordinate system.
References addPropertyMapped().
Referenced by addNodeGroup().