-
Notifications
You must be signed in to change notification settings - Fork 0
/
love.d.tl
2391 lines (2242 loc) · 88.7 KB
/
love.d.tl
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
-- generated with generate_tl.lua
-- LÖVE 11.3
global type love = record
type Data = record
clone: function(self: Data): Data
getFFIPointer: function(self: Data): any
getPointer: function(self: Data): any
getSize: function(self: Data): number
getString: function(self: Data): string
end
type Object = record
release: function(self: Object): boolean
type: function(self: Object): string
typeOf: function(self: Object, name: string): boolean
end
type Configuration = record
identity: string
appendidentity: boolean
version: string
console: boolean
accelerometerjoystick: boolean
externalstorage: boolean
gammacorrect: boolean
type audio = record
mic: boolean
mixwithsystem: boolean
end
type window = record
title: string
icon: string
width: number
height: number
borderless: boolean
resizable: boolean
minwidth: number
minheight: number
fullscreen: boolean
fullscreentype: string
usedpiscale: boolean
vsync: number
depth: number
stencil: number
msaa: number
display: number
highdpi: boolean
x: number
y: number
end
type modules = record
audio: boolean
event: boolean
graphics: boolean
image: boolean
joystick: boolean
keyboard: boolean
math: boolean
mouse: boolean
physics: boolean
sound: boolean
system: boolean
timer: boolean
touch: boolean
video: boolean
window: boolean
thread: boolean
end
end
getVersion: function(): number, number, number, string
hasDeprecationOutput: function(): boolean
setDeprecationOutput: function(enable: boolean)
conf: function(t: Configuration)
directorydropped: function(path: string)
displayrotated: function(index: number, orientation: window.DisplayOrientation)
draw: function()
errorhandler: function(msg: string)
filedropped: function(file: filesystem.DroppedFile)
focus: function(focus: boolean)
gamepadaxis: function(joystick: joystick.Joystick, axis: joystick.GamepadAxis, value: number)
gamepadpressed: function(joystick: joystick.Joystick, button: joystick.GamepadButton)
gamepadreleased: function(joystick: joystick.Joystick, button: joystick.GamepadButton)
joystickadded: function(joystick: joystick.Joystick)
joystickaxis: function(joystick: joystick.Joystick, axis: number, value: number)
joystickhat: function(joystick: joystick.Joystick, hat: number, direction: joystick.JoystickHat)
joystickpressed: function(joystick: joystick.Joystick, button: number)
joystickreleased: function(joystick: joystick.Joystick, button: number)
joystickremoved: function(joystick: joystick.Joystick)
keypressed: function(key: keyboard.KeyConstant, scancode: keyboard.Scancode, isrepeat: boolean)
keypressed: function(key: keyboard.KeyConstant, isrepeat: boolean)
keyreleased: function(key: keyboard.KeyConstant, scancode: keyboard.Scancode)
load: function(arg: {string}, unfilteredArg: {string})
lowmemory: function()
mousefocus: function(focus: boolean)
mousemoved: function(x: number, y: number, dx: number, dy: number, istouch: boolean)
mousepressed: function(x: number, y: number, button: number, istouch: boolean, presses: number)
mousereleased: function(x: number, y: number, button: number, istouch: boolean, presses: number)
quit: function(): boolean
resize: function(w: number, h: number)
run: function(): function(): string|number
textedited: function(text: string, start: number, length: number)
textinput: function(text: string)
threaderror: function(thread: love.thread.Thread, errorstr: string)
touchmoved: function(id: any, x: number, y: number, dx: number, dy: number, pressure: number)
touchpressed: function(id: any, x: number, y: number, dx: number, dy: number, pressure: number)
touchreleased: function(id: any, x: number, y: number, dx: number, dy: number, pressure: number)
update: function(dt: number)
visible: function(visible: boolean)
wheelmoved: function(x: number, y: number)
type audio = record
type DistanceModel = enum
"none"
"inverse"
"inverseclamped"
"linear"
"linearclamped"
"exponent"
"exponentclamped"
end
type EffectType = enum
"chorus"
"compressor"
"distortion"
"echo"
"equalizer"
"flanger"
"reverb"
"ringmodulator"
end
type EffectWaveform = enum
"sawtooth"
"sine"
"square"
"triangle"
end
type FilterType = enum
"lowpass"
"highpass"
"bandpass"
end
type SourceType = enum
"static"
"stream"
"queue"
end
type TimeUnit = enum
"seconds"
"samples"
end
type RecordingDevice = record
getBitDepth: function(self: RecordingDevice): number
getBitDepth: function(self: RecordingDevice): number
getChannelCount: function(self: RecordingDevice): number
getData: function(self: RecordingDevice): sound.SoundData
getName: function(self: RecordingDevice): string
getSampleCount: function(self: RecordingDevice): number
getSampleRate: function(self: RecordingDevice): number
isRecording: function(self: RecordingDevice): boolean
start: function(self: RecordingDevice, samplecount: number, samplerate: number, bitdepth: number, channels: number): boolean
stop: function(self: RecordingDevice): sound.SoundData
end
type Source = record
clone: function(self: Source): Source
getActiveEffects: function(self: Source): {string}
getAirAbsorption: function(self: Source): number
getAttenuationDistances: function(self: Source): number, number
getChannelCount: function(self: Source): number
getCone: function(self: Source): number, number, number
getDirection: function(self: Source): number, number, number
getDuration: function(self: Source, unit: TimeUnit): number
getEffect: function(self: Source, name: string, filtersettings: table): FilterSettings
getFilter: function(self: Source): FilterSettings
getFreeBufferCount: function(self: Source): number
getPitch: function(self: Source): number
getPosition: function(self: Source): number, number, number
getRolloff: function(self: Source): number
getType: function(self: Source): SourceType
getVelocity: function(self: Source): number, number, number
getVolume: function(self: Source): number
getVolumeLimits: function(self: Source): number, number
isLooping: function(self: Source): boolean
isPlaying: function(self: Source): boolean
isRelative: function(self: Source): boolean
pause: function(self: Source)
play: function(self: Source): boolean
queue: function(self: Source, sounddata: sound.SoundData): boolean
seek: function(self: Source, offset: number, unit: TimeUnit)
setAirAbsorption: function(self: Source, amount: number)
setAttenuationDistances: function(self: Source, ref: number, max: number)
setCone: function(self: Source, innerAngle: number, outerAngle: number, outerVolume: number)
setDirection: function(self: Source, x: number, y: number, z: number)
setEffect: function(self: Source, name: string, enable: boolean): boolean
setEffect: function(self: Source, name: string, filtersettings: FilterSettings): boolean
setFilter: function(self: Source, settings: FilterSettings): boolean
setFilter: function(self: Source)
setLooping: function(self: Source, loop: boolean)
setPitch: function(self: Source, pitch: number)
setPosition: function(self: Source, x: number, y: number, z: number)
setRelative: function(self: Source, enable: boolean)
setRolloff: function(self: Source, rolloff: number)
setVelocity: function(self: Source, x: number, y: number, z: number)
setVolume: function(self: Source, volume: number)
setVolumeLimits: function(self: Source, min: number, max: number)
stop: function(self: Source)
tell: function(self: Source, unit: TimeUnit): number
end
type FilterSettings = record
type: FilterType
volume: number
highgain: number
lowgain: number
end
getActiveEffects: function(): {string}
getActiveSourceCount: function(): number
getDistanceModel: function(): DistanceModel
getDopplerScale: function(): number
getMaxSceneEffects: function(): number
getMaxSourceEffects: function(): number
getOrientation: function(): number, number
getPosition: function(): number, number, number
getRecordingDevices: function(): {RecordingDevice}
getSourceCount: function(): number
getVelocity: function(): number, number, number
getVolume: function(): number
isEffectsSupported: function(): boolean
newQueueableSource: function(samplerate: number, bitdepth: number, channels: number, buffercount: number): Source
newSource: function(filename: string, type: SourceType): Source
newSource: function(file: filesystem.File, type: SourceType): Source
newSource: function(decoder: sound.Decoder, type: SourceType): Source
newSource: function(data: filesystem.FileData, type: SourceType): Source
newSource: function(data: sound.SoundData): Source
pause: function(): {Source}
pause: function(source: Source, ...: Source)
pause: function(sources: {Source})
play: function(source: Source)
play: function(sources: {Source})
play: function(...: Source)
setDistanceModel: function(model: DistanceModel)
setDopplerScale: function(scale: number)
setEffect: function(name: string, settings: {string:any}): boolean
setEffect: function(name: string, enabled: boolean): boolean
setMixWithSystem: function(mix: boolean): boolean
setOrientation: function(fx: number, fy: number, fz: number, ux: number, uy: number, uz: number)
setPosition: function(x: number, y: number, z: number)
setVelocity: function(x: number, y: number, z: number)
setVolume: function(volume: number)
stop: function()
stop: function(source: Source)
stop: function(...: Source)
stop: function(sources: {Source})
end
type data = record
type CompressedDataFormat = enum
"lz4"
"zlib"
"gzip"
"deflate"
end
type ContainerType = enum
"data"
"string"
end
type EncodeFormat = enum
"base64"
"hex"
end
type HashFunction = enum
"md5"
"sha1"
"sha224"
"sha256"
"sha384"
"sha512"
end
type ByteData = record
end
type CompressedData = record
getFormat: function(self: CompressedData): CompressedDataFormat
end
compress: function(container: ContainerType, format: CompressedDataFormat, data: string|Data, level: number): string|CompressedData
decode: function(container: ContainerType, format: EncodeFormat, source: string|love.Data): string|ByteData
decompress: function(container: ContainerType, compressedData: CompressedData): string|ByteData
decompress: function(container: ContainerType, format: CompressedDataFormat, compressed: string|ByteData): string|ByteData
encode: function(container: ContainerType, format: EncodeFormat, source: string|love.Data, linelength: number): string|ByteData
getPackedSize: function(format: string): number
hash: function(hashFunction: HashFunction, string: string): string
hash: function(hashFunction: HashFunction, data: love.Data): string
newByteData: function(datastring: string): ByteData
newByteData: function(Data: love.Data, offset: number, size: number): ByteData
newByteData: function(size: number): ByteData
newDataView: function(data: love.Data, offset: number, size: number): love.Data
pack: function(container: ContainerType, format: string, ...: any): string|ByteData
unpack: function(format: string, data: string|love.Data, pos: number): any...
end
type event = record
clear: function()
poll: function(): function(): string, any...
pump: function()
push: function(n: string, ...: any)
quit: function(exitstatus: number|string)
wait: function(): string, any...
end
type filesystem = record
type BufferMode = enum
"none"
"line"
"full"
end
type FileDecoder = enum
"file"
"base64"
end
type FileMode = enum
"r"
"w"
"a"
"c"
end
type FileType = enum
"file"
"directory"
"symlink"
"other"
end
type DroppedFile = record
end
type File = record
close: function(self: File): boolean
flush: function(self: File): boolean, string
getBuffer: function(self: File): BufferMode, number
getFilename: function(self: File): string
getMode: function(self: File): FileMode
getSize: function(self: File): number
isEOF: function(self: File): boolean
isOpen: function(self: File): boolean
lines: function(self: File): function(): string
open: function(self: File, mode: FileMode): boolean, string
read: function(self: File, bytes: number): string, number
read: function(self: File, container: data.ContainerType, bytes: number): string|FileData
seek: function(self: File, pos: number): boolean
setBuffer: function(self: File, mode: BufferMode, size: number): boolean, string
tell: function(self: File): number
write: function(self: File, data: string, size: number): boolean, string
write: function(self: File, data: love.Data, size: number): boolean, string
end
type FileData = record
getExtension: function(self: FileData): string
getFilename: function(self: FileData): string
end
type FileInfo = record
type: FileType
size: number
modtime: number
end
append: function(name: string, data: string, size: number): boolean, string
append: function(name: string, data: love.Data, size: number): boolean, string
areSymlinksEnabled: function(): boolean
createDirectory: function(name: string): boolean
getAppdataDirectory: function(): string
getCRequirePath: function(): string
getDirectoryItems: function(dir: string): {string}
getDirectoryItems: function(dir: string, callback: function(filename: string)): {string}
getIdentity: function(): string
getInfo: function(path: string, filtertype: FileType): FileInfo
getInfo: function(path: string, info: table): FileInfo
getInfo: function(path: string, filtertype: FileType, info: table): FileInfo
getRealDirectory: function(filepath: string): string
getRequirePath: function(): string
getSaveDirectory: function(): string
getSource: function(): string
getSourceBaseDirectory: function(): string
getUserDirectory: function(): string
getWorkingDirectory: function(): string
init: function(appname: string)
isFused: function(): boolean
lines: function(name: string): function(): string
load: function(name: string): function(...: any): any..., string
mount: function(archive: string, mountpoint: string, appendToPath: boolean): boolean
mount: function(filedata: FileData, mountpoint: string, appendToPath: boolean): boolean
mount: function(data: love.Data, archivename: string, mountpoint: string, appendToPath: boolean): boolean
newFile: function(filename: string): File
newFile: function(filename: string, mode: FileMode): File, string
newFileData: function(contents: string, name: string): FileData
newFileData: function(filepath: string): FileData, string
read: function(name: string, size: number): string, number|string
read: function(container: data.ContainerType, name: string, size: number): string|FileData, number|string
remove: function(name: string): boolean
setCRequirePath: function(paths: string)
setIdentity: function(name: string)
setIdentity: function(name: string)
setRequirePath: function(paths: string)
setSource: function(path: string)
setSymlinksEnabled: function(enable: boolean)
unmount: function(archive: string): boolean
write: function(name: string, data: string, size: number): boolean, string
write: function(name: string, data: love.Data, size: number): boolean, string
end
type font = record
type HintingMode = enum
"normal"
"light"
"mono"
"none"
end
type GlyphData = record
getAdvance: function(self: GlyphData): number
getBearing: function(self: GlyphData): number, number
getBoundingBox: function(self: GlyphData): number, number, number, number
getDimensions: function(self: GlyphData): number, number
getFormat: function(self: GlyphData): image.PixelFormat
getGlyph: function(self: GlyphData): number
getGlyphString: function(self: GlyphData): string
getHeight: function(self: GlyphData): number
getWidth: function(self: GlyphData): number
end
type Rasterizer = record
getAdvance: function(self: Rasterizer): number
getAscent: function(self: Rasterizer): number
getDescent: function(self: Rasterizer): number
getGlyphCount: function(self: Rasterizer): number
getGlyphData: function(self: Rasterizer, glyph: string): GlyphData
getGlyphData: function(self: Rasterizer, glyphNumber: number): GlyphData
getHeight: function(self: Rasterizer): number
getLineHeight: function(self: Rasterizer): number
hasGlyphs: function(self: Rasterizer, ...: number|string): boolean
end
newBMFontRasterizer: function(imageData: image.ImageData, glyphs: string, dpiscale: number): Rasterizer
newBMFontRasterizer: function(fileName: string, glyphs: string, dpiscale: number): Rasterizer
newGlyphData: function(rasterizer: Rasterizer, glyph: number)
newImageRasterizer: function(imageData: image.ImageData, glyphs: string, extraSpacing: number, dpiscale: number): Rasterizer
newRasterizer: function(filename: string): Rasterizer
newRasterizer: function(data: filesystem.FileData): Rasterizer
newRasterizer: function(size: number, hinting: HintingMode, dpiscale: number): Rasterizer
newRasterizer: function(fileName: string, size: number, hinting: HintingMode, dpiscale: number): Rasterizer
newRasterizer: function(fileData: filesystem.FileData, size: number, hinting: HintingMode, dpiscale: number): Rasterizer
newRasterizer: function(imageData: image.ImageData, glyphs: string, dpiscale: number): Rasterizer
newRasterizer: function(fileName: string, glyphs: string, dpiscale: number): Rasterizer
newTrueTypeRasterizer: function(size: number, hinting: HintingMode, dpiscale: number): Rasterizer
newTrueTypeRasterizer: function(fileName: string, size: number, hinting: HintingMode, dpiscale: number): Rasterizer
newTrueTypeRasterizer: function(fileData: filesystem.FileData, size: number, hinting: HintingMode, dpiscale: number): Rasterizer
end
type graphics = record
type AlignMode = enum
"center"
"left"
"right"
"justify"
end
type ArcType = enum
"pie"
"open"
"closed"
end
type AreaSpreadDistribution = enum
"uniform"
"normal"
"ellipse"
"borderellipse"
"borderrectangle"
"none"
end
type BlendAlphaMode = enum
"alphamultiply"
"premultiplied"
end
type BlendMode = enum
"alpha"
"replace"
"screen"
"add"
"subtract"
"multiply"
"lighten"
"darken"
"additive"
"subtractive"
"multiplicative"
"premultiplied"
end
type CompareMode = enum
"equal"
"notequal"
"less"
"lequal"
"gequal"
"greater"
"never"
"always"
end
type CullMode = enum
"back"
"front"
"none"
end
type DrawMode = enum
"fill"
"line"
end
type FilterMode = enum
"linear"
"nearest"
end
type GraphicsFeature = enum
"clampzero"
"lighten"
"multicanvasformats"
"glsl3"
"instancing"
"fullnpot"
"pixelshaderhighp"
"shaderderivatives"
end
type GraphicsLimit = enum
"pointsize"
"texturesize"
"multicanvas"
"canvasmsaa"
"texturelayers"
"volumetexturesize"
"cubetexturesize"
"anisotropy"
end
type IndexDataType = enum
"uint16"
"uint32"
end
type LineJoin = enum
"miter"
"none"
"bevel"
end
type LineStyle = enum
"rough"
"smooth"
end
type MeshDrawMode = enum
"fan"
"strip"
"triangles"
"points"
end
type MipmapMode = enum
"none"
"auto"
"manual"
end
type ParticleInsertMode = enum
"top"
"bottom"
"random"
end
type SpriteBatchUsage = enum
"dynamic"
"static"
"stream"
end
type StackType = enum
"transform"
"all"
end
type StencilAction = enum
"replace"
"increment"
"decrement"
"incrementwrap"
"decrementwrap"
"invert"
end
type TextureType = enum
"2d"
"array"
"cube"
"volume"
end
type VertexAttributeStep = enum
"pervertex"
"perinstance"
end
type VertexWinding = enum
"cw"
"ccw"
end
type WrapMode = enum
"clamp"
"repeat"
"mirroredrepeat"
"clampzero"
end
type ImageFlag = enum
"linear"
"mipmaps"
end
type Canvas = record
generateMipmaps: function(self: Canvas)
getMSAA: function(self: Canvas): number
getMipmapMode: function(self: Canvas): MipmapMode
newImageData: function(self: Canvas): image.ImageData
newImageData: function(self: Canvas, slice: number, mipmap: number, x: number, y: number, width: number, height: number): image.ImageData
renderTo: function(func: function())
end
type Drawable = record
end
type Font = record
getAscent: function(self: Font): number
getBaseline: function(self: Font): number
getDPIScale: function(self: Font): number
getDescent: function(self: Font): number
getFilter: function(self: Font): FilterMode, FilterMode, number
getHeight: function(self: Font): number
getLineHeight: function(self: Font): number
getWidth: function(self: Font, text: string): number
getWrap: function(self: Font, text: string, wraplimit: number): number, {string}
hasGlyphs: function(self: Font, text: string): boolean
hasGlyphs: function(self: Font, character1: string, character2: string): boolean
hasGlyphs: function(self: Font, codepoint1: number, codepoint2: number): boolean
setFallbacks: function(self: Font, fallbackfont1: Font, ...: Font)
setFilter: function(self: Font, min: FilterMode, mag: FilterMode, anisotropy: number)
setLineHeight: function(self: Font, height: number)
end
type Image = record
getFlags: function(self: Image): {ImageFlag}
isCompressed: function(self: Image): boolean
replacePixels: function(self: Image, data: image.ImageData, slice: number, mipmap: number, x: number, y: number, reloadmipmaps: boolean)
end
type Mesh = record
attachAttribute: function(self: Mesh, name: string, mesh: Mesh)
attachAttribute: function(self: Mesh, name: string, mesh: Mesh, step: VertexAttributeStep, attachname: string)
attachAttribute: function(self: Mesh, name: string, mesh: Mesh)
attachAttribute: function(self: Mesh, name: string, mesh: Mesh, step: VertexAttributeStep, attachname: string)
detachAttribute: function(self: Mesh, name: string): boolean
getDrawMode: function(self: Mesh): MeshDrawMode
getDrawRange: function(self: Mesh): number, number
getTexture: function(self: Mesh): Texture
getVertex: function(self: Mesh, index: number): number, number...
getVertex: function(self: Mesh, index: number): number, number, number, number, number, number, number, number
getVertexAttribute: function(self: Mesh, vertexindex: number, attributeindex: number): number, number, number...
getVertexCount: function(self: Mesh): number
getVertexFormat: function(self: Mesh): {{number|string}}
getVertexMap: function(self: Mesh): {number}
isAttributeEnabled: function(self: Mesh, name: string): boolean
setAttributeEnabled: function(self: Mesh, name: string, enable: boolean)
setDrawMode: function(self: Mesh, mode: MeshDrawMode)
setDrawRange: function(self: Mesh, start: number, count: number)
setDrawRange: function(self: Mesh)
setTexture: function(self: Mesh, texture: Texture)
setTexture: function(self: Mesh)
setVertex: function(self: Mesh, index: number, attributecomponent: number, ...: number)
setVertex: function(self: Mesh, index: number, vertex: {number})
setVertex: function(self: Mesh, index: number, x: number, y: number, u: number, v: number, r: number, g: number, b: number, a: number)
setVertex: function(self: Mesh, index: number, vertex: {number})
setVertexAttribute: function(self: Mesh, vertexindex: number, attributeindex: number, value1: number, value2: number, ...: number)
setVertexMap: function(self: Mesh, map: {number})
setVertexMap: function(self: Mesh, ...: number)
setVertexMap: function(self: Mesh, data: love.Data, datatype: IndexDataType)
setVertices: function(self: Mesh, vertices: {{number}}, startvertex: number)
setVertices: function(self: Mesh, data: love.Data, startvertex: number)
end
type ParticleSystem = record
clone: function(self: ParticleSystem): ParticleSystem
emit: function(self: ParticleSystem, numparticles: number)
getBufferSize: function(self: ParticleSystem): number
getColors: function(self: ParticleSystem): number, number, number, number, number, number, number, number, number, number, number, number
getCount: function(self: ParticleSystem): number
getDirection: function(self: ParticleSystem): number
getEmissionArea: function(self: ParticleSystem): AreaSpreadDistribution, number, number, number, boolean
getEmissionRate: function(self: ParticleSystem): number
getEmitterLifetime: function(self: ParticleSystem): number
getInsertMode: function(self: ParticleSystem): ParticleInsertMode
getLinearAcceleration: function(self: ParticleSystem): number, number, number, number
getLinearDamping: function(self: ParticleSystem): number, number
getOffset: function(self: ParticleSystem): number, number
getParticleLifetime: function(self: ParticleSystem): number, number
getPosition: function(self: ParticleSystem): number, number
getQuads: function(self: ParticleSystem): {Quad}
getRadialAcceleration: function(self: ParticleSystem): number, number
getRotation: function(self: ParticleSystem): number, number
getSizeVariation: function(self: ParticleSystem): number
getSizes: function(self: ParticleSystem): number, number, number
getSpeed: function(self: ParticleSystem): number, number
getSpin: function(self: ParticleSystem): number, number, number
getSpinVariation: function(self: ParticleSystem): number
getSpread: function(self: ParticleSystem): number
getTangentialAcceleration: function(self: ParticleSystem): number, number
getTexture: function(self: ParticleSystem): Texture
hasRelativeRotation: function(self: ParticleSystem): boolean
isActive: function(self: ParticleSystem): boolean
isPaused: function(self: ParticleSystem): boolean
isStopped: function(self: ParticleSystem): boolean
moveTo: function(self: ParticleSystem, x: number, y: number)
pause: function(self: ParticleSystem)
reset: function(self: ParticleSystem)
setBufferSize: function(self: ParticleSystem, size: number)
setColors: function(self: ParticleSystem, r1: number, g1: number, b1: number, a1: number, r2: number, g2: number, b2: number, a2: number, r8: number, g8: number, b8: number, a8: number)
setDirection: function(self: ParticleSystem, direction: number)
setEmissionArea: function(self: ParticleSystem, distribution: AreaSpreadDistribution, dx: number, dy: number, angle: number, directionRelativeToCenter: boolean)
setEmissionRate: function(self: ParticleSystem, rate: number)
setEmitterLifetime: function(self: ParticleSystem, life: number)
setInsertMode: function(self: ParticleSystem, mode: ParticleInsertMode)
setLinearAcceleration: function(self: ParticleSystem, xmin: number, ymin: number, xmax: number, ymax: number)
setLinearDamping: function(self: ParticleSystem, min: number, max: number)
setOffset: function(self: ParticleSystem, x: number, y: number)
setParticleLifetime: function(self: ParticleSystem, min: number, max: number)
setPosition: function(self: ParticleSystem, x: number, y: number)
setQuads: function(self: ParticleSystem, ...: Quad)
setQuads: function(self: ParticleSystem, quads: {Quad})
setRadialAcceleration: function(self: ParticleSystem, min: number, max: number)
setRelativeRotation: function(self: ParticleSystem, enable: boolean)
setRotation: function(self: ParticleSystem, min: number, max: number)
setSizeVariation: function(self: ParticleSystem, variation: number)
setSizes: function(self: ParticleSystem, size1: number, size2: number, size8: number)
setSpeed: function(self: ParticleSystem, min: number, max: number)
setSpin: function(self: ParticleSystem, min: number, max: number)
setSpinVariation: function(self: ParticleSystem, variation: number)
setSpread: function(self: ParticleSystem, spread: number)
setTangentialAcceleration: function(self: ParticleSystem, min: number, max: number)
setTexture: function(self: ParticleSystem, texture: Texture)
start: function(self: ParticleSystem)
stop: function(self: ParticleSystem)
update: function(self: ParticleSystem, dt: number)
end
type Quad = record
getTextureDimensions: function(self: Quad): number, number
getViewport: function(self: Quad): number, number, number, number
setViewport: function(self: Quad, x: number, y: number, w: number, h: number, sw: number, sh: number)
end
type Shader = record
getWarnings: function(self: Shader): string
hasUniform: function(self: Shader, name: string): boolean
send: function(self: Shader, name: string, ...: number)
send: function(self: Shader, name: string, ...: table)
send: function(self: Shader, name: string, ...: {{number}})
send: function(self: Shader, name: string, texture: Texture)
send: function(self: Shader, name: string, ...: boolean)
send: function(self: Shader, name: string, matrixLayout: math.MatrixLayout, ...: {{number}})
send: function(self: Shader, name: string, data: love.Data, offset: number, size: number)
send: function(self: Shader, name: string, data: love.Data, matrixlayout: math.MatrixLayout, offset: number, size: number)
sendColor: function(self: Shader, name: string, ...: table)
end
type SpriteBatch = record
add: function(self: SpriteBatch, x: number, y: number, r: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number): number
add: function(self: SpriteBatch, quad: Quad, x: number, y: number, r: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number): number
addLayer: function(self: SpriteBatch, layerindex: number, x: number, y: number, r: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number): number
addLayer: function(self: SpriteBatch, layerindex: number, quad: Quad, x: number, y: number, r: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number): number
addLayer: function(self: SpriteBatch, layerindex: number, transform: math.Transform): number
addLayer: function(self: SpriteBatch, layerindex: number, quad: Quad, transform: math.Transform): number
attachAttribute: function(self: SpriteBatch, name: string, mesh: Mesh)
clear: function(self: SpriteBatch)
flush: function(self: SpriteBatch)
getBufferSize: function(self: SpriteBatch): number
getColor: function(self: SpriteBatch): number, number, number, number
getCount: function(self: SpriteBatch): number
getTexture: function(self: SpriteBatch): Texture
set: function(self: SpriteBatch, spriteindex: number, x: number, y: number, r: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number)
set: function(self: SpriteBatch, spriteindex: number, quad: Quad, x: number, y: number, r: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number)
setColor: function(self: SpriteBatch, r: number, g: number, b: number, a: number)
setColor: function(self: SpriteBatch)
setDrawRange: function(self: SpriteBatch, start: number, count: number)
setDrawRange: function(self: SpriteBatch)
setLayer: function(self: SpriteBatch, spriteindex: number, layerindex: number, x: number, y: number, r: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number)
setLayer: function(self: SpriteBatch, spriteindex: number, layerindex: number, quad: Quad, x: number, y: number, r: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number)
setLayer: function(self: SpriteBatch, spriteindex: number, layerindex: number, transform: math.Transform)
setLayer: function(self: SpriteBatch, spriteindex: number, layerindex: number, quad: Quad, transform: math.Transform)
setTexture: function(self: SpriteBatch, texture: Texture)
end
type Text = record
add: function(self: Text, textstring: string, x: number, y: number, angle: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number): number
add: function(self: Text, coloredtext: {table|string}, x: number, y: number, angle: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number): number
addf: function(self: Text, textstring: string, wraplimit: number, align: AlignMode, x: number, y: number, angle: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number): number
addf: function(self: Text, coloredtext: {table|string}, wraplimit: number, align: AlignMode, x: number, y: number, angle: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number): number
clear: function(self: Text)
getDimensions: function(self: Text): number, number
getDimensions: function(self: Text, index: number): number, number
getFont: function(self: Text): Font
getHeight: function(self: Text): number
getHeight: function(self: Text, index: number): number
getWidth: function(self: Text): number
getWidth: function(self: Text, index: number): number
set: function(self: Text, textstring: string)
set: function(self: Text, coloredtext: {table|string})
setFont: function(self: Text, font: Font)
setf: function(self: Text, textstring: string, wraplimit: number, align: AlignMode)
setf: function(self: Text, coloredtext: {table|string}, wraplimit: number, alignmode: AlignMode)
end
type Texture = record
getDPIScale: function(self: Texture): number
getDepth: function(self: Texture): number
getDepthSampleMode: function(self: Texture): CompareMode
getDimensions: function(self: Texture): number, number
getFilter: function(self: Texture): FilterMode, FilterMode, number
getFormat: function(self: Texture): image.PixelFormat
getHeight: function(self: Texture): number
getLayerCount: function(self: Texture): number
getMipmapCount: function(self: Texture): number
getMipmapFilter: function(self: Texture): FilterMode, number
getPixelDimensions: function(self: Texture): number, number
getPixelHeight: function(self: Texture): number
getPixelWidth: function(self: Texture): number
getTextureType: function(self: Texture): TextureType
getWidth: function(self: Texture): number
getWrap: function(self: Texture): WrapMode, WrapMode, WrapMode
isReadable: function(self: Texture): boolean
setDepthSampleMode: function(self: Texture, compare: CompareMode)
setFilter: function(self: Texture, min: FilterMode, mag: FilterMode, anisotropy: number)
setMipmapFilter: function(self: Texture, filtermode: FilterMode, sharpness: number)
setMipmapFilter: function(self: Texture)
setWrap: function(self: Texture, horiz: WrapMode, vert: WrapMode, depth: WrapMode)
end
type Video = record
getDimensions: function(self: Video): number, number
getFilter: function(self: Video): FilterMode, FilterMode, number
getHeight: function(self: Video): number
getSource: function(self: Video): audio.Source
getStream: function(self: Video): video.VideoStream
getWidth: function(self: Video): number
isPlaying: function(self: Video): boolean
pause: function(self: Video)
play: function(self: Video)
rewind: function(self: Video)
seek: function(self: Video, offset: number)
setFilter: function(self: Video, min: FilterMode, mag: FilterMode, anisotropy: number)
setSource: function(self: Video, source: audio.Source)
tell: function(self: Video): number
end
type Stats = record
drawcalls: number
canvasswitches: number
texturememory: number
images: number
canvases: number
fonts: number
shaderswitches: number
drawcallsbatched: number
end
type ImageSetting = record
mipmaps: boolean
linear: boolean
dpiscale: number
end
type CanvasSetting = record
type: TextureType
format: image.PixelFormat
readable: boolean
msaa: number
dpiscale: number
mipmaps: MipmapMode
end
type VideoSetting = record
audio: boolean
dpiscale: number
end
applyTransform: function(transform: math.Transform)
arc: function(drawmode: DrawMode, x: number, y: number, radius: number, angle1: number, angle2: number, segments: number)
arc: function(drawmode: DrawMode, arctype: ArcType, x: number, y: number, radius: number, angle1: number, angle2: number, segments: number)
captureScreenshot: function(filename: string)
captureScreenshot: function(callback: function(image: image.ImageData))
captureScreenshot: function(channel: love.thread.Channel)
circle: function(mode: DrawMode, x: number, y: number, radius: number)
circle: function(mode: DrawMode, x: number, y: number, radius: number, segments: number)
clear: function()
clear: function(r: number, g: number, b: number, a: number, clearstencil: boolean, cleardepth: boolean)
clear: function(...: {number}|boolean)
clear: function(clearcolor: boolean, clearstencil: boolean, cleardepth: boolean)
discard: function(discardcolor: boolean, discardstencil: boolean)
discard: function(discardcolors: {boolean}, discardstencil: boolean)
draw: function(drawable: Drawable, x: number, y: number, r: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number)
draw: function(texture: Texture, quad: Quad, x: number, y: number, r: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number)
draw: function(drawable: Drawable, transform: math.Transform)
draw: function(texture: Texture, quad: Quad, transform: math.Transform)
drawInstanced: function(mesh: Mesh, instancecount: number, x: number, y: number, r: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number)
drawInstanced: function(mesh: Mesh, instancecount: number, transform: math.Transform)
drawLayer: function(texture: Texture, layerindex: number, x: number, y: number, r: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number)
drawLayer: function(texture: Texture, layerindex: number, quad: Quad, x: number, y: number, r: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number)
drawLayer: function(texture: Texture, layerindex: number, transform: math.Transform)
drawLayer: function(texture: Texture, layerindex: number, quad: Quad, transform: math.Transform)
ellipse: function(mode: DrawMode, x: number, y: number, radiusx: number, radiusy: number)
ellipse: function(mode: DrawMode, x: number, y: number, radiusx: number, radiusy: number, segments: number)
flushBatch: function()
getBackgroundColor: function(): number, number, number, number
getBlendMode: function(): BlendMode, BlendAlphaMode
getCanvas: function(): Canvas
getCanvasFormats: function(): {image.PixelFormat:boolean}
getCanvasFormats: function(readable: boolean): {image.PixelFormat:boolean}
getColor: function(): number, number, number, number
getColorMask: function(): boolean, boolean, boolean, boolean
getDPIScale: function(): number
getDefaultFilter: function(): FilterMode, FilterMode, number
getDepthMode: function(): CompareMode, boolean
getDimensions: function(): number, number
getFont: function(): Font
getFrontFaceWinding: function(): VertexWinding
getHeight: function(): number
getImageFormats: function(): {image.PixelFormat:boolean}
getLineJoin: function(): LineJoin
getLineStyle: function(): LineStyle
getLineWidth: function(): number
getMeshCullMode: function(): CullMode
getPixelHeight: function(): number
getPixelWidth: function(): number
getPointSize: function(): number
getRendererInfo: function(): string, string, string, string
getScissor: function(): number, number, number, number
getShader: function(): Shader
getStackDepth: function(): number
getStats: function(): Stats
getStats: function(stats: table): Stats
getStencilTest: function(): CompareMode, number
getSupported: function(): {GraphicsFeature:boolean}
getSystemLimits: function(): {GraphicsLimit:boolean}
getTextureTypes: function(): {TextureType:boolean}
getWidth: function(): number
intersectScissor: function(x: number, y: number, width: number, height: number)
inverseTransformPoint: function(screenX: number, screenY: number): number, number
isActive: function(): boolean
isGammaCorrect: function(): boolean
isWireframe: function(): boolean
line: function(...: number)
line: function(points: {number})
newArrayImage: function(slices: table, settings: ImageSetting): Image
newCanvas: function(): Canvas
newCanvas: function(width: number, height: number): Canvas
newCanvas: function(width: number, height: number, settings: CanvasSetting): Canvas