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 t}from"../../chunks/tslib.es6.js";import{ClonableMixin as o}from"../../core/Clonable.js";import{cyclicalDegrees as r}from"../../core/Cyclical.js";import{JSONSupport as e}from"../../core/JSONSupport.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import{cast as i}from"../../core/accessorSupport/decorators/cast.js";import{subclass as n}from"../../core/accessorSupport/decorators/subclass.js";import{ensureNumber as l}from"../../core/accessorSupport/ensureType.js";import{computeOrientationTiltFromNormal as a,computeNormalFromOrientationTilt as p}from"./voxelPlaneUtils.js";let m=class extends(o(e)){constructor(t){super(t),this.enabled=!0,this.label="",this.normal=null,this.point=null}get orientation(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[t,o]=a(this.normal);return r.normalize(l(t),0,!0)}set orientation(t){const o=p(t,this.tilt);this._set("normal",o),this._set("orientation",t)}get tilt(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[t,o]=a(this.normal);return r.normalize(l(o),0,!0)}set tilt(t){const o=p(this.orientation,t);this._set("normal",o),this._set("tilt",t)}};t([s({type:Boolean,json:{write:!0}})],m.prototype,"enabled",void 0),t([s({type:String,json:{write:!0}})],m.prototype,"label",void 0),t([s({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),i((t=>r.normalize(l(t),0,!0)))],m.prototype,"orientation",null),t([s({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),i((t=>r.normalize(l(t),0,!0)))],m.prototype,"tilt",null),t([s({type:[Number],json:{write:!0}})],m.prototype,"normal",void 0),t([s({type:[Number],json:{write:!0}})],m.prototype,"point",void 0),m=t([n("esri.layers.voxel.VoxelSlice")],m);const c=m;export{c as default};
|