perf: no elapsed

This commit is contained in:
cha0s 2024-07-21 07:22:48 -05:00
parent a872d9ae5f
commit 14713797f1

View File

@ -9,11 +9,22 @@ export default class Sprite extends Component {
get scale() { get scale() {
return {x: this.scaleX, y: this.scaleY}; return {x: this.scaleX, y: this.scaleY};
} }
toNet() {
// eslint-disable-next-line no-unused-vars
const {elapsed, ...rest} = super.toNet();
return rest;
}
}; };
} }
async load(instance) { async load(instance) {
instance.$$sourceJson = await this.ecs.readJson(instance.source); instance.$$sourceJson = await this.ecs.readJson(instance.source);
} }
markChange(entityId, key, value) {
if ('elapsed' === key) {
return;
}
super.markChange(entityId, key, value);
}
static properties = { static properties = {
anchorX: {defaultValue: 0.5, type: 'float32'}, anchorX: {defaultValue: 0.5, type: 'float32'},
anchorY: {defaultValue: 0.5, type: 'float32'}, anchorY: {defaultValue: 0.5, type: 'float32'},