From b5703c25926adfc01026f0d5dbd28d497d7e5536 Mon Sep 17 00:00:00 2001 From: Adi Date: Wed, 10 May 2017 09:30:45 +0100 Subject: [PATCH] cleanup --- src/pixi/core/RenderOptions.hx | 15 ++++---- src/pixi/core/display/DisplayObject.hx | 47 +++++++++++++------------- 2 files changed, 32 insertions(+), 30 deletions(-) diff --git a/src/pixi/core/RenderOptions.hx b/src/pixi/core/RenderOptions.hx index 469c710b..5e8c3681 100644 --- a/src/pixi/core/RenderOptions.hx +++ b/src/pixi/core/RenderOptions.hx @@ -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; } \ No newline at end of file diff --git a/src/pixi/core/display/DisplayObject.hx b/src/pixi/core/display/DisplayObject.hx index 17f21490..269fe86e 100644 --- a/src/pixi/core/display/DisplayObject.hx +++ b/src/pixi/core/display/DisplayObject.hx @@ -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 { @@ -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 @@ -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 @@ -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 @@ -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; } \ No newline at end of file