import{gY as j,bU as C,cO as g,hl as A,bT as x,hm as N,cQ as O,fl as q,cs as Q}from"./index-b5c8f851.js";import{s as w}from"./Indices-8bd7636c.js";import{s as z}from"./sphere-5667aa69.js";import{v as V}from"./lineSegment-95273d56.js";var T;(function(i){i[i.Layer=0]="Layer",i[i.Object=1]="Object",i[i.Mesh=2]="Mesh",i[i.Line=3]="Line",i[i.Point=4]="Point",i[i.Material=5]="Material",i[i.Texture=6]="Texture",i[i.COUNT=7]="COUNT"})(T||(T={}));class L{constructor(o,d,u){this.primitiveIndices=o,this._numIndexPerPrimitive=d,this.position=u,this._children=void 0,w(o.length>=1),w(u.size===3||u.size===4);const{data:s,size:l,indices:p}=u;w(p.length%this._numIndexPerPrimitive==0),w(p.length>=o.length*this._numIndexPerPrimitive);const I=o.length;let e=l*p[this._numIndexPerPrimitive*o[0]];f.clear(),f.push(e);const n=C(s[e],s[e+1],s[e+2]),t=g(n);for(let a=0;a0&&++e;if(e<2)return;const n=new Array(8);for(let t=0;t<8;++t)n[t]=s[t]>0?new Uint32Array(s[t]):void 0;for(let t=0;t<8;++t)s[t]=0;for(let t=0;tY());const y=x(),U=x();export{T as e,L as o,E as w};