Create components for a sprite entity. Returns an object suitable for spreading into spawn().
Optional
const player = ecs.spawn({ ...createSpriteComponents(new Sprite(texture), { x: 100, y: 100 }), velocity: { x: 0, y: 0 },}); Copy
const player = ecs.spawn({ ...createSpriteComponents(new Sprite(texture), { x: 100, y: 100 }), velocity: { x: 0, y: 0 },});
Create components for a sprite entity. Returns an object suitable for spreading into spawn().