Giter VIP home page Giter VIP logo

love2d's People

Contributors

c3pa avatar carsakiller avatar sewbacca avatar sumneko avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

clembu

love2d's Issues

Löve2d Image:replacePixels reporting wrong number of arguments

How are you using the lua-language-server?
Visual Studio Code Extension (sumneko.lua)

Which OS are you using?
Windows

What is the issue affecting?
Diagnostics/Syntax Checking

Expected Behaviour
This might not be the place for this issue, if not feel free to close.

With löve2d when using Image:replacePixels it's reporting wrong number of arguments if you just give one, as in the example on the love2d wiki. image:replacePixels(imagedata)

The syntax checker is expecting 3: "data", "slice" and "reloadmipmaps". However "slice" only needs to be given if applicable (which it isn't with a plain texture) and "reloadmipmaps" defaults to true if the existing image has mipmaps and false if not. I appreciate it may be out of the scope of this plugin to know if these conditions are true or not.

The website in the hover over is also linking to the wrong page, it should be https://love2d.org/wiki/(Image):replacePixels

Actual Behaviour
Currently putting in the exaple from the love2d wiki gives an error about the nubmer of arguments.

Reproduction steps
Copy example from the love2d wiki page on Image:replacePixels (https://love2d.org/wiki/(Image):replacePixels)
See error being underlined
Also click the link in the hover, it goes to a non-page. This probably affects all "image" links as the wiki says these had parenthesis added to the link to as "image" was a reserved word in the wiki.
https://love2d.org/wiki/(Image):isCompressed
https://love2d.org/wiki/(Image):isFormatLinear
and https://love2d.org/wiki/(Image):replacePixels

Missing `newText` definition

According to https://love2d.org/wiki/love.graphics.newText there is a love.graphics.Text constructor that accepts a table as a second parameter, interpreting it as "colored text". It seems to work fine in Löve 11.4, yet this variant is missing from the definition file.

I would submit a PR but I don't know how the doc comments work, and I don't have the time right now to get into it, so I thought I'd report it first, before I forget.

Maintaining

Hello,

The definitions in this addon have been generated from https://github.com/LuaLS/lua-language-server/blob/master/tools/love-api.lua by using ./bin/lua-language-server ./tools/build-3rd-meta.lua. This uses https://github.com/love2d-community/love-api.

I would like help with maintaining this addon from someone knowledgeable about love2d. I have never really used it so I am not sure if it would be best to keep generating the documentation from https://github.com/love2d-community/love-api, or to manually update it, or if https://github.com/love2d-community/love-api is even accurate.

If someone could assist with managing issues on this addon and keeping the definitions up to date (using whatever method they think is best), that would be great! 🙂

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.