/* COPYRIGHT Esri - https://js.arcgis.com/5.0.18/LICENSE.txt */
import{__decorate as t}from"tslib";import{uniform as e,UniformGroup as r}from"../../GraphShaderModule.js";import{Float as o,ifElse as i,sin as n,cos as l,Mat4 as s,Mat3 as m,equal as p}from"../../graph/glsl.js";import{cDegToRad as a}from"./constants.js";import{isNan as u}from"./utils.js";class g extends r{getVVRotationMat4(t){return i(u(t),s.identity(),()=>{const e=this.getNormalizedAngle(t).multiply(a),r=n(e),i=l(e);return new s(i,r,0,0,r.multiply(new o(-1)),i,0,0,0,0,1,0,0,0,0,1)})}getVVRotationMat3(t){return i(u(t),m.identity(),()=>{const e=this.getNormalizedAngle(t).multiply(a),r=n(e),i=l(e);return new m(i,r,0,r.multiply(new o(-1)),i,0,0,0,1)})}getNormalizedAngle(t){const e=p(this.rotationType,new o(1));return i(e,new o(90).subtract(t),t)}}t([e(o)],g.prototype,"rotationType",void 0);export{g as VisualVariableRotation};
