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
import OutlineSpriteFX from './OutlineSpriteFx'; | |
export default class MyScene extends Phaser.Scene { | |
create() { | |
const pipeline:OutlineSpriteFX = this.renderer.pipelines.add('OutlineSpriteFX', new OutlineSpriteFX(this.game)); | |
pipeline.thickness = 3; | |
pipeline.color.setFromRGB(Phaser.Display.Color.IntegerToRGB(0xff3333)); | |
const sprite = this.add.sprite(100, 100, 'someSprite'); |
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
import haxe.macro.ExprTools; | |
import haxe.macro.Context; | |
import haxe.macro.Type; | |
import haxe.macro.Expr; | |
import Type in StdType; | |
class ExprToEnumVal { | |
public static macro function foo(e:Expr) { | |
return switch exprToEnum(e, macro:ExprToEnumVal.Foo, Foo) { | |
case A: macro null; |
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 antriel.macros; | |
import haxe.macro.Expr; | |
import haxe.macro.Context; | |
import haxe.macro.Expr.Position; | |
import haxe.macro.Type.ClassType; | |
using Lambda; | |
class Singletonize { |
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; | |
import iron.math.Vec4; | |
import iron.App; | |
import iron.Scene; | |
import iron.RenderPath; | |
import iron.data.*; | |
import iron.data.SceneFormat; | |
import iron.object.Object; |
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 Hideable extends View { | |
@:attribute var hidden:Bool; | |
@:attribute var fast:Bool = false; | |
@:attribute var getRender:ClassName->RenderResult; | |
@:attribute var animationIn:ClassName = "fadeIn"; | |
@:attribute var animationOut:ClassName = "fadeOut"; | |
@:computed var baseClass:ClassName = if (fast) ['animated', 'faster'] else ['animated']; | |
@:computed var classes:ClassName = baseClass.add(hidden ? animationOut : animationIn); | |
@:computed var hiddenDelay:Delayer<Bool> = new Delayer({ delay: fast ? 650 : 1150, source: hidden }); |