/** * @license * Cesium - https://github.com/CesiumGS/cesium * Version 1.110 * * 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-CSXABXKU.js";import{a as Nt}from"./chunk-T2KUUXXE.js";import{a as zt}from"./chunk-7SENG36B.js";import"./chunk-Y5GAVQLY.js";import"./chunk-K5K3TDMT.js";import{a as ut}from"./chunk-VPPZOZTD.js";import{a as X}from"./chunk-QU7QNGRM.js";import{b as Rt}from"./chunk-34TCIMPD.js";import"./chunk-6J64DNFK.js";import"./chunk-FAXU5JYE.js";import"./chunk-DTBS4FIS.js";import{a as yt}from"./chunk-SE5RZMX2.js";import{a as Vt}from"./chunk-DUV4VG3N.js";import{b as Mt,c as Pt,d as q}from"./chunk-KMWU6SNL.js";import{d as st,f as Lt}from"./chunk-6NWI43LF.js";import"./chunk-4O5G66XJ.js";import{c as S,d as G,e as At}from"./chunk-FC5SLPQQ.js";import{a as Y}from"./chunk-LYGOJ6CO.js";import{a as _,b as wt,c as H,d as ft}from"./chunk-ZWQPISEL.js";import{a as W}from"./chunk-BL2B3H3H.js";import"./chunk-IYZKEJTR.js";import"./chunk-G6NVUYVR.js";import{a as L}from"./chunk-KFPKN74R.js";import{a as Et,b as lt}from"./chunk-OWNWTDHH.js";import{e as $}from"./chunk-55OKX5AT.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