UNPKG

@arcgis/core

Version:

ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API

6 lines (5 loc) 2.25 kB
/* All material copyright ESRI, All Rights Reserved, unless otherwise specified. See https://js.arcgis.com/4.32/esri/copyright.txt for details. */ import{_ as t}from"../../chunks/tslib.es6.js";import o from"../../core/JSONSupport.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import{fromRotationTranslationScale as i,invert as e,exactEquals as a}from"../../core/libs/gl-matrix-2/math/mat4.js";import{create as l}from"../../core/libs/gl-matrix-2/factories/mat4f64.js";import{setAxisAngle as n}from"../../core/libs/gl-matrix-2/math/quat.js";import{create as c}from"../../core/libs/gl-matrix-2/factories/quatf64.js";import{create as p,fromArray as m,fromValues as u,clone as h}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{up as x,fromAxisAndAngle as g,axis as f,angle as j,angleRad as b}from"./axisAngleDegrees.js";var y;let A=y=class extends o{constructor(t){super(t),this.translation=p(),this.rotationAxis=m(x),this.rotationAngle=0,this.scale=u(1,1,1)}get rotation(){return g(this.rotationAxis,this.rotationAngle)}set rotation(t){this.rotationAxis=h(f(t)),this.rotationAngle=j(t)}get localMatrix(){const t=l();return n(d,f(this.rotation),b(this.rotation)),i(t,d,this.translation,this.scale),t}get localMatrixInverse(){return e(l(),this.localMatrix)}equals(t){return this===t||null!=t&&a(this.localMatrix,t.localMatrix)}clone(){const t={translation:h(this.translation),rotationAxis:h(this.rotationAxis),rotationAngle:this.rotationAngle,scale:h(this.scale)};return new y(t)}};t([r({type:[Number],nonNullable:!0,json:{write:!0}})],A.prototype,"translation",void 0),t([r({type:[Number],nonNullable:!0,json:{write:!0}})],A.prototype,"rotationAxis",void 0),t([r({type:Number,nonNullable:!0,json:{write:!0}})],A.prototype,"rotationAngle",void 0),t([r({type:[Number],nonNullable:!0,json:{write:!0}})],A.prototype,"scale",void 0),t([r()],A.prototype,"rotation",null),t([r()],A.prototype,"localMatrix",null),t([r()],A.prototype,"localMatrixInverse",null),A=y=t([s("esri.geometry.support.MeshTransform")],A);const d=c(),N=A;export{N as default};