import * as PIXI from "../../pixi/pixi.mjs";
import { Vault } from "../Utils/DataTypes.utils";

export function createWorldChunkContainer() {
    let chunk = new PIXI.Container();
    let terrainLayer = new PIXI.Container();
    let vegetationLayer = new PIXI.Container();
    let buildingsLayer = new PIXI.Container();
    chunk.addChild(terrainLayer);
    chunk.addChild(vegetationLayer);
    chunk.addChild(buildingsLayer);
    return chunk;
}

/**
 *
 * @param {PIXI.Container} chunk
 * @param {PIXI.Container} terrainLayer
 * @param {PIXI.Container} vegetationLayer
 * @param {PIXI.Container} buildingsLayer
 * @param {Vault} terrainObjectsVault
 * @param {Vault} vegetationObjectsVault
 * @param {Vault} buildingsObjectsVault
 */
export class WorldChunk {
    constructor(chunk, terrainLayer, vegetationLayer, buildingsLayer, terrainObjectsVault, vegetationObjectsVault, buildingsObjectsVault) {
        this.chunk = chunk;
        this.terrainLayer = terrainLayer;
        this.vegetationLayer = vegetationLayer;
        this.buildingsLayer = buildingsLayer;
        this.terrainObjectsVault = terrainObjectsVault;
        this.vegetationObjectsVault = vegetationObjectsVault;
        this.buildingsObjectsVault = buildingsObjectsVault;
    }
}