Data update
This commit is contained in:
parent
35bcdeebf8
commit
74c69a0df6
2427 changed files with 31826 additions and 3468 deletions
37
Task/Image-noise/MiniScript/image-noise.mini
Normal file
37
Task/Image-noise/MiniScript/image-noise.mini
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
clear
|
||||
tileSetLength = 32
|
||||
width = 320
|
||||
height = 240
|
||||
cellSize = [960/width, 600/height]
|
||||
colors = [color.black, color.white]
|
||||
|
||||
newImg = function
|
||||
img = Image.create(tileSetLength, 1)
|
||||
for i in range(0, tileSetLength - 1)
|
||||
img.setPixel i, 0, colors[rnd * 2]
|
||||
end for
|
||||
return img
|
||||
end function
|
||||
|
||||
display(5).mode = displayMode.tile
|
||||
td = display(5)
|
||||
td.cellSize = cellSize
|
||||
td.extent = [width, height]
|
||||
td.tileSetTileSize = 1
|
||||
for x in range(0, width - 1)
|
||||
for y in range(0, height - 1)
|
||||
td.setCell x, y, rnd * tileSetLength
|
||||
end for
|
||||
end for
|
||||
frames = 0
|
||||
startTime = time
|
||||
while true
|
||||
td.tileSet = newImg
|
||||
frames += 1
|
||||
dt = time - startTime
|
||||
if dt >= 1 then
|
||||
text.row = 25; print "FPS: " + round(frames / dt, 2)
|
||||
frames = 0
|
||||
startTime = time
|
||||
end if
|
||||
end while
|
||||
Loading…
Add table
Add a link
Reference in a new issue