Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
On the edge

nanjizal nanjizal

💭
On the edge
View GitHub Profile
@nanjizal
nanjizal / Main.hx
Last active Jun 6, 2022
Demo of 256 color in neko
View Main.hx
import SysPrint256;
class Main {
static final text = 'Hello';
/**
* Demo of 256 color in terminal
**/
static public function main():Void {
var cyan = 51;
var purple = 57;
var colortxt = fontColor( text, cyan, purple );
@nanjizal
nanjizal / Backwards.hx
Created May 28, 2022
Backwards Iterator
View Backwards.hx
@:access(IntIterator.min, IntIterator.max )
class IntIterStart {
public var start: Int;
public var max: Int;
public function new( min_: Int, max_: Int ){
start = min_;
max = max_;
}
}
@:transitive
@nanjizal
nanjizal / CornerContourContact.hx
Created May 14, 2022
CornerContourContact without contact
View CornerContourContact.hx
package contacthx.testdemos;
/* WebGL based example using CornerContour totally overkill but perhaps easyier to setup for me */
import cornerContour.io.Float32Array;
import cornerContour.io.ColorTriangles2D;
import cornerContour.io.IteratorRange;
import cornerContour.io.Array2DTriangles;
// contour code
import cornerContour.Sketcher;
View README_HAXE.md

Haxe Lapce Code Editor

Initial Aim

Haxe Compiler Targets

The following table gives an overview of available Haxe targets taken from haxe site.

@nanjizal
nanjizal / Test.hx
Created Oct 19, 2021
TwoLines first implementation of Trilateral CornerContour in haxe flash - 25 September 2017
View Test.hx
package;
import TwoLines;
import flash.display.Graphics;
class Test {
static function main() {
var cur = flash.Lib.current;
var sp = new flash.display.Sprite();
cur.addChild(sp);
var g = sp.graphics;
TwoLines.testColors = true; // sets some default colors.
@nanjizal
nanjizal / index.html
Created Oct 14, 2021
Example of thick gradient and half curved ends, using cornerContour
View index.html
<!DOCTYPE html><meta charset="UTF-8"><html><body><script src="test.js"></script></body></html>
@nanjizal
nanjizal / PlayState.hx
Last active Oct 5, 2021
Broken Fixel test of cornerContour
View PlayState.hx
package;
import cornerContour.io.Float32Array;
// contour code
import cornerContour.Sketcher;
import cornerContour.SketcherGrad;
import cornerContour.Pen2D;
import cornerContour.Pen2DGrad;
import cornerContour.StyleSketch;
@nanjizal
nanjizal / cornerContourTests.hxml
Created Oct 3, 2021
Experiments with CornerContour
View cornerContourTests.hxml
#cornerContour installs
--cmd haxelib install fracs
--next
--cmd haxelib install justPath
--next
--cmd haxelib install cornerContour
--next
--cmd haxelib install htmlHelper
--next
@nanjizal
nanjizal / setupAtlasMaking.hxml
Created Apr 27, 2021
code to setup atlass making.
View setupAtlasMaking.hxml
-cmd haxelib git format https://github.com/haxefoundation/format
--next
-cmd haxelib git hxRectPack2D https://github.com/nanjizal/hxRectPack2D
--next
-cmd haxelib git hxPixels https://github.com/azrafe7/hxPixels
--next
-cmd haxelib git folder https://github.com/nanjizal/folder
--next
-cmd git clone https://github.com/nanjizal/hxRectPack2D_pixel.git
@nanjizal
nanjizal / Rose.hx
Last active Apr 26, 2021
Rose.hx experimental add to fracs, used for working with Compass directions.
View Rose.hx
package fracs;
import fracs.Fraction;
import fracs.Angles;
import fracs.ZeroTo2pi;
// Compass Rose
@:forward
enum abstract Rose32( Int ) to Int from Int {
var N = 0;
var NbE = 1;
var NNE;