/** * @license * Cesium - https://github.com/CesiumGS/cesium * Version 1.124 * * Copyright 2011-2022 Cesium Contributors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * Columbus View (Pat. Pend.) * * Portions licensed separately. * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ import{a as J}from"./chunk-Z6PJ3IIE.js";import{a as Nt}from"./chunk-W5MIOKEY.js";import{a as zt}from"./chunk-72CGGEJF.js";import"./chunk-Q5MYX5A2.js";import"./chunk-OZYLWM74.js";import{a as ut}from"./chunk-5CC3QRYS.js";import{a as X}from"./chunk-6HIVPZ7K.js";import{b as Rt}from"./chunk-WJYW7YDO.js";import"./chunk-RDAVO5OM.js";import"./chunk-PY4CW263.js";import"./chunk-RRZIPF5C.js";import{a as yt}from"./chunk-34ULWVZF.js";import{a as Vt}from"./chunk-24JYWT5N.js";import{b as Mt,c as Pt,d as q}from"./chunk-LH3SUUXG.js";import{d as st}from"./chunk-K2M3OJ7Z.js";import{f as Lt,h as E,i as At}from"./chunk-M3A6SPGI.js";import{a as Y}from"./chunk-D5HNP2LB.js";import{a as w,b as _t,c as G,d as H,e as ft}from"./chunk-S4VBGY2U.js";import{a as W}from"./chunk-UCTPWOTZ.js";import"./chunk-54PMPXZ4.js";import"./chunk-R62IKKEC.js";import{a as L}from"./chunk-N3A5CZ2S.js";import{a as St,b as lt}from"./chunk-G75U3WZT.js";import{e as $}from"./chunk-3THTQ4QB.js";var Tt=new w,Bt=new w,Ut=new w,Yt=new w,qt=new E,Zt=new G,Kt=new st,$t=new st;function Xt(t,e){let n=new Pt({attributes:new Vt,primitiveType:Mt.TRIANGLES});return n.attributes.position=new q({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:e.positions}),t.normal&&(n.attributes.normal=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:e.normals})),t.tangent&&(n.attributes.tangent=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:e.tangents})),t.bitangent&&(n.attributes.bitangent=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:e.bitangents})),n}function Gt(t,e,n,r){let a=t.length,c=e.normal?new Float32Array(a):void 0,l=e.tangent?new Float32Array(a):void 0,u=e.bitangent?new Float32Array(a):void 0,d=0,p=Yt,o=Ut,i=Bt;if(e.normal||e.tangent||e.bitangent)for(let f=0;f1||T>1))for(let x=0;x0;o-=p)_=o*3,C=ht(C,v,_,f,A),v+=6,a.st&&(V=dt(V,B,o*2,T),B+=4),n&&(y+=3,S[y++]=m[_],S[y++]=m[_+1],S[y++]=m[_+2]),et&&(Z[U++]=1,U+=1);if(k){let R=nt;for(_=R*3,o=0;o<2;o++)C=ht(C,v,_,f,A),v+=6,a.st&&(V=dt(V,B,R*2,T),B+=4),n&&(y+=3,S[y++]=m[_],S[y++]=m[_+1],S[y++]=m[_+2]),et&&(Z[U++]=1,U+=1)}else for(o=p-1;o>=0;o--)_=o*3,C=ht(C,v,_,f,A),v+=6,a.st&&(V=dt(V,B,o*2,T),B+=4),n&&(y+=3,S[y++]=m[_],S[y++]=m[_+1],S[y++]=m[_+2]),et&&(Z[U++]=1,U+=1);let ot=te(C,a,u);a.st&&(ot.attributes.st=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:V})),n&&(ot.attributes.extrudeDirection=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:S})),P&&(ot.attributes.applyOffset=new q({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:Z}));let it=yt.createTypedArray(gt,pt*6),mt,wt,kt,bt;s=C.length/3;let ct=0;for(o=0;o