-
Notifications
You must be signed in to change notification settings - Fork 0
/
love_api.lua
5660 lines (5660 loc) · 314 KB
/
love_api.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
return {
love = {
audio = {
DistanceModel = {
exponent = {
description = "[var]\n\nExponential attenuation.",
signature = "[var]"
},
exponentclamped = {
description = "[var]\n\nExponential attenuation.\nGain is clamped.\nIn version 0.9.2 and older this is named exponent clamped.",
signature = "[var]"
},
inverse = {
description = "[var]\n\nInverse distance attenuation.",
signature = "[var]"
},
inverseclamped = {
description = "[var]\n\nInverse distance attenuation.\nGain is clamped.\nIn version 0.9.2 and older this is named inverse clamped.",
signature = "[var]"
},
linear = {
description = "[var]\n\nLinear attenuation.",
signature = "[var]"
},
linearclamped = {
description = "[var]\n\nLinear attenuation.\nGain is clamped.\nIn version 0.9.2 and older this is named linear clamped.",
signature = "[var]"
},
none = {
description = "[var]\n\nSources do not get attenuated.",
signature = "[var]"
}
},
RecordingDevice = {
description = "[var]\n\nRepresents an audio input device capable of recording sounds.",
signature = "[var]"
},
Source = {
getAttenuationDistances = {
description = "[fun] () -> (ref: number, max: number)\n\nReturns the reference and maximum distance of the source.",
signature = "[fun] () -> (ref: number, max: number)"
},
getChannelCount = {
description = "[fun] () -> (channels: number)\n\nGets the number of channels in the Source.\nOnly 1-channel (mono) Sources can use directional and positional effects.",
signature = "[fun] () -> (channels: number)"
},
getCone = {
description = "[fun] () -> (innerAngle: number, outerAngle: number, outerVolume: number)\n\nGets the Source's directional volume cones.\nTogether with Source:setDirection, the cone angles allow for the Source's volume to vary depending on its direction.",
signature = "[fun] () -> (innerAngle: number, outerAngle: number, outerVolume: number)"
},
getDirection = {
description = "[fun] () -> (x: number, y: number, z: number)\n\nGets the direction of the Source.",
signature = "[fun] () -> (x: number, y: number, z: number)"
},
getDuration = {
description = "[fun] (unit: TimeUnit) -> (duration: number)\n\nGets the duration of the Source.\nFor streaming Sources it may not always be sample-accurate, and may return -1 if the duration cannot be determined at all.",
signature = "[fun] (unit: TimeUnit) -> (duration: number)"
},
getPitch = {
description = "[fun] () -> (pitch: number)\n\nGets the current pitch of the Source.",
signature = "[fun] () -> (pitch: number)"
},
getPosition = {
description = "[fun] () -> (x: number, y: number, z: number)\n\nGets the position of the Source.",
signature = "[fun] () -> (x: number, y: number, z: number)"
},
getRolloff = {
description = "[fun] () -> (rolloff: number)\n\nReturns the rolloff factor of the source.",
signature = "[fun] () -> (rolloff: number)"
},
getType = {
description = "[fun] () -> (sourcetype: SourceType)\n\nGets the type (static or stream) of the Source.",
signature = "[fun] () -> (sourcetype: SourceType)"
},
getVelocity = {
description = "[fun] () -> (x: number, y: number, z: number)\n\nGets the velocity of the Source.",
signature = "[fun] () -> (x: number, y: number, z: number)"
},
getVolume = {
description = "[fun] () -> (volume: number)\n\nGets the current volume of the Source.",
signature = "[fun] () -> (volume: number)"
},
getVolumeLimits = {
description = "[fun] () -> (min: number, max: number)\n\nReturns the volume limits of the source.",
signature = "[fun] () -> (min: number, max: number)"
},
isLooping = {
description = "[fun] () -> (loop: boolean)\n\nReturns whether the Source will loop.",
signature = "[fun] () -> (loop: boolean)"
},
isPaused = {
description = "[fun] () -> (paused: boolean)\n\nReturns whether the Source is paused.",
signature = "[fun] () -> (paused: boolean)"
},
isPlaying = {
description = "[fun] () -> (playing: boolean)\n\nReturns whether the Source is playing.",
signature = "[fun] () -> (playing: boolean)"
},
isStopped = {
description = "[fun] () -> (stopped: boolean)\n\nReturns whether the Source is stopped.",
signature = "[fun] () -> (stopped: boolean)"
},
pause = {
description = "[fun] () -> ()\n\nPauses the Source.",
signature = "[fun] () -> ()"
},
play = {
description = "[fun] () -> (success: boolean)\n\nStarts playing the Source.",
signature = "[fun] () -> (success: boolean)"
},
resume = {
description = "[fun] () -> ()\n\nResumes a paused Source.",
signature = "[fun] () -> ()"
},
rewind = {
description = "[fun] () -> ()\n\nRewinds a Source.",
signature = "[fun] () -> ()"
},
seek = {
description = "[fun] (position: number, unit: TimeUnit) -> ()\n\nSets the playing position of the Source.",
signature = "[fun] (position: number, unit: TimeUnit) -> ()"
},
setAttenuationDistances = {
description = "[fun] (ref: number, max: number) -> ()\n\nSets the reference and maximum distance of the source.",
signature = "[fun] (ref: number, max: number) -> ()"
},
setCone = {
description = "[fun] (innerAngle: number, outerAngle: number, outerVolume: number) -> ()\n\nSets the Source's directional volume cones.\nTogether with Source:setDirection, the cone angles allow for the Source's volume to vary depending on its direction.",
signature = "[fun] (innerAngle: number, outerAngle: number, outerVolume: number) -> ()"
},
setDirection = {
description = "[fun] (x: number, y: number, z: number) -> ()\n\nSets the direction vector of the Source.\nA zero vector makes the source non-directional.",
signature = "[fun] (x: number, y: number, z: number) -> ()"
},
setLooping = {
description = "[fun] (loop: boolean) -> ()\n\nSets whether the Source should loop.",
signature = "[fun] (loop: boolean) -> ()"
},
setPitch = {
description = "[fun] (pitch: number) -> ()\n\nSets the pitch of the Source.",
signature = "[fun] (pitch: number) -> ()"
},
setPosition = {
description = "[fun] (x: number, y: number, z: number) -> ()\n\nSets the position of the Source.",
signature = "[fun] (x: number, y: number, z: number) -> ()"
},
setRolloff = {
description = "[fun] (rolloff: number) -> ()\n\nSets the rolloff factor which affects the strength of the used distance attenuation.\n\nExtended information and detailed formulas can be found in the chapter \"3.4.\nAttenuation By Distance\" of OpenAL 1.1 specification.",
signature = "[fun] (rolloff: number) -> ()"
},
setVelocity = {
description = "[fun] (x: number, y: number, z: number) -> ()\n\nSets the velocity of the Source.\n\nThis does not change the position of the Source, but is used to calculate the doppler effect.",
signature = "[fun] (x: number, y: number, z: number) -> ()"
},
setVolume = {
description = "[fun] (volume: number) -> ()\n\nSets the volume of the Source.",
signature = "[fun] (volume: number) -> ()"
},
setVolumeLimits = {
description = "[fun] (min: number, max: number) -> ()\n\nSets the volume limits of the source.\nThe limits have to be numbers from 0 to 1.",
signature = "[fun] (min: number, max: number) -> ()"
},
stop = {
description = "[fun] () -> ()\n\nStops a Source.",
signature = "[fun] () -> ()"
},
tell = {
description = "[fun] (unit: TimeUnit) -> (position: number)\n\nGets the currently playing position of the Source.",
signature = "[fun] (unit: TimeUnit) -> (position: number)"
}
},
SourceType = {
static = {
description = "[var]\n\nDecode the entire sound at once.",
signature = "[var]"
},
stream = {
description = "[var]\n\nStream the sound; decode it gradually.",
signature = "[var]"
}
},
TimeUnit = {
samples = {
description = "[var]\n\nAudio samples.",
signature = "[var]"
},
seconds = {
description = "[var]\n\nRegular seconds.",
signature = "[var]"
}
},
getDistanceModel = {
description = "[fun] () -> (model: DistanceModel)\n\nReturns the distance attenuation model.",
signature = "[fun] () -> (model: DistanceModel)"
},
getDopplerScale = {
description = "[fun] () -> (scale: number)\n\nGets the current global scale factor for velocity-based doppler effects.",
signature = "[fun] () -> (scale: number)"
},
getOrientation = {
description = "[fun] () -> (fx: number, fy: number, fz: number, ux: number, uy: number, uz: number)\n\nReturns the orientation of the listener.",
signature = "[fun] () -> (fx: number, fy: number, fz: number, ux: number, uy: number, uz: number)"
},
getPosition = {
description = "[fun] () -> (x: number, y: number, z: number)\n\nReturns the position of the listener.",
signature = "[fun] () -> (x: number, y: number, z: number)"
},
getSourceCount = {
description = "[fun] () -> (numSources: number)\n\nReturns the number of sources which are currently playing or paused.",
signature = "[fun] () -> (numSources: number)"
},
getVelocity = {
description = "[fun] () -> (x: number, y: number, z: number)\n\nReturns the velocity of the listener.",
signature = "[fun] () -> (x: number, y: number, z: number)"
},
getVolume = {
description = "[fun] () -> (volume: number)\n\nReturns the master volume.",
signature = "[fun] () -> (volume: number)"
},
newSource = {
description = "[fun] (filename: string, type: SourceType) -> (source: Source)\n\nCreates a new Source from a file or SoundData.\nSources created from SoundData are always static.",
signature = "[fun] (filename: string, type: SourceType) -> (source: Source)"
},
pause = {
description = "[fun] (source: Source) -> ()\n\nPauses currently played Sources.",
signature = "[fun] (source: Source) -> ()"
},
play = {
description = "[fun] (source: Source) -> ()\n\nPlays the specified Source.",
signature = "[fun] (source: Source) -> ()"
},
resume = {
description = "[fun] (source: Source) -> ()\n\nResumes all audio",
signature = "[fun] (source: Source) -> ()"
},
rewind = {
description = "[fun] (source: Source) -> ()\n\nRewinds all playing audio.",
signature = "[fun] (source: Source) -> ()"
},
setDistanceModel = {
description = "[fun] (model: DistanceModel) -> ()\n\nSets the distance attenuation model.",
signature = "[fun] (model: DistanceModel) -> ()"
},
setDopplerScale = {
description = "[fun] (scale: number) -> ()\n\nSets a global scale factor for velocity-based doppler effects.\nThe default scale value is 1.",
signature = "[fun] (scale: number) -> ()"
},
setOrientation = {
description = "[fun] (fx: number, fy: number, fz: number, ux: number, uy: number, uz: number) -> ()\n\nSets the orientation of the listener.",
signature = "[fun] (fx: number, fy: number, fz: number, ux: number, uy: number, uz: number) -> ()"
},
setPosition = {
description = "[fun] (x: number, y: number, z: number) -> ()\n\nSets the position of the listener, which determines how sounds play.",
signature = "[fun] (x: number, y: number, z: number) -> ()"
},
setVelocity = {
description = "[fun] (x: number, y: number, z: number) -> ()\n\nSets the velocity of the listener.",
signature = "[fun] (x: number, y: number, z: number) -> ()"
},
setVolume = {
description = "[fun] (volume: number) -> ()\n\nSets the master volume.",
signature = "[fun] (volume: number) -> ()"
},
stop = {
description = "[fun] (source: Source) -> ()\n\nStops currently played sources.",
signature = "[fun] (source: Source) -> ()"
}
},
conf = {
description = "[fun] (t: table) -> ()\n\nIf a file called conf.lua is present in your game folder (or .love file), it is run before the LÖVE modules are loaded.\nYou can use this file to overwrite the love.conf function, which is later called by the LÖVE 'boot' script.\nUsing the love.conf function, you can set some configuration options, and change things like the default size of the window, which modules are loaded, and other stuff.",
signature = "[fun] (t: table) -> ()"
},
directorydropped = {
description = "[fun] (path: string) -> ()\n\nCallback function triggered when a directory is dragged and dropped onto the window.",
signature = "[fun] (path: string) -> ()"
},
draw = {
description = "[fun] () -> ()\n\nCallback function used to draw on the screen every frame.",
signature = "[fun] () -> ()"
},
errorhandler = {
description = "[fun] (msg: string) -> ()\n\nThe error handler, used to display error messages.",
signature = "[fun] (msg: string) -> ()"
},
event = {
Event = {
focus = {
description = "[var]\n\nWindow focus gained or lost",
signature = "[var]"
},
joystickaxis = {
description = "[var]\n\nJoystick axis motion",
signature = "[var]"
},
joystickhat = {
description = "[var]\n\nJoystick hat pressed",
signature = "[var]"
},
joystickpressed = {
description = "[var]\n\nJoystick pressed",
signature = "[var]"
},
joystickreleased = {
description = "[var]\n\nJoystick released",
signature = "[var]"
},
keypressed = {
description = "[var]\n\nKey pressed",
signature = "[var]"
},
keyreleased = {
description = "[var]\n\nKey released",
signature = "[var]"
},
mousefocus = {
description = "[var]\n\nWindow mouse focus gained or lost",
signature = "[var]"
},
mousepressed = {
description = "[var]\n\nMouse pressed",
signature = "[var]"
},
mousereleased = {
description = "[var]\n\nMouse released",
signature = "[var]"
},
quit = {
description = "[var]\n\nQuit",
signature = "[var]"
},
resize = {
description = "[var]\n\nWindow size changed by the user",
signature = "[var]"
},
threaderror = {
description = "[var]\n\nA Lua error has occurred in a thread.",
signature = "[var]"
},
visible = {
description = "[var]\n\nWindow is minimized or un-minimized by the user",
signature = "[var]"
}
},
poll = {
description = "[fun] () -> (i: function)\n\nReturns an iterator for messages in the event queue.",
signature = "[fun] () -> (i: function)"
},
pump = {
description = "[fun] () -> ()\n\nPump events into the event queue.\nThis is a low-level function, and is usually not called by the user, but by love.run.\nNote that this does need to be called for any OS to think you're still running, and if you want to handle OS-generated events at all (think callbacks).\nlove.event.pump can only be called from the main thread, but afterwards, the rest of love.event can be used from any other thread.",
signature = "[fun] () -> ()"
},
push = {
description = "[fun] (e: Event, a: Variant, b: Variant, c: Variant, d: Variant) -> ()\n\nAdds an event to the event queue.",
signature = "[fun] (e: Event, a: Variant, b: Variant, c: Variant, d: Variant) -> ()"
},
quit = {
description = "[fun] (exitstatus: number) -> ()\n\nAdds the quit event to the queue.\n\nThe quit event is a signal for the event handler to close LÖVE.\nIt's possible to abort the exit process with the love.quit callback.",
signature = "[fun] (exitstatus: number) -> ()"
},
wait = {
description = "[fun] () -> (e: Event, a: Variant, b: Variant, c: Variant, d: Variant)\n\nLike love.event.poll but blocks until there is an event in the queue.",
signature = "[fun] () -> (e: Event, a: Variant, b: Variant, c: Variant, d: Variant)"
}
},
filedropped = {
description = "[fun] (file: File) -> ()\n\nCallback function triggered when a file is dragged and dropped onto the window.",
signature = "[fun] (file: File) -> ()"
},
filesystem = {
BufferMode = {
full = {
description = "[var]\n\nFull buffering.\nWrite and append operations are always buffered until the buffer size limit is reached.",
signature = "[var]"
},
line = {
description = "[var]\n\nLine buffering.\nWrite and append operations are buffered until a newline is output or the buffer size limit is reached.",
signature = "[var]"
},
none = {
description = "[var]\n\nNo buffering.\nThe result of write and append operations appears immediately.",
signature = "[var]"
}
},
File = {
flush = {
description = "[fun] () -> (success: boolean, err: string)\n\nFlushes any buffered written data in the file to the disk.",
signature = "[fun] () -> (success: boolean, err: string)"
},
getBuffer = {
description = "[fun] () -> (mode: BufferMode, size: number)\n\nGets the buffer mode of a file.",
signature = "[fun] () -> (mode: BufferMode, size: number)"
},
getFilename = {
description = "[fun] () -> (filename: string)\n\nGets the filename that the File object was created with.\nIf the file object originated from the love.filedropped callback, the filename will be the full platform-dependent file path.",
signature = "[fun] () -> (filename: string)"
},
getMode = {
description = "[fun] () -> (mode: FileMode)\n\nGets the FileMode the file has been opened with.",
signature = "[fun] () -> (mode: FileMode)"
},
getSize = {
description = "[fun] () -> (size: number)\n\nReturns the file size.",
signature = "[fun] () -> (size: number)"
},
isEOF = {
description = "[fun] () -> (eof: boolean)\n\nGets whether end-of-file has been reached.",
signature = "[fun] () -> (eof: boolean)"
},
isOpen = {
description = "[fun] () -> (open: boolean)\n\nGets whether the file is open.",
signature = "[fun] () -> (open: boolean)"
},
lines = {
description = "[fun] () -> (iterator: function)\n\nIterate over all the lines in a file",
signature = "[fun] () -> (iterator: function)"
},
open = {
description = "[fun] (mode: FileMode) -> (success: boolean)\n\nOpen the file for write, read or append.\n\nIf you are getting the error message \"Could not set write directory\", try setting the save directory.\nThis is done either with love.filesystem.setIdentity or by setting the identity field in love.conf.",
signature = "[fun] (mode: FileMode) -> (success: boolean)"
},
read = {
description = "[fun] (bytes: number) -> (contents: string, size: number)\n\nRead a number of bytes from a file.",
signature = "[fun] (bytes: number) -> (contents: string, size: number)"
},
seek = {
description = "[fun] (position: number) -> (success: boolean)\n\nSeek to a position in a file.",
signature = "[fun] (position: number) -> (success: boolean)"
},
setBuffer = {
description = "[fun] (mode: BufferMode, size: number) -> (success: boolean, errorstr: string)\n\nSets the buffer mode for a file opened for writing or appending.\nFiles with buffering enabled will not write data to the disk until the buffer size limit is reached, depending on the buffer mode.",
signature = "[fun] (mode: BufferMode, size: number) -> (success: boolean, errorstr: string)"
},
tell = {
description = "[fun] () -> (pos: number)\n\nReturns the position in the file.",
signature = "[fun] () -> (pos: number)"
},
write = {
description = "[fun] (data: string, size: number) -> (success: boolean)\n\nWrite data to a file.",
signature = "[fun] (data: string, size: number) -> (success: boolean)"
}
},
FileData = {
getFilename = {
description = "[fun] () -> (name: string)\n\nGets the filename of the FileData.",
signature = "[fun] () -> (name: string)"
}
},
FileDecoder = {
base64 = {
description = "[var]\n\nThe data is base64-encoded.",
signature = "[var]"
},
file = {
description = "[var]\n\nThe data is unencoded.",
signature = "[var]"
}
},
FileMode = {
a = {
description = "[var]\n\nOpen a file for append.",
signature = "[var]"
},
c = {
description = "[var]\n\nDo not open a file (represents a closed file.)",
signature = "[var]"
},
r = {
description = "[var]\n\nOpen a file for read.",
signature = "[var]"
},
w = {
description = "[var]\n\nOpen a file for write.",
signature = "[var]"
}
},
FileType = {
directory = {
description = "[var]\n\nDirectory",
signature = "[var]"
},
file = {
description = "[var]\n\nRegular file.",
signature = "[var]"
},
other = {
description = "[var]\n\nSomething completely different like a device.",
signature = "[var]"
},
symlink = {
description = "[var]\n\nSymbolic link.",
signature = "[var]"
}
},
areSymlinksEnabled = {
description = "[fun] () -> (enable: boolean)\n\nGets whether love.filesystem follows symbolic links.",
signature = "[fun] () -> (enable: boolean)"
},
createDirectory = {
description = "[fun] (name: string) -> (success: boolean)\n\nCreates a directory.",
signature = "[fun] (name: string) -> (success: boolean)"
},
getAppdataDirectory = {
description = "[fun] () -> (path: string)\n\nReturns the application data directory (could be the same as getUserDirectory)",
signature = "[fun] () -> (path: string)"
},
getCRequirePath = {
description = "[fun] () -> (paths: string)\n\nGets the filesystem paths that will be searched for c libraries when require is called.\n\nThe paths string returned by this function is a sequence of path templates separated by semicolons.\nThe argument passed to require will be inserted in place of any question mark (\"?\") character in each template (after the dot characters in the argument passed to require are replaced by directory separators.) Additionally, any occurrence of a double question mark (\"??\") will be replaced by the name passed to require and the default library extension for the platform.\n\nThe paths are relative to the game's source and save directories, as well as any paths mounted with love.filesystem.mount.",
signature = "[fun] () -> (paths: string)"
},
getDirectoryItems = {
description = "[fun] (dir: string) -> (items: table)\n\nReturns a table with the names of files and subdirectories in the specified path.\nThe table is not sorted in any way; the order is undefined.\n\nIf the path passed to the function exists in the game and the save directory, it will list the files and directories from both places.",
signature = "[fun] (dir: string) -> (items: table)"
},
getIdentity = {
description = "[fun] (name: string) -> ()\n\nGets the write directory name for your game.\nNote that this only returns the name of the folder to store your files in, not the full location.",
signature = "[fun] (name: string) -> ()"
},
getInfo = {
description = "[fun] (path: string) -> (info: table)\n\nGets information about the specified file or directory.",
signature = "[fun] (path: string) -> (info: table)"
},
getRealDirectory = {
description = "[fun] (filepath: string) -> (realdir: string)\n\nGets the platform-specific absolute path of the directory containing a filepath.\n\nThis can be used to determine whether a file is inside the save directory or the game's source .love.",
signature = "[fun] (filepath: string) -> (realdir: string)"
},
getRequirePath = {
description = "[fun] () -> (paths: string)\n\nGets the filesystem paths that will be searched when require is called.\n\nThe paths string returned by this function is a sequence of path templates separated by semicolons.\nThe argument passed to require will be inserted in place of any question mark (\"?\") character in each template (after the dot characters in the argument passed to require are replaced by directory separators.)\n\nThe paths are relative to the game's source and save directories, as well as any paths mounted with love.filesystem.mount.",
signature = "[fun] () -> (paths: string)"
},
getSaveDirectory = {
description = "[fun] () -> (path: string)\n\nGets the full path to the designated save directory.\nThis can be useful if you want to use the standard io library (or something else) to read or write in the save directory.",
signature = "[fun] () -> (path: string)"
},
getSource = {
description = "[fun] () -> (path: string)\n\nReturns the full path to the the .love file or directory.\nIf the game is fused to the LÖVE executable, then the executable is returned.",
signature = "[fun] () -> (path: string)"
},
getSourceBaseDirectory = {
description = "[fun] () -> (path: string)\n\nReturns the full path to the directory containing the .love file.\nIf the game is fused to the LÖVE executable, then the directory containing the executable is returned.\n\nIf love.filesystem.isFused is true, the path returned by this function can be passed to love.filesystem.mount, which will make the directory containing the main game readable by love.filesystem.",
signature = "[fun] () -> (path: string)"
},
getUserDirectory = {
description = "[fun] () -> (path: string)\n\nReturns the path of the user's directory.",
signature = "[fun] () -> (path: string)"
},
getWorkingDirectory = {
description = "[fun] () -> (path: string)\n\nGets the current working directory.",
signature = "[fun] () -> (path: string)"
},
init = {
description = "[fun] (appname: string) -> ()\n\nInitializes love.filesystem, will be called internally, so should not be used explicitly.",
signature = "[fun] (appname: string) -> ()"
},
isFused = {
description = "[fun] () -> (fused: boolean)\n\nGets whether the game is in fused mode or not.\n\nIf a game is in fused mode, its save directory will be directly in the Appdata directory instead of Appdata/LOVE/.\nThe game will also be able to load C Lua dynamic libraries which are located in the save directory.\n\nA game is in fused mode if the source .love has been fused to the executable (see Game Distribution), or if \"--fused\" has been given as a command-line argument when starting the game.",
signature = "[fun] () -> (fused: boolean)"
},
lines = {
description = "[fun] (name: string) -> (iterator: function)\n\nIterate over the lines in a file.",
signature = "[fun] (name: string) -> (iterator: function)"
},
load = {
description = "[fun] (name: string, errormsg: string) -> (chunk: function)\n\nLoads a Lua file (but does not run it).",
signature = "[fun] (name: string, errormsg: string) -> (chunk: function)"
},
mount = {
description = "[fun] (archive: string, mountpoint: string) -> (success: boolean)\n\nMounts a zip file or folder in the game's save directory for reading.",
signature = "[fun] (archive: string, mountpoint: string) -> (success: boolean)"
},
newFile = {
description = "[fun] (filename: string, mode: FileMode) -> (file: File, errorstr: string)\n\nCreates a new File object.\nIt needs to be opened before it can be accessed.",
signature = "[fun] (filename: string, mode: FileMode) -> (file: File, errorstr: string)"
},
newFileData = {
description = "[fun] (contents: string, name: string, decoder: FileDecoder) -> (data: FileData)\n\nCreates a new FileData object.",
signature = "[fun] (contents: string, name: string, decoder: FileDecoder) -> (data: FileData)"
},
read = {
description = "[fun] (name: string, bytes: number) -> (contents: string, size: number)\n\nRead the contents of a file.",
signature = "[fun] (name: string, bytes: number) -> (contents: string, size: number)"
},
remove = {
description = "[fun] (name: string) -> (success: boolean)\n\nRemoves a file or directory.",
signature = "[fun] (name: string) -> (success: boolean)"
},
setCRequirePath = {
description = "[fun] (paths: string) -> ()\n\nSets the filesystem paths that will be searched for c libraries when require is called.\n\nThe paths string returned by this function is a sequence of path templates separated by semicolons.\nThe argument passed to require will be inserted in place of any question mark (\"?\") character in each template (after the dot characters in the argument passed to require are replaced by directory separators.) Additionally, any occurrence of a double question mark (\"??\") will be replaced by the name passed to require and the default library extension for the platform.\n\nThe paths are relative to the game's source and save directories, as well as any paths mounted with love.filesystem.mount.",
signature = "[fun] (paths: string) -> ()"
},
setIdentity = {
description = "[fun] (name: string, appendToPath: boolean) -> ()\n\nSets the write directory for your game.\nNote that you can only set the name of the folder to store your files in, not the location.",
signature = "[fun] (name: string, appendToPath: boolean) -> ()"
},
setRequirePath = {
description = "[fun] (paths: string) -> ()\n\nSets the filesystem paths that will be searched when require is called.\n\nThe paths string given to this function is a sequence of path templates separated by semicolons.\nThe argument passed to require will be inserted in place of any question mark (\"?\") character in each template (after the dot characters in the argument passed to require are replaced by directory separators.)\n\nThe paths are relative to the game's source and save directories, as well as any paths mounted with love.filesystem.mount.",
signature = "[fun] (paths: string) -> ()"
},
setSource = {
description = "[fun] (path: string) -> ()\n\nSets the source of the game, where the code is present.\nThis function can only be called once, and is normally automatically done by LÖVE.",
signature = "[fun] (path: string) -> ()"
},
setSymlinksEnabled = {
description = "[fun] (enable: boolean) -> ()\n\nSets whether love.filesystem follows symbolic links.\nIt is enabled by default in version 0.10.0 and newer, and disabled by default in 0.9.2.",
signature = "[fun] (enable: boolean) -> ()"
},
unmount = {
description = "[fun] (archive: string) -> (success: boolean)\n\nUnmounts a zip file or folder previously mounted for reading with love.filesystem.mount.",
signature = "[fun] (archive: string) -> (success: boolean)"
},
write = {
description = "[fun] (name: string, data: string, size: number) -> (success: boolean, message: string)\n\nWrite data to a file.\n\nIf you are getting the error message \"Could not set write directory\", try setting the save directory.\nThis is done either with love.filesystem.setIdentity or by setting the identity field in love.conf.",
signature = "[fun] (name: string, data: string, size: number) -> (success: boolean, message: string)"
}
},
focus = {
description = "[fun] (focus: boolean) -> ()\n\nCallback function triggered when window receives or loses focus.",
signature = "[fun] (focus: boolean) -> ()"
},
gamepadaxis = {
description = "[fun] (joystick: Joystick, axis: GamepadAxis, value: number) -> ()\n\nCalled when a Joystick's virtual gamepad axis is moved.",
signature = "[fun] (joystick: Joystick, axis: GamepadAxis, value: number) -> ()"
},
gamepadpressed = {
description = "[fun] (joystick: Joystick, button: GamepadButton) -> ()\n\nCalled when a Joystick's virtual gamepad button is pressed.",
signature = "[fun] (joystick: Joystick, button: GamepadButton) -> ()"
},
gamepadreleased = {
description = "[fun] (joystick: Joystick, button: GamepadButton) -> ()\n\nCalled when a Joystick's virtual gamepad button is released.",
signature = "[fun] (joystick: Joystick, button: GamepadButton) -> ()"
},
getVersion = {
description = "[fun] () -> (major: number, minor: number, revision: number, codename: string)\n\nGets the current running version of LÖVE.",
signature = "[fun] () -> (major: number, minor: number, revision: number, codename: string)"
},
graphics = {
AlignMode = {
center = {
description = "[var]\n\nAlign text center.",
signature = "[var]"
},
justify = {
description = "[var]\n\nAlign text both left and right.",
signature = "[var]"
},
left = {
description = "[var]\n\nAlign text left.",
signature = "[var]"
},
right = {
description = "[var]\n\nAlign text right.",
signature = "[var]"
}
},
ArcType = {
closed = {
description = "[var]\n\nThe arc circle's two end-points are connected to each other.",
signature = "[var]"
},
open = {
description = "[var]\n\nThe arc circle's two end-points are unconnected when the arc is drawn as a line.\nBehaves like the \"closed\" arc type when the arc is drawn in filled mode.",
signature = "[var]"
},
pie = {
description = "[var]\n\nThe arc is drawn like a slice of pie, with the arc circle connected to the center at its end-points.",
signature = "[var]"
}
},
AreaSpreadDistribution = {
ellipse = {
description = "[var]\n\nUniform distribution in an ellipse.",
signature = "[var]"
},
none = {
description = "[var]\n\nNo distribution - area spread is disabled.",
signature = "[var]"
},
normal = {
description = "[var]\n\nNormal (gaussian) distribution.",
signature = "[var]"
},
uniform = {
description = "[var]\n\nUniform distribution.",
signature = "[var]"
}
},
BlendAlphaMode = {
alphamultiply = {
description = "[var]\n\nThe RGB values of what's drawn are multiplied by the alpha values of those colors during blending.\nThis is the default alpha mode.",
signature = "[var]"
},
premultiplied = {
description = "[var]\n\nThe RGB values of what's drawn are not multiplied by the alpha values of those colors during blending.\nFor most blend modes to work correctly with this alpha mode, the colors of a drawn object need to have had their RGB values multiplied by their alpha values at some point previously (\"premultiplied alpha\").",
signature = "[var]"
}
},
BlendMode = {
add = {
description = "[var]\n\nThe pixel colors of what's drawn are added to the pixel colors already on the screen.\nThe alpha of the screen is not modified.",
signature = "[var]"
},
alpha = {
description = "[var]\n\nAlpha blending (normal).\nThe alpha of what's drawn determines its opacity.",
signature = "[var]"
},
darken = {
description = "[var]\n\nThe pixel colors of what's drawn are compared to the existing pixel colors, and the smaller of the two values for each color component is used.\nOnly works when the \"premultiplied\" BlendAlphaMode is used in love.graphics.setBlendMode.",
signature = "[var]"
},
lighten = {
description = "[var]\n\nThe pixel colors of what's drawn are compared to the existing pixel colors, and the larger of the two values for each color component is used.\nOnly works when the \"premultiplied\" BlendAlphaMode is used in love.graphics.setBlendMode.",
signature = "[var]"
},
multiply = {
description = "[var]\n\nThe pixel colors of what's drawn are multiplied with the pixel colors already on the screen (darkening them).\nThe alpha of drawn objects is multiplied with the alpha of the screen rather than determining how much the colors on the screen are affected, even when the \"alphamultiply\" BlendAlphaMode is used.",
signature = "[var]"
},
replace = {
description = "[var]\n\nThe colors of what's drawn completely replace what was on the screen, with no additional blending.\nThe BlendAlphaMode specified in love.graphics.setBlendMode still affects what happens.",
signature = "[var]"
},
screen = {
description = "[var]\n\n\"Screen\" blending.",
signature = "[var]"
},
subtract = {
description = "[var]\n\nThe pixel colors of what's drawn are subtracted from the pixel colors already on the screen.\nThe alpha of the screen is not modified.",
signature = "[var]"
}
},
Canvas = {
getFilter = {
description = "[fun] () -> (min: FilterMode, mag: FilterMode, anisotropy: number)\n\nGets the filter mode of the Canvas.",
signature = "[fun] () -> (min: FilterMode, mag: FilterMode, anisotropy: number)"
},
getFormat = {
description = "[fun] () -> (format: CanvasFormat)\n\nGets the texture format of the Canvas.",
signature = "[fun] () -> (format: CanvasFormat)"
},
getHeight = {
description = "[fun] () -> (height: number)\n\nGets the height of the Canvas.",
signature = "[fun] () -> (height: number)"
},
getMSAA = {
description = "[fun] () -> (samples: number)\n\nGets the number of multisample antialiasing (MSAA) samples used when drawing to the Canvas.\n\nThis may be different than the number used as an argument to love.graphics.newCanvas if the system running LÖVE doesn't support that number.",
signature = "[fun] () -> (samples: number)"
},
getWidth = {
description = "[fun] () -> (width: number)\n\nGets the width of the Canvas.",
signature = "[fun] () -> (width: number)"
},
getWrap = {
description = "[fun] () -> (horizontal: WrapMode, vertical: WrapMode)\n\nGets the wrapping properties of a Canvas.\n\nThis function returns the currently set horizontal and vertical wrapping modes for the Canvas.",
signature = "[fun] () -> (horizontal: WrapMode, vertical: WrapMode)"
},
newImageData = {
description = "[fun] (x: number, y: number, width: number, height: number) -> (data: ImageData)\n\nGenerates ImageData from the contents of the Canvas.",
signature = "[fun] (x: number, y: number, width: number, height: number) -> (data: ImageData)"
},
renderTo = {
description = "[fun] (func: function) -> ()\n\nRender to the Canvas using a function.",
signature = "[fun] (func: function) -> ()"
},
setFilter = {
description = "[fun] (min: FilterMode, mag: FilterMode, anisotropy: number) -> ()\n\nSets the filter of the Canvas.",
signature = "[fun] (min: FilterMode, mag: FilterMode, anisotropy: number) -> ()"
},
setWrap = {
description = "[fun] (horizontal: WrapMode, vertical: WrapMode) -> ()\n\nSets the wrapping properties of a Canvas.\n\nThis function sets the way the edges of a Canvas are treated if it is scaled or rotated.\nIf the WrapMode is set to \"clamp\", the edge will not be interpolated.\nIf set to \"repeat\", the edge will be interpolated with the pixels on the opposing side of the framebuffer.",
signature = "[fun] (horizontal: WrapMode, vertical: WrapMode) -> ()"
}
},
CanvasFormat = {
hdr = {
description = "[var]\n\nA format suitable for high dynamic range content - an alias for the rgba16f format, normally.",
signature = "[var]"
},
normal = {
description = "[var]\n\nThe default Canvas format - usually an alias for the rgba8 format, or the srgb format if gamma-correct rendering is enabled in LÖVE 0.10.0 and newer.",
signature = "[var]"
},
r8 = {
description = "[var]\n\nSingle-channel (red component) format (8 bpp).",
signature = "[var]"
},
r16f = {
description = "[var]\n\nFloating point single-channel format (16 bpp).\nColor values can range from [-65504, +65504].",
signature = "[var]"
},
r32f = {
description = "[var]\n\nFloating point single-channel format (32 bpp).",
signature = "[var]"
},
rg8 = {
description = "[var]\n\nTwo channels (red and green components) with 8 bits per channel (16 bpp).",
signature = "[var]"
},
rg11b10f = {
description = "[var]\n\nFloating point RGB with 11 bits in the red and green channels, and 10 bits in the blue channel (32 bpp).\nThere is no alpha channel.\nColor values can range from [0, +65024].",
signature = "[var]"
},
rg16f = {
description = "[var]\n\nFloating point two-channel format with 16 bits per channel (32 bpp).\nColor values can range from [-65504, +65504].",
signature = "[var]"
},
rg32f = {
description = "[var]\n\nFloating point two-channel format with 32 bits per channel (64 bpp).",
signature = "[var]"
},
rgb5a1 = {
description = "[var]\n\nRGB with 5 bits each, and a 1-bit alpha channel (16 bpp).",
signature = "[var]"
},
rgb10a2 = {
description = "[var]\n\nRGB with 10 bits per channel, and a 2-bit alpha channel (32 bpp).",
signature = "[var]"
},
rgb565 = {
description = "[var]\n\nRGB with 5, 6, and 5 bits each, respectively (16 bpp).\nThere is no alpha channel in this format.",
signature = "[var]"
},
rgba4 = {
description = "[var]\n\n4 bits per channel (16 bpp) RGBA.",
signature = "[var]"
},
rgba8 = {
description = "[var]\n\n8 bits per channel (32 bpp) RGBA.\nColor channel values range from 0-255 (0-1 in shaders).",
signature = "[var]"
},
rgba16f = {
description = "[var]\n\nFloating point RGBA with 16 bits per channel (64 bpp).\nColor values can range from [-65504, +65504].",
signature = "[var]"
},
rgba32f = {
description = "[var]\n\nFloating point RGBA with 32 bits per channel (128 bpp).",
signature = "[var]"
},
srgb = {
description = "[var]\n\nThe same as rgba8, but the Canvas is interpreted as being in the sRGB color space.\nEverything drawn to the Canvas will be converted from linear RGB to sRGB.\nWhen the Canvas is drawn (or used in a shader), it will be decoded from sRGB to linear RGB.\nThis reduces color banding when doing gamma-correct rendering, since sRGB encoding has more precision than linear RGB for darker colors.",
signature = "[var]"
}
},
CompareMode = {
equal = {
description = "[var]\n\nThe stencil value of the pixel must be equal to the supplied value.",
signature = "[var]"
},
gequal = {
description = "[var]\n\nThe stencil value of the pixel must be greater than or equal to the supplied value.",
signature = "[var]"
},
greater = {
description = "[var]\n\nThe stencil value of the pixel must be greater than the supplied value.",
signature = "[var]"
},
lequal = {
description = "[var]\n\nThe stencil value of the pixel must be less than or equal to the supplied value.",
signature = "[var]"
},
less = {
description = "[var]\n\nThe stencil value of the pixel must be less than the supplied value.",
signature = "[var]"
},
notequal = {
description = "[var]\n\nThe stencil value of the pixel must not be equal to the supplied value.",
signature = "[var]"
}
},
DrawMode = {
fill = {
description = "[var]\n\nDraw filled shape.",
signature = "[var]"
},
line = {
description = "[var]\n\nDraw outlined shape.",
signature = "[var]"
}
},
FilterMode = {
linear = {
description = "[var]\n\nScale image with linear interpolation.",
signature = "[var]"
},
nearest = {
description = "[var]\n\nScale image with nearest neighbor interpolation.",
signature = "[var]"
}
},
Font = {
getBaseline = {
description = "[fun] () -> (baseline: number)\n\nGets the baseline of the Font.\nMost scripts share the notion of a baseline: an imaginary horizontal line on which characters rest.\nIn some scripts, parts of glyphs lie below the baseline.",
signature = "[fun] () -> (baseline: number)"
},
getDescent = {
description = "[fun] () -> (descent: number)\n\nGets the descent of the Font.\nThe descent spans the distance between the baseline and the lowest descending glyph in a typeface.",
signature = "[fun] () -> (descent: number)"
},
getFilter = {
description = "[fun] () -> (min: FilterMode, mag: FilterMode, anisotropy: number)\n\nGets the filter mode for a font.",
signature = "[fun] () -> (min: FilterMode, mag: FilterMode, anisotropy: number)"
},
getHeight = {
description = "[fun] () -> (height: number)\n\nGets the height of the Font.\nThe height of the font is the size including any spacing; the height which it will need.",
signature = "[fun] () -> (height: number)"
},
getLineHeight = {
description = "[fun] () -> (height: number)\n\nGets the line height.\nThis will be the value previously set by Font:setLineHeight, or 1.0 by default.",
signature = "[fun] () -> (height: number)"
},
getWidth = {
description = "[fun] (line: string) -> (width: number)\n\nDetermines the horizontal size a line of text needs.\nDoes not support line-breaks.",
signature = "[fun] (line: string) -> (width: number)"
},
getWrap = {
description = "[fun] (text: string, wraplimit: number) -> (width: number, wrappedtext: table)\n\nGets formatting information for text, given a wrap limit.\n\nThis function accounts for newlines correctly (i.e.\n'\\n').",
signature = "[fun] (text: string, wraplimit: number) -> (width: number, wrappedtext: table)"
},
hasGlyphs = {
description = "[fun] (character: string) -> (hasglyph: boolean)\n\nGets whether the font can render a particular character.",
signature = "[fun] (character: string) -> (hasglyph: boolean)"
},
setFallbacks = {
description = "[fun] (fallbackfont1: Font, ...: Font) -> ()\n\nSets the fallback fonts.\nWhen the Font doesn't contain a glyph, it will substitute the glyph from the next subsequent fallback Fonts.\nThis is akin to setting a \"font stack\" in Cascading Style Sheets (CSS).",
signature = "[fun] (fallbackfont1: Font, ...: Font) -> ()"
},
setFilter = {
description = "[fun] (min: FilterMode, mag: FilterMode, anisotropy: number) -> ()\n\nSets the filter mode for a font.",
signature = "[fun] (min: FilterMode, mag: FilterMode, anisotropy: number) -> ()"
},
setLineHeight = {
description = "[fun] (height: number) -> ()\n\nSets the line height.\nWhen rendering the font in lines the actual height will be determined by the line height multiplied by the height of the font.\nThe default is 1.0.",
signature = "[fun] (height: number) -> ()"
}
},
GraphicsFeature = {
clampzero = {
description = "[var]\n\nWhether the \"clampzero\" WrapMode is supported.",
signature = "[var]"
},
lighten = {
description = "[var]\n\nWhether the \"lighten\" and \"darken\" BlendModes are supported.",
signature = "[var]"
},
multicanvasformats = {
description = "[var]\n\nWhether multiple Canvases with different formats can be used in the same love.graphics.setCanvas call.",
signature = "[var]"
}
},
GraphicsLimit = {
canvasmsaa = {
description = "[var]\n\nThe maximum number of antialiasing samples for a Canvas.",
signature = "[var]"
},
multicanvas = {
description = "[var]\n\nThe maximum number of simultaneously active canvases (via love.graphics.setCanvas).",
signature = "[var]"
},
pointsize = {
description = "[var]\n\nThe maximum size of points.",
signature = "[var]"
},
texturesize = {
description = "[var]\n\nThe maximum width or height of Images and Canvases.",
signature = "[var]"
}
},
Image = {
getDimensions = {
description = "[fun] () -> (width: number, height: number)\n\nGets the width and height of the Image.",
signature = "[fun] () -> (width: number, height: number)"
},
getFilter = {
description = "[fun] () -> (min: FilterMode, mag: FilterMode)\n\nGets the filter mode for an image.",
signature = "[fun] () -> (min: FilterMode, mag: FilterMode)"
},
getFlags = {
description = "[fun] () -> (flags: table)\n\nGets the flags used when the image was created.",
signature = "[fun] () -> (flags: table)"
},
getHeight = {
description = "[fun] () -> (height: number)\n\nGets the height of the Image.",
signature = "[fun] () -> (height: number)"
},
getMipmapFilter = {
description = "[fun] () -> (mode: FilterMode, sharpness: number)\n\nGets the mipmap filter mode for an Image.",
signature = "[fun] () -> (mode: FilterMode, sharpness: number)"
},
getWidth = {
description = "[fun] () -> (width: number)\n\nGets the width of the Image.",
signature = "[fun] () -> (width: number)"
},
getWrap = {
description = "[fun] () -> (horizontal: WrapMode, vertical: WrapMode)\n\nGets the wrapping properties of an Image.\n\nThis function returns the currently set horizontal and vertical wrapping modes for the image.",
signature = "[fun] () -> (horizontal: WrapMode, vertical: WrapMode)"
},
refresh = {
description = "[fun] (x: number, y: number, width: number, height: number) -> ()\n\nReloads the Image's contents from the ImageData or CompressedImageData used to create the image.",
signature = "[fun] (x: number, y: number, width: number, height: number) -> ()"
},
replacePixels = {
description = "[fun] (data: ImageData, slice: number, mipmap: number) -> ()\n\nReplaces the contents of an Image.",