-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlove2d-trimmed.lua
7481 lines (7481 loc) · 283 KB
/
love2d-trimmed.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
local love = {
childs = {
audio = {
childs = {
DistanceModel = {
childs = {
exponent = {
description = "Exponential attenuation.",
type = "value"
},
exponentclamped = {
description = "Exponential attenuation. Gain is clamped. In version 0.9.2 and older this is named exponent clamped.",
type = "value"
},
inverse = {
description = "Inverse distance attenuation.",
type = "value"
},
inverseclamped = {
description = "Inverse distance attenuation. Gain is clamped. In version 0.9.2 and older this is named inverse clamped.",
type = "value"
},
linear = {
description = "Linear attenuation.",
type = "value"
},
linearclamped = {
description = "Linear attenuation. Gain is clamped. In version 0.9.2 and older this is named linear clamped.",
type = "value"
},
none = {
description = "Sources do not get attenuated.",
type = "value"
}
},
description = "class constants",
type = "class"
},
Source = {
childs = {
getAttenuationDistances = {
args = "()",
description = "Returns the reference and maximum distance of the source.",
returns = "(ref: number, max: number)",
type = "function"
},
getChannels = {
args = "()",
description = "Gets the number of channels in the Source. Only 1-channel (mono) Sources can use directional and positional effects.",
returns = "(channels: number)",
type = "function"
},
getCone = {
args = "()",
description = "Gets the Source's directional volume cones. Together with Source:setDirection, the cone angles allow for the Source's volume to vary depending on its direction.",
returns = "(innerAngle: number, outerAngle: number, outerVolume: number)",
type = "function"
},
getDirection = {
args = "()",
description = "Gets the direction of the Source.",
returns = "(x: number, y: number, z: number)",
type = "function"
},
getDuration = {
args = "(unit: TimeUnit)",
description = "Gets the duration of the Source. For streaming Sources it may not always be sample-accurate, and may return -1 if the duration cannot be determined at all.",
returns = "(duration: number)",
type = "function"
},
getPitch = {
args = "()",
description = "Gets the current pitch of the Source.",
returns = "(pitch: number)",
type = "function"
},
getPosition = {
args = "()",
description = "Gets the position of the Source.",
returns = "(x: number, y: number, z: number)",
type = "function"
},
getRolloff = {
args = "()",
description = "Returns the rolloff factor of the source.",
returns = "(rolloff: number)",
type = "function"
},
getType = {
args = "()",
description = "Gets the type (static or stream) of the Source.",
returns = "(sourcetype: SourceType)",
type = "function"
},
getVelocity = {
args = "()",
description = "Gets the velocity of the Source.",
returns = "(x: number, y: number, z: number)",
type = "function"
},
getVolume = {
args = "()",
description = "Gets the current volume of the Source.",
returns = "(volume: number)",
type = "function"
},
getVolumeLimits = {
args = "()",
description = "Returns the volume limits of the source.",
returns = "(min: number, max: number)",
type = "function"
},
isLooping = {
args = "()",
description = "Returns whether the Source will loop.",
returns = "(loop: boolean)",
type = "function"
},
isPaused = {
args = "()",
description = "Returns whether the Source is paused.",
returns = "(paused: boolean)",
type = "function"
},
isPlaying = {
args = "()",
description = "Returns whether the Source is playing.",
returns = "(playing: boolean)",
type = "function"
},
isStopped = {
args = "()",
description = "Returns whether the Source is stopped.",
returns = "(stopped: boolean)",
type = "function"
},
pause = {
args = "()",
description = "Pauses the Source.",
returns = "()",
type = "function"
},
play = {
args = "()",
description = "Starts playing the Source.",
returns = "(success: boolean)",
type = "function"
},
resume = {
args = "()",
description = "Resumes a paused Source.",
returns = "()",
type = "function"
},
rewind = {
args = "()",
description = "Rewinds a Source.",
returns = "()",
type = "function"
},
seek = {
args = "(position: number, unit: TimeUnit)",
description = "Sets the playing position of the Source.",
returns = "()",
type = "function"
},
setAttenuationDistances = {
args = "(ref: number, max: number)",
description = "Sets the reference and maximum distance of the source.",
returns = "()",
type = "function"
},
setCone = {
args = "(innerAngle: number, outerAngle: number, outerVolume: number)",
description = "Sets the Source's directional volume cones. Together with Source:setDirection, the cone angles allow for the Source's volume to vary depending on its direction.",
returns = "()",
type = "function"
},
setDirection = {
args = "(x: number, y: number, z: number)",
description = "Sets the direction vector of the Source. A zero vector makes the source non-directional.",
returns = "()",
type = "function"
},
setLooping = {
args = "(loop: boolean)",
description = "Sets whether the Source should loop.",
returns = "()",
type = "function"
},
setPitch = {
args = "(pitch: number)",
description = "Sets the pitch of the Source.",
returns = "()",
type = "function"
},
setPosition = {
args = "(x: number, y: number, z: number)",
description = "Sets the position of the Source.",
returns = "()",
type = "function"
},
setRolloff = {
args = "(rolloff: number)",
description = "Sets 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. Attenuation By Distance\" of OpenAL 1.1 specification.",
returns = "()",
type = "function"
},
setVelocity = {
args = "(x: number, y: number, z: number)",
description = "Sets the velocity of the Source.\n\nThis does not change the position of the Source, but is used to calculate the doppler effect.",
returns = "()",
type = "function"
},
setVolume = {
args = "(volume: number)",
description = "Sets the volume of the Source.",
returns = "()",
type = "function"
},
setVolumeLimits = {
args = "(min: number, max: number)",
description = "Sets the volume limits of the source. The limits have to be numbers from 0 to 1.",
returns = "()",
type = "function"
},
stop = {
args = "()",
description = "Stops a Source.",
returns = "()",
type = "function"
},
tell = {
args = "(unit: TimeUnit)",
description = "Gets the currently playing position of the Source.",
returns = "(position: number)",
type = "function"
}
},
description = "A Source represents audio you can play back. You can do interesting things with Sources, like set the volume, pitch, and its position relative to the listener.",
type = "lib"
},
SourceType = {
childs = {
static = {
description = "Decode the entire sound at once.",
type = "value"
},
stream = {
description = "Stream the sound; decode it gradually.",
type = "value"
}
},
description = "class constants",
type = "class"
},
TimeUnit = {
childs = {
samples = {
description = "Audio samples.",
type = "value"
},
seconds = {
description = "Regular seconds.",
type = "value"
}
},
description = "class constants",
type = "class"
},
getDopplerScale = {
args = "()",
description = "Gets the current global scale factor for velocity-based doppler effects.",
returns = "(scale: number)",
type = "function"
},
getOrientation = {
args = "()",
description = "Returns the orientation of the listener.",
returns = "(fx: number, fy: number, fz: number, ux: number, uy: number, uz: number)",
type = "function"
},
getPosition = {
args = "()",
description = "Returns the position of the listener.",
returns = "(x: number, y: number, z: number)",
type = "function"
},
getSourceCount = {
args = "()",
description = "Returns the number of sources which are currently playing or paused.",
returns = "(numSources: number)",
type = "function"
},
getVelocity = {
args = "()",
description = "Returns the velocity of the listener.",
returns = "(x: number, y: number, z: number)",
type = "function"
},
getVolume = {
args = "()",
description = "Returns the master volume.",
returns = "(volume: number)",
type = "function"
},
newSource = {
args = "(filename: string, type: SourceType)",
description = "Creates a new Source from a file or SoundData. Sources created from SoundData are always static.",
returns = "(source: Source)",
type = "function"
},
pause = {
args = "(source: Source)",
description = "Pauses currently played Sources.",
returns = "()",
type = "function"
},
play = {
args = "(source: Source)",
description = "Plays the specified Source.",
returns = "()",
type = "function"
},
resume = {
args = "(source: Source)",
description = "Resumes all audio",
returns = "()",
type = "function"
},
rewind = {
args = "(source: Source)",
description = "Rewinds all playing audio.",
returns = "()",
type = "function"
},
setDistanceModel = {
args = "(model: DistanceModel)",
description = "Sets the distance attenuation model.",
returns = "()",
type = "function"
},
setDopplerScale = {
args = "(scale: number)",
description = "Sets a global scale factor for velocity-based doppler effects. The default scale value is 1.",
returns = "()",
type = "function"
},
setOrientation = {
args = "(fx: number, fy: number, fz: number, ux: number, uy: number, uz: number)",
description = "Sets the orientation of the listener.",
returns = "()",
type = "function"
},
setPosition = {
args = "(x: number, y: number, z: number)",
description = "Sets the position of the listener, which determines how sounds play.",
returns = "()",
type = "function"
},
setVelocity = {
args = "(x: number, y: number, z: number)",
description = "Sets the velocity of the listener.",
returns = "()",
type = "function"
},
setVolume = {
args = "(volume: number)",
description = "Sets the master volume.",
returns = "()",
type = "function"
},
stop = {
args = "(source: Source)",
description = "Stops currently played sources.",
returns = "()",
type = "function"
}
},
description = "Provides an interface to create noise with the user's speakers.",
type = "class"
},
conf = {
args = "(t: table)",
description = "If a file called conf.lua is present in your game folder (or .love file), it is run before the LÖVE modules are loaded. You can use this file to overwrite the love.conf function, which is later called by the LÖVE 'boot' script. Using 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.",
returns = "()",
type = "function"
},
directorydropped = {
args = "(path: string)",
description = "Callback function triggered when a directory is dragged and dropped onto the window.",
returns = "()",
type = "function"
},
draw = {
args = "()",
description = "Callback function used to draw on the screen every frame.",
returns = "()",
type = "function"
},
errhand = {
args = "(msg: string)",
description = "The error handler, used to display error messages.",
returns = "()",
type = "function"
},
event = {
childs = {
Event = {
childs = {
focus = {
description = "Window focus gained or lost",
type = "value"
},
joystickaxis = {
description = "Joystick axis motion",
type = "value"
},
joystickhat = {
description = "Joystick hat pressed",
type = "value"
},
joystickpressed = {
description = "Joystick pressed",
type = "value"
},
joystickreleased = {
description = "Joystick released",
type = "value"
},
keypressed = {
description = "Key pressed",
type = "value"
},
keyreleased = {
description = "Key released",
type = "value"
},
mousefocus = {
description = "Window mouse focus gained or lost",
type = "value"
},
mousepressed = {
description = "Mouse pressed",
type = "value"
},
mousereleased = {
description = "Mouse released",
type = "value"
},
quit = {
description = "Quit",
type = "value"
},
resize = {
description = "Window size changed by the user",
type = "value"
},
threaderror = {
description = "A Lua error has occurred in a thread.",
type = "value"
},
visible = {
description = "Window is minimized or un-minimized by the user",
type = "value"
}
},
description = "class constants",
type = "class"
},
poll = {
args = "()",
description = "Returns an iterator for messages in the event queue.",
returns = "(i: function)",
type = "function"
},
pump = {
args = "()",
description = "Pump events into the event queue. This is a low-level function, and is usually not called by the user, but by love.run. Note 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). love.event.pump can only be called from the main thread, but afterwards, the rest of love.event can be used from any other thread.",
returns = "()",
type = "function"
},
push = {
args = "(e: Event, a: mixed, b: mixed, c: mixed, d: mixed)",
description = "Adds an event to the event queue.",
returns = "()",
type = "function"
},
quit = {
args = "(exitstatus: number)",
description = "Adds the quit event to the queue.\n\nThe quit event is a signal for the event handler to close LÖVE. It's possible to abort the exit process with the love.quit callback.",
returns = "()",
type = "function"
},
wait = {
args = "()",
description = "Like love.event.poll but blocks until there is an event in the queue.",
returns = "(e: Event, a: mixed, b: mixed, c: mixed, d: mixed)",
type = "function"
}
},
description = "Manages events, like keypresses.",
type = "lib"
},
filedropped = {
args = "(file: File)",
description = "Callback function triggered when a file is dragged and dropped onto the window.",
returns = "()",
type = "function"
},
filesystem = {
childs = {
BufferMode = {
childs = {
full = {
description = "Full buffering. Write and append operations are always buffered until the buffer size limit is reached.",
type = "value"
},
line = {
description = "Line buffering. Write and append operations are buffered until a newline is output or the buffer size limit is reached.",
type = "value"
},
none = {
description = "No buffering. The result of write and append operations appears immediately.",
type = "value"
}
},
description = "class constants",
type = "class"
},
File = {
childs = {
flush = {
args = "()",
description = "Flushes any buffered written data in the file to the disk.",
returns = "(success: boolean, err: string)",
type = "function"
},
getBuffer = {
args = "()",
description = "Gets the buffer mode of a file.",
returns = "(mode: BufferMode, size: number)",
type = "function"
},
getFilename = {
args = "()",
description = "Gets the filename that the File object was created with. If the file object originated from the love.filedropped callback, the filename will be the full platform-dependent file path.",
returns = "(filename: string)",
type = "function"
},
getMode = {
args = "()",
description = "Gets the FileMode the file has been opened with.",
returns = "(mode: FileMode)",
type = "function"
},
getSize = {
args = "()",
description = "Returns the file size.",
returns = "(size: number)",
type = "function"
},
isEOF = {
args = "()",
description = "Gets whether end-of-file has been reached.",
returns = "(eof: boolean)",
type = "function"
},
isOpen = {
args = "()",
description = "Gets whether the file is open.",
returns = "(open: boolean)",
type = "function"
},
lines = {
args = "()",
description = "Iterate over all the lines in a file",
returns = "(iterator: function)",
type = "function"
},
open = {
args = "(mode: FileMode)",
description = "Open 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. This is done either with love.filesystem.setIdentity or by setting the identity field in love.conf.",
returns = "(success: boolean)",
type = "function"
},
read = {
args = "(bytes: number)",
description = "Read a number of bytes from a file.",
returns = "(contents: string, size: number)",
type = "function"
},
seek = {
args = "(position: number)",
description = "Seek to a position in a file.",
returns = "(success: boolean)",
type = "function"
},
setBuffer = {
args = "(mode: BufferMode, size: number)",
description = "Sets the buffer mode for a file opened for writing or appending. Files with buffering enabled will not write data to the disk until the buffer size limit is reached, depending on the buffer mode.",
returns = "(success: boolean, errorstr: string)",
type = "function"
},
write = {
args = "(data: string, size: number)",
description = "Write data to a file.",
returns = "(success: boolean)",
type = "function"
}
},
description = "Represents a file on the filesystem.",
type = "lib"
},
FileData = {
childs = {
getFilename = {
args = "()",
description = "Gets the filename of the FileData.",
returns = "(name: string)",
type = "function"
}
},
description = "Data representing the contents of a file.",
type = "lib"
},
FileDecoder = {
childs = {
base64 = {
description = "The data is base64-encoded.",
type = "value"
},
file = {
description = "The data is unencoded.",
type = "value"
}
},
description = "class constants",
type = "class"
},
FileMode = {
childs = {
a = {
description = "Open a file for append.",
type = "value"
},
c = {
description = "Do not open a file (represents a closed file.)",
type = "value"
},
r = {
description = "Open a file for read.",
type = "value"
},
w = {
description = "Open a file for write.",
type = "value"
}
},
description = "class constants",
type = "class"
},
areSymlinksEnabled = {
args = "()",
description = "Gets whether love.filesystem follows symbolic links.",
returns = "(enable: boolean)",
type = "function"
},
createDirectory = {
args = "(name: string)",
description = "Creates a directory.",
returns = "(success: boolean)",
type = "function"
},
exists = {
args = "(filename: string)",
description = "Check whether a file or directory exists.",
returns = "(exists: boolean)",
type = "function"
},
getAppdataDirectory = {
args = "()",
description = "Returns the application data directory (could be the same as getUserDirectory)",
returns = "(path: string)",
type = "function"
},
getDirectoryItems = {
args = "(dir: string)",
description = "Returns a table with the names of files and subdirectories in the specified path. The 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.",
returns = "(items: table)",
type = "function"
},
getIdentity = {
args = "(name: string)",
description = "Gets the write directory name for your game. Note that this only returns the name of the folder to store your files in, not the full location.",
returns = "()",
type = "function"
},
getLastModified = {
args = "(filename: string)",
description = "Gets the last modification time of a file.",
returns = "(modtime: number, errormsg: string)",
type = "function"
},
getRealDirectory = {
args = "(filepath: string)",
description = "Gets 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.",
returns = "(realdir: string)",
type = "function"
},
getRequirePath = {
args = "()",
description = "Gets 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. The 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.",
returns = "(paths: string)",
type = "function"
},
getSaveDirectory = {
args = "()",
description = "Gets the full path to the designated save directory. This can be useful if you want to use the standard io library (or something else) to read or write in the save directory.",
returns = "(path: string)",
type = "function"
},
getSize = {
args = "(filename: string)",
description = "Gets the size in bytes of a file.",
returns = "(size: number, errormsg: string)",
type = "function"
},
getSource = {
args = "()",
description = "Returns the full path to the the .love file or directory. If the game is fused to the LÖVE executable, then the executable is returned.",
returns = "(path: string)",
type = "function"
},
getSourceBaseDirectory = {
args = "()",
description = "Returns the full path to the directory containing the .love file. If 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.",
returns = "(path: string)",
type = "function"
},
getUserDirectory = {
args = "()",
description = "Returns the path of the user's directory.",
returns = "(path: string)",
type = "function"
},
getWorkingDirectory = {
args = "()",
description = "Gets the current working directory.",
returns = "(path: string)",
type = "function"
},
init = {
args = "(appname: string)",
description = "Initializes love.filesystem, will be called internally, so should not be used explicitly.",
returns = "()",
type = "function"
},
isDirectory = {
args = "(path: string)",
description = "Check whether something is a directory.",
returns = "(isDir: boolean)",
type = "function"
},
isFile = {
args = "(path: string)",
description = "Check whether something is a file.",
returns = "(isFile: boolean)",
type = "function"
},
isFused = {
args = "()",
description = "Gets 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/. The 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.",
returns = "(fused: boolean)",
type = "function"
},
isSymlink = {
args = "(path: string)",
description = "Gets whether a filepath is actually a symbolic link.\n\nIf symbolic links are not enabled (via love.filesystem.setSymlinksEnabled), this function will always return false.",
returns = "(symlink: boolean)",
type = "function"
},
lines = {
args = "(name: string)",
description = "Iterate over the lines in a file.",
returns = "(iterator: function)",
type = "function"
},
load = {
args = "(name: string, errormsg: string)",
description = "Loads a Lua file (but does not run it).",
returns = "(chunk: function)",
type = "function"
},
mount = {
args = "(archive: string, mountpoint: string)",
description = "Mounts a zip file or folder in the game's save directory for reading.",
returns = "(success: boolean)",
type = "function"
},
newFile = {
args = "(filename: string, mode: FileMode)",
description = "Creates a new File object. It needs to be opened before it can be accessed.",
returns = "(file: File, errorstr: string)",
type = "function"
},
newFileData = {
args = "(contents: string, name: string, decoder: FileDecoder)",
description = "Creates a new FileData object.",
returns = "(data: FileData)",
type = "function"
},
read = {
args = "(name: string, bytes: number)",
description = "Read the contents of a file.",
returns = "(contents: string, size: number)",
type = "function"
},
remove = {
args = "(name: string)",
description = "Removes a file or directory.",
returns = "(success: boolean)",
type = "function"
},
setIdentity = {
args = "(name: string, appendToPath: boolean)",
description = "Sets the write directory for your game. Note that you can only set the name of the folder to store your files in, not the location.",
returns = "()",
type = "function"
},
setRequirePath = {
args = "(paths: string)",
description = "Sets 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. The 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.",
returns = "()",
type = "function"
},
setSource = {
args = "(path: string)",
description = "Sets the source of the game, where the code is present. This function can only be called once, and is normally automatically done by LÖVE.",
returns = "()",
type = "function"
},
setSymlinksEnabled = {
args = "(enable: boolean)",
description = "Sets whether love.filesystem follows symbolic links. It is enabled by default in version 0.10.0 and newer, and disabled by default in 0.9.2.",
returns = "()",
type = "function"
},
unmount = {
args = "(archive: string)",
description = "Unmounts a zip file or folder previously mounted for reading with love.filesystem.mount.",
returns = "(success: boolean)",
type = "function"
},
write = {
args = "(name: string, data: string, size: number)",
description = "Write data to a file.\n\nIf you are getting the error message \"Could not set write directory\", try setting the save directory. This is done either with love.filesystem.setIdentity or by setting the identity field in love.conf.",
returns = "(success: boolean)",
type = "function"
}
},
description = "Provides an interface to the user's filesystem.",
type = "class"
},
focus = {
args = "(focus: boolean)",
description = "Callback function triggered when window receives or loses focus.",
returns = "()",
type = "function"
},
gamepadaxis = {
args = "(joystick: Joystick, axis: GamepadAxis)",
description = "Called when a Joystick's virtual gamepad axis is moved.",
returns = "()",
type = "function"
},
gamepadpressed = {
args = "(joystick: Joystick, button: GamepadButton)",
description = "Called when a Joystick's virtual gamepad button is pressed.",
returns = "()",
type = "function"
},
gamepadreleased = {
args = "(joystick: Joystick, button: GamepadButton)",
description = "Called when a Joystick's virtual gamepad button is released.",
returns = "()",
type = "function"
},
getVersion = {
args = "()",
description = "Gets the current running version of LÖVE.",
returns = "(major: number, minor: number, revision: number, codename: string)",
type = "function"
},
graphics = {
childs = {
AlignMode = {
childs = {
center = {
description = "Align text center.",
type = "value"
},
left = {
description = "Align text left.",
type = "value"
},
right = {
description = "Align text right.",
type = "value"
}
},
description = "class constants",
type = "class"
},
ArcType = {
childs = {
closed = {
description = "The arc circle's two end-points are connected to each other.",
type = "value"
},
open = {
description = "The arc circle's two end-points are unconnected when the arc is drawn as a line. Behaves like the \"closed\" arc type when the arc is drawn in filled mode.",
type = "value"
},
pie = {
description = "The arc is drawn like a slice of pie, with the arc circle connected to the center at its end-points.",
type = "value"
}
},
description = "class constants",
type = "class"
},
AreaSpreadDistribution = {
childs = {
ellipse = {
description = "Uniform distribution in an ellipse.",
type = "value"
},
none = {
description = "No distribution - area spread is disabled.",
type = "value"
},
normal = {
description = "Normal (gaussian) distribution.",
type = "value"
},
uniform = {
description = "Uniform distribution.",
type = "value"
}
},
description = "class constants",
type = "class"
},
BlendAlphaMode = {
childs = {
alphamultiply = {
description = "The RGB values of what's drawn are multiplied by the alpha values of those colors during blending. This is the default alpha mode.",
type = "value"
},
premultiplied = {
description = "The RGB values of what's drawn are not multiplied by the alpha values of those colors during blending. For 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\").",
type = "value"
}
},
description = "class constants",
type = "class"
},
BlendMode = {
childs = {
add = {
description = "The pixel colors of what's drawn are added to the pixel colors already on the screen. The alpha of the screen is not modified.",
type = "value"
},
alpha = {
description = "Alpha blending (normal). The alpha of what's drawn determines its opacity.",
type = "value"
},
darken = {
description = "The 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. Only works when the \"premultiplied\" BlendAlphaMode is used in love.graphics.setBlendMode.",
type = "value"
},
lighten = {
description = "The 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. Only works when the \"premultiplied\" BlendAlphaMode is used in love.graphics.setBlendMode.",
type = "value"
},
multiply = {
description = "The pixel colors of what's drawn are multiplied with the pixel colors already on the screen (darkening them). The 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.",
type = "value"
},
replace = {
description = "The colors of what's drawn completely replace what was on the screen, with no additional blending. The BlendAlphaMode specified in love.graphics.setBlendMode still affects what happens.",
type = "value"
},
screen = {
description = "\"Screen\" blending.",
type = "value"
},
subtract = {
description = "The pixel colors of what's drawn are subtracted from the pixel colors already on the screen. The alpha of the screen is not modified.",