This is a WIP of a cheat-sheet that I will finish Eventually™
Mapping of the shader types to Heaps types:
Float = Float
Int = Int
Bool = Bool
package util; | |
/** | |
* ... | |
* @author Kevin | |
*/ | |
@:build(util.AssetPathsMacro.build()) | |
class AssetPaths | |
{ |
import com.badlogic.gdx.Gdx; | |
import com.badlogic.gdx.graphics.OrthographicCamera; | |
import com.badlogic.gdx.graphics.g2d.BitmapFont; | |
import com.badlogic.gdx.graphics.g2d.SpriteBatch; | |
import com.badlogic.gdx.utils.Disposable; | |
import com.badlogic.gdx.utils.TimeUtils; | |
/** | |
* A nicer class for showing framerate that doesn't spam the console | |
* like Logger.log() |
/** | |
* K.jpg's OpenSimplex 2, smooth variant ("SuperSimplex") | |
* | |
* More language ports, as well as legacy 2014 OpenSimplex, can be found here: | |
* https://github.com/KdotJPG/OpenSimplex2 | |
*/ | |
public class OpenSimplex2S { | |
private static final long PRIME_X = 0x5205402B9270C86FL; |
abstract ArrayRead<T>(Array<T>) from Array<T> { | |
@:arrayAccess inline function get(i:Int):T return this[i]; | |
public var length(get,never):Int; | |
inline function get_length() return this.length; | |
} |
/** | |
Simple, colorful logging! | |
Setup | |
===== | |
Somewhere really early in your code do a: | |
Log.init(); | |
This will setup the logger methods and coloring stuff. | |
Logging |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000