Sprite:set_quad
Sets the love.Quad used to crop the texture drawn by this component.
Usage
sprite:set_quad(quad)
Arguments
| Name | Type | Description |
|---|---|---|
quad | love.Quad | The quad to crop the texture with. |
Examples
local ecs = crystal.ECS:new();
local entity = ecs:spawn(crystal.Entity);
entity:add_component(crystal.Sprite);
entity:set_texture(crystal.assets.get("assets/double_door.png"));
entity:set_quad(love.graphics.newQuad(0, 0, 16, 32));