feat: sprite scale

This commit is contained in:
cha0s 2024-07-02 10:27:25 -05:00
parent fe44c1a4df
commit 44384be138
2 changed files with 2 additions and 0 deletions

View File

@ -9,6 +9,7 @@ export default class Sprite extends Component {
elapsed: {type: 'float32'},
frame: {type: 'uint16'},
frames: {type: 'uint16'},
scale: vector2d('float32', {x: 1, y: 1}),
source: {type: 'string'},
speed: {type: 'float32'},
};

View File

@ -18,6 +18,7 @@ export default function Sprite({entity, ...rest}) {
return (
<PixiSprite
anchor={entity.Sprite.anchor}
scale={entity.Sprite.scale}
texture={texture}
x={Math.round(entity.Position.x)}
y={Math.round(entity.Position.y)}