16 lines
404 B
JavaScript
16 lines
404 B
JavaScript
import Component from '@/ecs/component.js';
|
|
|
|
import vector2d from "./helpers/vector-2d";
|
|
|
|
export default class Sprite extends Component {
|
|
static properties = {
|
|
anchor: vector2d('float32', {x: 0.5, y: 0.5}),
|
|
animation: {type: 'string'},
|
|
elapsed: {type: 'float32'},
|
|
frame: {type: 'uint16'},
|
|
frames: {type: 'uint16'},
|
|
source: {type: 'string'},
|
|
speed: {type: 'float32'},
|
|
};
|
|
}
|