293
293
294
294
function love .keypressed (key )
295
295
if key == ' f' then
296
- camera :flash (0.05 , {0 , 0 , 0 , 255 })
296
+ camera :flash (0.05 , {0 , 0 , 0 , 1 })
297
297
end
298
298
end
299
299
```
320
320
321
321
function love .keypressed (key )
322
322
if key == ' f' then
323
- camera :fade (1 , {0 , 0 , 0 , 255 })
323
+ camera :fade (1 , {0 , 0 , 0 , 1 })
324
324
end
325
325
326
326
if key == ' g' then
@@ -361,7 +361,7 @@ function love.draw()
361
361
love .graphics .setCanvas ()
362
362
363
363
-- Draw the 400x300 canvas scaled by 2 to a 800x600 screen
364
- love .graphics .setColor (255 , 255 , 255 , 255 )
364
+ love .graphics .setColor (1 , 1 , 1 , 1 )
365
365
love .graphics .setBlendMode (' alpha' , ' premultiplied' )
366
366
love .graphics .draw (canvas , 0 , 0 , 0 , 2 , 2 )
367
367
love .graphics .setBlendMode (' alpha' )
@@ -667,13 +667,13 @@ Arguments:
667
667
Fills the screen up with a color for a certain duration.
668
668
669
669
``` lua
670
- camera :flash (0.05 , {0 , 0 , 0 , 255 })
670
+ camera :flash (0.05 , {0 , 0 , 0 , 1 })
671
671
```
672
672
673
673
Arguments:
674
674
675
675
* ` duration ` ` (number) ` - The duration of the flash in seconds
676
- * ` color={0, 0, 0, 255 } ` ` (table[number]) ` - The color of the flash. Defaults to ` {0, 0, 0, 255 } `
676
+ * ` color={0, 0, 0, 1 } ` ` (table[number]) ` - The color of the flash. Defaults to ` {0, 0, 0, 1 } `
677
677
678
678
---
679
679
@@ -682,7 +682,7 @@ Arguments:
682
682
Slowly fills up the screen with a color along the duration.
683
683
684
684
``` lua
685
- camera :fade (1 , {0 , 0 , 0 , 255 }, function () print (1 ) end )
685
+ camera :fade (1 , {0 , 0 , 0 , 1 }, function () print (1 ) end )
686
686
```
687
687
688
688
Arguments:
0 commit comments