/** * @license * Cesium - https://github.com/CesiumGS/cesium * Version 1.110.1 * * 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-FAHIADKY.js";import{a as Nt}from"./chunk-CE6W255B.js";import{a as zt}from"./chunk-54EUFFXI.js";import"./chunk-CAKU43HZ.js";import"./chunk-WNXNCTQK.js";import{a as ut}from"./chunk-HL2OONDA.js";import{a as X}from"./chunk-FEU4H2YL.js";import{b as Rt}from"./chunk-P2SABSEB.js";import"./chunk-GTKXIG42.js";import"./chunk-EVUMPJJC.js";import"./chunk-BXMC6F3B.js";import{a as yt}from"./chunk-EUSUDYW7.js";import{a as Vt}from"./chunk-XYZU5ZKW.js";import{b as Mt,c as Pt,d as q}from"./chunk-ADEEKX5Q.js";import{d as st,f as Lt}from"./chunk-O5E7EBKP.js";import"./chunk-LEJDAZA7.js";import{c as S,d as G,e as At}from"./chunk-GMFQULD7.js";import{a as Y}from"./chunk-IS523WNE.js";import{a as _,b as wt,c as H,d as ft}from"./chunk-4ZQSV4FU.js";import{a as W}from"./chunk-CLQ5X6HS.js";import"./chunk-6Y3U6IMI.js";import"./chunk-7DENS74L.js";import{a as L}from"./chunk-FOJGNIAW.js";import{a as Et,b as lt}from"./chunk-UGI536VH.js";import{e as $}from"./chunk-BQUQ5TPM.js";var Tt=new _,Bt=new _,Ut=new _,Yt=new _,qt=new S,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,p=0,d=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-=d)w=o*3,C=ht(C,v,w,f,A),v+=6,a.st&&(V=pt(V,B,o*2,T),B+=4),n&&(y+=3,E[y++]=m[w],E[y++]=m[w+1],E[y++]=m[w+2]),et&&(Z[U++]=1,U+=1);if(k){let R=nt;for(w=R*3,o=0;o<2;o++)C=ht(C,v,w,f,A),v+=6,a.st&&(V=pt(V,B,R*2,T),B+=4),n&&(y+=3,E[y++]=m[w],E[y++]=m[w+1],E[y++]=m[w+2]),et&&(Z[U++]=1,U+=1)}else for(o=d-1;o>=0;o--)w=o*3,C=ht(C,v,w,f,A),v+=6,a.st&&(V=pt(V,B,o*2,T),B+=4),n&&(y+=3,E[y++]=m[w],E[y++]=m[w+1],E[y++]=m[w+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:E})),P&&(ot.attributes.applyOffset=new q({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:Z}));let it=yt.createTypedArray(gt,dt*6),mt,_t,kt,bt;s=C.length/3;let ct=0;for(o=0;o