12345 |
- /*
- All material copyright ESRI, All Rights Reserved, unless otherwise specified.
- See https://js.arcgis.com/4.25/esri/copyright.txt for details.
- */
- import{_ as e}from"../../chunks/tslib.es6.js";import{ClonableMixin as r}from"../../core/Clonable.js";import{cyclicalDegrees as o}from"../../core/Cyclical.js";import{JSONSupport as t}from"../../core/JSONSupport.js";import{property as i}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import{ensureNumber as s,Integer as l}from"../../core/accessorSupport/ensureType.js";import{subclass as n}from"../../core/accessorSupport/decorators/subclass.js";import{persistable as p}from"../../core/accessorSupport/decorators/persistable.js";import{computeOrientationTiltFromNormal as a}from"./voxelPlaneUtils.js";import m from"./VoxelSlice.js";import{r as c}from"../../chunks/persistableUrlUtils.js";let d=class extends(r(t)){constructor(){super(...arguments),this.enabled=!0,this.href=null,this.id=null,this.label="",this.normal=null,this.point=null,this.sizeInPixel=null,this.slices=null,this.timeId=0,this.variableId=null}get orientation(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,r]=a(this.normal);return o.normalize(s(e),0,!0)}get tilt(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,r]=a(this.normal);return o.normalize(s(r),0,!0)}};e([i({type:Boolean,json:{default:!0,write:!0}})],d.prototype,"enabled",void 0),e([i({type:String,json:{origins:{service:{read:c}},write:{enabled:!0,isRequired:!0}}}),p({origins:["web-scene"],type:"resource",prefix:"sections",compress:!0})],d.prototype,"href",void 0),e([i({type:l,json:{write:{enabled:!0,isRequired:!0}}})],d.prototype,"id",void 0),e([i({type:String,json:{write:!0}})],d.prototype,"label",void 0),e([i({type:Number,clonable:!1,readOnly:!0,range:{min:0,max:360}})],d.prototype,"orientation",null),e([i({type:Number,clonable:!1,readOnly:!0,range:{min:0,max:360}})],d.prototype,"tilt",null),e([i({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],d.prototype,"normal",void 0),e([i({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],d.prototype,"point",void 0),e([i({type:[l],json:{write:{enabled:!0,isRequired:!0}}})],d.prototype,"sizeInPixel",void 0),e([i({type:[m],json:{write:!0}})],d.prototype,"slices",void 0),e([i({type:l,json:{default:0,write:!0}})],d.prototype,"timeId",void 0),e([i({type:l,json:{write:{enabled:!0,isRequired:!0}}})],d.prototype,"variableId",void 0),d=e([n("esri.layers.voxel.VoxelSection")],d);const u=d;export{u as default};
|