Advertisement
programcreator

Render

Jan 12th, 2016
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.60 KB | None | 0 0
  1. love.graphics.setCanvas(can)
  2. local xBuffer = {}
  3. local state = false
  4.  
  5. for i=0,500 do
  6.     for k,v in pairs(beziers) do
  7.         a,b = v.getX(i)
  8.         --print(a, type(a))
  9.         --print(b, type(b))
  10.         if a then
  11.             xBuffer[round(a)] = 1
  12.             if b then
  13.                 xBuffer[round(a)] = 1
  14.             end
  15.         end
  16.     end
  17.     for k,v in pairs(lines) do
  18.         a = v.getX(i)
  19.         --print(a, type(a))
  20.         if a then
  21.             xBuffer[round(a)] = 1
  22.         end
  23.     end
  24.     state = false
  25.     for x=0,600 do
  26.         if xBuffer[x] then
  27.             --state = not state
  28.             love.graphics.points(x,i)
  29.         end
  30.         if state then
  31.             --love.graphics.points(x,i)
  32.         end
  33.     end
  34. end
  35.  
  36. love.graphics.setCanvas()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement