This file contains hidden or 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
#if !macro | |
import ecs.System; | |
import ecs.Entity; | |
import ecs.Universe; | |
#else | |
import haxe.macro.Expr; | |
import haxe.macro.Context; | |
using haxe.macro.TypeTools; | |
#end |
This file contains hidden or 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
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Electron: Renderer", | |
"type": "chrome", | |
"request": "attach", | |
"port": 9223, | |
"webRoot": "${workspaceFolder}/project/web", | |
"timeout": 30000, |
This file contains hidden or 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
// preload.js | |
// All the Node.js APIs are available in the preload process. | |
// It has the same sandbox as a Chrome extension. | |
window.addEventListener('DOMContentLoaded', () => { | |
const replaceText = (selector, text) => { | |
const element = document.getElementById(selector) | |
if (element) element.innerText = text | |
} |
This file contains hidden or 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
// main.js | |
// Modules to control application life and create native browser window | |
const { app, BrowserWindow } = require('electron') | |
const path = require('path') | |
const createWindow = () => { | |
// Create the browser window. | |
const mainWindow = new BrowserWindow({ | |
width: 800, | |
height: 600, |
This file contains hidden or 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
Hello World from GitHub |
This file contains hidden or 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; | |
import haxe.macro.Printer; | |
import haxe.macro.Context; | |
#if macro | |
import haxe.macro.Expr; | |
#end | |
using haxe.macro.Tools; |
This file contains hidden or 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 utilities; | |
import externs.Fetch.FetchOptions; | |
import js.Function; | |
import js.Syntax; | |
import js.lib.Promise; | |
class Async { | |
public static inline function async(f:Void->Void) { |
This file contains hidden or 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; | |
typedef TMap<A, B> = { | |
var length:Int; | |
var data:Map<A, B>; | |
} | |
@:forward abstract AMap<A, B>(TMap<A, B>) { | |
public var length(get, never):Int; |
This file contains hidden or 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 utilities; | |
@:forward abstract CArray<T>(Array<T>) { | |
public var last(get, never):T; | |
public var first(get, never):T; | |
public function new(value) { | |
this = value; | |
} | |
public function rewind(data:T->Void, end:Int = 0) { |