UNPKG

@doegis/core

Version:

DOE GIS API

3 lines (1 loc) 1.78 kB
import{_ as r}from"../../chunks/tslib.es6.js";import{JSONSupport as t}from"../../core/JSONSupport.js";import{clone as e}from"../../core/lang.js";import s from"../../core/Logger.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import{cast as a}from"../../core/accessorSupport/decorators/cast.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";import{ensureClass as c}from"../../core/accessorSupport/ensureType.js";import l from"./MeshMaterial.js";import p from"./MeshMaterialMetallicRoughness.js";import{castArray as n}from"./MeshVertexAttributes.js";var u;const m="esri.geometry.support.MeshComponent",h=s.getLogger(m);let f=u=class extends t{static from(r){return c(u,r)}constructor(r){super(r),this.faces=null,this.material=null,this.shading="source",this.trustSourceNormals=!1}castFaces(r){return n(r,Uint32Array,[Uint16Array],{loggerTag:".faces=",stride:3},h)}castMaterial(r){return c(r&&"object"==typeof r&&("metallic"in r||"roughness"in r||"metallicRoughnessTexture"in r)?p:l,r)}clone(){return new u({faces:e(this.faces),shading:this.shading,material:e(this.material),trustSourceNormals:this.trustSourceNormals})}cloneWithDeduplication(r,t){const s={faces:e(this.faces),shading:this.shading,material:this.material?this.material.cloneWithDeduplication(r,t):null,trustSourceNormals:this.trustSourceNormals};return new u(s)}};r([o({json:{write:!0}})],f.prototype,"faces",void 0),r([a("faces")],f.prototype,"castFaces",null),r([o({type:l,json:{write:!0}})],f.prototype,"material",void 0),r([a("material")],f.prototype,"castMaterial",null),r([o({type:String,json:{write:!0}})],f.prototype,"shading",void 0),r([o({type:Boolean})],f.prototype,"trustSourceNormals",void 0),f=u=r([i(m)],f);const g=f;export{g as default};