Skip to content

inspired by ninjamuffin99 doing it also helps me remember stuff

License

Notifications You must be signed in to change notification settings

sphis-Sinco/learnings.plan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 

Repository files navigation

learnings.plan

  1. You can add -watch as an arg when running/testing a Lime based project (openfl, haxeflixel, etc.), and it will auto-recompile anytime there's a file change in any of your source directories.

  2. Snippet for pixel perfect HTML5 rendering for HaxeFlixel.

    #if web
        // pixel perfect render fix!
        Application.current.window.element.style.setProperty("image-rendering", "pixelated");
    #end
  3. You can use

    @:depricated()

    for functions no longer in use and put some text in the ()'s to tell yourself its depricated

  4. You can use

    @:haxe.warning("WDeprecated")

    to disable deprication warnings or in the terminal use the compiler conditional -w WDeprecated

  5. You can use

    haxe.PosInfos

    for things related to position in code, for example

    class Main {
       static function assert(cond:Bool, ?pos:haxe.PosInfos) {
         if (!cond)
           haxe.Log.trace("Assert in " + pos.className + "::" + pos.methodName, pos);
       }
    
       static function main() {
         assert(1 == 1); // nothing
         assert(0 == 3); // trace "Assert in Test::main"
       }
     }
  6. You can use

    @type();

    to get the type of something

About

inspired by ninjamuffin99 doing it also helps me remember stuff

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published