Skip to content
This repository has been archived by the owner on Feb 23, 2023. It is now read-only.

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
adireddy committed May 10, 2017
1 parent d095e90 commit b5703c2
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 30 deletions.
15 changes: 9 additions & 6 deletions src/pixi/core/RenderOptions.hx
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,20 @@ import js.html.CanvasElement;
typedef RenderOptions = {
@:optional var width:Float;
@:optional var height:Float;
@:optional var noWebGL:Bool;
@:optional var transparent:Bool;
@:optional var antialias:Bool;
@:optional var preserveDrawingBuffer:Bool;
@:optional var resolution:Float;
@:optional var forceCanvas:Bool;
@:optional var legacy:Bool;
@:optional var sharedTicker:Bool;
@:optional var sharedLoader:Bool;

@:optional var noWebGL:Bool;
@:optional var view:CanvasElement;
@:optional var resolution:Float;
@:optional var antialias:Bool;
@:optional var forceFXAA:Bool;
@:optional var autoResize:Bool;
@:optional var transparent:Bool;
@:optional var backgroundColor:Int;
@:optional var clearBeforeRender:Bool;
@:optional var preserveDrawingBuffer:Bool;
@:optional var roundPixels:Bool;
@:optional var legacy:Bool;
}
47 changes: 23 additions & 24 deletions src/pixi/core/display/DisplayObject.hx
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,6 @@ import pixi.core.math.Point;
import pixi.interaction.InteractiveTarget;
import haxe.extern.EitherType;

typedef DestroyOptions = {
/**
* {boolean} [options.children=false] - if set to true, all the children will have their destroy
* method called as well. 'options' will be passed on to those calls.
*/
?children:Bool,

/**
* {boolean} [options.texture=false] - Only used for child Sprites if options.children is set to true
* Should it destroy the texture of the child sprite
*/
?texture:Bool,

/**
* {boolean} [options.baseTexture=false] - Only used for child Sprites if options.children is set to true
* Should it destroy the base texture of the child sprite
*/
?baseTexture:Bool,
}


@:native("PIXI.DisplayObject")
extern class DisplayObject extends InteractiveTarget {

Expand All @@ -43,7 +22,7 @@ extern class DisplayObject extends InteractiveTarget {
/**
* Retrieves the bounds of the displayObject as a rectangle object
*
* @param skipUpdate {Matrix} setting to true will stop the transforms of the scene graph from being updated.
* @param skipUpdate {Matrix} setting to true will stop the transforms of the scene graph from being updated.
* This means the calculation returned MAY be out of date BUT will give you a nice performance boost
* @param rect {Rectangle} Optional rectangle to store the result of the bounds calculation
* @return {Rectangle} the rectangular bounding area
Expand All @@ -65,7 +44,7 @@ extern class DisplayObject extends InteractiveTarget {
* @param skipUpdate {Bool} Should we skip the update transform
* @return {Point} A point object representing the position of this object
*/
function toGlobal(position:Point, ?point:Point, skipUpdate:Bool = false):Point;
function toGlobal(position:Point, ?point:Point, ?skipUpdate:Bool):Point;

/**
* Calculates the local position of the display object relative to another point
Expand Down Expand Up @@ -106,7 +85,7 @@ extern class DisplayObject extends InteractiveTarget {
* @param [pivotY=0] {Float} The Y pivot value
* @return {DisplayObject}
*/
function setTransform(?x:Float = 0, ?y:Float = 0, ?scaleX:Float = 0, ?scaleY:Float = 0, ?rotation:Float = 0, ?skewX:Float = 0, ?skewY:Float = 0, ?pivotX:Float = 0, ?pivotY:Float = 0):DisplayObject;
function setTransform(?x:Float, ?y:Float, ?scaleX:Float, ?scaleY:Float, ?rotation:Float, ?skewX:Float, ?skewY:Float, ?pivotX:Float, ?pivotY:Float):DisplayObject;

/**
* Base destroy method for generic display objects
Expand Down Expand Up @@ -314,4 +293,24 @@ extern class DisplayObject extends InteractiveTarget {
* @todo Needs docs.
*/
var tabIndex:Int;
}

typedef DestroyOptions = {
/**
* {boolean} [options.children=false] - if set to true, all the children will have their destroy
* method called as well. 'options' will be passed on to those calls.
*/
@:optional var children:Bool;

/**
* {boolean} [options.texture=false] - Only used for child Sprites if options.children is set to true
* Should it destroy the texture of the child sprite
*/
@:optional var texture:Bool;

/**
* {boolean} [options.baseTexture=false] - Only used for child Sprites if options.children is set to true
* Should it destroy the base texture of the child sprite
*/
@:optional var baseTexture:Bool;
}

0 comments on commit b5703c2

Please sign in to comment.