Class Visual.SpriteInfo
The settings that PolyMod uses to make a sprite, such as the pivot and the pixels per unit.
A mod gives these settings in a sprites.json file.
public class Visual.SpriteInfo
- Inheritance
-
Visual.SpriteInfo
- Inherited Members
Constructors
SpriteInfo(float?, Vector2?, bool, SpriteOrigin?, float?)
Makes a new Visual.SpriteInfo with the given settings.
public SpriteInfo(float? pixelsPerUnit, Vector2? pivot, bool transformToOutline = false, Visual.SpriteOrigin? spriteOrigin = null, float? gaussianBlurRadius = null)
Parameters
pixelsPerUnitfloat?The number of texture pixels in one world unit, or null to use the default value.
pivotVector2?The pivot of the sprite, or null to use the default pivot.
transformToOutlineboolIf true, the image changes into a white silhouette with a border.
spriteOriginVisual.SpriteOriginThe source of the sprite image, or null to use the texture with the same name.
gaussianBlurRadiusfloat?The radius of the Gaussian blur, or null for no blur.
Fields
gaussianBlurRadius
The radius of the Gaussian blur that PolyMod applies to the image. If this value is null, PolyMod does not apply a blur.
[JsonInclude]
public float? gaussianBlurRadius
Field Value
pivot
The pivot of the sprite, as a fraction of the sprite size. If this value is null, PolyMod uses a preset pivot for a mod texture and the original pivot for a game sprite.
[JsonInclude]
public Vector2? pivot
Field Value
- Vector2?
pixelsPerUnit
The number of texture pixels in one world unit. If this value is null, PolyMod uses 2112 for a mod texture and the original value for a game sprite.
[JsonInclude]
public float? pixelsPerUnit
Field Value
spriteOrigin
The source of the sprite image. If this value is null, PolyMod uses the mod texture that has the same name as the sprite.
[JsonInclude]
public Visual.SpriteOrigin? spriteOrigin
Field Value
transformToOutline
If true, PolyMod changes the image into a white silhouette with a border before it makes the sprite.
[JsonInclude]
public bool transformToOutline