@intechstudio/grid-protocol 1.20261030.1031 → 1.20261104.1458

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +1 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -963,7 +963,7 @@ var GRID_ACTIONSTRING_LCD_INIT = "--[[@cb]]glsb(255)pi,s,c,self.f,self.v,self.id
963
963
  var GRID_ACTIONSTRING_LCD_DRAW = "--[[@cb]]if self.f>0 then self.f=self.f-1 local a,xo=gmaps(self.v[1],self.v[2],self.v[3],0.1,1),#tostring(self.v[1])/2*s/2-#tostring(self.v[1])-s//32 self:ldaf(10,10,310,230,c[1])self:ldrr(xc-p//1-1,yc-p//1-1,xc+p//1+1,yc+p//1+1,s,c[2])self:ldrrf(xc-p*a//1,yc-p*a//1,xc+p*a//1,yc+p*a//1,s,c[3])self:ldft(self.v[1],xc-xo,yc+s,s/2,c[2])local xn=(#self.id*(s/2))/2-s//32 self:ldft(self.id,xc-xn,yc-1.5*s,s/2,c[2])self:ldsw()end";
964
964
  var GRID_LUA_T_TYPE = "Touch";
965
965
  var GRID_LUA_T_META_init = "GRID_LUA_T_TYPE \" = { __index = {type = 'touch', post_init_cb = function (self) self:\" GRID_LUA_FNC_A_INIT_short \"() end,\" GRID_LUA_FNC_ASSIGN_META_PAR1_RET(\"gen\", GRID_LUA_FNC_G_ELEMENTNAME_short) \",\" GRID_LUA_FNC_ASSIGN_META_EVENT(INIT, TOUCH_INIT) \"}}\"";
966
- var GRID_ACTIONSTRING_TOUCH_INIT = "--[[@cb]]for i=0,self:lwi()*self:lwi()-1 do gln(i,1,0,0,0)gld(i,1,32,32,32)glx(i,1,64,64,64)glp(i,1,0)end function laddr2to1(x,y)return glag(0,x+y*9)end xp={0,0}yp={0,0}self.touch_cb=function(self,id,evt,x,y)local tp={(x/127)*(self:lwi()-1),(y/127)*(self:lwi()-1)}local xs={math.floor(tp[1]),math.ceil(tp[1])}local ys={math.floor(tp[2]),math.ceil(tp[2])}for i=xp[1],xp[2]do for j=yp[1],yp[2]do glp(laddr2to1(i,j),1,0)end end for i=xs[1],xs[2]do for j=ys[1],ys[2]do local d={tp[1]-i,tp[2]-j}local dist=math.sqrt(d[1]*d[1]+d[2]*d[2])if dist<1 then local pha=255-math.tointeger((dist*255)//1)glp(laddr2to1(i,j),1,pha)end end end xp=xs yp=ys end";
966
+ var GRID_ACTIONSTRING_TOUCH_INIT = "--[[@cb]]for i=0,self:lwi()*self:lwi()-1 do gln(i,1,0,0,0)gld(i,1,128,128,128)glx(i,1,255,255,255)glp(i,1,0)end function laddr2to1(x,y)return glag(0,x+y*9)end xp={0,0}yp={0,0}self.touch_cb=function(self,id,evt,x,y)local tp={(x/127)*(self:lwi()-1),(y/127)*(self:lwi()-1)}local xs={math.floor(tp[1]),math.ceil(tp[1])}local ys={math.floor(tp[2]),math.ceil(tp[2])}for i=xp[1],xp[2]do for j=yp[1],yp[2]do glp(laddr2to1(i,j),1,0)end end for i=xs[1],xs[2]do for j=ys[1],ys[2]do local d={tp[1]-i,tp[2]-j}local dist=math.sqrt(d[1]*d[1]+d[2]*d[2])if dist<1 then local pha=255-math.tointeger((dist*255)//1)glp(laddr2to1(i,j),1,pha)end end end xp=xs yp=ys end";
967
967
  var GRID_LUA_FNC_G_DECODE_source = "common_src_lua_decode_lua";
968
968
  var GRID_LUA_FNC_G_DECODE_short = "gdec";
969
969
  var GRID_LUA_FNC_G_DECODE_human = "decode";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intechstudio/grid-protocol",
3
- "version": "1.20261030.1031",
3
+ "version": "1.20261104.1458",
4
4
  "description": "Grid protocol descriptors automatically generated from the grid-fw repository!",
5
5
  "scripts": {
6
6
  "test": "vitest run",