var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  // If the importer is in node compatibility mode or this is not an ESM
  // file that has been converted to a CommonJS file using a Babel-
  // compatible transform (i.e. "__esModule" has not been set), then set
  // "default" to the CommonJS "module.exports" for node compatibility.
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  mod
));
var import_node_test = __toESM(require("node:test"));
var import_strict = __toESM(require("node:assert/strict"));
var THREE = __toESM(require("three"));
var import_src = require("../src/index.js");
(0, import_node_test.default)("createBoxelScene respects node filters and exposes reusable clips", () => {
  const entity = {
    id: "filter-test",
    geometry: {
      id: "geom",
      root: {
        id: "Root",
        position: [0, 0, 0],
        children: [
          {
            id: "Arm",
            position: [2, 0, 0],
            mesh: "arm",
            children: []
          },
          {
            id: "Leg",
            position: [-2, 0, 0],
            mesh: "leg",
            children: []
          }
        ]
      }
    },
    primitives: [
      { id: "arm", kind: "plain_box", size: [1, 1, 1], material: "mat" },
      { id: "leg", kind: "plain_box", size: [1, 1, 1], material: "mat" }
    ],
    materials: [{ id: "mat", baseColor: [255, 100, 100] }],
    textures: [],
    patterns: [],
    animations: []
  };
  const full = (0, import_src.createBoxelScene)({ THREE, entity });
  import_strict.default.ok(full.nodes.has("Arm"));
  import_strict.default.ok(full.nodes.has("Leg"));
  const filtered = (0, import_src.createBoxelScene)({ THREE, entity }, { nodes: "Arm" });
  import_strict.default.strictEqual(filtered.root.children.length, 1, "filtered scene should include one limb");
  import_strict.default.ok(filtered.nodes.has("Arm"));
  import_strict.default.ok(!filtered.nodes.has("Leg"));
  const nodeScene = (0, import_src.createBoxelNodeScene)({ THREE, entity }, "Leg");
  import_strict.default.strictEqual(nodeScene.nodes.size, 1, "node scene should only contain requested limb");
  import_strict.default.ok(nodeScene.nodes.has("Leg"));
  full.dispose();
  filtered.dispose();
  nodeScene.dispose();
});
