@sprite
A sprite is an image which clips its content to a given box.
This class extends the @image class with the clipping functionality
A sprite is an image which clips its content to a given box.
This class extends the @image class with the clipping functionality
#new @sprite character {
width: 64;
height: 64
src: "sprite.png";
x: 20;
y: 10;
clipX: 0;
clipY: 128;
}
Type: vvar.f32
The location on the horizontal axis of where to place the clipping window.
mySprite.clipX: 0;
Type: vvar.f32
#= The location on the vertical axis of where to place the clipping window.
<lil>mySprite.clipY +: 64;
Type: var.@image
The @image superclass. This field is expanded and gives this class its id field and the vvars interface from @image.
var image: @self.super;
To gain a better understanding of this class, it is recommended to look at the source code of the following file: