/*
All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
*/
import{__decorate as t}from"tslib";import{uniform as i,UniformGroup as l}from"../../GraphShaderModule.js";import{Vec2 as o,Float as r,fract as e,mod as s}from"../../graph/glsl.js";import{maxRepresentableInt as m}from"./constants.js";class n extends l{getPatternOffsetAtTileOrigin(t,i=new r(0),l=new r(1)){const n=new o(m).divide(t);let p=t.multiply(e(this.maxIntsToLocalOrigin.multiply(n))).add(this.tileOffsetFromLocalOrigin).subtract(new r(.5).multiply(t));return p=new o(p.x.multiply(l).subtract(p.y.multiply(i)),p.x.multiply(i).add(p.y.multiply(l))),s(p,t)}}t([i(o)],n.prototype,"tileOffsetFromLocalOrigin",void 0),t([i(o)],n.prototype,"maxIntsToLocalOrigin",void 0);export{n as LocalTileOffset};
