Skip to content

Commit

Permalink
Some minor change and cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
MikuAuahDark committed May 19, 2024
1 parent 8536392 commit 0388084
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 209 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ print(s)

```lua
return {
version = '11.4',
version = '11.5',
modules = {
{
name = 'modulename',
Expand Down
15 changes: 0 additions & 15 deletions modules/audio/Audio.lua
Original file line number Diff line number Diff line change
Expand Up @@ -182,21 +182,6 @@ return {
},
},
},
{
name = 'getSourceCount',
description = 'Gets the current number of simultaneously playing sources.',
variants = {
{
returns = {
{
type = 'number',
name = 'numSources',
description = 'The current number of simultaneously playing sources.',
},
},
},
},
},
{
name = 'getVelocity',
description = 'Returns the velocity of the listener.',
Expand Down
18 changes: 9 additions & 9 deletions modules/graphics/types/Image.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,30 +16,30 @@ return {
},
functions = {
{
name = 'getFlags',
description = 'Gets the flags used when the image was created.',
name = 'isCompressed',
description = 'Gets whether the Image was created from CompressedData.\n\nCompressed images take up less space in VRAM, and drawing a compressed image will generally be more efficient than drawing one created from raw pixel data.',
variants = {
{
returns = {
{
type = 'table',
name = 'flags',
description = 'A table with ImageFlag keys.',
type = 'boolean',
name = 'compressed',
description = 'Whether the Image is stored as a compressed texture on the GPU.',
},
},
},
},
},
{
name = 'isCompressed',
description = 'Gets whether the Image was created from CompressedData.\n\nCompressed images take up less space in VRAM, and drawing a compressed image will generally be more efficient than drawing one created from raw pixel data.',
name = 'isFormatLinear',
description = 'Gets whether the Image was created with the linear (non-gamma corrected) flag set to true.\n\nThis method always returns false when gamma-correct rendering is not enabled.',
variants = {
{
returns = {
{
type = 'boolean',
name = 'compressed',
description = 'Whether the Image is stored as a compressed texture on the GPU.',
name = 'linear',
description = 'Whether the Image\'s internal pixel format is linear (not gamma corrected), when gamma-correct rendering is enabled.',
},
},
},
Expand Down
55 changes: 8 additions & 47 deletions modules/graphics/types/Mesh.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,53 +11,6 @@ return {
'Object',
},
functions = {
{
name = 'attachAttribute',
description = 'Attaches a vertex attribute from a different Mesh onto this Mesh, for use when drawing. This can be used to share vertex attribute data between several different Meshes.',
variants = {
{
arguments = {
{
type = 'string',
name = 'name',
description = 'The name of the vertex attribute to attach.',
},
{
type = 'Mesh',
name = 'mesh',
description = 'The Mesh to get the vertex attribute from.',
},
},
},
{
description = 'If a Mesh wasn\'t created with a custom vertex format, it will have 3 vertex attributes named VertexPosition, VertexTexCoord, and VertexColor.\n\nCustom named attributes can be accessed in a vertex shader by declaring them as attribute vec4 MyCustomAttributeName; at the top-level of the vertex shader code. The name must match what was specified in the Mesh\'s vertex format and in the name argument of Mesh:attachAttribute.',
arguments = {
{
type = 'string',
name = 'name',
description = 'The name of the vertex attribute to attach.',
},
{
type = 'Mesh',
name = 'mesh',
description = 'The Mesh to get the vertex attribute from.',
},
{
type = 'VertexAttributeStep',
name = 'step',
description = 'Whether the attribute will be per-vertex or per-instance when the mesh is drawn.',
default = '\'pervertex\'',
},
{
type = 'string',
name = 'attachname',
description = 'The name of the attribute to use in shader code. Defaults to the name of the attribute in the given mesh. Can be used to use a different name for this attribute when rendering.',
default = 'name',
},
},
},
},
},
{
name = 'attachAttribute',
description = 'Attaches a vertex attribute from a different Mesh onto this Mesh, for use when drawing. This can be used to share vertex attribute data between several different Meshes.',
Expand Down Expand Up @@ -127,6 +80,14 @@ return {
},
},
},
{
name = 'flush',
description = 'Immediately sends all modified vertex data in the Mesh to the graphics card.\n\nNormally it isn\'t necessary to call this method as love.graphics.draw(mesh, ...) will do it automatically if needed, but explicitly using **Mesh:flush** gives more control over when the work happens.\n\nIf this method is used, it generally shouldn\'t be called more than once (at most) between love.graphics.draw(mesh, ...) calls.',
variants = {
{
},
},
},
{
name = 'getDrawMode',
description = 'Gets the mode used when drawing the Mesh.',
Expand Down
126 changes: 0 additions & 126 deletions modules/math/Math.lua
Original file line number Diff line number Diff line change
Expand Up @@ -117,132 +117,6 @@ return {
},
},
},
{
name = 'compress',
description = 'Compresses a string or data using a specific compression algorithm.',
variants = {
{
arguments = {
{
type = 'string',
name = 'rawstring',
description = 'The raw (un-compressed) string to compress.',
},
{
type = 'CompressedDataFormat',
name = 'format',
description = 'The format to use when compressing the string.',
default = '\'lz4\'',
},
{
type = 'number',
name = 'level',
description = 'The level of compression to use, between 0 and 9. -1 indicates the default level. The meaning of this argument depends on the compression format being used.',
default = '-1',
},
},
returns = {
{
type = 'CompressedData',
name = 'compressedData',
description = 'A new Data object containing the compressed version of the string.',
},
},
},
{
arguments = {
{
type = 'Data',
name = 'data',
description = 'A Data object containing the raw (un-compressed) data to compress.',
},
{
type = 'CompressedDataFormat',
name = 'format',
description = 'The format to use when compressing the data.',
default = '\'lz4\'',
},
{
type = 'number',
name = 'level',
description = 'The level of compression to use, between 0 and 9. -1 indicates the default level. The meaning of this argument depends on the compression format being used.',
default = '-1',
},
},
returns = {
{
type = 'CompressedData',
name = 'compressedData',
description = 'A new Data object containing the compressed version of the raw data.',
},
},
},
},
},
{
name = 'decompress',
description = 'Decompresses a CompressedData or previously compressed string or Data object.',
variants = {
{
arguments = {
{
type = 'CompressedData',
name = 'compressedData',
description = 'The compressed data to decompress.',
},
},
returns = {
{
type = 'string',
name = 'rawstring',
description = 'A string containing the raw decompressed data.',
},
},
},
{
arguments = {
{
type = 'string',
name = 'compressedstring',
description = 'A string containing data previously compressed with love.math.compress.',
},
{
type = 'CompressedDataFormat',
name = 'format',
description = 'The format that was used to compress the given string.',
},
},
returns = {
{
type = 'string',
name = 'rawstring',
description = 'A string containing the raw decompressed data.',
},
},
},
{
arguments = {
{
type = 'Data',
name = 'data',
description = 'A Data object containing data previously compressed with love.math.compress.',
},
{
type = 'CompressedDataFormat',
name = 'format',
description = 'The format that was used to compress the given data.',
},
},
returns = {
{
type = 'string',
name = 'rawstring',
description = 'A string containing the raw decompressed data.',
},
},
},
},
},
{
name = 'gammaToLinear',
description = 'Converts a color from gamma-space (sRGB) to linear-space (RGB). This is useful when doing gamma-correct rendering and you need to do math in linear RGB in the few cases where LÖVE doesn\'t handle conversions automatically.\n\nRead more about gamma-correct rendering here, here, and here.\n\nIn versions prior to 11.0, color component values were within the range of 0 to 255 instead of 0 to 1.',
Expand Down
12 changes: 1 addition & 11 deletions modules/thread/types/Thread.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,20 +49,10 @@ return {
{
description = 'Arguments passed to Thread:start are accessible in the thread\'s main file via \'\'\'...\'\'\' (the vararg expression.)',
arguments = {
{
type = 'Variant',
name = 'arg1',
description = 'A string, number, boolean, LÖVE object, or simple table.',
},
{
type = 'Variant',
name = 'arg2',
description = 'A string, number, boolean, LÖVE object, or simple table.',
},
{
type = 'Variant',
name = '...',
description = 'You can continue passing values to the thread.',
description = 'A string, number, boolean, LÖVE object, or simple table.',
},
},
},
Expand Down

0 comments on commit 0388084

Please sign in to comment.