UNPKG

starling-framework

Version:

A fast, productive library for 2D cross-platform development.

709 lines 190 kB
<!doctype html> <html class="default no-js"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>DisplayObject | starling-framework</title> <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="../assets/css/main.css"> </head> <body> <header> <div class="tsd-page-toolbar"> <div class="container"> <div class="table-wrap"> <div class="table-cell" id="tsd-search" data-index="../assets/js/search.js" data-base=".."> <div class="field"> <label for="tsd-search-field" class="tsd-widget search no-caption">Search</label> <input id="tsd-search-field" type="text" /> </div> <ul class="results"> <li class="state loading">Preparing search index...</li> <li class="state failure">The search index is not available</li> </ul> <a href="../index.html" class="title">starling-framework</a> </div> <div class="table-cell" id="tsd-widgets"> <div id="tsd-filter"> <a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a> <div class="tsd-filter-group"> <div class="tsd-select" id="tsd-filter-visibility"> <span class="tsd-select-label">All</span> <ul class="tsd-select-list"> <li data-value="public">Public</li> <li data-value="protected">Public/Protected</li> <li data-value="private" class="selected">All</li> </ul> </div> <input type="checkbox" id="tsd-filter-inherited" checked /> <label class="tsd-widget" for="tsd-filter-inherited">Inherited</label> <input type="checkbox" id="tsd-filter-externals" checked /> <label class="tsd-widget" for="tsd-filter-externals">Externals</label> <input type="checkbox" id="tsd-filter-only-exported" /> <label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label> </div> </div> <a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a> </div> </div> </div> </div> <div class="tsd-page-title"> <div class="container"> <ul class="tsd-breadcrumb"> <li> <a href="../index.html">starling</a> </li> <li> <a href="../modules/starling.display.html">display</a> </li> <li> <a href="starling.display.displayobject.html">DisplayObject</a> </li> </ul> <h1>Class DisplayObject</h1> </div> </div> </header> <div class="container container-main"> <div class="row"> <div class="col-8 col-content"> <section class="tsd-panel tsd-comment"> <div class="tsd-comment tsd-typography"> <div class="lead"> <p> The DisplayObject class is the base class for all objects that are rendered on the screen.</p> </div> <p><strong>The Display Tree</strong></p> <p>In Starling, all displayable objects are organized in a display tree. Only objects that are part of the display tree will be displayed (rendered).</p> <p>The display tree consists of leaf nodes (Image, Quad) that will be rendered directly to the screen, and of container nodes (subclasses of &quot;DisplayObjectContainer&quot;, like &quot;Sprite&quot;). A container is simply a display object that has child nodes - which can, again, be either leaf nodes or other containers.</p> <p>At the base of the display tree, there is the Stage, which is a container, too. To create a Starling application, you create a custom Sprite subclass, and Starling will add an instance of this class to the stage.</p> <p>A display object has properties that define its position in relation to its parent (x, y), as well as its rotation and scaling factors (scaleX, scaleY). Use the <code>alpha</code> and <code>visible</code> properties to make an object translucent or invisible.</p> <p>Every display object may be the target of touch events. If you don&#39;t want an object to be touchable, you can disable the &quot;touchable&quot; property. When it&#39;s disabled, neither the object nor its children will receive any more touch events.</p> <p> <strong>Transforming coordinates</strong></p> <p>Within the display tree, each object has its own local coordinate system. If you rotate a container, you rotate that coordinate system - and thus all the children of the container.</p> <p>Sometimes you need to know where a certain point lies relative to another coordinate system. That&#39;s the purpose of the method <code>getTransformationMatrix</code>. It will create a matrix that represents the transformation of a point in one coordinate system to another.</p> <p> <strong>Customization</strong></p> <p>DisplayObject is an abstract class, which means you cannot instantiate it directly, but have to use one of its many subclasses instead. For leaf nodes, this is typically &#39;Mesh&#39; or its subclasses &#39;Quad&#39; and &#39;Image&#39;. To customize rendering of these objects, you can use fragment filters (via the <code>filter</code>-property on &#39;DisplayObject&#39;) or mesh styles (via the <code>style</code>-property on &#39;Mesh&#39;). Look at the respective class documentation for more information.</p> <p> @see DisplayObjectContainer @see Sprite @see Stage @see Mesh @see starling.filters.FragmentFilter @see starling.styles.MeshStyle</p> </div> </section> <section class="tsd-panel tsd-hierarchy"> <h3>Hierarchy</h3> <ul class="tsd-hierarchy"> <li> <a href="starling.events.eventdispatcher.html" class="tsd-signature-type">EventDispatcher</a> <ul class="tsd-hierarchy"> <li> <span class="target">DisplayObject</span> <ul class="tsd-hierarchy"> <li> <a href="starling.display.mesh.html" class="tsd-signature-type">Mesh</a> </li> <li> <a href="starling.display.displayobjectcontainer.html" class="tsd-signature-type">DisplayObjectContainer</a> </li> </ul> </li> </ul> </li> </ul> </section> <section class="tsd-panel-group tsd-index-group"> <h2>Index</h2> <section class="tsd-panel tsd-index-panel"> <div class="tsd-index-content"> <section class="tsd-index-section tsd-is-inherited tsd-is-external"> <h3>Constructors</h3> <ul class="tsd-index-list"> <li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited tsd-is-external"><a href="starling.display.displayobject.html#constructor" class="tsd-kind-icon">constructor</a></li> </ul> </section> <section class="tsd-index-section tsd-is-external"> <h3>Properties</h3> <ul class="tsd-index-list"> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.display.displayobject.html#alpha" class="tsd-kind-icon">alpha</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.display.displayobject.html#base" class="tsd-kind-icon">base</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.display.displayobject.html#blendmode" class="tsd-kind-icon">blend<wbr>Mode</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.display.displayobject.html#bounds" class="tsd-kind-icon">bounds</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.display.displayobject.html#filter" class="tsd-kind-icon">filter</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.display.displayobject.html#height" class="tsd-kind-icon">height</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.display.displayobject.html#is3d" class="tsd-kind-icon">is3D</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.display.displayobject.html#mask" class="tsd-kind-icon">mask</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.display.displayobject.html#maskinverted" class="tsd-kind-icon">mask<wbr>Inverted</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.display.displayobject.html#name" class="tsd-kind-icon">name</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.display.displayobject.html#parent" class="tsd-kind-icon">parent</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.display.displayobject.html#pivotx" class="tsd-kind-icon">pivotX</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.display.displayobject.html#pivoty" class="tsd-kind-icon">pivotY</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.display.displayobject.html#requiresredraw" class="tsd-kind-icon">requires<wbr>Redraw</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.display.displayobject.html#root" class="tsd-kind-icon">root</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.display.displayobject.html#rotation" class="tsd-kind-icon">rotation</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.display.displayobject.html#scale" class="tsd-kind-icon">scale</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.display.displayobject.html#scalex" class="tsd-kind-icon">scaleX</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.display.displayobject.html#scaley" class="tsd-kind-icon">scaleY</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.display.displayobject.html#skewx" class="tsd-kind-icon">skewX</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.display.displayobject.html#skewy" class="tsd-kind-icon">skewY</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.display.displayobject.html#stage" class="tsd-kind-icon">stage</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.display.displayobject.html#touchable" class="tsd-kind-icon">touchable</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.display.displayobject.html#transformationmatrix" class="tsd-kind-icon">transformation<wbr>Matrix</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.display.displayobject.html#transformationmatrix3d" class="tsd-kind-icon">transformation<wbr>Matrix3D</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.display.displayobject.html#usehandcursor" class="tsd-kind-icon">use<wbr>Hand<wbr>Cursor</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.display.displayobject.html#visible" class="tsd-kind-icon">visible</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.display.displayobject.html#width" class="tsd-kind-icon">width</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.display.displayobject.html#x" class="tsd-kind-icon">x</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.display.displayobject.html#y" class="tsd-kind-icon">y</a></li> </ul> </section> <section class="tsd-index-section tsd-is-external"> <h3>Methods</h3> <ul class="tsd-index-list"> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-external"><a href="starling.display.displayobject.html#addeventlistener" class="tsd-kind-icon">add<wbr>Event<wbr>Listener</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.display.displayobject.html#alignpivot" class="tsd-kind-icon">align<wbr>Pivot</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-external"><a href="starling.display.displayobject.html#dispatchevent" class="tsd-kind-icon">dispatch<wbr>Event</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-external"><a href="starling.display.displayobject.html#dispatcheventwith" class="tsd-kind-icon">dispatch<wbr>Event<wbr>With</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.display.displayobject.html#dispose" class="tsd-kind-icon">dispose</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.display.displayobject.html#drawtobitmapdata" class="tsd-kind-icon">draw<wbr>ToBitmap<wbr>Data</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.display.displayobject.html#getbounds" class="tsd-kind-icon">get<wbr>Bounds</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.display.displayobject.html#gettransformationmatrix" class="tsd-kind-icon">get<wbr>Transformation<wbr>Matrix</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.display.displayobject.html#gettransformationmatrix3d" class="tsd-kind-icon">get<wbr>Transformation<wbr>Matrix3D</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.display.displayobject.html#get_alpha" class="tsd-kind-icon">get_<wbr>alpha</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.display.displayobject.html#get_base" class="tsd-kind-icon">get_<wbr>base</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.display.displayobject.html#get_blendmode" class="tsd-kind-icon">get_<wbr>blend<wbr>Mode</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.display.displayobject.html#get_bounds" class="tsd-kind-icon">get_<wbr>bounds</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.display.displayobject.html#get_filter" class="tsd-kind-icon">get_<wbr>filter</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.display.displayobject.html#get_height" class="tsd-kind-icon">get_<wbr>height</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.display.displayobject.html#get_is3d" class="tsd-kind-icon">get_<wbr>is3D</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.display.displayobject.html#get_mask" class="tsd-kind-icon">get_<wbr>mask</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.display.displayobject.html#get_maskinverted" class="tsd-kind-icon">get_<wbr>mask<wbr>Inverted</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.display.displayobject.html#get_name" class="tsd-kind-icon">get_<wbr>name</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.display.displayobject.html#get_parent" class="tsd-kind-icon">get_<wbr>parent</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.display.displayobject.html#get_pivotx" class="tsd-kind-icon">get_<wbr>pivotX</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.display.displayobject.html#get_pivoty" class="tsd-kind-icon">get_<wbr>pivotY</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.display.displayobject.html#get_requiresredraw" class="tsd-kind-icon">get_<wbr>requires<wbr>Redraw</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.display.displayobject.html#get_root" class="tsd-kind-icon">get_<wbr>root</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.display.displayobject.html#get_rotation" class="tsd-kind-icon">get_<wbr>rotation</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.display.displayobject.html#get_scale" class="tsd-kind-icon">get_<wbr>scale</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.display.displayobject.html#get_scalex" class="tsd-kind-icon">get_<wbr>scaleX</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.display.displayobject.html#get_scaley" class="tsd-kind-icon">get_<wbr>scaleY</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.display.displayobject.html#get_skewx" class="tsd-kind-icon">get_<wbr>skewX</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.display.displayobject.html#get_skewy" class="tsd-kind-icon">get_<wbr>skewY</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.display.displayobject.html#get_stage" class="tsd-kind-icon">get_<wbr>stage</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.display.displayobject.html#get_touchable" class="tsd-kind-icon">get_<wbr>touchable</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.display.displayobject.html#get_transformationmatrix" class="tsd-kind-icon">get_<wbr>transformation<wbr>Matrix</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.display.displayobject.html#get_transformationmatrix3d" class="tsd-kind-icon">get_<wbr>transformation<wbr>Matrix3D</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.display.displayobject.html#get_usehandcursor" class="tsd-kind-icon">get_<wbr>use<wbr>Hand<wbr>Cursor</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.display.displayobject.html#get_visible" class="tsd-kind-icon">get_<wbr>visible</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.display.displayobject.html#get_width" class="tsd-kind-icon">get_<wbr>width</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.display.displayobject.html#get_x" class="tsd-kind-icon">get_<wbr>x</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.display.displayobject.html#get_y" class="tsd-kind-icon">get_<wbr>y</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.display.displayobject.html#globaltolocal" class="tsd-kind-icon">global<wbr>ToLocal</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.display.displayobject.html#globaltolocal3d" class="tsd-kind-icon">global<wbr>ToLocal3D</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-external"><a href="starling.display.displayobject.html#haseventlistener" class="tsd-kind-icon">has<wbr>Event<wbr>Listener</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.display.displayobject.html#hittest" class="tsd-kind-icon">hit<wbr>Test</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.display.displayobject.html#hittestmask" class="tsd-kind-icon">hit<wbr>Test<wbr>Mask</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.display.displayobject.html#local3dtoglobal" class="tsd-kind-icon">local3DTo<wbr>Global</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.display.displayobject.html#localtoglobal" class="tsd-kind-icon">local<wbr>ToGlobal</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-external"><a href="starling.display.displayobject.html#removeeventlistener" class="tsd-kind-icon">remove<wbr>Event<wbr>Listener</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-external"><a href="starling.display.displayobject.html#removeeventlisteners" class="tsd-kind-icon">remove<wbr>Event<wbr>Listeners</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.display.displayobject.html#removefromparent" class="tsd-kind-icon">remove<wbr>From<wbr>Parent</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.display.displayobject.html#render" class="tsd-kind-icon">render</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.display.displayobject.html#setrequiresredraw" class="tsd-kind-icon">set<wbr>Requires<wbr>Redraw</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.display.displayobject.html#set_alpha" class="tsd-kind-icon">set_<wbr>alpha</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.display.displayobject.html#set_blendmode" class="tsd-kind-icon">set_<wbr>blend<wbr>Mode</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.display.displayobject.html#set_filter" class="tsd-kind-icon">set_<wbr>filter</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.display.displayobject.html#set_height" class="tsd-kind-icon">set_<wbr>height</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.display.displayobject.html#set_mask" class="tsd-kind-icon">set_<wbr>mask</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.display.displayobject.html#set_maskinverted" class="tsd-kind-icon">set_<wbr>mask<wbr>Inverted</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.display.displayobject.html#set_name" class="tsd-kind-icon">set_<wbr>name</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.display.displayobject.html#set_pivotx" class="tsd-kind-icon">set_<wbr>pivotX</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.display.displayobject.html#set_pivoty" class="tsd-kind-icon">set_<wbr>pivotY</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.display.displayobject.html#set_rotation" class="tsd-kind-icon">set_<wbr>rotation</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.display.displayobject.html#set_scale" class="tsd-kind-icon">set_<wbr>scale</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.display.displayobject.html#set_scalex" class="tsd-kind-icon">set_<wbr>scaleX</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.display.displayobject.html#set_scaley" class="tsd-kind-icon">set_<wbr>scaleY</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.display.displayobject.html#set_skewx" class="tsd-kind-icon">set_<wbr>skewX</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.display.displayobject.html#set_skewy" class="tsd-kind-icon">set_<wbr>skewY</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.display.displayobject.html#set_touchable" class="tsd-kind-icon">set_<wbr>touchable</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.display.displayobject.html#set_transformationmatrix" class="tsd-kind-icon">set_<wbr>transformation<wbr>Matrix</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.display.displayobject.html#set_usehandcursor" class="tsd-kind-icon">set_<wbr>use<wbr>Hand<wbr>Cursor</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.display.displayobject.html#set_visible" class="tsd-kind-icon">set_<wbr>visible</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.display.displayobject.html#set_width" class="tsd-kind-icon">set_<wbr>width</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.display.displayobject.html#set_x" class="tsd-kind-icon">set_<wbr>x</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.display.displayobject.html#set_y" class="tsd-kind-icon">set_<wbr>y</a></li> </ul> </section> </div> </section> </section> <section class="tsd-panel-group tsd-member-group tsd-is-inherited tsd-is-external"> <h2>Constructors</h2> <section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited tsd-is-external"> <a name="constructor" class="tsd-anchor"></a> <h3>constructor</h3> <ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited tsd-is-external"> <li class="tsd-signature tsd-kind-icon">new <wbr>Display<wbr>Object<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="starling.display.displayobject.html" class="tsd-signature-type">DisplayObject</a></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="starling.events.eventdispatcher.html">EventDispatcher</a>.<a href="starling.events.eventdispatcher.html#constructor">constructor</a></p> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/events/EventDispatcher.d.ts#L27">lib/starling/events/EventDispatcher.d.ts:27</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Creates an EventDispatcher.</p> </div> </div> <h4 class="tsd-returns-title">Returns <a href="starling.display.displayobject.html" class="tsd-signature-type">DisplayObject</a></h4> </li> </ul> </section> </section> <section class="tsd-panel-group tsd-member-group tsd-is-external"> <h2>Properties</h2> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external"> <a name="alpha" class="tsd-anchor"></a> <h3>alpha</h3> <div class="tsd-signature tsd-kind-icon">alpha<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/display/DisplayObject.d.ts#L331">lib/starling/display/DisplayObject.d.ts:331</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>The opacity of the object. 0 = transparent, 1 = opaque. @default 1</p> </div> </div> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external"> <a name="base" class="tsd-anchor"></a> <h3>base</h3> <div class="tsd-signature tsd-kind-icon">base<span class="tsd-signature-symbol">:</span> <a href="starling.display.displayobject.html" class="tsd-signature-type">DisplayObject</a></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/display/DisplayObject.d.ts#L417">lib/starling/display/DisplayObject.d.ts:417</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>The topmost object in the display tree the object is part of.</p> </div> </div> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external"> <a name="blendmode" class="tsd-anchor"></a> <h3>blend<wbr>Mode</h3> <div class="tsd-signature tsd-kind-icon">blend<wbr>Mode<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/display/DisplayObject.d.ts#L348">lib/starling/display/DisplayObject.d.ts:348</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>The blend mode determines how the object is blended with the objects underneath.</p> </div> <dl class="tsd-comment-tags"> <dt>default</dt> <dd><p>auto</p> </dd> <dt>see</dt> <dd><p>starling.display.BlendMode</p> </dd> </dl> </div> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external"> <a name="bounds" class="tsd-anchor"></a> <h3>bounds</h3> <div class="tsd-signature tsd-kind-icon">bounds<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Rectangle</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/display/DisplayObject.d.ts#L259">lib/starling/display/DisplayObject.d.ts:259</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>The bounds of the object relative to the local coordinates of the parent.</p> </div> </div> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external"> <a name="filter" class="tsd-anchor"></a> <h3>filter</h3> <div class="tsd-signature tsd-kind-icon">filter<span class="tsd-signature-symbol">:</span> <a href="starling.filters.fragmentfilter.html" class="tsd-signature-type">FragmentFilter</a></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/display/DisplayObject.d.ts#L371">lib/starling/display/DisplayObject.d.ts:371</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>The filter that is attached to the display object. The <code>starling.filters</code> package contains several classes that define specific filters you can use. To combine several filters, assign an instance of the <code>FilterChain</code> class; to remove all filters, assign <code>null</code>.</p> </div> <p>Beware that a filter instance may only be used on one object at a time! Furthermore, when you remove or replace a filter, it is NOT disposed automatically (since you might want to reuse it on a different object).</p> <p> @default null @see starling.filters.FragmentFilter @see starling.filters.FilterChain</p> </div> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external"> <a name="height" class="tsd-anchor"></a> <h3>height</h3> <div class="tsd-signature tsd-kind-icon">height<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/display/DisplayObject.d.ts#L272">lib/starling/display/DisplayObject.d.ts:272</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>The height of the object in pixels. Note that for objects in a 3D space (connected to a Sprite3D), this value might not be accurate until the object is part of the display list.</p> </div> </div> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external"> <a name="is3d" class="tsd-anchor"></a> <h3>is3D</h3> <div class="tsd-signature tsd-kind-icon">is3D<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/display/DisplayObject.d.ts#L249">lib/starling/display/DisplayObject.d.ts:249</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Indicates if this object or any of its parents is a &#39;Sprite3D&#39; object.</p> </div> </div> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external"> <a name="mask" class="tsd-anchor"></a> <h3>mask</h3> <div class="tsd-signature tsd-kind-icon">mask<span class="tsd-signature-symbol">:</span> <a href="starling.display.displayobject.html" class="tsd-signature-type">DisplayObject</a></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/display/DisplayObject.d.ts#L403">lib/starling/display/DisplayObject.d.ts:403</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>The display object that acts as a mask for the current object. Assign <code>null</code> to remove it.</p> </div> <p>A pixel of the masked display object will only be drawn if it is within one of the mask&#39;s polygons. Texture pixels and alpha values of the mask are not taken into account. The mask object itself is never visible.</p> <p>If the mask is part of the display list, masking will occur at exactly the location it occupies on the stage. If it is not, the mask will be placed in the local coordinate system of the target object (as if it was one of its children).</p> <p>For rectangular masks, you can use simple quads; for other forms (like circles or arbitrary shapes) it is recommended to use a &#39;Canvas&#39; instance.</p> <p><strong>Note:</strong> a mask will typically cause at least two additional draw calls: one to draw the mask to the stencil buffer and one to erase it. However, if the mask object is an instance of <code>starling.display.Quad</code> and is aligned parallel to the stage axes, rendering will be optimized: instead of using the stencil buffer, the object will be clipped using the scissor rectangle. That&#39;s faster and reduces the number of draw calls, so make use of this when possible.</p> <p><strong>Note:</strong> AIR apps require the <code>depthAndStencil</code> node in the application descriptor XMLs to be enabled! Otherwise, stencil masking won&#39;t work.</p> <p> @see Canvas @default null</p> </div> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external"> <a name="maskinverted" class="tsd-anchor"></a> <h3>mask<wbr>Inverted</h3> <div class="tsd-signature tsd-kind-icon">mask<wbr>Inverted<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/display/DisplayObject.d.ts#L408">lib/starling/display/DisplayObject.d.ts:408</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Indicates if the masked region of this object is set to be inverted.</p> </div> </div> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external"> <a name="name" class="tsd-anchor"></a> <h3>name</h3> <div class="tsd-signature tsd-kind-icon">name<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/display/DisplayObject.d.ts#L354">lib/starling/display/DisplayObject.d.ts:354</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>The name of the display object (default: null). Used by &#39;getChildByName()&#39; of display object containers.</p> </div> </div> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external"> <a name="parent" class="tsd-anchor"></a> <h3>parent</h3> <div class="tsd-signature tsd-kind-icon">parent<span class="tsd-signature-symbol">:</span> <a href="starling.display.displayobjectcontainer.html" class="tsd-signature-type">DisplayObjectContainer</a></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/display/DisplayObject.d.ts#L413">lib/starling/display/DisplayObject.d.ts:413</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>The display object container that contains this display object.</p> </div> </div> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external"> <a name="pivotx" class="tsd-anchor"></a> <h3>pivotX</h3> <div class="tsd-signature tsd-kind-icon">pivotX<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/display/DisplayObject.d.ts#L287">lib/starling/display/DisplayObject.d.ts:287</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>The x coordinate of the object&#39;s origin in its own coordinate space (default: 0).</p> </div> </div> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external"> <a name="pivoty" class="tsd-anchor"></a> <h3>pivotY</h3> <div class="tsd-signature tsd-kind-icon">pivotY<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/display/DisplayObject.d.ts#L292">lib/starling/display/DisplayObject.d.ts:292</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>The y coordinate of the object&#39;s origin in its own coordinate space (default: 0).</p> </div> </div> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external"> <a name="requiresredraw" class="tsd-anchor"></a> <h3>requires<wbr>Redraw</h3> <div class="tsd-signature tsd-kind-icon">requires<wbr>Redraw<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/display/DisplayObject.d.ts#L199">lib/starling/display/DisplayObject.d.ts:199</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Indicates if the object needs to be redrawn in the upcoming frame, i.e. if it has changed its location relative to the stage or some other aspect of its appearance since it was last rendered.</p> </div> </div> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external"> <a name="root" class="tsd-anchor"></a> <h3>root</h3> <div class="tsd-signature tsd-kind-icon">root<span class="tsd-signature-symbol">:</span> <a href="starling.display.displayobject.html" class="tsd-signature-type">DisplayObject</a></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/display/DisplayObject.d.ts#L423">lib/starling/display/DisplayObject.d.ts:423</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>The root object the display object is connected to (i.e. an instance of the class that was passed to the Starling constructor), or null if the object is not connected to the stage.</p> </div> </div> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external"> <a name="rotation" class="tsd-anchor"></a> <h3>rotation</h3> <div class="tsd-signature tsd-kind-icon">rotation<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/display/DisplayObject.d.ts#L326">lib/starling/display/DisplayObject.d.ts:326</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>The rotation of the object in radians. (In Starling, all angles are measured in radians.)</p> </div> </div> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external"> <a name="scale" class="tsd-anchor"></a> <h3>scale</h3> <div class="tsd-signature tsd-kind-icon">scale<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/display/DisplayObject.d.ts#L310">lib/starling/display/DisplayObject.d.ts:310</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Sets both &#39;scaleX&#39; and &#39;scaleY&#39; to the same value. The getter simply returns the value of &#39;scaleX&#39; (even if the scaling values are different). @default 1</p> </div> </div> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external"> <a name="scalex" class="tsd-anchor"></a> <h3>scaleX</h3> <div class="tsd-signature tsd-kind-icon">scaleX<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/display/DisplayObject.d.ts#L298">lib/starling/display/DisplayObject.d.ts:298</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>The horizontal scale factor. &#39;1&#39; means no scale, negative values flip the object.</p> </div> <dl class="tsd-comment-tags"> <dt>default</dt> <dd><p>1</p> </dd> </dl> </div> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external"> <a name="scaley" class="tsd-anchor"></a> <h3>scaleY</h3> <div class="tsd-signature tsd-kind-icon">scaleY<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/display/DisplayObject.d.ts#L304">lib/starling/display/DisplayObject.d.ts:304</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>The vertical scale factor. &#39;1&#39; means no scale, negative values flip the object.</p> </div> <dl class="tsd-comment-tags"> <dt>default</dt> <dd><p>1</p> </dd> </dl> </div> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external"> <a name="skewx" class="tsd-anchor"></a> <h3>skewX</h3> <div class="tsd-signature tsd-kind-icon">skewX<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/display/DisplayObject.d.ts#L315">lib/starling/display/DisplayObject.d.ts:315</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>The horizontal skew angle in radians.</p> </div> </div> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external"> <a name="skewy" class="tsd-anchor"></a> <h3>skewY</h3> <div class="tsd-signature tsd-kind-icon">skewY<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/display/DisplayObject.d.ts#L320">lib/starling/display/DisplayObject.d.ts:320</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>The vertical skew angle in radians.</p> </div> </div> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external"> <a name="stage" class="tsd-anchor"></a> <h3>stage</h3> <div class="tsd-signature tsd-kind-icon">stage<span class="tsd-signature-symbol">:</span> <a href="starling.display.stage.html" class="tsd-signature-type">Stage</a></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/display/DisplayObject.d.ts#L428">lib/starling/display/DisplayObject.d.ts:428</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>The stage the display object is connected to, or null if it is not connected to the stage.</p> </div> </div> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external"> <a name="touchable" class="tsd-anchor"></a> <h3>touchable</h3> <div class="tsd-signature tsd-kind-icon">touchable<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/display/DisplayObject.d.ts#L341">lib/starling/display/DisplayObject.d.ts:341</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Indicates if this object (and its children) will receive touch events.</p> </div> </div> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external"> <a name="transformationmatrix" class="tsd-anchor"></a> <h3>transformation<wbr>Matrix</h3> <div class="tsd-signature tsd-kind-icon">transformation<wbr>Matrix<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Matrix</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/display/DisplayObject.d.ts#L235">lib/starling/display/DisplayObject.d.ts:235</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>The transformation matrix of the object relative to its parent.</p> </div> <p>If you assign a custom transformation matrix, Starling will try to figure out suitable values for <code>x, y, scaleX, scaleY,</code> a