Old vs New API, and Update/Graphics func

  • ChargedCreeper
    4th May 2015 Member 0 Permalink

    https://powdertoy.co.uk/Wiki/W/Talk:Lua_API:Elements.html

     

    Why is there two methods of adding the functions to an element? The wiki seems to imply that you have to use the old API to do so, but that is not true because Graphics and Update properties can be used to define those.

  • jacob1
    4th May 2015 Developer 0 Permalink
    I guess the wiki was wrong. It does later in the page say that "Update" and "Graphics" work, maybe those are newer properties, or just whoever wrote the page didn't know about it. You are free to fix it :P, and I recommend fixing it because the new functions are better (well except for that one glitch that I fixed ...)
  • ChargedCreeper
    4th May 2015 Member 0 Permalink

    jacob1:

    I guess the wiki was wrong. It does later in the page say that "Update" and "Graphics" work, maybe those are newer properties, or just whoever wrote the page didn't know about it. You are free to fix it :P, and I recommend fixing it because the new functions are better (well except for that one glitch that I fixed ...)

     

     

    I updated the page, including an example. I'm assuming by better, you mean less lag and glitches?

  • boxmein
    5th May 2015 Former Staff 0 Permalink
    @ChargedCreeper (View Post)
    They're more unified with the other properties, since the update and graphics functions are just properties you can set on elements! :D
  • jacob1
    5th May 2015 Developer 0 Permalink
    @ChargedCreeper (View Post)
    Same amount of lag (which is none), and more glitches (just see this post where I completely abuse a glitch ...)

    But it just looks nicer when compared to the legacy api. It literally does the exact same thing internally.
    Edited 2 times by jacob1. Last: 5th May 2015