// find:
\((#)(.+?)\)
//replace:
\([$1$2]\(https://github.com/HaxeFoundation/haxe/issues/$2\)\)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//You can use it like this: | |
System.root.add(new NapeDebugView()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package temple.utils; | |
import flambe.System; | |
/** | |
* @author Mark Knol [http://blog.stroep.nl] | |
*/ | |
class ExternalUtil | |
{ | |
#if air | |
public static var airBrowser:AirBrowser = new AirBrowser(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Type definitions for <https://github.com/kaimallea/isMobile> | |
* Don't forget to add the actual script in the head of the html. | |
* | |
* @author Mark Knol | |
*/ | |
@:native("isMobile") | |
extern class IsMobile | |
{ | |
public static var apple(default,null):{phone:Bool, ipod:Bool, tablet:Bool, device:Bool}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @author Mark Knol | |
*/ | |
class MacroJsonValidator { | |
public static macro function validateJson(path:String) { | |
if (sys.FileSystem.exists(path)) { | |
var content = sys.io.File.getContent(path); | |
try { | |
// Test the json by parsing it. | |
// It will throw an error when you made a mistake. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using StringTools; | |
class CSVReader | |
{ | |
private static var format:CSVFormat = { del: ",", quote: '"', escape: '""', linedel: "\r\n" }; | |
private var csv:String; | |
public function new(csv:String) | |
{ | |
this.csv = csv; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package game; | |
import h2d.Bitmap; | |
import h2d.Sprite; | |
import hxd.Res; | |
import nape.geom.Vec2; | |
import nape.phys.Body; | |
import nape.phys.BodyType; | |
import nape.shape.Polygon; | |
import nape.space.Space; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Main { | |
static function main() { | |
addConsoleLogViewer(); | |
} | |
public static inline function addConsoleLogViewer(align = "bottom", minimized = true, totalItems = 45) { | |
#if consolelogviewer | |
var script = js.Browser.document.createScriptElement(); | |
script.type = "text/javascript"; | |
script.src = 'https://markknol.github.io/console-log-viewer/console-log-viewer.js?align=$align&minimized=$minimized'; |