- copy your image (
Ctrl+A
andCtrl+C
) - make a new document-sized pure-black layer behind it
- group the black layer and yor image together
- add mask to the group
- enter mask edit mode (
alt+click
on the mask icon/thumbnail) - paste your image in the mask (b/w) and then invert it.
- save it as a 24-bit transparent PNG
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 ; | |
abstract JsonMap<T>({ }) from {} { | |
public function new() this = {}; | |
public function exists(key:String) return Reflect.hasField(this, key); | |
@:arrayAccess public function get(key:String) return Reflect.field(this, key); | |
@:arrayAccess public function set(key:String, value:T):T { | |
Reflect.setField(this, key, value); | |
return value; | |
} |
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.ds.StringMap; | |
import haxe.web.Dispatch; | |
import haxe.web.Dispatch.DispatchError; | |
#if sys | |
import Sys.println; | |
import Sys.print; | |
#else | |
import haxe.Log.trace in println; | |
import haxe.Log.trace in print; |
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 flash.Lib; | |
import flash.display.Sprite; | |
import flash.display.Bitmap; | |
import flash.display.BitmapData; | |
import openfl.Assets; | |
import openfl.display.Tilesheet; | |
import flash.display.Graphics; | |
import flash.events.Event; | |
class Particle |
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
typedef FlxGraphicAsset = AcceptOneOfFive<String, Class<Dynamic>, CachedGraphics, TextureRegion, BitmapData>; | |
abstract AcceptOneOfFive<T1, T2, T3, T4, T5>(EitherOfFive<T1, T2, T3, T4, T5>) | |
{ | |
public inline function new(e:EitherOfFive<T1, T2, T3, T4, T5>) | |
{ | |
this = e; | |
} | |
public var value(get, never):Dynamic; |
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() { | |
var signal = new Signal<Int,String>(); | |
var conn = signal.connect(function(a, b) { | |
trace('Well done $a $b'); | |
}); | |
signal.dispatch(10, "lol"); | |
} | |
} |
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
Instructions for testing hxScout with hxcpp. | |
FYI, I've tested this using Haxe 3.1.3, OpenFL 2.1.7 (the legacy version, aka _v2, aka not next) in Windows 7. Your mileage may vary. All this is under heavy development, so it may cease working at some point. | |
1) Git checkout (or download) jcward's hxcpp (integration branch), hxtelemetry, and hxScout: | |
https://github.com/jcward/hxScout/archive/master.zip | |
https://github.com/jcward/hxtelemetry/archive/master.zip | |
https://github.com/jcward/hxcpp/archive/integration.zip |
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
<?php | |
define("CLIENT_ID", "REDACTED"); | |
define("CLIENT_SECRET", "REDACTED"); | |
define("GITHUB_URL", "ssl://api.github.com"); | |
define("GITHUB_PATH", "/repos/YOUR-NAME-HERE/YOUR-REPO-HERE/"); | |
define("ISSUESTATE_OPEN", "open"); | |
define("OUTPUT_FILENAME", "/path/to/milestones.json"); | |
$milestones = processIssues(loadIssues()); | |
$fp = fopen(OUTPUT_FILENAME, "w+"); |
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; | |
/** | |
* Avoid holes or border artifacts between tiles. | |
* Sometimes the scale by 1.01 trick doesn't work, a greater value should be used. This method finds the correct value for you. | |
* If you use openfl_legacy, pack your atlas using reduceBorderArtifact option in TexturePacker. There is no need to use this option on openfl_next. | |
* You should update the scale of your tiles if your resize the screen during the game to always have the best scale value. | |
* @author loudo | |
*/ | |
class FixTile | |
{ |
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.Context; | |
import haxe.macro.Expr; | |
class Macros { | |
macro public static function autoInt():Array<Field> { | |
var fields = Context.getBuildFields(); | |
var t = switch(Context.getLocalClass().get().kind) { | |
case KAbstractImpl(c): |
OlderNewer