import { BinaryBuffer } from "../../../../../core/binary/BinaryBuffer.js";
import { EntityComponentDataset } from "../../../../ecs/EntityComponentDataset.js";
import { LightProbeVolume } from "../LightProbeVolume.js";
import { LightProbeVolumeSerializationAdapter } from "../serialization/LightProbeVolumeSerializationAdapter.js";

const adapter = new LightProbeVolumeSerializationAdapter();
const volume = new LightProbeVolume();

const scene = new EntityComponentDataset();

self.Contex = {
    volume,

    /**
     *
     * @param {ArrayBuffer} data
     */
    load_scene(data){
        const buffer = BinaryBuffer.fromArrayBuffer(data);



    },

    serialize() {
        const buffer = new BinaryBuffer();

        adapter.serialize(buffer, volume);

        buffer.trim();

        return buffer.data;
    },

    reset() {
        volume.clear()
    }
};