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
#if macro | |
import haxe.macro.Context; | |
import haxe.macro.Expr; | |
class SchemaTypeBuilder | |
{ | |
public static function build(ref:String):haxe.macro.Type | |
{ | |
var schema = haxe.Json.parse(sys.io.File.getContent(ref)); | |
var type:ComplexType = parseType(schema); |
using WithMacro; | |
typedef Player = { | |
final name:String; | |
final level:Int; | |
} | |
class Main { | |
static function main() { | |
var player = {name: "Dan", level: 15}; |
function _composite(under, over) { | |
var alphaO = over[3], | |
alphaU = under[3], | |
invAlphaO = 1 - alphaO, | |
i, | |
len; | |
for(i = 0, len = under.length - 1; i < len; ++i) { | |
under[i] = Math.round((over[i] * alphaO) | |
+ ((under[i] * alphaU) * invAlphaO)); |
This file was generated automatically based on this two sources:
This is a JSON object by following structure:
[string ext] : {
signs: [sign]
i386 : iPhone Simulator | |
x86_64 : iPhone Simulator | |
arm64 : iPhone Simulator | |
iPhone1,1 : iPhone | |
iPhone1,2 : iPhone 3G | |
iPhone2,1 : iPhone 3GS | |
iPhone3,1 : iPhone 4 | |
iPhone3,2 : iPhone 4 GSM Rev A | |
iPhone3,3 : iPhone 4 CDMA | |
iPhone4,1 : iPhone 4S |