Skip to content

Commit c3b468f

Browse files
committed
update submodules
1 parent 65413a2 commit c3b468f

File tree

8 files changed

+108
-26
lines changed

8 files changed

+108
-26
lines changed

meta/3rd/love2d/library/love.lua

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
---@meta
22

33
-- version: 11.4
4-
4+
---
5+
---[Open in Browser](https://love2d.org/wiki/love)
6+
---
57
---@class love
68
love = {}
79

810
---
911
---Gets the current running version of LÖVE.
1012
---
13+
---
14+
---[Open in Browser](https://love2d.org/wiki/love.getVersion)
15+
---
1116
---@return number major # The major version of LÖVE, i.e. 0 for version 0.9.1.
1217
---@return number minor # The minor version of LÖVE, i.e. 9 for version 0.9.1.
1318
---@return number revision # The revision version of LÖVE, i.e. 1 for version 0.9.1.
@@ -19,12 +24,18 @@ function love.getVersion() end
1924
---
2025
---When deprecation output is enabled, the first use of a formally deprecated LÖVE API will show a message at the bottom of the screen for a short time, and print the message to the console.
2126
---
27+
---
28+
---[Open in Browser](https://love2d.org/wiki/love.hasDeprecationOutput)
29+
---
2230
---@return boolean enabled # Whether deprecation output is enabled.
2331
function love.hasDeprecationOutput() end
2432

2533
---
2634
---Gets whether the given version is compatible with the current running version of LÖVE.
2735
---
36+
---
37+
---[Open in Browser](https://love2d.org/wiki/love.isVersionCompatible)
38+
---
2839
---@overload fun(major: number, minor: number, revision: number):boolean
2940
---@param version string # The version to check (for example '11.3' or '0.10.2').
3041
---@return boolean compatible # Whether the given version is compatible with the current running version of LÖVE.
@@ -35,18 +46,27 @@ function love.isVersionCompatible(version) end
3546
---
3647
---When deprecation output is enabled, the first use of a formally deprecated LÖVE API will show a message at the bottom of the screen for a short time, and print the message to the console.
3748
---
49+
---
50+
---[Open in Browser](https://love2d.org/wiki/love.setDeprecationOutput)
51+
---
3852
---@param enable boolean # Whether to enable or disable deprecation output.
3953
function love.setDeprecationOutput(enable) end
4054

4155
---
4256
---The superclass of all data.
4357
---
58+
---
59+
---[Open in Browser](https://love2d.org/wiki/love)
60+
---
4461
---@class love.Data: love.Object
4562
local Data = {}
4663

4764
---
4865
---Creates a new copy of the Data object.
4966
---
67+
---
68+
---[Open in Browser](https://love2d.org/wiki/Data:clone)
69+
---
5070
---@return love.Data clone # The new copy.
5171
function Data:clone() end
5272

@@ -55,30 +75,45 @@ function Data:clone() end
5575
---
5676
---This function should be preferred instead of Data:getPointer because the latter uses light userdata which can't store more all possible memory addresses on some new ARM64 architectures, when LuaJIT is used.
5777
---
78+
---
79+
---[Open in Browser](https://love2d.org/wiki/Data:getFFIPointer)
80+
---
5881
---@return ffi.cdata* pointer # A raw void* pointer to the Data, or nil if FFI is unavailable.
5982
function Data:getFFIPointer() end
6083

6184
---
6285
---Gets a pointer to the Data. Can be used with libraries such as LuaJIT's FFI.
6386
---
87+
---
88+
---[Open in Browser](https://love2d.org/wiki/Data:getPointer)
89+
---
6490
---@return lightuserdata pointer # A raw pointer to the Data.
6591
function Data:getPointer() end
6692

6793
---
6894
---Gets the Data's size in bytes.
6995
---
96+
---
97+
---[Open in Browser](https://love2d.org/wiki/Data:getSize)
98+
---
7099
---@return number size # The size of the Data in bytes.
71100
function Data:getSize() end
72101

73102
---
74103
---Gets the full Data as a string.
75104
---
105+
---
106+
---[Open in Browser](https://love2d.org/wiki/Data:getString)
107+
---
76108
---@return string data # The raw data.
77109
function Data:getString() end
78110

79111
---
80112
---The superclass of all LÖVE types.
81113
---
114+
---
115+
---[Open in Browser](https://love2d.org/wiki/love)
116+
---
82117
---@class love.Object
83118
local Object = {}
84119

@@ -87,18 +122,27 @@ local Object = {}
87122
---
88123
---This method can be used to immediately clean up resources without waiting for Lua's garbage collector.
89124
---
125+
---
126+
---[Open in Browser](https://love2d.org/wiki/Object:release)
127+
---
90128
---@return boolean success # True if the object was released by this call, false if it had been previously released.
91129
function Object:release() end
92130

93131
---
94132
---Gets the type of the object as a string.
95133
---
134+
---
135+
---[Open in Browser](https://love2d.org/wiki/Object:type)
136+
---
96137
---@return string type # The type as a string.
97138
function Object:type() end
98139

99140
---
100141
---Checks whether an object is of a certain type. If the object has the type with the specified name in its hierarchy, this function will return true.
101142
---
143+
---
144+
---[Open in Browser](https://love2d.org/wiki/Object:typeOf)
145+
---
102146
---@param name string # The name of the type to check for.
103147
---@return boolean b # True if the object is of the specified type, false otherwise.
104148
function Object:typeOf(name) end

meta/3rd/love2d/library/love/graphics.lua

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -731,13 +731,13 @@ function love.graphics.newFont(filename) end
731731
---
732732
---[Open in Browser](https://love2d.org/wiki/love.graphics.newImage)
733733
---
734-
---@overload fun(fileData: love.FileData, flags?: table):love.Image
735-
---@overload fun(imageData: love.ImageData, flags?: table):love.Image
736-
---@overload fun(compressedImageData: love.CompressedImageData, flags?: table):love.Image
734+
---@overload fun(fileData: love.FileData, settings?: table):love.Image
735+
---@overload fun(imageData: love.ImageData, settings?: table):love.Image
736+
---@overload fun(compressedImageData: love.CompressedImageData, settings?: table):love.Image
737737
---@param filename string # The filepath to the image file.
738-
---@param flags? {dpiscale: number, linear: boolean, mipmaps: boolean} # A table containing the following fields:
738+
---@param settings? {dpiscale: number, linear: boolean, mipmaps: boolean} # A table containing the following fields:
739739
---@return love.Image image # A new Image object which can be drawn on screen.
740-
function love.graphics.newImage(filename, flags) end
740+
function love.graphics.newImage(filename, settings) end
741741

742742
---
743743
---Creates a new specifically formatted image.
@@ -1074,8 +1074,7 @@ function love.graphics.scale(sx, sy) end
10741074
---
10751075
---[Open in Browser](https://love2d.org/wiki/love.graphics.setBackgroundColor)
10761076
---
1077-
---@overload fun()
1078-
---@overload fun()
1077+
---@overload fun(rgba: table)
10791078
---@param red number # The red component (0-1).
10801079
---@param green number # The green component (0-1).
10811080
---@param blue number # The blue component (0-1).
@@ -2243,18 +2242,19 @@ function ParticleSystem:setBufferSize(size) end
22432242
---
22442243
---[Open in Browser](https://love2d.org/wiki/ParticleSystem:setColors)
22452244
---
2245+
---@overload fun(self: love.ParticleSystem, rgba1: table, rgba2: table, rgba8: table)
22462246
---@param r1 number # First color, red component (0-1).
22472247
---@param g1 number # First color, green component (0-1).
22482248
---@param b1 number # First color, blue component (0-1).
2249-
---@param a1 number # First color, alpha component (0-1).
2250-
---@param r2 number # Second color, red component (0-1).
2251-
---@param g2 number # Second color, green component (0-1).
2252-
---@param b2 number # Second color, blue component (0-1).
2253-
---@param a2 number # Second color, alpha component (0-1).
2254-
---@param r8 number # Eighth color, red component (0-1).
2255-
---@param g8 number # Eighth color, green component (0-1).
2256-
---@param b8 number # Eighth color, blue component (0-1).
2257-
---@param a8 number # Eighth color, alpha component (0-1).
2249+
---@param a1? number # First color, alpha component (0-1).
2250+
---@param r2? number # Second color, red component (0-1).
2251+
---@param g2? number # Second color, green component (0-1).
2252+
---@param b2? number # Second color, blue component (0-1).
2253+
---@param a2? number # Second color, alpha component (0-1).
2254+
---@param r8? number # Eighth color, red component (0-1).
2255+
---@param g8? number # Eighth color, green component (0-1).
2256+
---@param b8? number # Eighth color, blue component (0-1).
2257+
---@param a8? number # Eighth color, alpha component (0-1).
22582258
function ParticleSystem:setColors(r1, g1, b1, a1, r2, g2, b2, a2, r8, g8, b8, a8) end
22592259

22602260
---
@@ -2420,8 +2420,8 @@ function ParticleSystem:setSizeVariation(variation) end
24202420
---[Open in Browser](https://love2d.org/wiki/ParticleSystem:setSizes)
24212421
---
24222422
---@param size1 number # The first size.
2423-
---@param size2 number # The second size.
2424-
---@param size8 number # The eighth size.
2423+
---@param size2? number # The second size.
2424+
---@param size8? number # The eighth size.
24252425
function ParticleSystem:setSizes(size1, size2, size8) end
24262426

24272427
---

meta/3rd/love2d/library/love/physics.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3145,8 +3145,8 @@ function World:rayCast(fixture, x, y, xn, yn, fraction) end
31453145
---
31463146
---@param beginContact function # Gets called when two fixtures begin to overlap.
31473147
---@param endContact function # Gets called when two fixtures cease to overlap. This will also be called outside of a world update, when colliding objects are destroyed.
3148-
---@param preSolve function # Gets called before a collision gets resolved.
3149-
---@param postSolve function # Gets called after the collision has been resolved.
3148+
---@param preSolve? function # Gets called before a collision gets resolved.
3149+
---@param postSolve? function # Gets called after the collision has been resolved.
31503150
function World:setCallbacks(beginContact, endContact, preSolve, postSolve) end
31513151

31523152
---

meta/3rd/lovr/library/lovr/filesystem.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,8 +310,8 @@ function lovr.filesystem.unmount(path) end
310310
---
311311
---If the file already has data in it, it will be replaced with the new content.
312312
---
313-
---@overload fun(filename: string, blob: lovr.Blob):number
313+
---@overload fun(filename: string, blob: lovr.Blob):boolean
314314
---@param filename string # The file to write to.
315315
---@param content string # A string to write to the file.
316-
---@return number bytes # The number of bytes written.
316+
---@return boolean success # Whether the write was successful.
317317
function lovr.filesystem.write(filename, content) end

meta/3rd/lovr/library/lovr/physics.lua

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,19 @@ function lovr.physics.newDistanceJoint(colliderA, colliderB, x1, y1, z1, x2, y2,
102102
---@return lovr.HingeJoint hinge # The new HingeJoint.
103103
function lovr.physics.newHingeJoint(colliderA, colliderB, x, y, z, ax, ay, az) end
104104

105+
---
106+
---Creates a new MeshShape.
107+
---
108+
---
109+
---### NOTE:
110+
---A Shape can be attached to a Collider using `Collider:addShape`.
111+
---
112+
---@overload fun(model: lovr.Model):lovr.MeshShape
113+
---@param vertices table # The table of vertices in the mesh. Each vertex is a table with 3 numbers.
114+
---@param indices table # A table of triangle indices representing how the vertices are connected in the Mesh.
115+
---@return lovr.MeshShape mesh # The new MeshShape.
116+
function lovr.physics.newMeshShape(vertices, indices) end
117+
105118
---
106119
---Creates a new SliderJoint.
107120
---
@@ -128,6 +141,19 @@ function lovr.physics.newSliderJoint(colliderA, colliderB, ax, ay, az) end
128141
---@return lovr.SphereShape sphere # The new SphereShape.
129142
function lovr.physics.newSphereShape(radius) end
130143

144+
---
145+
---Creates a new TerrainShape.
146+
---
147+
---
148+
---### NOTE:
149+
---A Shape can be attached to a Collider using `Collider:addShape`. For immobile terrain use the `Collider:setKinematic`.
150+
---
151+
---@overload fun(scale: number, heightmap: lovr.Image, stretch?: number):lovr.TerrainShape
152+
---@overload fun(scale: number, callback: function, samples?: number):lovr.TerrainShape
153+
---@param scale number # The width and depth of the terrain, in meters.
154+
---@return lovr.TerrainShape terrain # The new TerrainShape.
155+
function lovr.physics.newTerrainShape(scale) end
156+
131157
---
132158
---Creates a new physics World, which tracks the overall physics simulation, holds collider objects, and resolves collisions between them.
133159
---
@@ -1032,6 +1058,12 @@ function Joint:setEnabled(enabled) end
10321058
---@param data any # The custom value associated with the Joint.
10331059
function Joint:setUserData(data) end
10341060

1061+
---
1062+
---A type of `Shape` that can be used for triangle meshes.
1063+
---
1064+
---@class lovr.MeshShape
1065+
local MeshShape = {}
1066+
10351067
---
10361068
---A Shape is a physics object that can be attached to colliders to define their shape.
10371069
---
@@ -1267,6 +1299,12 @@ function SphereShape:getRadius() end
12671299
---@param radius number # The radius of the sphere, in meters.
12681300
function SphereShape:setRadius(radius) end
12691301

1302+
---
1303+
---A type of `Shape` that can be used for terrains and irregular surfaces.
1304+
---
1305+
---@class lovr.TerrainShape
1306+
local TerrainShape = {}
1307+
12701308
---
12711309
---A World is an object that holds the colliders, joints, and shapes in a physics simulation.
12721310
---

0 commit comments

Comments
 (0)