FxPixelCapsule โ
This module provides functions to work with nodes inheriting from PixelCapsule, which are nodes of type PixelReference.
Load โ
lua
FxPixelCapsule = require "FxPixelCapsule";Functions โ
| Function | Description |
|---|---|
| Convert (NodeID) | Converts a pixel capsule to a pixel layer node. |
| Flip (NodeID, Horizontally) | Flips the pixel grid of a pixel capsule. |
| Rotate90 (NodeID, Steps) | Rotates the pixel grid of a a pixel capsule in 90ยฐ steps. |
Convert (NodeID) โ
This function converts the specified PixelCapsule node to a PixelLayer node.
Parameters โ
- NodeID: The NodeID to identify the PixelCapsule nodes to convert
Errors โ
Possible errors include FX_REQUIRED_ASSET_UNAVAILABLE, FX_NODE_NOT_FOUND
Since โ
Version 1.0
Example โ
lua
-- convert "Reference1" to a PixelLayer
FxPixelCapsule.Convert("Reference1");Flip (NodeID, Horizontally) โ
This function flips the pixel grid of the specified PixelCapsule node.
Parameters โ
- NodeID: The NodeID to identify the PixelCapsule nodes to flip
- Horizontally: Whether to flip horizontally
Errors โ
Possible errors include FX_REQUIRED_ASSET_UNAVAILABLE, FX_NODE_NOT_FOUND
Since โ
Version 1.0
Example โ
lua
-- flip horizontally
FxPixelCapsule.Flip("Reference1", true);Rotate90 (NodeID, Steps) โ
This function rotates the pixel grid of the specified PixelCapsule in 90ยฐ steps.
Parameters โ
- NodeID: The NodeID to identify the PixelCapsule nodes to rotate
- Steps: The number of 90ยฐ rotation steps
Errors โ
Possible errors include FX_REQUIRED_ASSET_UNAVAILABLE, FX_NODE_NOT_FOUND
Since โ
Version 1.0
Example โ
lua
-- rotate 90ยฐ counter clockwise
FxPixelCapsule.Rotate90("Reference1", -1);