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
(function ($hx_exports, $global) { "use strict"; var $hx_script = (function (exports, global) { // Generated by Haxe 4.3.3 | |
(function ($hx_exports, $global) { "use strict"; | |
$hx_exports["lime"] = $hx_exports["lime"] || {}; | |
var $hxClasses = {},$estr = function() { return js_Boot.__string_rec(this,''); },$hxEnums = $hxEnums || {},$_; | |
function $extend(from, fields) { | |
var proto = Object.create(from); | |
for (var name in fields) proto[name] = fields[name]; | |
if( fields.toString !== Object.prototype.toString ) proto.toString = fields.toString; | |
return proto; | |
} |
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 iterMagic; | |
https://try.haxe.org/#05CF3741 | |
/* | |
Basic data structure to work with images made of Int, does not provide color specific manipulation. | |
*/ | |
import haxe.ds.GenericStack; // assess to GenericCell | |
import haxe.ds.Vector; | |
typedef BytesInt = haxe.io.Bytes; | |
typedef ArrInt = Array<Int>; |
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
function main() { | |
trace("Freya Hermite Monotonic curve"); | |
var w = 0.5; | |
var x = 0.; | |
for( x10 in 0...10 ){ | |
x = x10/10; | |
trace( x + ' : ' + cubicMidpointEaseInOut( x, w ) ); | |
} | |
trace( 1. + ' : ' + cubicMidpointEaseInOut( 1., 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
import haxe.ds.Vector; | |
function main() { | |
var a: A<ArrInt> = A.arrInt( 10 ); | |
var v: A<VecInt> = A.vecInt( 10 ); | |
a[3]=1; | |
v[2]=2; | |
trace( a[3] ); | |
trace( v[2] ); | |
} | |
typedef ArrInt = Array<Int>; |
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
//https://try.haxe.org/#3C9bD72e | |
import haxe.ds.GenericStack; // assess to GenericCell | |
enum abstract ImageType(Int) { | |
var BYTES; | |
var ARRAY; | |
var UINT32ARRAY; | |
var VECTOR; | |
var GENERICSTACK; | |
} |
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
//https://try.haxe.org/#d6768054 | |
enum abstract ImageType( Int ) { | |
var BYTES; | |
var ARRAY; | |
var UINT32ARRAY; | |
var VECTOR; | |
} | |
@:access( IDataImage ) | |
@:transitive | |
@:multiType |
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 HolderImage{ | |
public var image: IDataImage; | |
public function new( image: IDataImage ){ | |
this.image = image; | |
} | |
} | |
class Test { | |
static function main() { | |
var holderImage = new HolderImage( new ByteImage( 100, 100 ) ); | |
var b = new UInt32ArrayImage(100, 100); |
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
//https://try.haxe.org/#A9A751b4 | |
import haxe.io.UInt32Array; | |
import haxe.io.Bytes; | |
class Test { | |
static function main() { | |
ImageStruct.imageType = BYTEIMAGE; | |
var img = new Pixelimage( 10, 10 ); | |
img.image[0] = 0xFFFF0000; | |
ImageStruct.imageType = UINT32ARRAY; | |
var img2 = new Pixelimage( 10, 10 ); |
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
// https://try.haxe.org/#f7d671F9 | |
import haxe.io.Bytes; | |
import haxe.io.UInt32Array; | |
function main() { | |
trace("Haxe is great!"); | |
var width = 10; | |
var height = 10; | |
var a1 = new ByteImage( width, height ); | |
a1.set( 1, 0x1234567A ); | |
trace( a1.get( 1 ) ); |
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
//https://try.haxe.org/#100D46B4 | |
function main() { | |
trace( 'Math.PI' ); | |
var val = [ tau+pie | |
, tau+pie_2 | |
, tau | |
, tau3_4 | |
, pie | |
, pie_2 | |
, 0 |
NewerOlder