123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119 |
- import {
- a,
- c
- } from "./chunk-UE4KC4K5.js";
- import {
- s as s2
- } from "./chunk-YEJL5NEF.js";
- import {
- e,
- l3 as l,
- n5 as n,
- y3 as y2
- } from "./chunk-2Z2TG5CU.js";
- import {
- v
- } from "./chunk-SQOPWYIT.js";
- import {
- s2 as s
- } from "./chunk-E5O6P5I2.js";
- import {
- y
- } from "./chunk-SPWQ3AWG.js";
- // node_modules/@arcgis/core/geometry/support/MeshVertexAttributes.js
- var i;
- var l2 = "esri.geometry.support.MeshVertexAttributes";
- var c2 = s.getLogger(l2);
- var p = i = class extends l {
- constructor(r) {
- super(r), this.color = null, this.position = new Float64Array(0), this.uv = null, this.normal = null, this.tangent = null;
- }
- castColor(r) {
- return g(r, Uint8Array, [Uint8ClampedArray], { loggerTag: ".color=", stride: 4 }, c2);
- }
- castPosition(r) {
- r && r instanceof Float32Array && c2.warn(".position=", "Setting position attribute from a Float32Array may cause precision problems. Consider storing data in a Float64Array or a regular number array");
- return g(r, Float64Array, [Float32Array], { loggerTag: ".position=", stride: 3 }, c2);
- }
- castUv(r) {
- return g(r, Float32Array, [Float64Array], { loggerTag: ".uv=", stride: 2 }, c2);
- }
- castNormal(r) {
- return g(r, Float32Array, [Float64Array], { loggerTag: ".normal=", stride: 3 }, c2);
- }
- castTangent(r) {
- return g(r, Float32Array, [Float64Array], { loggerTag: ".tangent=", stride: 4 }, c2);
- }
- clone() {
- const r = { position: y(this.position), uv: y(this.uv), normal: y(this.normal), tangent: y(this.tangent), color: y(this.color) };
- return new i(r);
- }
- clonePositional() {
- const r = { position: y(this.position), normal: y(this.normal), tangent: y(this.tangent), uv: this.uv, color: this.color };
- return new i(r);
- }
- };
- function u(r, o, t, n2) {
- const { loggerTag: e2, stride: a2 } = o;
- return r.length % a2 != 0 ? (n2.error(e2, `Invalid array length, expected a multiple of ${a2}`), new t([])) : r;
- }
- function g(r, o, t, n2, e2) {
- if (!r)
- return r;
- if (r instanceof o)
- return u(r, n2, o, e2);
- for (const a2 of t)
- if (r instanceof a2)
- return u(new o(r), n2, o, e2);
- if (Array.isArray(r))
- return u(new o(r), n2, o, e2);
- {
- const n3 = t.map((r2) => `'${r2.name}'`);
- return e2.error(`Failed to set property, expected one of ${n3}, but got ${r.constructor.name}`), new o([]);
- }
- }
- function m(r, o, t) {
- o[t] = y3(r);
- }
- function y3(r) {
- const o = new Array(r.length);
- for (let t = 0; t < r.length; t++)
- o[t] = r[t];
- return o;
- }
- e([y2({ json: { write: m } })], p.prototype, "color", void 0), e([s2("color")], p.prototype, "castColor", null), e([y2({ nonNullable: true, json: { write: m } })], p.prototype, "position", void 0), e([s2("position")], p.prototype, "castPosition", null), e([y2({ json: { write: m } })], p.prototype, "uv", void 0), e([s2("uv")], p.prototype, "castUv", null), e([y2({ json: { write: m } })], p.prototype, "normal", void 0), e([s2("normal")], p.prototype, "castNormal", null), e([y2({ json: { write: m } })], p.prototype, "tangent", void 0), e([s2("tangent")], p.prototype, "castTangent", null), p = i = e([n(l2)], p);
- // node_modules/@arcgis/core/geometry/support/MeshComponent.js
- var u2;
- var m2 = "esri.geometry.support.MeshComponent";
- var h = s.getLogger(m2);
- var f = u2 = class extends l {
- constructor(r) {
- super(r), this.faces = null, this.material = null, this.shading = "source", this.trustSourceNormals = false;
- }
- static from(r) {
- return v(u2, r);
- }
- castFaces(r) {
- return g(r, Uint32Array, [Uint16Array], { loggerTag: ".faces=", stride: 3 }, h);
- }
- castMaterial(r) {
- return v(r && "object" == typeof r && ("metallic" in r || "roughness" in r || "metallicRoughnessTexture" in r) ? c : a, r);
- }
- clone() {
- return new u2({ faces: y(this.faces), shading: this.shading, material: y(this.material), trustSourceNormals: this.trustSourceNormals });
- }
- cloneWithDeduplication(r, t) {
- const s3 = { faces: y(this.faces), shading: this.shading, material: this.material ? this.material.cloneWithDeduplication(r, t) : null, trustSourceNormals: this.trustSourceNormals };
- return new u2(s3);
- }
- };
- e([y2({ json: { write: true } })], f.prototype, "faces", void 0), e([s2("faces")], f.prototype, "castFaces", null), e([y2({ type: a, json: { write: true } })], f.prototype, "material", void 0), e([s2("material")], f.prototype, "castMaterial", null), e([y2({ type: String, json: { write: true } })], f.prototype, "shading", void 0), e([y2({ type: Boolean })], f.prototype, "trustSourceNormals", void 0), f = u2 = e([n(m2)], f);
- var g2 = f;
- export {
- p,
- g2 as g
- };
- //# sourceMappingURL=chunk-SFI4OJO6.js.map
|