Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions createjs/easeljs/ColorMatrix.hx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ extern class ColorMatrix {
public function adjustHue(value:Float):ColorMatrix;
public function adjustSaturation(value:Float):ColorMatrix;
public function clone():ColorMatrix;
public function concat(matrix:Array):ColorMatrix;
public function copyMatrix(matrix:Array):ColorMatrix;
public function concat(matrix:ColorMatrix):ColorMatrix;
public function copyMatrix(matrix:ColorMatrix):ColorMatrix;
public function reset():ColorMatrix;
public function toArray():Array<Dynamic>;

Expand Down
1 change: 1 addition & 0 deletions createjs/easeljs/DisplayObject.hx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ extern class DisplayObject extends EventDispatcher{
public var visible:Bool;
public var x:Float;
public var y:Float;
public var transformMatrix:Matrix2D;

public var onClick:Dynamic;
public var onDoubleClick:Dynamic;
Expand Down
3 changes: 2 additions & 1 deletion createjs/easeljs/Graphics.hx
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,11 @@ extern class Graphics {
public function rect(x:Float, y:Float, w:Float, h:Float):Graphics;
public function setStrokeStyle(thickness:Float, ?caps:Dynamic = 0, ?joints:Dynamic = 0, ?miterLimit:Float = 10, ?ignoreScale:Bool = false):Graphics;
public function toString():String;
public function setStrokeDash(?elements:Array<Int>,?offset:Int=0):Graphics;

public static var BASE_64:Dynamic;
public static var Command:Dynamic;
public static var STROKE_CAPS_MAP:Array<String>;
public static var STROKE_JOINTS_MAP :Array<String>;

}
}
91 changes: 91 additions & 0 deletions org/tamina/events/CreateJSEvent.hx
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
package org.tamina.events;

/**
* CreateJSEvent Type
* @class CreateJSEvent
* @module EaselJS
* @static
*/
class CreateJSEvent {


/**
* @property BITMAP_LOAD
* @type String
* @static
* @readOnly
*/
static public inline var BITMAP_LOAD:String='load';


/**
* @property MOUSE_UP
* @type String
* @static
* @readOnly
*/
static public inline var MOUSE_UP:String='pressup';


/**
* @property MOUSE_MOVE
* @type String
* @static
* @readOnly
*/
static public inline var MOUSE_MOVE:String='pressmove';


/**
* @property MOUSE_DOWN
* @type String
* @static
* @readOnly
*/
static public inline var MOUSE_DOWN:String='mousedown';


/**
* @property DOUBLE_CLICK
* @type String
* @static
* @readOnly
*/
static public inline var DOUBLE_CLICK:String='dblclick';


/**
* @property CLICK
* @type String
* @static
* @readOnly
*/
static public inline var CLICK:String='click';


/**
* @property TICKER_TICK
* @type String
* @static
* @readOnly
*/
static public inline var TICKER_TICK:String='tick';


/**
* @property STAGE_MOUSE_UP
* @type String
* @static
* @readOnly
*/
static public inline var STAGE_MOUSE_UP:String='stagemouseup';

/**
* @property STAGE_MOUSE_MOVE
* @type String
* @static
* @readOnly
*/
static public inline var STAGE_MOUSE_MOVE:String='stagemousemove';

}
14 changes: 14 additions & 0 deletions org/tamina/utils/GraphicUtils.hx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package org.tamina.utils;

import createjs.easeljs.Point;
import createjs.easeljs.Rectangle;
class GraphicUtils {


public static function isPointInsideRectangle(p:Point,rec:Rectangle):Bool{
return (p.x > rec.x
&& p.x < rec.x + rec.width
&& p.y > rec.y
&& p.y < rec.y + rec.height);
}
}
63 changes: 63 additions & 0 deletions org/tamina/view/Group.hx
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
package org.tamina.view;

import createjs.easeljs.Container;
import createjs.easeljs.DisplayObject;

/**
* EaselJS Typed Container
* @module EaselJS
* @class Group[T]
* @extends Container
* @constructor
*/
class Group<T : (DisplayObject) > extends Container {

/**
* @constructor
* @method new
* @example
* var _contentGroup = new Group<DrawingElementSprite>();
*
* var item = new TestElementSprite();
* item.x = element.x;
* item.y = element.y;
* _contentGroup.addElement(item);
*
* for (i in 0..._contentGroup.getNumChildren()) {
* _contentGroup.getElementAt(i).dispose();
* }
* _contentGroup.removeAllChildren();
*/
public function new() {
super();
}

/**
* Add an Element to the group
* @method addElement
* @param element {T} the element. T MUST be a DisplayObject
*/
public function addElement(element:T):Void {
this.addChild(element);
}

/**
* Add an Element to the group at a specific position
* @method addElementAt
* @param element {T} the element. T MUST be a DisplayObject
* @param index {Int} the index
*/
public function addElementAt(element:T, index:Float):Void {
this.addChildAt(element,index);
}

/**
* Return an Element of the group at a specific position
* @method getElementAt
* @param index {Int} the index
* @return {T} the element.
*/
public function getElementAt(index:Int):T {
return cast getChildAt(index);
}
}
59 changes: 59 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"name": "createjs-haxe",
"description": "The project includes Haxe externs for CreateJS libraries: EaselJS, TweenJS, SoundJS, PreloadJS",
"keywords": [
"haxe",
"createjs",
"easeljs",
"tweenjs",
"preloadjs",
"canvas"
],
"author": {
"name": "Nikolay Glushchenko"
},
"version": "1.7.0",
"license": "MIT",
"engines": {
"node": ">=0.8.0"
},
"main": "",
"preferGlobal": false,
"homepage": "https://github.com/nickalie/CreateJS-Haxe/",
"bugs": {
"url": "https://github.com/nickalie/CreateJS-Haxe/issues"
},
"repository": {
"type": "git",
"url": "git://github.com/nickalie/CreateJS-Haxe.git"
},
"dependencies": {},
"_id": "createjs-haxe@1.6.5",
"_shasum": "762a6bb1764482c1d001d2d354c23fdd1069f004",
"_from": "createjs-haxe@>=1.5.6",
"_npmVersion": "1.4.9",
"_npmUser": {
"name": "haxelib.js",
"email": "haxelibjs@tamina-online.com"
},
"maintainers": [
{
"name": "damoebius",
"email": "damo@tamina-online.com"
},
{
"name": "haxelib.js",
"email": "haxelibjs@tamina-online.com"
}
],
"dist": {
"shasum": "304c5e6a81681beb7cd01f3d761e14050e49dc9a",
"tarball": "http://registry.npmjs.org/createjs-haxe/-/createjs-haxe-1.6.5.tgz"
},
"_npmOperationalInternal": {
"host": "packages-5-east.internal.npmjs.com",
"tmp": "tmp/createjs-haxe-1.6.5.tgz_1455115044626_0.04731920990161598"
},
"directories": {},
"_resolved": "https://registry.npmjs.org/createjs-haxe/-/createjs-haxe-1.6.5.tgz"
}