UNPKG

@spearwolf/twopoint5d

Version:

Create 2.5D realtime graphics and pixelart with WebGL and three.js

19 lines 604 B
export class AnimatedSprite { setSize(width, height) { this.setQuadSize([width, height]); } setPosition(x, y, z = 0) { this.setInstancePosition([x, y, z]); } } export const AnimatedSpriteDescriptor = { meshCount: 1, attributes: { quadSize: { components: ['width', 'height'] }, anim: { components: ['animId', 'animOffset'] }, instancePosition: { components: ['x', 'y', 'z'], usage: 'dynamic' }, rotation: { size: 1, usage: 'dynamic' }, }, basePrototype: AnimatedSprite.prototype, }; //# sourceMappingURL=AnimatedSprite.js.map