bitECS icon indicating copy to clipboard operation
bitECS copied to clipboard

Using `Changed` on tag components breaks deserialization

Open pietrovismara opened this issue 5 months ago • 1 comments

When I run this code:

const world = createWorld({}, 1e8);
const Empty = defineComponent({});
registerComponents(world, [Empty]);
const query = defineQuery([Empty]);

// bitecs throws here
const deser = pipe(query, defineSerializer([Changed(Empty)])); 

defineSerializer throws:

    const shadowStore = store[$parentArray].slice(0);
                                            ^

TypeError: Cannot read properties of undefined (reading 'slice')
    at createShadow (file:///home/dist/index.js:75:45)

pietrovismara avatar Jan 31 '24 18:01 pietrovismara