园林绿化
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
27 KiB

  1. /**
  2. * @license
  3. * Cesium - https://github.com/CesiumGS/cesium
  4. * Version 1.140.0
  5. *
  6. * Copyright 2011-2022 Cesium Contributors
  7. *
  8. * Licensed under the Apache License, Version 2.0 (the "License");
  9. * you may not use this file except in compliance with the License.
  10. * You may obtain a copy of the License at
  11. *
  12. * http://www.apache.org/licenses/LICENSE-2.0
  13. *
  14. * Unless required by applicable law or agreed to in writing, software
  15. * distributed under the License is distributed on an "AS IS" BASIS,
  16. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17. * See the License for the specific language governing permissions and
  18. * limitations under the License.
  19. *
  20. * Columbus View (Pat. Pend.)
  21. *
  22. * Portions licensed separately.
  23. * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
  24. */
  25. import{a as z1}from"./chunk-422SYBQS.js";import{a as L,b as u,c as j1}from"./chunk-XXWWJ3QU.js";import{a as F}from"./chunk-N6SIW7ZL.js";import{a as g,b as p}from"./chunk-K35RPNUR.js";import{e as U}from"./chunk-RTRJ3LVQ.js";var P=class c{constructor(n,o,y,O){this.x=n??0,this.y=o??0,this.z=y??0,this.w=O??0}static fromElements(n,o,y,O,f){return U(f)?(f.x=n,f.y=o,f.z=y,f.w=O,f):new c(n,o,y,O)}static fromColor(n,o){return p.typeOf.object("color",n),U(o)?(o.x=n.red,o.y=n.green,o.z=n.blue,o.w=n.alpha,o):new c(n.red,n.green,n.blue,n.alpha)}static clone(n,o){if(U(n))return U(o)?(o.x=n.x,o.y=n.y,o.z=n.z,o.w=n.w,o):new c(n.x,n.y,n.z,n.w)}static pack(n,o,y){return p.typeOf.object("value",n),p.defined("array",o),y=y??0,o[y++]=n.x,o[y++]=n.y,o[y++]=n.z,o[y]=n.w,o}static unpack(n,o,y){return p.defined("array",n),o=o??0,U(y)||(y=new c),y.x=n[o++],y.y=n[o++],y.z=n[o++],y.w=n[o],y}static packArray(n,o){p.defined("array",n);let y=n.length,O=y*4;if(!U(o))o=new Array(O);else{if(!Array.isArray(o)&&o.length!==O)throw new g("If result is a typed array, it must have exactly array.length * 4 elements");o.length!==O&&(o.length=O)}for(let f=0;f<y;++f)c.pack(n[f],o,f*4);return o}static unpackArray(n,o){if(p.defined("array",n),p.typeOf.number.greaterThanOrEquals("array.length",n.length,4),n.length%4!==0)throw new g("array length must be a multiple of 4.");let y=n.length;U(o)?o.length=y/4:o=new Array(y/4);for(let O=0;O<y;O+=4){let f=O/4;o[f]=c.unpack(n,O,o[f])}return o}static maximumComponent(n){return p.typeOf.object("cartesian",n),Math.max(n.x,n.y,n.z,n.w)}static minimumComponent(n){return p.typeOf.object("cartesian",n),Math.min(n.x,n.y,n.z,n.w)}static minimumByComponent(n,o,y){return p.typeOf.object("first",n),p.typeOf.object("second",o),p.typeOf.object("result",y),y.x=Math.min(n.x,o.x),y.y=Math.min(n.y,o.y),y.z=Math.min(n.z,o.z),y.w=Math.min(n.w,o.w),y}static maximumByComponent(n,o,y){return p.typeOf.object("first",n),p.typeOf.object("second",o),p.typeOf.object("result",y),y.x=Math.max(n.x,o.x),y.y=Math.max(n.y,o.y),y.z=Math.max(n.z,o.z),y.w=Math.max(n.w,o.w),y}static clamp(n,o,y,O){p.typeOf.object("value",n),p.typeOf.object("min",o),p.typeOf.object("max",y),p.typeOf.object("result",O);let f=F.clamp(n.x,o.x,y.x),w=F.clamp(n.y,o.y,y.y),j=F.clamp(n.z,o.z,y.z),z=F.clamp(n.w,o.w,y.w);return O.x=f,O.y=w,O.z=j,O.w=z,O}static magnitudeSquared(n){return p.typeOf.object("cartesian",n),n.x*n.x+n.y*n.y+n.z*n.z+n.w*n.w}static magnitude(n){return Math.sqrt(c.magnitudeSquared(n))}static distance(n,o){return p.typeOf.object("left",n),p.typeOf.object("right",o),c.subtract(n,o,l),c.magnitude(l)}static distanceSquared(n,o){return p.typeOf.object("left",n),p.typeOf.object("right",o),c.subtract(n,o,l),c.magnitudeSquared(l)}static normalize(n,o){p.typeOf.object("cartesian",n),p.typeOf.object("result",o);let y=c.magnitude(n);if(o.x=n.x/y,o.y=n.y/y,o.z=n.z/y,o.w=n.w/y,isNaN(o.x)||isNaN(o.y)||isNaN(o.z)||isNaN(o.w))throw new g("normalized result is not a number");return o}static dot(n,o){return p.typeOf.object("left",n),p.typeOf.object("right",o),n.x*o.x+n.y*o.y+n.z*o.z+n.w*o.w}static multiplyComponents(n,o,y){return p.typeOf.object("left",n),p.typeOf.object("right",o),p.typeOf.object("result",y),y.x=n.x*o.x,y.y=n.y*o.y,y.z=n.z*o.z,y.w=n.w*o.w,y}static divideComponents(n,o,y){return p.typeOf.object("left",n),p.typeOf.object("right",o),p.typeOf.object("result",y),y.x=n.x/o.x,y.y=n.y/o.y,y.z=n.z/o.z,y.w=n.w/o.w,y}static add(n,o,y){return p.typeOf.object("left",n),p.typeOf.object("right",o),p.typeOf.object("result",y),y.x=n.x+o.x,y.y=n.y+o.y,y.z=n.z+o.z,y.w=n.w+o.w,y}static subtract(n,o,y){return p.typeOf.object("left",n),p.typeOf.object("right",o),p.typeOf.object("result",y),y.x=n.x-o.x,y.y=n.y-o.y,y.z=n.z-o.z,y.w=n.w-o.w,y}static multiplyByScalar(n,o,y){return p.typeOf.object("cartesian",n),p.typeOf.number("scalar",o),p.typeOf.object("result",y),y.x=n.x*o,y.y=n.y*o,y.z=n.z*o,y.w=n.w*o,y}static divideByScalar(n,o,y){return p.typeOf.object("cartesian",n),p.typeOf.number("scalar",o),p.typeOf.object("result",y),y.x=n.x/o,y.y=n.y/o,y.z=n.z/o,y.w=n.w/o,y}static negate(n,o){ret
  26. (${this[1]}, ${this[5]}, ${this[9]}, ${this[13]})
  27. (${this[2]}, ${this[6]}, ${this[10]}, ${this[14]})
  28. (${this[3]}, ${this[7]}, ${this[11]}, ${this[15]})`};var m1=b;export{r as a,m1 as b};