{ "project": { "name": "EaselJS", "version": "1.0.0", "description": "EaselJS Docs", "url": "http://www.createjs.com/easeljs", "logo": "assets/docs-icon-EaselJS.png" }, "files": { "createjs/events/Event.js": { "name": "createjs/events/Event.js", "modules": { "CreateJS": 1 }, "classes": { "Event": 1 }, "fors": {}, "namespaces": {} }, "createjs/events/EventDispatcher.js": { "name": "createjs/events/EventDispatcher.js", "modules": {}, "classes": { "EventDispatcher": 1 }, "fors": {}, "namespaces": {} }, "createjs/utils/Ticker.js": { "name": "createjs/utils/Ticker.js", "modules": {}, "classes": { "Ticker": 1 }, "fors": {}, "namespaces": {} }, "createjs/utils/deprecate.js": { "name": "createjs/utils/deprecate.js", "modules": {}, "classes": {}, "fors": {}, "namespaces": {} }, "createjs/utils/extend.js": { "name": "createjs/utils/extend.js", "modules": {}, "classes": {}, "fors": {}, "namespaces": {} }, "createjs/utils/indexOf.js": { "name": "createjs/utils/indexOf.js", "modules": {}, "classes": {}, "fors": {}, "namespaces": {} }, "createjs/utils/promote.js": { "name": "createjs/utils/promote.js", "modules": {}, "classes": { "Utility Methods": 1 }, "fors": {}, "namespaces": {} }, "easeljs/display/Bitmap.js": { "name": "easeljs/display/Bitmap.js", "modules": {}, "classes": { "Bitmap": 1 }, "fors": {}, "namespaces": {} }, "easeljs/display/BitmapText.js": { "name": "easeljs/display/BitmapText.js", "modules": {}, "classes": { "BitmapText": 1 }, "fors": {}, "namespaces": {} }, "easeljs/display/Container.js": { "name": "easeljs/display/Container.js", "modules": {}, "classes": { "Container": 1 }, "fors": {}, "namespaces": {} }, "easeljs/display/DOMElement.js": { "name": "easeljs/display/DOMElement.js", "modules": {}, "classes": { "DOMElement": 1 }, "fors": {}, "namespaces": {} }, "easeljs/display/DisplayObject.js": { "name": "easeljs/display/DisplayObject.js", "modules": { "EaselJS": 1 }, "classes": { "DisplayObject": 1 }, "fors": {}, "namespaces": {} }, "easeljs/display/Graphics.js": { "name": "easeljs/display/Graphics.js", "modules": {}, "classes": { "Graphics": 1, "Graphics.LineTo": 1, "Graphics.MoveTo": 1, "Graphics.ArcTo": 1, "Graphics.Arc": 1, "Graphics.QuadraticCurveTo": 1, "Graphics.BezierCurveTo": 1, "Graphics.Rect": 1, "Graphics.ClosePath": 1, "Graphics.BeginPath": 1, "Graphics.Fill": 1, "Graphics.Stroke": 1, "Graphics.StrokeStyle": 1, "Graphics.StrokeDash": 1, "Graphics.RoundRect": 1, "Graphics.Circle": 1, "Graphics.Ellipse": 1, "Graphics.PolyStar": 1 }, "fors": {}, "namespaces": { "Graphics": 1 } }, "easeljs/display/MovieClip.js": { "name": "easeljs/display/MovieClip.js", "modules": {}, "classes": { "MovieClip": 1, "MovieClipPlugin": 1 }, "fors": {}, "namespaces": {} }, "easeljs/display/Shadow.js": { "name": "easeljs/display/Shadow.js", "modules": {}, "classes": { "Shadow": 1 }, "fors": {}, "namespaces": {} }, "easeljs/display/Shape.js": { "name": "easeljs/display/Shape.js", "modules": {}, "classes": { "Shape": 1 }, "fors": {}, "namespaces": {} }, "easeljs/display/Sprite.js": { "name": "easeljs/display/Sprite.js", "modules": {}, "classes": { "Sprite": 1 }, "fors": {}, "namespaces": {} }, "easeljs/display/SpriteSheet.js": { "name": "easeljs/display/SpriteSheet.js", "modules": {}, "classes": { "SpriteSheet": 1 }, "fors": {}, "namespaces": {} }, "easeljs/display/Stage.js": { "name": "easeljs/display/Stage.js", "modules": {}, "classes": { "Stage": 1 }, "fors": {}, "namespaces": {} }, "easeljs/display/StageGL.js": { "name": "easeljs/display/StageGL.js", "modules": {}, "classes": { "StageGL": 1 }, "fors": {}, "namespaces": {} }, "easeljs/display/Text.js": { "name": "easeljs/display/Text.js", "modules": {}, "classes": { "Text": 1 }, "fors": {}, "namespaces": {} }, "easeljs/events/MouseEvent.js": { "name": "easeljs/events/MouseEvent.js", "modules": {}, "classes": { "MouseEvent": 1 }, "fors": {}, "namespaces": {} }, "easeljs/filters/AlphaMapFilter.js": { "name": "easeljs/filters/AlphaMapFilter.js", "modules": {}, "classes": { "AlphaMapFilter": 1 }, "fors": {}, "namespaces": {} }, "easeljs/filters/AlphaMaskFilter.js": { "name": "easeljs/filters/AlphaMaskFilter.js", "modules": {}, "classes": { "AlphaMaskFilter": 1 }, "fors": {}, "namespaces": {} }, "easeljs/filters/BitmapCache.js": { "name": "easeljs/filters/BitmapCache.js", "modules": {}, "classes": { "BitmapCache": 1 }, "fors": { "BitmapCache": 1 }, "namespaces": {} }, "easeljs/filters/BlurFilter.js": { "name": "easeljs/filters/BlurFilter.js", "modules": {}, "classes": { "BlurFilter": 1 }, "fors": {}, "namespaces": {} }, "easeljs/filters/ColorFilter.js": { "name": "easeljs/filters/ColorFilter.js", "modules": {}, "classes": { "ColorFilter": 1 }, "fors": {}, "namespaces": {} }, "easeljs/filters/ColorMatrix.js": { "name": "easeljs/filters/ColorMatrix.js", "modules": {}, "classes": { "ColorMatrix": 1 }, "fors": {}, "namespaces": {} }, "easeljs/filters/ColorMatrixFilter.js": { "name": "easeljs/filters/ColorMatrixFilter.js", "modules": {}, "classes": { "ColorMatrixFilter": 1 }, "fors": {}, "namespaces": {} }, "easeljs/filters/Filter.js": { "name": "easeljs/filters/Filter.js", "modules": {}, "classes": { "Filter": 1 }, "fors": {}, "namespaces": {} }, "easeljs/geom/DisplayProps.js": { "name": "easeljs/geom/DisplayProps.js", "modules": {}, "classes": { "DisplayProps": 1 }, "fors": {}, "namespaces": {} }, "easeljs/geom/Matrix2D.js": { "name": "easeljs/geom/Matrix2D.js", "modules": {}, "classes": { "Matrix2D": 1 }, "fors": {}, "namespaces": {} }, "easeljs/geom/Point.js": { "name": "easeljs/geom/Point.js", "modules": {}, "classes": { "Point": 1 }, "fors": {}, "namespaces": {} }, "easeljs/geom/Rectangle.js": { "name": "easeljs/geom/Rectangle.js", "modules": {}, "classes": { "Rectangle": 1 }, "fors": {}, "namespaces": {} }, "easeljs/ui/ButtonHelper.js": { "name": "easeljs/ui/ButtonHelper.js", "modules": {}, "classes": { "ButtonHelper": 1 }, "fors": {}, "namespaces": {} }, "easeljs/ui/Touch.js": { "name": "easeljs/ui/Touch.js", "modules": {}, "classes": { "Touch": 1 }, "fors": {}, "namespaces": {} }, "easeljs/utils/SpriteSheetBuilder.js": { "name": "easeljs/utils/SpriteSheetBuilder.js", "modules": {}, "classes": { "SpriteSheetBuilder": 1 }, "fors": {}, "namespaces": {} }, "easeljs/utils/SpriteSheetUtils.js": { "name": "easeljs/utils/SpriteSheetUtils.js", "modules": {}, "classes": { "SpriteSheetUtils": 1 }, "fors": {}, "namespaces": {} }, "easeljs/utils/UID.js": { "name": "easeljs/utils/UID.js", "modules": {}, "classes": { "UID": 1 }, "fors": {}, "namespaces": {} }, "easeljs/utils/VideoBuffer.js": { "name": "easeljs/utils/VideoBuffer.js", "modules": {}, "classes": { "VideoBuffer": 1 }, "fors": {}, "namespaces": {} }, "easeljs/utils/WebGLInspector.js": { "name": "easeljs/utils/WebGLInspector.js", "modules": {}, "classes": { "WebGLInspector": 1 }, "fors": {}, "namespaces": {} }, "easeljs/version.js": { "name": "easeljs/version.js", "modules": {}, "classes": { "EaselJS": 1 }, "fors": {}, "namespaces": {} } }, "modules": { "CreateJS": { "name": "CreateJS", "submodules": {}, "classes": { "Event": 1, "EventDispatcher": 1, "Ticker": 1, "Utility Methods": 1 }, "fors": {}, "namespaces": {}, "tag": "main", "file": "createjs/utils/promote.js", "line": 36, "description": "A collection of Classes that are shared across all the CreateJS libraries. The classes are included in the minified\nfiles of each library and are available on the createjs namespace directly.\n\n

Example

\n\n myObject.addEventListener(\"change\", createjs.proxy(myMethod, scope));", "itemtype": "main" }, "EaselJS": { "name": "EaselJS", "submodules": {}, "classes": { "Bitmap": 1, "BitmapText": 1, "Container": 1, "DOMElement": 1, "DisplayObject": 1, "Graphics": 1, "Graphics.LineTo": 1, "Graphics.MoveTo": 1, "Graphics.ArcTo": 1, "Graphics.Arc": 1, "Graphics.QuadraticCurveTo": 1, "Graphics.BezierCurveTo": 1, "Graphics.Rect": 1, "Graphics.ClosePath": 1, "Graphics.BeginPath": 1, "Graphics.Fill": 1, "Graphics.Stroke": 1, "Graphics.StrokeStyle": 1, "Graphics.StrokeDash": 1, "Graphics.RoundRect": 1, "Graphics.Circle": 1, "Graphics.Ellipse": 1, "Graphics.PolyStar": 1, "MovieClip": 1, "MovieClipPlugin": 1, "Shadow": 1, "Shape": 1, "Sprite": 1, "SpriteSheet": 1, "Stage": 1, "StageGL": 1, "Text": 1, "MouseEvent": 1, "AlphaMapFilter": 1, "AlphaMaskFilter": 1, "BitmapCache": 1, "BlurFilter": 1, "ColorFilter": 1, "ColorMatrix": 1, "ColorMatrixFilter": 1, "Filter": 1, "DisplayProps": 1, "Matrix2D": 1, "Point": 1, "Rectangle": 1, "ButtonHelper": 1, "Touch": 1, "SpriteSheetBuilder": 1, "SpriteSheetUtils": 1, "UID": 1, "VideoBuffer": 1, "WebGLInspector": 1, "EaselJS": 1 }, "fors": { "BitmapCache": 1 }, "namespaces": { "Graphics": 1 }, "tag": "main", "file": "easeljs/version.js", "line": 9, "description": "The EaselJS Javascript library provides a retained graphics mode for canvas including a full hierarchical display\nlist, a core interaction model, and helper classes to make working with 2D graphics in Canvas much easier.\nEaselJS provides straight forward solutions for working with rich graphics and interactivity with HTML5 Canvas...\n\n

Getting Started

\nTo get started with Easel, create a {{#crossLink \"Stage\"}}{{/crossLink}} that wraps a CANVAS element, and add\n{{#crossLink \"DisplayObject\"}}{{/crossLink}} instances as children. EaselJS supports:\n\n\nAll display objects can be added to the stage as children, or drawn to a canvas directly.\n\nUser Interactions
\nAll display objects on stage (except DOMElement) will dispatch events when interacted with using a mouse or\ntouch. EaselJS supports hover, press, and release events, as well as an easy-to-use drag-and-drop model. Check out\n{{#crossLink \"MouseEvent\"}}{{/crossLink}} for more information.\n\n

Simple Example

\nThis example illustrates how to create and position a {{#crossLink \"Shape\"}}{{/crossLink}} on the {{#crossLink \"Stage\"}}{{/crossLink}}\nusing EaselJS' drawing API.\n\n\t //Create a stage by getting a reference to the canvas\n\t stage = new createjs.Stage(\"demoCanvas\");\n\t //Create a Shape DisplayObject.\n\t circle = new createjs.Shape();\n\t circle.graphics.beginFill(\"red\").drawCircle(0, 0, 40);\n\t //Set position of Shape instance.\n\t circle.x = circle.y = 50;\n\t //Add Shape instance to stage display list.\n\t stage.addChild(circle);\n\t //Update stage will render next frame\n\t stage.update();\n\nSimple Interaction Example
\n\n displayObject.addEventListener(\"click\", handleClick);\n function handleClick(event){\n // Click happenened\n }\n\n displayObject.addEventListener(\"mousedown\", handlePress);\n function handlePress(event) {\n // A mouse press happened.\n // Listen for mouse move while the mouse is down:\n event.addEventListener(\"mousemove\", handleMove);\n }\n function handleMove(event) {\n // Check out the DragAndDrop example in GitHub for more\n }\n\nSimple Animation Example
\nThis example moves the shape created in the previous demo across the screen.\n\n\t //Update stage will render next frame\n\t createjs.Ticker.addEventListener(\"tick\", handleTick);\n\n\t function handleTick() {\n //Circle will move 10 units to the right.\n\t \tcircle.x += 10;\n\t \t//Will cause the circle to wrap back\n\t \tif (circle.x > stage.canvas.width) { circle.x = 0; }\n\t \tstage.update();\n\t }\n\n

Other Features

\nEaselJS also has built in support for\n\n\n

Browser Support

\nAll modern browsers that support Canvas will support EaselJS (http://caniuse.com/canvas).\nBrowser performance may vary between platforms, for example, Android Canvas has poor hardware support, and is much\nslower on average than most other browsers.", "itemtype": "main" } }, "classes": { "Event": { "name": "Event", "shortname": "Event", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "CreateJS", "namespace": "", "file": "createjs/events/Event.js", "line": 48, "description": "Contains properties and methods shared by all events for use with\n{{#crossLink \"EventDispatcher\"}}{{/crossLink}}.\n\nNote that Event objects are often reused, so you should never\nrely on an event object's state outside of the call stack it was received in.", "params": [ { "name": "type", "description": "The event type.", "type": "String" }, { "name": "bubbles", "description": "Indicates whether the event will bubble through the display list.", "type": "Boolean" }, { "name": "cancelable", "description": "Indicates whether the default behaviour of this event can be cancelled.", "type": "Boolean" } ], "is_constructor": 1 }, "EventDispatcher": { "name": "EventDispatcher", "shortname": "EventDispatcher", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [ "Ticker" ], "module": "CreateJS", "namespace": "", "file": "createjs/events/EventDispatcher.js", "line": 41, "description": "EventDispatcher provides methods for managing queues of event listeners and dispatching events.\n\nYou can either extend EventDispatcher or mix its methods into an existing prototype or instance by using the\nEventDispatcher {{#crossLink \"EventDispatcher/initialize\"}}{{/crossLink}} method.\n\nTogether with the CreateJS Event class, EventDispatcher provides an extended event model that is based on the\nDOM Level 2 event model, including addEventListener, removeEventListener, and dispatchEvent. It supports\nbubbling / capture, preventDefault, stopPropagation, stopImmediatePropagation, and handleEvent.\n\nEventDispatcher also exposes a {{#crossLink \"EventDispatcher/on\"}}{{/crossLink}} method, which makes it easier\nto create scoped listeners, listeners that only run once, and listeners with associated arbitrary data. The \n{{#crossLink \"EventDispatcher/off\"}}{{/crossLink}} method is merely an alias to\n{{#crossLink \"EventDispatcher/removeEventListener\"}}{{/crossLink}}.\n\nAnother addition to the DOM Level 2 model is the {{#crossLink \"EventDispatcher/removeAllEventListeners\"}}{{/crossLink}}\nmethod, which can be used to listeners for all events, or listeners for a specific event. The Event object also \nincludes a {{#crossLink \"Event/remove\"}}{{/crossLink}} method which removes the active listener.\n\n

Example

\nAdd EventDispatcher capabilities to the \"MyClass\" class.\n\n EventDispatcher.initialize(MyClass.prototype);\n\nAdd an event (see {{#crossLink \"EventDispatcher/addEventListener\"}}{{/crossLink}}).\n\n instance.addEventListener(\"eventName\", handlerMethod);\n function handlerMethod(event) {\n console.log(event.target + \" Was Clicked\");\n }\n\nMaintaining proper scope
\nScope (ie. \"this\") can be be a challenge with events. Using the {{#crossLink \"EventDispatcher/on\"}}{{/crossLink}}\nmethod to subscribe to events simplifies this.\n\n instance.addEventListener(\"click\", function(event) {\n console.log(instance == this); // false, scope is ambiguous.\n });\n \n instance.on(\"click\", function(event) {\n console.log(instance == this); // true, \"on\" uses dispatcher scope by default.\n });\n\nIf you want to use addEventListener instead, you may want to use function.bind() or a similar proxy to manage\nscope.\n\nBrowser support\nThe event model in CreateJS can be used separately from the suite in any project, however the inheritance model\nrequires modern browsers (IE9+).", "is_constructor": 1 }, "Ticker": { "name": "Ticker", "shortname": "Ticker", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "CreateJS", "namespace": "", "file": "createjs/utils/Ticker.js", "line": 41, "description": "The Ticker provides a centralized tick or heartbeat broadcast at a set interval. Listeners can subscribe to the tick\nevent to be notified when a set time interval has elapsed.\n\nNote that the interval that the tick event is called is a target interval, and may be broadcast at a slower interval\nwhen under high CPU load. The Ticker class uses a static interface (ex. `Ticker.framerate = 30;`) and\ncan not be instantiated.\n\n

Example

\n\n createjs.Ticker.addEventListener(\"tick\", handleTick);\n function handleTick(event) {\n // Actions carried out each tick (aka frame)\n if (!event.paused) {\n // Actions carried out when the Ticker is not paused.\n }\n }", "uses": [ "EventDispatcher" ], "static": 1 }, "Utility Methods": { "name": "Utility Methods", "shortname": "Utility Methods", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "CreateJS", "namespace": "", "file": "createjs/utils/promote.js", "line": 36 }, "Bitmap": { "name": "Bitmap", "shortname": "Bitmap", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "EaselJS", "namespace": "", "file": "easeljs/display/Bitmap.js", "line": 38, "description": "A Bitmap represents an Image, Canvas, or Video in the display list. A Bitmap can be instantiated using an existing\nHTML element, or a string.\n\n

Example

\n\n\tvar bitmap = new createjs.Bitmap(\"imagePath.jpg\");\n\nNotes:\n
    \n\t
  1. When using a video source that may loop or seek, use a {{#crossLink \"VideoBuffer\"}}{{/crossLink}} object to\n\t prevent blinking / flashing.\n\t
  2. When a string path or image tag that is not yet loaded is used, the stage may need to be redrawn before it\n\t will be displayed.
  3. \n\t
  4. Bitmaps with an SVG source currently will not respect an alpha value other than 0 or 1. To get around this,\n\tthe Bitmap can be cached.
  5. \n\t
  6. Bitmaps with an SVG source will taint the canvas with cross-origin data, which prevents interactivity. This\n\thappens in all browsers except recent Firefox builds.
  7. \n\t
  8. Images loaded cross-origin will throw cross-origin security errors when interacted with using a mouse, using\n\tmethods such as `getObjectUnderPoint`, or using filters, or caching. You can get around this by setting\n\t`crossOrigin` flags on your images before passing them to EaselJS, eg: `img.crossOrigin=\"Anonymous\";`
  9. \n
", "extends": "DisplayObject", "is_constructor": 1, "params": [ { "name": "imageOrUri", "description": "The source image to display. This can be a CanvasImageSource\n(image, video, canvas), an object with a `getImage` method that returns a CanvasImageSource, or a string URL to an image.\nIf the latter, a new Image instance with the URL as its src will be used.", "type": "CanvasImageSource | String | Object" } ] }, "BitmapText": { "name": "BitmapText", "shortname": "BitmapText", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "EaselJS", "namespace": "", "file": "easeljs/display/BitmapText.js", "line": 36, "description": "Displays text using bitmap glyphs defined in a sprite sheet. Multi-line text is supported using new line characters,\nbut automatic wrapping is not supported. See the {{#crossLink \"BitmapText/spriteSheet:property\"}}{{/crossLink}}\nproperty for more information on defining glyphs.\n\nImportant: While BitmapText extends Container, it is not designed to be used as one.\nAs such, methods like addChild and removeChild are disabled.", "extends": "DisplayObject", "params": [ { "name": "text", "description": "The text to display.", "type": "String", "optional": true, "optdefault": "\"\"" }, { "name": "spriteSheet", "description": "The spritesheet that defines the character glyphs.", "type": "SpriteSheet", "optional": true, "optdefault": "null" } ], "is_constructor": 1 }, "Container": { "name": "Container", "shortname": "Container", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "EaselJS", "namespace": "", "file": "easeljs/display/Container.js", "line": 37, "description": "A Container is a nestable display list that allows you to work with compound display elements. For example you could\ngroup arm, leg, torso and head {{#crossLink \"Bitmap\"}}{{/crossLink}} instances together into a Person Container, and\ntransform them as a group, while still being able to move the individual parts relative to each other. Children of\ncontainers have their transform and alpha properties concatenated with their parent\nContainer.\n\nFor example, a {{#crossLink \"Shape\"}}{{/crossLink}} with x=100 and alpha=0.5, placed in a Container with x=50\nand alpha=0.7 will be rendered to the canvas at x=150 and alpha=0.35.\nContainers have some overhead, so you generally shouldn't create a Container to hold a single child.\n\n

Example

\n\n var container = new createjs.Container();\n container.addChild(bitmapInstance, shapeInstance);\n container.x = 100;", "extends": "DisplayObject", "is_constructor": 1 }, "DOMElement": { "name": "DOMElement", "shortname": "DOMElement", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "EaselJS", "namespace": "", "file": "easeljs/display/DOMElement.js", "line": 41, "description": "This class is still experimental, and more advanced use is likely to be buggy. Please report bugs.\n\nA DOMElement allows you to associate a HTMLElement with the display list. It will be transformed\nwithin the DOM as though it is child of the {{#crossLink \"Container\"}}{{/crossLink}} it is added to. However, it is\nnot rendered to canvas, and as such will retain whatever z-index it has relative to the canvas (ie. it will be\ndrawn in front of or behind the canvas).\n\nThe position of a DOMElement is relative to their parent node in the DOM. It is recommended that\nthe DOM Object be added to a div that also contains the canvas so that they share the same position\non the page.\n\nDOMElement is useful for positioning HTML elements over top of canvas content, and for elements\nthat you want to display outside the bounds of the canvas. For example, a tooltip with rich HTML\ncontent.\n\n

Mouse Interaction

\n\nDOMElement instances are not full EaselJS display objects, and do not participate in EaselJS mouse\nevents or support methods like hitTest. To get mouse events from a DOMElement, you must instead add handlers to\nthe htmlElement (note, this does not support EventDispatcher)\n\n var domElement = new createjs.DOMElement(htmlElement);\n domElement.htmlElement.onclick = function() {\n console.log(\"clicked\");\n }\n\nImportant: This class needs to be notified it is about to be drawn, this will happen automatically\nif you call stage.update, calling stage.draw or disabling tickEnabled will miss important steps and it will render\nstale information.", "extends": "DisplayObject", "is_constructor": 1, "params": [ { "name": "htmlElement", "description": "A reference or id for the DOM element to manage.", "type": "HTMLElement" } ] }, "DisplayObject": { "name": "DisplayObject", "shortname": "DisplayObject", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "EaselJS", "namespace": "", "file": "easeljs/display/DisplayObject.js", "line": 129, "description": "DisplayObject is an abstract class that should not be constructed directly. Instead construct subclasses such as\n{{#crossLink \"Container\"}}{{/crossLink}}, {{#crossLink \"Bitmap\"}}{{/crossLink}}, and {{#crossLink \"Shape\"}}{{/crossLink}}.\nDisplayObject is the base class for all display classes in the EaselJS library. It defines the core properties and\nmethods that are shared between all display objects, such as transformation properties (x, y, scaleX, scaleY, etc),\ncaching, and mouse handlers.", "extends": "EventDispatcher", "is_constructor": 1 }, "Graphics": { "name": "Graphics", "shortname": "Graphics", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "EaselJS", "namespace": "Graphics", "file": "easeljs/display/Graphics.js", "line": 41, "description": "The Graphics class exposes an easy to use API for generating vector drawing instructions and drawing them to a\nspecified context. Note that you can use Graphics without any dependency on the EaselJS framework by calling {{#crossLink \"Graphics/draw\"}}{{/crossLink}}\ndirectly, or it can be used with the {{#crossLink \"Shape\"}}{{/crossLink}} object to draw vector graphics within the\ncontext of an EaselJS display list.\n\nThere are two approaches to working with Graphics object: calling methods on a Graphics instance (the \"Graphics API\"), or\ninstantiating Graphics command objects and adding them to the graphics queue via {{#crossLink \"Graphics/append\"}}{{/crossLink}}.\nThe former abstracts the latter, simplifying beginning and ending paths, fills, and strokes.\n\n var g = new createjs.Graphics();\n g.setStrokeStyle(1);\n g.beginStroke(\"#000000\");\n g.beginFill(\"red\");\n g.drawCircle(0,0,30);\n\nAll drawing methods in Graphics return the Graphics instance, so they can be chained together. For example,\nthe following line of code would generate the instructions to draw a rectangle with a red stroke and blue fill:\n\n myGraphics.beginStroke(\"red\").beginFill(\"blue\").drawRect(20, 20, 100, 50);\n\nEach graphics API call generates a command object (see below). The last command to be created can be accessed via\n{{#crossLink \"Graphics/command:property\"}}{{/crossLink}}:\n\n var fillCommand = myGraphics.beginFill(\"red\").command;\n // ... later, update the fill style/color:\n fillCommand.style = \"blue\";\n // or change it to a bitmap fill:\n fillCommand.bitmap(myImage);\n\nFor more direct control of rendering, you can instantiate and append command objects to the graphics queue directly. In this case, you\nneed to manage path creation manually, and ensure that fill/stroke is applied to a defined path:\n\n // start a new path. Graphics.beginCmd is a reusable BeginPath instance:\n myGraphics.append(createjs.Graphics.beginCmd);\n // we need to define the path before applying the fill:\n var circle = new createjs.Graphics.Circle(0,0,30);\n myGraphics.append(circle);\n // fill the path we just defined:\n var fill = new createjs.Graphics.Fill(\"red\");\n myGraphics.append(fill);\n\nThese approaches can be used together, for example to insert a custom command:\n\n myGraphics.beginFill(\"red\");\n var customCommand = new CustomSpiralCommand(etc);\n myGraphics.append(customCommand);\n myGraphics.beginFill(\"blue\");\n myGraphics.drawCircle(0, 0, 30);\n\nSee {{#crossLink \"Graphics/append\"}}{{/crossLink}} for more info on creating custom commands.\n\n

Tiny API

\nThe Graphics class also includes a \"tiny API\", which is one or two-letter methods that are shortcuts for all of the\nGraphics methods. These methods are great for creating compact instructions, and is used by the Toolkit for CreateJS\nto generate readable code. All tiny methods are marked as protected, so you can view them by enabling protected\ndescriptions in the docs.\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
TinyMethodTinyMethod
mt{{#crossLink \"Graphics/moveTo\"}}{{/crossLink}} lt {{#crossLink \"Graphics/lineTo\"}}{{/crossLink}}
a/at{{#crossLink \"Graphics/arc\"}}{{/crossLink}} / {{#crossLink \"Graphics/arcTo\"}}{{/crossLink}} bt{{#crossLink \"Graphics/bezierCurveTo\"}}{{/crossLink}}
qt{{#crossLink \"Graphics/quadraticCurveTo\"}}{{/crossLink}} (also curveTo)r{{#crossLink \"Graphics/rect\"}}{{/crossLink}}
cp{{#crossLink \"Graphics/closePath\"}}{{/crossLink}} c{{#crossLink \"Graphics/clear\"}}{{/crossLink}}
f{{#crossLink \"Graphics/beginFill\"}}{{/crossLink}} lf{{#crossLink \"Graphics/beginLinearGradientFill\"}}{{/crossLink}}
rf{{#crossLink \"Graphics/beginRadialGradientFill\"}}{{/crossLink}} bf{{#crossLink \"Graphics/beginBitmapFill\"}}{{/crossLink}}
ef{{#crossLink \"Graphics/endFill\"}}{{/crossLink}} ss / sd{{#crossLink \"Graphics/setStrokeStyle\"}}{{/crossLink}} / {{#crossLink \"Graphics/setStrokeDash\"}}{{/crossLink}}
s{{#crossLink \"Graphics/beginStroke\"}}{{/crossLink}} ls{{#crossLink \"Graphics/beginLinearGradientStroke\"}}{{/crossLink}}
rs{{#crossLink \"Graphics/beginRadialGradientStroke\"}}{{/crossLink}} bs{{#crossLink \"Graphics/beginBitmapStroke\"}}{{/crossLink}}
es{{#crossLink \"Graphics/endStroke\"}}{{/crossLink}} dr{{#crossLink \"Graphics/drawRect\"}}{{/crossLink}}
rr{{#crossLink \"Graphics/drawRoundRect\"}}{{/crossLink}} rc{{#crossLink \"Graphics/drawRoundRectComplex\"}}{{/crossLink}}
dc{{#crossLink \"Graphics/drawCircle\"}}{{/crossLink}} de{{#crossLink \"Graphics/drawEllipse\"}}{{/crossLink}}
dp{{#crossLink \"Graphics/drawPolyStar\"}}{{/crossLink}} p{{#crossLink \"Graphics/decodePath\"}}{{/crossLink}}
\n\nHere is the above example, using the tiny API instead.\n\n myGraphics.s(\"red\").f(\"blue\").r(20, 20, 100, 50);", "is_constructor": 1 }, "Graphics.LineTo": { "name": "Graphics.LineTo", "shortname": "LineTo", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "EaselJS", "namespace": "Graphics", "file": "easeljs/display/Graphics.js", "line": 1619, "description": "Graphics command object. See {{#crossLink \"Graphics/lineTo\"}}{{/crossLink}} and {{#crossLink \"Graphics/append\"}}{{/crossLink}} for more information. See {{#crossLink \"Graphics\"}}{{/crossLink}} and {{#crossLink \"Graphics/append\"}}{{/crossLink}} for more information.", "is_constructor": 1, "params": [ { "name": "x", "description": "", "type": "Number" }, { "name": "y", "description": "", "type": "Number" } ] }, "Graphics.MoveTo": { "name": "Graphics.MoveTo", "shortname": "MoveTo", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "EaselJS", "namespace": "Graphics", "file": "easeljs/display/Graphics.js", "line": 1643, "description": "Graphics command object. See {{#crossLink \"Graphics/moveTo\"}}{{/crossLink}} and {{#crossLink \"Graphics/append\"}}{{/crossLink}} for more information.", "is_constructor": 1, "params": [ { "name": "x", "description": "", "type": "Number" }, { "name": "y", "description": "", "type": "Number" } ] }, "Graphics.ArcTo": { "name": "Graphics.ArcTo", "shortname": "ArcTo", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "EaselJS", "namespace": "Graphics", "file": "easeljs/display/Graphics.js", "line": 1667, "description": "Graphics command object. See {{#crossLink \"Graphics/arcTo\"}}{{/crossLink}} and {{#crossLink \"Graphics/append\"}}{{/crossLink}} for more information.", "is_constructor": 1, "params": [ { "name": "x1", "description": "", "type": "Number" }, { "name": "y1", "description": "", "type": "Number" }, { "name": "x2", "description": "", "type": "Number" }, { "name": "y2", "description": "", "type": "Number" }, { "name": "radius", "description": "", "type": "Number" } ] }, "Graphics.Arc": { "name": "Graphics.Arc", "shortname": "Arc", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "EaselJS", "namespace": "Graphics", "file": "easeljs/display/Graphics.js", "line": 1708, "description": "Graphics command object. See {{#crossLink \"Graphics/arc\"}}{{/crossLink}} and {{#crossLink \"Graphics/append\"}}{{/crossLink}} for more information.", "is_constructor": 1, "params": [ { "name": "x", "description": "", "type": "Number" }, { "name": "y", "description": "", "type": "Number" }, { "name": "radius", "description": "", "type": "Number" }, { "name": "startAngle", "description": "", "type": "Number" }, { "name": "endAngle", "description": "", "type": "Number" }, { "name": "anticlockwise", "description": "", "type": "Number" } ] }, "Graphics.QuadraticCurveTo": { "name": "Graphics.QuadraticCurveTo", "shortname": "QuadraticCurveTo", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "EaselJS", "namespace": "Graphics", "file": "easeljs/display/Graphics.js", "line": 1755, "description": "Graphics command object. See {{#crossLink \"Graphics/quadraticCurveTo\"}}{{/crossLink}} and {{#crossLink \"Graphics/append\"}}{{/crossLink}} for more information.", "is_constructor": 1, "params": [ { "name": "cpx", "description": "", "type": "Number" }, { "name": "cpy", "description": "", "type": "Number" }, { "name": "x", "description": "", "type": "Number" }, { "name": "y", "description": "", "type": "Number" } ] }, "Graphics.BezierCurveTo": { "name": "Graphics.BezierCurveTo", "shortname": "BezierCurveTo", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "EaselJS", "namespace": "Graphics", "file": "easeljs/display/Graphics.js", "line": 1790, "description": "Graphics command object. See {{#crossLink \"Graphics/bezierCurveTo\"}}{{/crossLink}} and {{#crossLink \"Graphics/append\"}}{{/crossLink}} for more information.", "is_constructor": 1, "params": [ { "name": "cp1x", "description": "", "type": "Number" }, { "name": "cp1y", "description": "", "type": "Number" }, { "name": "cp2x", "description": "", "type": "Number" }, { "name": "cp2y", "description": "", "type": "Number" }, { "name": "x", "description": "", "type": "Number" }, { "name": "y", "description": "", "type": "Number" } ] }, "Graphics.Rect": { "name": "Graphics.Rect", "shortname": "Rect", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "EaselJS", "namespace": "Graphics", "file": "easeljs/display/Graphics.js", "line": 1836, "description": "Graphics command object. See {{#crossLink \"Graphics/rect\"}}{{/crossLink}} and {{#crossLink \"Graphics/append\"}}{{/crossLink}} for more information.", "is_constructor": 1, "params": [ { "name": "x", "description": "", "type": "Number" }, { "name": "y", "description": "", "type": "Number" }, { "name": "w", "description": "", "type": "Number" }, { "name": "h", "description": "", "type": "Number" } ] }, "Graphics.ClosePath": { "name": "Graphics.ClosePath", "shortname": "ClosePath", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "EaselJS", "namespace": "Graphics", "file": "easeljs/display/Graphics.js", "line": 1871, "description": "Graphics command object. See {{#crossLink \"Graphics/closePath\"}}{{/crossLink}} and {{#crossLink \"Graphics/append\"}}{{/crossLink}} for more information.", "is_constructor": 1 }, "Graphics.BeginPath": { "name": "Graphics.BeginPath", "shortname": "BeginPath", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "EaselJS", "namespace": "Graphics", "file": "easeljs/display/Graphics.js", "line": 1884, "description": "Graphics command object to begin a new path. See {{#crossLink \"Graphics\"}}{{/crossLink}} and {{#crossLink \"Graphics/append\"}}{{/crossLink}} for more information.", "is_constructor": 1 }, "Graphics.Fill": { "name": "Graphics.Fill", "shortname": "Fill", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "EaselJS", "namespace": "Graphics", "file": "easeljs/display/Graphics.js", "line": 1897, "description": "Graphics command object. See {{#crossLink \"Graphics/beginFill\"}}{{/crossLink}} and {{#crossLink \"Graphics/append\"}}{{/crossLink}} for more information.", "is_constructor": 1, "params": [ { "name": "style", "description": "A valid Context2D fillStyle.", "type": "Object" }, { "name": "matrix", "description": "", "type": "Matrix2D" } ] }, "Graphics.Stroke": { "name": "Graphics.Stroke", "shortname": "Stroke", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "EaselJS", "namespace": "Graphics", "file": "easeljs/display/Graphics.js", "line": 1986, "description": "Graphics command object. See {{#crossLink \"Graphics/beginStroke\"}}{{/crossLink}} and {{#crossLink \"Graphics/append\"}}{{/crossLink}} for more information.", "is_constructor": 1, "params": [ { "name": "style", "description": "A valid Context2D fillStyle.", "type": "Object" }, { "name": "ignoreScale", "description": "", "type": "Boolean" } ] }, "Graphics.StrokeStyle": { "name": "Graphics.StrokeStyle", "shortname": "StrokeStyle", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "EaselJS", "namespace": "Graphics", "file": "easeljs/display/Graphics.js", "line": 2057, "description": "Graphics command object. See {{#crossLink \"Graphics/setStrokeStyle\"}}{{/crossLink}} and {{#crossLink \"Graphics/append\"}}{{/crossLink}} for more information.", "is_constructor": 1, "params": [ { "name": "width", "description": "", "type": "Number" }, { "name": "caps", "description": "", "type": "String", "optional": true, "optdefault": "butt" }, { "name": "joints", "description": "", "type": "String", "optional": true, "optdefault": "miter" }, { "name": "miterLimit", "description": "", "type": "Number", "optional": true, "optdefault": "10" }, { "name": "ignoreScale", "description": "", "type": "Boolean", "optional": true, "optdefault": "false" } ] }, "Graphics.StrokeDash": { "name": "Graphics.StrokeDash", "shortname": "StrokeDash", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "EaselJS", "namespace": "Graphics", "file": "easeljs/display/Graphics.js", "line": 2106, "description": "Graphics command object. See {{#crossLink \"Graphics/setStrokeDash\"}}{{/crossLink}} and {{#crossLink \"Graphics/append\"}}{{/crossLink}} for more information.", "is_constructor": 1, "params": [ { "name": "segments", "description": "", "type": "Array", "optional": true }, { "name": "offset", "description": "", "type": "Number", "optional": true, "optdefault": "0" } ] }, "Graphics.RoundRect": { "name": "Graphics.RoundRect", "shortname": "RoundRect", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "EaselJS", "namespace": "Graphics", "file": "easeljs/display/Graphics.js", "line": 2146, "description": "Graphics command object. See {{#crossLink \"Graphics/drawRoundRectComplex\"}}{{/crossLink}} and {{#crossLink \"Graphics/append\"}}{{/crossLink}} for more information.", "is_constructor": 1, "params": [ { "name": "x", "description": "", "type": "Number" }, { "name": "y", "description": "", "type": "Number" }, { "name": "w", "description": "", "type": "Number" }, { "name": "h", "description": "", "type": "Number" }, { "name": "radiusTL", "description": "", "type": "Number" }, { "name": "radiusTR", "description": "", "type": "Number" }, { "name": "radiusBR", "description": "", "type": "Number" }, { "name": "radiusBL", "description": "", "type": "Number" } ] }, "Graphics.Circle": { "name": "Graphics.Circle", "shortname": "Circle", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "EaselJS", "namespace": "Graphics", "file": "easeljs/display/Graphics.js", "line": 2227, "description": "Graphics command object. See {{#crossLink \"Graphics/drawCircle\"}}{{/crossLink}} and {{#crossLink \"Graphics/append\"}}{{/crossLink}} for more information.", "is_constructor": 1, "params": [ { "name": "x", "description": "", "type": "Number" }, { "name": "y", "description": "", "type": "Number" }, { "name": "radius", "description": "", "type": "Number" } ] }, "Graphics.Ellipse": { "name": "Graphics.Ellipse", "shortname": "Ellipse", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "EaselJS", "namespace": "Graphics", "file": "easeljs/display/Graphics.js", "line": 2257, "description": "Graphics command object. See {{#crossLink \"Graphics/drawEllipse\"}}{{/crossLink}} and {{#crossLink \"Graphics/append\"}}{{/crossLink}} for more information.", "is_constructor": 1, "params": [ { "name": "x", "description": "", "type": "Number" }, { "name": "y", "description": "", "type": "Number" }, { "name": "w", "description": "", "type": "Number" }, { "name": "h", "description": "", "type": "Number" } ] }, "Graphics.PolyStar": { "name": "Graphics.PolyStar", "shortname": "PolyStar", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "EaselJS", "namespace": "Graphics", "file": "easeljs/display/Graphics.js", "line": 2309, "description": "Graphics command object. See {{#crossLink \"Graphics/drawPolyStar\"}}{{/crossLink}} and {{#crossLink \"Graphics/append\"}}{{/crossLink}} for more information.", "is_constructor": 1, "params": [ { "name": "x", "description": "", "type": "Number" }, { "name": "y", "description": "", "type": "Number" }, { "name": "radius", "description": "", "type": "Number" }, { "name": "sides", "description": "", "type": "Number" }, { "name": "pointSize", "description": "", "type": "Number" }, { "name": "angle", "description": "", "type": "Number" } ] }, "MovieClip": { "name": "MovieClip", "shortname": "MovieClip", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "EaselJS", "namespace": "", "file": "easeljs/display/MovieClip.js", "line": 41, "description": "The MovieClip class associates a TweenJS Timeline with an EaselJS {{#crossLink \"Container\"}}{{/crossLink}}. It allows\nyou to create objects which encapsulate timeline animations, state changes, and synched actions. The MovieClip\nclass has been included in the EaselJS minified file since 0.7.0.\n\nCurrently MovieClip only works properly if it is tick based (as opposed to time based) though some concessions have\nbeen made to support time-based timelines in the future.\n\n

Example

\nThis example animates two shapes back and forth. The grey shape starts on the left, but we jump to a mid-point in\nthe animation using {{#crossLink \"MovieClip/gotoAndPlay\"}}{{/crossLink}}.\n\n var stage = new createjs.Stage(\"canvas\");\n createjs.Ticker.addEventListener(\"tick\", stage);\n\n var mc = new createjs.MovieClip({loop:-1, labels:{myLabel:20}});\n stage.addChild(mc);\n\n var child1 = new createjs.Shape(\n new createjs.Graphics().beginFill(\"#999999\")\n .drawCircle(30,30,30));\n var child2 = new createjs.Shape(\n new createjs.Graphics().beginFill(\"#5a9cfb\")\n .drawCircle(30,30,30));\n\n mc.timeline.addTween(\n createjs.Tween.get(child1)\n .to({x:0}).to({x:60}, 50).to({x:0}, 50));\n mc.timeline.addTween(\n createjs.Tween.get(child2)\n .to({x:60}).to({x:0}, 50).to({x:60}, 50));\n\n mc.gotoAndPlay(\"start\");\n\nIt is recommended to use tween.to() to animate and set properties (use no duration to have it set\nimmediately), and the tween.wait() method to create delays between animations. Note that using the\ntween.set() method to affect properties will likely not provide the desired result.", "mainName": "MovieClip", "tag": "main", "itemtype": "main", "_main": true, "params": [ { "name": "props", "description": "The configuration properties to apply to this instance (ex. `{mode:MovieClip.SYNCHED}`).\nSupported props for the MovieClip are listed below. These props are set on the corresponding instance properties except where\nspecified.\n\nThis object will also be passed into the Timeline instance associated with this MovieClip. See the documentation\nfor Timeline for a list of supported props (ex. `paused`, `labels`, `loop`, `reversed`, etc.)", "type": "Object", "optional": true } ], "extends": "Container", "is_constructor": 1 }, "MovieClipPlugin": { "name": "MovieClipPlugin", "shortname": "MovieClipPlugin", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "EaselJS", "namespace": "", "file": "easeljs/display/MovieClip.js", "line": 689, "description": "This plugin works with TweenJS to prevent the startPosition\nproperty from tweening.", "access": "private", "tagname": "", "is_constructor": 1 }, "Shadow": { "name": "Shadow", "shortname": "Shadow", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "EaselJS", "namespace": "", "file": "easeljs/display/Shadow.js", "line": 41, "description": "This class encapsulates the properties required to define a shadow to apply to a {{#crossLink \"DisplayObject\"}}{{/crossLink}}\nvia its shadow property.\n\n

Example

\n\n myImage.shadow = new createjs.Shadow(\"#000000\", 5, 5, 10);", "is_constructor": 1, "params": [ { "name": "color", "description": "The color of the shadow. This can be any valid CSS color value.", "type": "String" }, { "name": "offsetX", "description": "The x offset of the shadow in pixels.", "type": "Number" }, { "name": "offsetY", "description": "The y offset of the shadow in pixels.", "type": "Number" }, { "name": "blur", "description": "The size of the blurring effect.", "type": "Number" } ] }, "Shape": { "name": "Shape", "shortname": "Shape", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "EaselJS", "namespace": "", "file": "easeljs/display/Shape.js", "line": 41, "description": "A Shape allows you to display vector art in the display list. It composites a {{#crossLink \"Graphics\"}}{{/crossLink}}\ninstance which exposes all of the vector drawing methods. The Graphics instance can be shared between multiple Shape\ninstances to display the same vector graphics with different positions or transforms.\n\nIf the vector art will not\nchange between draws, you may want to use the {{#crossLink \"DisplayObject/cache\"}}{{/crossLink}} method to reduce the\nrendering cost.\n\n

Example

\n\n var graphics = new createjs.Graphics().beginFill(\"#ff0000\").drawRect(0, 0, 100, 100);\n var shape = new createjs.Shape(graphics);\n\n //Alternatively use can also use the graphics property of the Shape class to renderer the same as above.\n var shape = new createjs.Shape();\n shape.graphics.beginFill(\"#ff0000\").drawRect(0, 0, 100, 100);", "extends": "DisplayObject", "is_constructor": 1, "params": [ { "name": "graphics", "description": "Optional. The graphics instance to display. If null, a new Graphics instance will be created.", "type": "Graphics" } ] }, "Sprite": { "name": "Sprite", "shortname": "Sprite", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "EaselJS", "namespace": "", "file": "easeljs/display/Sprite.js", "line": 41, "description": "Displays a frame or sequence of frames (ie. an animation) from a SpriteSheet instance. A sprite sheet is a series of\nimages (usually animation frames) combined into a single image. For example, an animation consisting of 8 100x100\nimages could be combined into a 400x200 sprite sheet (4 frames across by 2 high). You can display individual frames,\nplay frames as an animation, and even sequence animations together.\n\nSee the {{#crossLink \"SpriteSheet\"}}{{/crossLink}} class for more information on setting up frames and animations.\n\n

Example

\n\n var instance = new createjs.Sprite(spriteSheet);\n instance.gotoAndStop(\"frameName\");\n\nUntil {{#crossLink \"Sprite/gotoAndStop\"}}{{/crossLink}} or {{#crossLink \"Sprite/gotoAndPlay\"}}{{/crossLink}} is called,\nonly the first defined frame defined in the sprite sheet will be displayed.", "extends": "DisplayObject", "is_constructor": 1, "params": [ { "name": "spriteSheet", "description": "The SpriteSheet instance to play back. This includes the source image(s), frame\ndimensions, and frame data. See {{#crossLink \"SpriteSheet\"}}{{/crossLink}} for more information.", "type": "SpriteSheet" }, { "name": "frameOrAnimation", "description": "The frame number or animation to play initially.", "type": "String|Number", "optional": true } ] }, "SpriteSheet": { "name": "SpriteSheet", "shortname": "SpriteSheet", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "EaselJS", "namespace": "", "file": "easeljs/display/SpriteSheet.js", "line": 41, "description": "Encapsulates the properties and methods associated with a sprite sheet. A sprite sheet is a series of images (usually\nanimation frames) combined into a larger image (or images). For example, an animation consisting of eight 100x100\nimages could be combined into a single 400x200 sprite sheet (4 frames across by 2 high).\n\nThe data passed to the SpriteSheet constructor defines:\n
    \n\t
  1. The source image or images to use.
  2. \n\t
  3. The positions of individual image frames.
  4. \n\t
  5. Sequences of frames that form named animations. Optional.
  6. \n\t
  7. The target playback framerate. Optional.
  8. \n
\n

SpriteSheet Format

\nSpriteSheets are an object with two required properties (`images` and `frames`), and two optional properties\n(`framerate` and `animations`). This makes them easy to define in javascript code, or in JSON.\n\n

images

\nAn array of source images. Images can be either an HTMlimage\ninstance, or a uri to an image. The former is recommended to control preloading.\n\n\timages: [image1, \"path/to/image2.png\"],\n\n

frames

\nDefines the individual frames. There are two supported formats for frame data:\nWhen all of the frames are the same size (in a grid), use an object with `width`, `height`, `regX`, `regY`,\nand `count` properties.\n\n\n\n \tframes: {width:64, height:64, count:20, regX: 32, regY:64, spacing:0, margin:0}\n\nIf the frames are of different sizes, use an array of frame definitions. Each definition is itself an array\nwith 4 required and 3 optional entries, in the order:\n\n\n\n\tframes: [\n\t\t// x, y, width, height, imageIndex*, regX*, regY*\n\t\t[64, 0, 96, 64],\n\t\t[0, 0, 64, 64, 1, 32, 32]\n\t\t// etc.\n\t]\n\n

animations

\nOptional. An object defining sequences of frames to play as named animations. Each property corresponds to an\nanimation of the same name. Each animation must specify the frames to play, and may\nalso include a relative playback `speed` (ex. 2 would playback at double speed, 0.5 at half), and\nthe name of the `next` animation to sequence to after it completes.\n\nThere are three formats supported for defining the frames in an animation, which can be mixed and matched as appropriate:\n
    \n\t
  1. for a single frame animation, you can simply specify the frame index\n\n\t\tanimations: {\n\t\t\tsit: 7\n\t\t}\n\n
  2. \n
  3. \n for an animation of consecutive frames, you can use an array with two required, and two optional entries\n\t\tin the order: `start`, `end`, `next`, and `speed`. This will play the frames from start to end inclusive.\n\n\t\tanimations: {\n\t\t\t// start, end, next*, speed*\n\t\t\trun: [0, 8],\n\t\t\tjump: [9, 12, \"run\", 2]\n\t\t}\n\n
  4. \n
  5. \n for non-consecutive frames, you can use an object with a `frames` property defining an array of frame\n indexes to play in order. The object can also specify `next` and `speed` properties.\n\n\t\tanimations: {\n\t\t\twalk: {\n\t\t\t\tframes: [1,2,3,3,2,1]\n\t\t\t},\n\t\t\tshoot: {\n\t\t\t\tframes: [1,4,5,6],\n\t\t\t\tnext: \"walk\",\n\t\t\t\tspeed: 0.5\n\t\t\t}\n\t\t}\n\n
  6. \n
\nNote: the `speed` property was added in EaselJS 0.7.0. Earlier versions had a `frequency`\nproperty instead, which was the inverse of `speed`. For example, a value of \"4\" would be 1/4 normal speed in\nearlier versions, but is 4x normal speed in EaselJS 0.7.0+.\n\n

framerate

\nOptional. Indicates the default framerate to play this spritesheet at in frames per second. See\n{{#crossLink \"SpriteSheet/framerate:property\"}}{{/crossLink}} for more information.\n\n\t\tframerate: 20\n\nNote that the Sprite framerate will only work if the stage update method is provided with the {{#crossLink \"Ticker/tick:event\"}}{{/crossLink}}\nevent generated by the {{#crossLink \"Ticker\"}}{{/crossLink}}.\n\n\t\tcreatejs.Ticker.on(\"tick\", handleTick);\n\t\tfunction handleTick(event) {\n\t\t\tstage.update(event);\n\t\t}\n\n

Example

\nTo define a simple sprite sheet, with a single image \"sprites.jpg\" arranged in a regular 50x50 grid with three\nanimations: \"stand\" showing the first frame, \"run\" looping frame 1-5 inclusive, and \"jump\" playing frame 6-8 and\nsequencing back to run.\n\n\t\tvar data = {\n\t\t\timages: [\"sprites.jpg\"],\n\t\t\tframes: {width:50, height:50},\n\t\t\tanimations: {\n\t\t\t\tstand:0,\n\t\t\t\trun:[1,5],\n\t\t\t\tjump:[6,8,\"run\"]\n\t\t\t}\n\t\t};\n\t\tvar spriteSheet = new createjs.SpriteSheet(data);\n\t\tvar animation = new createjs.Sprite(spriteSheet, \"run\");\n\n

Generating SpriteSheet Images

\nSpritesheets can be created manually by combining images in PhotoShop, and specifying the frame size or\ncoordinates manually, however there are a number of tools that facilitate this.\n\n\n

Cross Origin Issues

\nWarning: Images loaded cross-origin will throw cross-origin security errors when interacted with\nusing:\n\nYou can get around this by setting `crossOrigin` property on your images before passing them to EaselJS, or\nsetting the `crossOrigin` property on PreloadJS' LoadQueue or LoadItems.\n\n\t\tvar image = new Image();\n\t\timg.crossOrigin=\"Anonymous\";\n\t\timg.src = \"http://server-with-CORS-support.com/path/to/image.jpg\";\n\nIf you pass string paths to SpriteSheets, they will not work cross-origin. The server that stores the image must\nsupport cross-origin requests, or this will not work. For more information, check out\nCORS overview on MDN.", "is_constructor": 1, "params": [ { "name": "data", "description": "An object describing the SpriteSheet data.", "type": "Object" } ], "extends": "EventDispatcher" }, "Stage": { "name": "Stage", "shortname": "Stage", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "EaselJS", "namespace": "", "file": "easeljs/display/Stage.js", "line": 41, "description": "A stage is the root level {{#crossLink \"Container\"}}{{/crossLink}} for a display list. Each time its {{#crossLink \"Stage/tick\"}}{{/crossLink}}\nmethod is called, it will render its display list to its target canvas.\n\n

Example

\nThis example creates a stage, adds a child to it, then uses {{#crossLink \"Ticker\"}}{{/crossLink}} to update the child\nand redraw the stage using {{#crossLink \"Stage/update\"}}{{/crossLink}}.\n\n var stage = new createjs.Stage(\"canvasElementId\");\n var image = new createjs.Bitmap(\"imagePath.png\");\n stage.addChild(image);\n createjs.Ticker.addEventListener(\"tick\", handleTick);\n function handleTick(event) {\n image.x += 10;\n stage.update();\n }", "extends": "Container", "is_constructor": 1, "params": [ { "name": "canvas", "description": "A canvas object that the Stage will render to, or the string id\nof a canvas object in the current document.", "type": "HTMLCanvasElement | String | Object" } ] }, "StageGL": { "name": "StageGL", "shortname": "StageGL", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "EaselJS", "namespace": "", "file": "easeljs/display/StageGL.js", "line": 56, "description": "A StageGL instance is the root level {{#crossLink \"Container\"}}{{/crossLink}} for an WebGL-optimized display list,\nwhich is used in place of the usual {{#crossLink \"Stage\"}}{{/crossLink}}. This class should behave identically to\na {{#crossLink \"Stage\"}}{{/crossLink}} except for WebGL-specific functionality.\n\nEach time the {{#crossLink \"Stage/tick\"}}{{/crossLink}} method is called, the display list is rendered to the\ntarget <canvas/> instance, ignoring non-WebGL-compatible display objects. On devices and browsers that don't\nsupport WebGL, content will automatically be rendered to canvas 2D context instead.\n\n

Limitations

\n- {{#crossLink \"Shape\"}}{{/crossLink}}, {{#crossLink \"Shadow\"}}{{/crossLink}}, and {{#crossLink \"Text\"}}{{/crossLink}}\n\tare not rendered when added to the display list.\n- To display something StageGL cannot render, {{#crossLink \"displayObject/cache\"}}{{/crossLink}} the object.\n\tCaches can be rendered regardless of source.\n- Images are wrapped as a webGL \"Texture\". Each graphics card has a limit to its concurrent Textures, too many \nTextures will noticeably slow performance.\n- Each cache counts as an individual Texture. As such {{#crossLink \"SpriteSheet\"}}{{/crossLink}} and \n{{#crossLink \"SpriteSheetBuilder\"}}{{/crossLink}} are recommended practices to help keep texture counts low.\n- To use any image node (DOM Image/Canvas Element) between multiple StageGL instances it must be a \n{{#crossLink \"Bitmap/clone\"}}{{/crossLink}}, otherwise the GPU texture loading and tracking will get confused.\n- to avoid an up/down scaled render you must call {{#crossLink \"StageGL/updateViewport\"}}{{/crossLink}} if you\nresize your canvas after making a StageGL instance, this will properly size the WebGL context stored in memory.\n- Best performance in demanding scenarios will come from manual management of texture memory, but it is handled\nautomatically by default. See {{#crossLink \"StageGL/releaseTexture\"}}{{/crossLink}} for details.\n\n

Example

\nThis example creates a StageGL instance, adds a child to it, then uses the EaselJS {{#crossLink \"Ticker\"}}{{/crossLink}}\nto update the child and redraw the stage.\n\n var stage = new createjs.StageGL(\"canvasElementId\");\n\n var image = new createjs.Bitmap(\"imagePath.png\");\n stage.addChild(image);\n\n createjs.Ticker.on(\"tick\", handleTick);\n\n function handleTick(event) {\n image.x += 10;\n stage.update();\n }\n\n

Notes

\n- StageGL is not currently included in the minified version of EaselJS.\n- {{#crossLink \"SpriteContainer\"}}{{/crossLink}} (the previous approach to WebGL with EaselJS) has been deprecated.\n- Earlier versions of WebGL support in EaselJS (SpriteStage and SpriteContainer) had hard limitations on images\n\tper container, which have been solved.", "extends": "Stage", "is_constructor": 1, "params": [ { "name": "canvas", "description": "A canvas object that StageGL will render to, or the string id\n of a canvas object in the current DOM.", "type": "HTMLCanvasElement | String | Object" }, { "name": "options", "description": "All the option parameters in a reference object, some are not supported by some browsers.", "type": "Object", "props": [ { "name": "preserveBuffer", "description": "If `true`, the canvas is NOT auto-cleared by WebGL (the spec\n discourages setting this to `true`). This is useful if you want persistent draw effects.", "type": "Boolean", "optional": true, "optdefault": "false" }, { "name": "antialias", "description": "Specifies whether or not the browser's WebGL implementation should try\n to perform anti-aliasing. This will also enable linear pixel sampling on power-of-two textures (smoother images).", "type": "Boolean", "optional": true, "optdefault": "false" }, { "name": "transparent", "description": "If `true`, the canvas is transparent. This is very\nexpensive, and should be used with caution.", "type": "Boolean", "optional": true, "optdefault": "false" }, { "name": "premultiply", "description": "Alters color handling. If `true`, this assumes the shader must\naccount for pre-multiplied alpha. This can help avoid visual halo effects with some assets, but may also cause\nproblems with other assets.", "type": "Boolean", "optional": true, "optdefault": "false" }, { "name": "autoPurge", "description": "How often the system should automatically dump unused textures with\n`purgeTextures(autoPurge)` every `autoPurge/2` draws. See {{#crossLink \"StageGL/purgeTextures\"}}{{/crossLink}} for more\ninformation.", "type": "Integer", "optional": true, "optdefault": "1200" } ] } ] }, "Text": { "name": "Text", "shortname": "Text", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "EaselJS", "namespace": "", "file": "easeljs/display/Text.js", "line": 41, "description": "Display one or more lines of dynamic text (not user editable) in the display list. Line wrapping support (using the\nlineWidth) is very basic, wrapping on spaces and tabs only. Note that as an alternative to Text, you can position HTML\ntext above or below the canvas relative to items in the display list using the {{#crossLink \"DisplayObject/localToGlobal\"}}{{/crossLink}}\nmethod, or using {{#crossLink \"DOMElement\"}}{{/crossLink}}.\n\nPlease note that Text does not support HTML text, and can only display one font style at a time. To use\nmultiple font styles, you will need to create multiple text instances, and position them manually.\n\n

Example

\n\n var text = new createjs.Text(\"Hello World\", \"20px Arial\", \"#ff7700\");\n text.x = 100;\n text.textBaseline = \"alphabetic\";\n\nCreateJS Text supports web fonts (the same rules as Canvas). The font must be loaded and supported by the browser\nbefore it can be displayed.\n\nNote: Text can be expensive to generate, so cache instances where possible. Be aware that not all\nbrowsers will render Text exactly the same.", "extends": "DisplayObject", "is_constructor": 1, "params": [ { "name": "text", "description": "The text to display.", "type": "String", "optional": true }, { "name": "font", "description": "The font style to use. Any valid value for the CSS font attribute is acceptable (ex. \"bold\n36px Arial\").", "type": "String", "optional": true }, { "name": "color", "description": "The color to draw the text in. Any valid value for the CSS color attribute is acceptable (ex.\n\"#F00\", \"red\", or \"#FF0000\").", "type": "String", "optional": true } ] }, "MouseEvent": { "name": "MouseEvent", "shortname": "MouseEvent", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "EaselJS", "namespace": "", "file": "easeljs/events/MouseEvent.js", "line": 41, "description": "Passed as the parameter to all mouse/pointer/touch related events. For a listing of mouse events and their properties,\nsee the {{#crossLink \"DisplayObject\"}}{{/crossLink}} and {{#crossLink \"Stage\"}}{{/crossLink}} event listings.", "params": [ { "name": "type", "description": "The event type.", "type": "String" }, { "name": "bubbles", "description": "Indicates whether the event will bubble through the display list.", "type": "Boolean" }, { "name": "cancelable", "description": "Indicates whether the default behaviour of this event can be cancelled.", "type": "Boolean" }, { "name": "stageX", "description": "The normalized x position relative to the stage.", "type": "Number" }, { "name": "stageY", "description": "The normalized y position relative to the stage.", "type": "Number" }, { "name": "nativeEvent", "description": "The native DOM event related to this mouse event.", "type": "MouseEvent" }, { "name": "pointerID", "description": "The unique id for the pointer.", "type": "Number" }, { "name": "primary", "description": "Indicates whether this is the primary pointer in a multitouch environment.", "type": "Boolean" }, { "name": "rawX", "description": "The raw x position relative to the stage.", "type": "Number" }, { "name": "rawY", "description": "The raw y position relative to the stage.", "type": "Number" }, { "name": "relatedTarget", "description": "The secondary target for the event.", "type": "DisplayObject" } ], "extends": "Event", "is_constructor": 1 }, "AlphaMapFilter": { "name": "AlphaMapFilter", "shortname": "AlphaMapFilter", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "EaselJS", "namespace": "", "file": "easeljs/filters/AlphaMapFilter.js", "line": 41, "description": "Applies a greyscale alpha map image (or canvas) to the target, such that the alpha channel of the result will\nbe copied from the red channel of the map, and the RGB channels will be copied from the target.\n\nGenerally, it is recommended that you use {{#crossLink \"AlphaMaskFilter\"}}{{/crossLink}}, because it has much\nbetter performance.\n\n

Example

\nThis example draws a red->blue box, caches it, and then uses the cache canvas as an alpha map on a 100x100 image.\n\n var box = new createjs.Shape();\n box.graphics.beginLinearGradientFill([\"#ff0000\", \"#0000ff\"], [0, 1], 0, 0, 0, 100)\n box.graphics.drawRect(0, 0, 100, 100);\n box.cache(0, 0, 100, 100);\n\n var bmp = new createjs.Bitmap(\"path/to/image.jpg\");\n bmp.filters = [\n new createjs.AlphaMapFilter(box.cacheCanvas)\n ];\n bmp.cache(0, 0, 100, 100);\n stage.addChild(bmp);\n\nSee {{#crossLink \"Filter\"}}{{/crossLink}} for more information on applying filters.", "extends": "Filter", "is_constructor": 1, "params": [ { "name": "alphaMap", "description": "The greyscale image (or canvas) to use as the alpha value for the\nresult. This should be exactly the same dimensions as the target.", "type": "HTMLImageElement|HTMLCanvasElement" } ] }, "AlphaMaskFilter": { "name": "AlphaMaskFilter", "shortname": "AlphaMaskFilter", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "EaselJS", "namespace": "", "file": "easeljs/filters/AlphaMaskFilter.js", "line": 41, "description": "Applies the alpha from the mask image (or canvas) to the target, such that the alpha channel of the result will\nbe derived from the mask, and the RGB channels will be copied from the target. This can be used, for example, to\napply an alpha mask to a display object. This can also be used to combine a JPG compressed RGB image with a PNG32\nalpha mask, which can result in a much smaller file size than a single PNG32 containing ARGB.\n\nIMPORTANT NOTE: This filter currently does not support the targetCtx, or targetX/Y parameters correctly.\n\n

Example

\nThis example draws a gradient box, then caches it and uses the \"cacheCanvas\" as the alpha mask on a 100x100 image.\n\n var box = new createjs.Shape();\n box.graphics.beginLinearGradientFill([\"#000000\", \"rgba(0, 0, 0, 0)\"], [0, 1], 0, 0, 100, 100)\n box.graphics.drawRect(0, 0, 100, 100);\n box.cache(0, 0, 100, 100);\n\n var bmp = new createjs.Bitmap(\"path/to/image.jpg\");\n bmp.filters = [\n new createjs.AlphaMaskFilter(box.cacheCanvas)\n ];\n bmp.cache(0, 0, 100, 100);\n\nSee {{#crossLink \"Filter\"}}{{/crossLink}} for more information on applying filters.", "extends": "Filter", "is_constructor": 1, "params": [ { "name": "mask", "description": "", "type": "HTMLImageElement|HTMLCanvasElement" } ] }, "BitmapCache": { "name": "BitmapCache", "shortname": "BitmapCache", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "EaselJS", "namespace": "", "file": "easeljs/filters/BitmapCache.js", "line": 41, "description": "The BitmapCache is an internal representation of all the cache properties and logic required in order to \"cache\"\nan object. This information and functionality used to be located on a {{#crossLink \"DisplayObject/cache\"}}{{/crossLink}}\nmethod in {{#crossLink \"DisplayObject\"}}{{/crossLink}}, but was moved to its own class.\n\nCaching in this context is purely visual, and will render the DisplayObject out into an image to be used instead\nof the object. The actual cache itself is still stored on the target with the {{#crossLink \"DisplayObject/cacheCanvas:property\"}}{{/crossLink}}.\nWorking with a singular image like a {{#crossLink \"Bitmap\"}}{{/crossLink}} there is little benefit to performing \na cache as it is already a single image. Caching is best done on containers containing multiple complex parts that \ndo not move often, so that rendering the image instead will improve overall rendering speed. A cached object will \nnot visually update until explicitly told to do so with a call to update, much like a Stage. If a cache is being \nupdated every frame it is likely not improving rendering performance. Cache are best used when updates will be sparse.\n\nCaching is also a co-requisite for applying filters to prevent expensive filters running constantly without need, \nand to physically enable some effects. The BitmapCache is also responsible for applying filters to objects and \nreads each {{#crossLink \"Filter\"}}{{/crossLink}} due to this relationship. Real-time Filters are not recommended \nperformance wise when dealing with a Context2D canvas. For best performance and to still allow for some visual \neffects use a compositeOperation when possible.", "is_constructor": 1 }, "BlurFilter": { "name": "BlurFilter", "shortname": "BlurFilter", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "EaselJS", "namespace": "", "file": "easeljs/filters/BlurFilter.js", "line": 43, "description": "Applies a box blur to DisplayObjects in context 2D and a Gaussian blur in webgl. Note that this filter is fairly\nintensive, particularly if the quality is set higher than 1.\n\n

Example

\nThis example creates a red circle, and then applies a 5 pixel blur to it. It uses the {{#crossLink \"Filter/getBounds\"}}{{/crossLink}}\nmethod to account for the spread that the blur causes.\n\n var shape = new createjs.Shape().set({x:100,y:100});\n shape.graphics.beginFill(\"#ff0000\").drawCircle(0,0,50);\n\n var blurFilter = new createjs.BlurFilter(5, 5, 1);\n shape.filters = [blurFilter];\n var bounds = blurFilter.getBounds();\n\n shape.cache(-50+bounds.x, -50+bounds.y, 100+bounds.width, 100+bounds.height);\n\nSee {{#crossLink \"Filter\"}}{{/crossLink}} for an more information on applying filters.", "extends": "Filter", "is_constructor": 1, "params": [ { "name": "blurX", "description": "The horizontal blur radius in pixels.", "type": "Number", "optional": true, "optdefault": "0" }, { "name": "blurY", "description": "The vertical blur radius in pixels.", "type": "Number", "optional": true, "optdefault": "0" }, { "name": "quality", "description": "The number of blur iterations.", "type": "Number", "optional": true, "optdefault": "1" } ] }, "ColorFilter": { "name": "ColorFilter", "shortname": "ColorFilter", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "EaselJS", "namespace": "", "file": "easeljs/filters/ColorFilter.js", "line": 41, "description": "Applies a color transform to DisplayObjects.\n\n

Example

\nThis example draws a red circle, and then transforms it to Blue. This is accomplished by multiplying all the channels\nto 0 (except alpha, which is set to 1), and then adding 255 to the blue channel.\n\n var shape = new createjs.Shape().set({x:100,y:100});\n shape.graphics.beginFill(\"#ff0000\").drawCircle(0,0,50);\n\n shape.filters = [\n new createjs.ColorFilter(0,0,0,1, 0,0,255,0)\n ];\n shape.cache(-50, -50, 100, 100);\n\nSee {{#crossLink \"Filter\"}}{{/crossLink}} for an more information on applying filters.", "params": [ { "name": "redMultiplier", "description": "The amount to multiply against the red channel. This is a range between 0 and 1.", "type": "Number", "optional": true, "optdefault": "1" }, { "name": "greenMultiplier", "description": "The amount to multiply against the green channel. This is a range between 0 and 1.", "type": "Number", "optional": true, "optdefault": "1" }, { "name": "blueMultiplier", "description": "The amount to multiply against the blue channel. This is a range between 0 and 1.", "type": "Number", "optional": true, "optdefault": "1" }, { "name": "alphaMultiplier", "description": "The amount to multiply against the alpha channel. This is a range between 0 and 1.", "type": "Number", "optional": true, "optdefault": "1" }, { "name": "redOffset", "description": "The amount to add to the red channel after it has been multiplied. This is a range\nbetween -255 and 255.", "type": "Number", "optional": true, "optdefault": "0" }, { "name": "greenOffset", "description": "The amount to add to the green channel after it has been multiplied. This is a range\nbetween -255 and 255.", "type": "Number", "optional": true, "optdefault": "0" }, { "name": "blueOffset", "description": "The amount to add to the blue channel after it has been multiplied. This is a range\nbetween -255 and 255.", "type": "Number", "optional": true, "optdefault": "0" }, { "name": "alphaOffset", "description": "The amount to add to the alpha channel after it has been multiplied. This is a range\nbetween -255 and 255.", "type": "Number", "optional": true, "optdefault": "0" } ], "is_constructor": 1, "extends": "Filter" }, "ColorMatrix": { "name": "ColorMatrix", "shortname": "ColorMatrix", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "EaselJS", "namespace": "", "file": "easeljs/filters/ColorMatrix.js", "line": 41, "description": "Provides helper functions for assembling a matrix for use with the {{#crossLink \"ColorMatrixFilter\"}}{{/crossLink}}.\nMost methods return the instance to facilitate chained calls.\n\n

Example

\n\n myColorMatrix.adjustHue(20).adjustBrightness(50);\n\nSee {{#crossLink \"Filter\"}}{{/crossLink}} for an example of how to apply filters, or {{#crossLink \"ColorMatrixFilter\"}}{{/crossLink}}\nfor an example of how to use ColorMatrix to change a DisplayObject's color.", "params": [ { "name": "brightness", "description": "", "type": "Number" }, { "name": "contrast", "description": "", "type": "Number" }, { "name": "saturation", "description": "", "type": "Number" }, { "name": "hue", "description": "", "type": "Number" } ], "is_constructor": 1 }, "ColorMatrixFilter": { "name": "ColorMatrixFilter", "shortname": "ColorMatrixFilter", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "EaselJS", "namespace": "", "file": "easeljs/filters/ColorMatrixFilter.js", "line": 41, "description": "Allows you to carry out complex color operations such as modifying saturation, brightness, or inverting. See the\n{{#crossLink \"ColorMatrix\"}}{{/crossLink}} for more information on changing colors. For an easier color transform,\nconsider the {{#crossLink \"ColorFilter\"}}{{/crossLink}}.\n\n

Example

\nThis example creates a red circle, inverts its hue, and then saturates it to brighten it up.\n\n var shape = new createjs.Shape().set({x:100,y:100});\n shape.graphics.beginFill(\"#ff0000\").drawCircle(0,0,50);\n\n var matrix = new createjs.ColorMatrix().adjustHue(180).adjustSaturation(100);\n shape.filters = [\n new createjs.ColorMatrixFilter(matrix)\n ];\n\n shape.cache(-50, -50, 100, 100);\n\nSee {{#crossLink \"Filter\"}}{{/crossLink}} for an more information on applying filters.", "is_constructor": 1, "extends": "Filter", "params": [ { "name": "matrix", "description": "A 4x5 matrix describing the color operation to perform. See also the {{#crossLink \"ColorMatrix\"}}{{/crossLink}}\nclass.", "type": "Array | ColorMatrix" } ] }, "Filter": { "name": "Filter", "shortname": "Filter", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "EaselJS", "namespace": "", "file": "easeljs/filters/Filter.js", "line": 41, "description": "Base class that all filters should inherit from. Filters need to be applied to objects that have been cached using\nthe {{#crossLink \"DisplayObject/cache\"}}{{/crossLink}} method. If an object changes, please cache it again, or use\n{{#crossLink \"DisplayObject/updateCache\"}}{{/crossLink}}. Note that the filters must be applied before caching.\n\n

Example

\n\n myInstance.filters = [\n new createjs.ColorFilter(0, 0, 0, 1, 255, 0, 0),\n new createjs.BlurFilter(5, 5, 10)\n ];\n myInstance.cache(0,0, 100, 100);\n\nNote that each filter can implement a {{#crossLink \"Filter/getBounds\"}}{{/crossLink}} method, which returns the\nmargins that need to be applied in order to fully display the filter. For example, the {{#crossLink \"BlurFilter\"}}{{/crossLink}}\nwill cause an object to feather outwards, resulting in a margin around the shape.\n\n

EaselJS Filters

\nEaselJS comes with a number of pre-built filters:\n", "is_constructor": 1 }, "DisplayProps": { "name": "DisplayProps", "shortname": "DisplayProps", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "EaselJS", "namespace": "", "file": "easeljs/geom/DisplayProps.js", "line": 39, "description": "Used for calculating and encapsulating display related properties.", "params": [ { "name": "visible", "description": "Visible value.", "type": "Number", "optional": true, "optdefault": "true" }, { "name": "alpha", "description": "Alpha value.", "type": "Number", "optional": true, "optdefault": "1" }, { "name": "shadow", "description": "A Shadow instance or null.", "type": "Number", "optional": true, "optdefault": "null" }, { "name": "compositeOperation", "description": "A compositeOperation value or null.", "type": "Number", "optional": true, "optdefault": "null" }, { "name": "matrix", "description": "A transformation matrix. Defaults to a new identity matrix.", "type": "Number", "optional": true } ], "is_constructor": 1 }, "Matrix2D": { "name": "Matrix2D", "shortname": "Matrix2D", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "EaselJS", "namespace": "", "file": "easeljs/geom/Matrix2D.js", "line": 41, "description": "Represents an affine transformation matrix, and provides tools for constructing and concatenating matrices.\n\nThis matrix can be visualized as:\n\n\t[ a c tx\n\t b d ty\n\t 0 0 1 ]\n\nNote the locations of b and c.", "params": [ { "name": "a", "description": "Specifies the a property for the new matrix.", "type": "Number", "optional": true, "optdefault": "1" }, { "name": "b", "description": "Specifies the b property for the new matrix.", "type": "Number", "optional": true, "optdefault": "0" }, { "name": "c", "description": "Specifies the c property for the new matrix.", "type": "Number", "optional": true, "optdefault": "0" }, { "name": "d", "description": "Specifies the d property for the new matrix.", "type": "Number", "optional": true, "optdefault": "1" }, { "name": "tx", "description": "Specifies the tx property for the new matrix.", "type": "Number", "optional": true, "optdefault": "0" }, { "name": "ty", "description": "Specifies the ty property for the new matrix.", "type": "Number", "optional": true, "optdefault": "0" } ], "is_constructor": 1 }, "Point": { "name": "Point", "shortname": "Point", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "EaselJS", "namespace": "", "file": "easeljs/geom/Point.js", "line": 41, "description": "Represents a point on a 2 dimensional x / y coordinate system.\n\n

Example

\n\n var point = new createjs.Point(0, 100);", "params": [ { "name": "x", "description": "X position.", "type": "Number", "optional": true, "optdefault": "0" }, { "name": "y", "description": "Y position.", "type": "Number", "optional": true, "optdefault": "0" } ], "is_constructor": 1 }, "Rectangle": { "name": "Rectangle", "shortname": "Rectangle", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "EaselJS", "namespace": "", "file": "easeljs/geom/Rectangle.js", "line": 41, "description": "Represents a rectangle as defined by the points (x, y) and (x+width, y+height).\n\n

Example

\n\n var rect = new createjs.Rectangle(0, 0, 100, 100);", "params": [ { "name": "x", "description": "X position.", "type": "Number", "optional": true, "optdefault": "0" }, { "name": "y", "description": "Y position.", "type": "Number", "optional": true, "optdefault": "0" }, { "name": "width", "description": "The width of the Rectangle.", "type": "Number", "optional": true, "optdefault": "0" }, { "name": "height", "description": "The height of the Rectangle.", "type": "Number", "optional": true, "optdefault": "0" } ], "is_constructor": 1 }, "ButtonHelper": { "name": "ButtonHelper", "shortname": "ButtonHelper", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "EaselJS", "namespace": "", "file": "easeljs/ui/ButtonHelper.js", "line": 41, "description": "The ButtonHelper is a helper class to create interactive buttons from {{#crossLink \"MovieClip\"}}{{/crossLink}} or\n{{#crossLink \"Sprite\"}}{{/crossLink}} instances. This class will intercept mouse events from an object, and\nautomatically call {{#crossLink \"Sprite/gotoAndStop\"}}{{/crossLink}} or {{#crossLink \"Sprite/gotoAndPlay\"}}{{/crossLink}},\nto the respective animation labels, add a pointer cursor, and allows the user to define a hit state frame.\n\nThe ButtonHelper instance does not need to be added to the stage, but a reference should be maintained to prevent\ngarbage collection.\n\nNote that over states will not work unless you call {{#crossLink \"Stage/enableMouseOver\"}}{{/crossLink}}.\n\n

Example

\n\n var helper = new createjs.ButtonHelper(myInstance, \"out\", \"over\", \"down\", false, myInstance, \"hit\");\n myInstance.addEventListener(\"click\", handleClick);\n function handleClick(event) {\n // Click Happened.\n }", "params": [ { "name": "target", "description": "The instance to manage.", "type": "Sprite|MovieClip" }, { "name": "outLabel", "description": "The label or animation to go to when the user rolls out of the button.", "type": "String", "optional": true, "optdefault": "\"out\"" }, { "name": "overLabel", "description": "The label or animation to go to when the user rolls over the button.", "type": "String", "optional": true, "optdefault": "\"over\"" }, { "name": "downLabel", "description": "The label or animation to go to when the user presses the button.", "type": "String", "optional": true, "optdefault": "\"down\"" }, { "name": "play", "description": "If the helper should call \"gotoAndPlay\" or \"gotoAndStop\" on the button when changing\nstates.", "type": "Boolean", "optional": true, "optdefault": "false" }, { "name": "hitArea", "description": "An optional item to use as the hit state for the button. If this is not defined,\nthen the button's visible states will be used instead. Note that the same instance as the \"target\" argument can be\nused for the hitState.", "type": "DisplayObject", "optional": true }, { "name": "hitLabel", "description": "The label or animation on the hitArea instance that defines the hitArea bounds. If this is\nnull, then the default state of the hitArea will be used. *", "type": "String", "optional": true } ], "is_constructor": 1 }, "Touch": { "name": "Touch", "shortname": "Touch", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "EaselJS", "namespace": "", "file": "easeljs/ui/Touch.js", "line": 41, "description": "Global utility for working with multi-touch enabled devices in EaselJS. Currently supports W3C Touch API (iOS and\nmodern Android browser) and the Pointer API (IE), including ms-prefixed events in IE10, and unprefixed in IE11.\n\nEnsure that you {{#crossLink \"Touch/disable\"}}{{/crossLink}} touch when cleaning up your application. You do not have\nto check if touch is supported to enable it, as it will fail gracefully if it is not supported.\n\n

Example

\n\n var stage = new createjs.Stage(\"canvasId\");\n createjs.Touch.enable(stage);\n\nNote: It is important to disable Touch on a stage that you are no longer using:\n\n createjs.Touch.disable(stage);", "static": 1 }, "SpriteSheetBuilder": { "name": "SpriteSheetBuilder", "shortname": "SpriteSheetBuilder", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "EaselJS", "namespace": "", "file": "easeljs/utils/SpriteSheetBuilder.js", "line": 41, "description": "The SpriteSheetBuilder allows you to generate {{#crossLink \"SpriteSheet\"}}{{/crossLink}} instances at run time\nfrom any display object. This can allow you to maintain your assets as vector graphics (for low file size), and\nrender them at run time as SpriteSheets for better performance.\n\nSpriteSheets can be built either synchronously, or asynchronously, so that large SpriteSheets can be generated\nwithout locking the UI.\n\nNote that the \"images\" used in the generated SpriteSheet are actually canvas elements, and that they will be\nsized to the nearest power of 2 up to the value of {{#crossLink \"SpriteSheetBuilder/maxWidth:property\"}}{{/crossLink}}\nor {{#crossLink \"SpriteSheetBuilder/maxHeight:property\"}}{{/crossLink}}.", "params": [ { "name": "framerate", "description": "The {{#crossLink \"SpriteSheet/framerate:property\"}}{{/crossLink}} of\n{{#crossLink \"SpriteSheet\"}}{{/crossLink}} instances that are created.", "type": "Number", "optional": true, "optdefault": "0" } ], "extends": "EventDispatcher", "is_constructor": 1 }, "SpriteSheetUtils": { "name": "SpriteSheetUtils", "shortname": "SpriteSheetUtils", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "EaselJS", "namespace": "", "file": "easeljs/utils/SpriteSheetUtils.js", "line": 41, "description": "The SpriteSheetUtils class is a collection of static methods for working with {{#crossLink \"SpriteSheet\"}}{{/crossLink}}s.\nA sprite sheet is a series of images (usually animation frames) combined into a single image on a regular grid. For\nexample, an animation consisting of 8 100x100 images could be combined into a 400x200 sprite sheet (4 frames across\nby 2 high). The SpriteSheetUtils class uses a static interface and should not be instantiated.", "static": 1 }, "UID": { "name": "UID", "shortname": "UID", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "EaselJS", "namespace": "", "file": "easeljs/utils/UID.js", "line": 41, "description": "Global utility for generating sequential unique ID numbers. The UID class uses a static interface (ex. UID.get())\nand should not be instantiated.", "static": 1 }, "VideoBuffer": { "name": "VideoBuffer", "shortname": "VideoBuffer", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "EaselJS", "namespace": "", "file": "easeljs/utils/VideoBuffer.js", "line": 41, "description": "When an HTML video seeks, including when looping, there is an indeterminate period before a new frame is available.\nThis can result in the video blinking or flashing when it is drawn to a canvas. The VideoBuffer class resolves\nthis issue by drawing each frame to an off-screen canvas and preserving the prior frame during a seek.\n\n\tvar myBuffer = new createjs.VideoBuffer(myVideo);\n\tvar myBitmap = new Bitmap(myBuffer);", "params": [ { "name": "video", "description": "The HTML video element to buffer.", "type": "HTMLVideoElement" } ], "is_constructor": 1 }, "WebGLInspector": { "name": "WebGLInspector", "shortname": "WebGLInspector", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "EaselJS", "namespace": "", "file": "easeljs/utils/WebGLInspector.js", "line": 38, "description": "A utility and helper class designed to work with {{#crossLink \"StageGL\"}}{{/crossLink}} to help investigate and\ntest performance or display problems. It contains logging functions to analyze behaviour and performance testing\nutilities.", "is_constructor": 1, "params": [ { "name": "stage", "description": "The default stage to use when none is supplied.", "type": "StageGL" } ] }, "EaselJS": { "name": "EaselJS", "shortname": "EaselJS", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "module": "EaselJS", "namespace": "", "file": "easeljs/version.js", "line": 9, "description": "Static class holding library specific information such as the version and buildDate of\nthe library." } }, "classitems": [ { "file": "createjs/events/Event.js", "line": 64, "description": "The type of event.", "itemtype": "property", "name": "type", "type": "String", "class": "Event", "module": "CreateJS" }, { "file": "createjs/events/Event.js", "line": 71, "description": "The object that generated an event.", "itemtype": "property", "name": "target", "type": "Object", "default": "null", "readonly": "", "class": "Event", "module": "CreateJS" }, { "file": "createjs/events/Event.js", "line": 80, "description": "The current target that a bubbling event is being dispatched from. For non-bubbling events, this will\nalways be the same as target. For example, if childObj.parent = parentObj, and a bubbling event\nis generated from childObj, then a listener on parentObj would receive the event with\ntarget=childObj (the original target) and currentTarget=parentObj (where the listener was added).", "itemtype": "property", "name": "currentTarget", "type": "Object", "default": "null", "readonly": "", "class": "Event", "module": "CreateJS" }, { "file": "createjs/events/Event.js", "line": 92, "description": "For bubbling events, this indicates the current event phase:
    \n\t
  1. capture phase: starting from the top parent to the target
  2. \n\t
  3. at target phase: currently being dispatched from the target
  4. \n\t
  5. bubbling phase: from the target to the top parent
  6. \n
", "itemtype": "property", "name": "eventPhase", "type": "Number", "default": "0", "readonly": "", "class": "Event", "module": "CreateJS" }, { "file": "createjs/events/Event.js", "line": 105, "description": "Indicates whether the event will bubble through the display list.", "itemtype": "property", "name": "bubbles", "type": "Boolean", "default": "false", "readonly": "", "class": "Event", "module": "CreateJS" }, { "file": "createjs/events/Event.js", "line": 114, "description": "Indicates whether the default behaviour of this event can be cancelled via\n{{#crossLink \"Event/preventDefault\"}}{{/crossLink}}. This is set via the Event constructor.", "itemtype": "property", "name": "cancelable", "type": "Boolean", "default": "false", "readonly": "", "class": "Event", "module": "CreateJS" }, { "file": "createjs/events/Event.js", "line": 124, "description": "The epoch time at which this event was created.", "itemtype": "property", "name": "timeStamp", "type": "Number", "default": "0", "readonly": "", "class": "Event", "module": "CreateJS" }, { "file": "createjs/events/Event.js", "line": 133, "description": "Indicates if {{#crossLink \"Event/preventDefault\"}}{{/crossLink}} has been called\non this event.", "itemtype": "property", "name": "defaultPrevented", "type": "Boolean", "default": "false", "readonly": "", "class": "Event", "module": "CreateJS" }, { "file": "createjs/events/Event.js", "line": 143, "description": "Indicates if {{#crossLink \"Event/stopPropagation\"}}{{/crossLink}} or\n{{#crossLink \"Event/stopImmediatePropagation\"}}{{/crossLink}} has been called on this event.", "itemtype": "property", "name": "propagationStopped", "type": "Boolean", "default": "false", "readonly": "", "class": "Event", "module": "CreateJS" }, { "file": "createjs/events/Event.js", "line": 153, "description": "Indicates if {{#crossLink \"Event/stopImmediatePropagation\"}}{{/crossLink}} has been called\non this event.", "itemtype": "property", "name": "immediatePropagationStopped", "type": "Boolean", "default": "false", "readonly": "", "class": "Event", "module": "CreateJS" }, { "file": "createjs/events/Event.js", "line": 163, "description": "Indicates if {{#crossLink \"Event/remove\"}}{{/crossLink}} has been called on this event.", "itemtype": "property", "name": "removed", "type": "Boolean", "default": "false", "readonly": "", "class": "Event", "module": "CreateJS" }, { "file": "createjs/events/Event.js", "line": 175, "description": "Sets {{#crossLink \"Event/defaultPrevented\"}}{{/crossLink}} to true if the event is cancelable.\nMirrors the DOM level 2 event standard. In general, cancelable events that have `preventDefault()` called will\ncancel the default behaviour associated with the event.", "itemtype": "method", "name": "preventDefault", "class": "Event", "module": "CreateJS" }, { "file": "createjs/events/Event.js", "line": 185, "description": "Sets {{#crossLink \"Event/propagationStopped\"}}{{/crossLink}} to true.\nMirrors the DOM event standard.", "itemtype": "method", "name": "stopPropagation", "class": "Event", "module": "CreateJS" }, { "file": "createjs/events/Event.js", "line": 194, "description": "Sets {{#crossLink \"Event/propagationStopped\"}}{{/crossLink}} and\n{{#crossLink \"Event/immediatePropagationStopped\"}}{{/crossLink}} to true.\nMirrors the DOM event standard.", "itemtype": "method", "name": "stopImmediatePropagation", "class": "Event", "module": "CreateJS" }, { "file": "createjs/events/Event.js", "line": 204, "description": "Causes the active listener to be removed via removeEventListener();\n\n\t\tmyBtn.addEventListener(\"click\", function(evt) {\n\t\t\t// do stuff...\n\t\t\tevt.remove(); // removes this listener.\n\t\t});", "itemtype": "method", "name": "remove", "class": "Event", "module": "CreateJS" }, { "file": "createjs/events/Event.js", "line": 218, "description": "Returns a clone of the Event instance.", "itemtype": "method", "name": "clone", "return": { "description": "a clone of the Event instance.", "type": "Event" }, "class": "Event", "module": "CreateJS" }, { "file": "createjs/events/Event.js", "line": 227, "description": "Provides a chainable shortcut method for setting a number of properties on the instance.", "itemtype": "method", "name": "set", "params": [ { "name": "props", "description": "A generic object containing properties to copy to the instance.", "type": "Object" } ], "return": { "description": "Returns the instance the method is called on (useful for chaining calls.)", "type": "Event" }, "chainable": 1, "class": "Event", "module": "CreateJS" }, { "file": "createjs/events/Event.js", "line": 240, "description": "Returns a string representation of this object.", "itemtype": "method", "name": "toString", "return": { "description": "a string representation of the instance.", "type": "String" }, "class": "Event", "module": "CreateJS" }, { "file": "createjs/events/EventDispatcher.js", "line": 99, "access": "protected", "tagname": "", "itemtype": "property", "name": "_listeners", "type": "Object", "class": "EventDispatcher", "module": "CreateJS" }, { "file": "createjs/events/EventDispatcher.js", "line": 106, "access": "protected", "tagname": "", "itemtype": "property", "name": "_captureListeners", "type": "Object", "class": "EventDispatcher", "module": "CreateJS" }, { "file": "createjs/events/EventDispatcher.js", "line": 116, "description": "Static initializer to mix EventDispatcher methods into a target object or prototype.\n\n\t\tEventDispatcher.initialize(MyClass.prototype); // add to the prototype of the class\n\t\tEventDispatcher.initialize(myObject); // add to a specific instance", "itemtype": "method", "name": "initialize", "static": 1, "params": [ { "name": "target", "description": "The target object to inject EventDispatcher methods into. This can be an instance or a\nprototype.", "type": "Object" } ], "class": "EventDispatcher", "module": "CreateJS" }, { "file": "createjs/events/EventDispatcher.js", "line": 140, "description": "Adds the specified event listener. Note that adding multiple listeners to the same function will result in\nmultiple callbacks getting fired.\n\n

Example

\n\n displayObject.addEventListener(\"click\", handleClick);\n function handleClick(event) {\n // Click happened.\n }", "itemtype": "method", "name": "addEventListener", "params": [ { "name": "type", "description": "The string type of the event.", "type": "String" }, { "name": "listener", "description": "An object with a handleEvent method, or a function that will be called when\nthe event is dispatched.", "type": "Function | Object" }, { "name": "useCapture", "description": "For events that bubble, indicates whether to listen for the event in the capture or bubbling/target phase.", "type": "Boolean", "optional": true } ], "return": { "description": "Returns the listener for chaining or assignment.", "type": "Function | Object" }, "class": "EventDispatcher", "module": "CreateJS" }, { "file": "createjs/events/EventDispatcher.js", "line": 173, "description": "A shortcut method for using addEventListener that makes it easier to specify an execution scope, have a listener\nonly run once, associate arbitrary data with the listener, and remove the listener.\n\nThis method works by creating an anonymous wrapper function and subscribing it with addEventListener.\nThe wrapper function is returned for use with `removeEventListener` (or `off`).\n\nIMPORTANT: To remove a listener added with `on`, you must pass in the returned wrapper function as the listener, or use\n{{#crossLink \"Event/remove\"}}{{/crossLink}}. Likewise, each time you call `on` a NEW wrapper function is subscribed, so multiple calls\nto `on` with the same params will create multiple listeners.\n\n

Example

\n\n\t\tvar listener = myBtn.on(\"click\", handleClick, null, false, {count:3});\n\t\tfunction handleClick(evt, data) {\n\t\t\tdata.count -= 1;\n\t\t\tconsole.log(this == myBtn); // true - scope defaults to the dispatcher\n\t\t\tif (data.count == 0) {\n\t\t\t\talert(\"clicked 3 times!\");\n\t\t\t\tmyBtn.off(\"click\", listener);\n\t\t\t\t// alternately: evt.remove();\n\t\t\t}\n\t\t}", "itemtype": "method", "name": "on", "params": [ { "name": "type", "description": "The string type of the event.", "type": "String" }, { "name": "listener", "description": "An object with a handleEvent method, or a function that will be called when\nthe event is dispatched.", "type": "Function | Object" }, { "name": "scope", "description": "The scope to execute the listener in. Defaults to the dispatcher/currentTarget for function listeners, and to the listener itself for object listeners (ie. using handleEvent).", "type": "Object", "optional": true }, { "name": "once", "description": "If true, the listener will remove itself after the first time it is triggered.", "type": "Boolean", "optional": true, "optdefault": "false" }, { "name": "data", "description": "Arbitrary data that will be included as the second parameter when the listener is called.", "type": "*", "optional": true }, { "name": "useCapture", "description": "For events that bubble, indicates whether to listen for the event in the capture or bubbling/target phase.", "type": "Boolean", "optional": true, "optdefault": "false" } ], "return": { "description": "Returns the anonymous function that was created and assigned as the listener. This is needed to remove the listener later using .removeEventListener.", "type": "Function" }, "class": "EventDispatcher", "module": "CreateJS" }, { "file": "createjs/events/EventDispatcher.js", "line": 219, "description": "Removes the specified event listener.\n\nImportant Note: that you must pass the exact function reference used when the event was added. If a proxy\nfunction, or function closure is used as the callback, the proxy/closure reference must be used - a new proxy or\nclosure will not work.\n\n

Example

\n\n displayObject.removeEventListener(\"click\", handleClick);", "itemtype": "method", "name": "removeEventListener", "params": [ { "name": "type", "description": "The string type of the event.", "type": "String" }, { "name": "listener", "description": "The listener function or object.", "type": "Function | Object" }, { "name": "useCapture", "description": "For events that bubble, indicates whether to listen for the event in the capture or bubbling/target phase.", "type": "Boolean", "optional": true } ], "class": "EventDispatcher", "module": "CreateJS" }, { "file": "createjs/events/EventDispatcher.js", "line": 249, "description": "A shortcut to the removeEventListener method, with the same parameters and return value. This is a companion to the\n.on method.\n\nIMPORTANT: To remove a listener added with `on`, you must pass in the returned wrapper function as the listener. See \n{{#crossLink \"EventDispatcher/on\"}}{{/crossLink}} for an example.", "itemtype": "method", "name": "off", "params": [ { "name": "type", "description": "The string type of the event.", "type": "String" }, { "name": "listener", "description": "The listener function or object.", "type": "Function | Object" }, { "name": "useCapture", "description": "For events that bubble, indicates whether to listen for the event in the capture or bubbling/target phase.", "type": "Boolean", "optional": true } ], "class": "EventDispatcher", "module": "CreateJS" }, { "file": "createjs/events/EventDispatcher.js", "line": 263, "description": "Removes all listeners for the specified type, or all listeners of all types.\n\n

Example

\n\n // Remove all listeners\n displayObject.removeAllEventListeners();\n\n // Remove all click listeners\n displayObject.removeAllEventListeners(\"click\");", "itemtype": "method", "name": "removeAllEventListeners", "params": [ { "name": "type", "description": "The string type of the event. If omitted, all listeners for all types will be removed.", "type": "String", "optional": true } ], "class": "EventDispatcher", "module": "CreateJS" }, { "file": "createjs/events/EventDispatcher.js", "line": 285, "description": "Dispatches the specified event to all listeners.\n\n

Example

\n\n // Use a string event\n this.dispatchEvent(\"complete\");\n\n // Use an Event instance\n var event = new createjs.Event(\"progress\");\n this.dispatchEvent(event);", "itemtype": "method", "name": "dispatchEvent", "params": [ { "name": "eventObj", "description": "An object with a \"type\" property, or a string type.\nWhile a generic object will work, it is recommended to use a CreateJS Event instance. If a string is used,\ndispatchEvent will construct an Event instance if necessary with the specified type. This latter approach can\nbe used to avoid event object instantiation for non-bubbling events that may not have any listeners.", "type": "Object | String | Event" }, { "name": "bubbles", "description": "Specifies the `bubbles` value when a string was passed to eventObj.", "type": "Boolean", "optional": true }, { "name": "cancelable", "description": "Specifies the `cancelable` value when a string was passed to eventObj.", "type": "Boolean", "optional": true } ], "return": { "description": "Returns false if `preventDefault()` was called on a cancelable event, true otherwise.", "type": "Boolean" }, "class": "EventDispatcher", "module": "CreateJS" }, { "file": "createjs/events/EventDispatcher.js", "line": 339, "description": "Indicates whether there is at least one listener for the specified event type.", "itemtype": "method", "name": "hasEventListener", "params": [ { "name": "type", "description": "The string type of the event.", "type": "String" } ], "return": { "description": "Returns true if there is at least one listener for the specified event.", "type": "Boolean" }, "class": "EventDispatcher", "module": "CreateJS" }, { "file": "createjs/events/EventDispatcher.js", "line": 350, "description": "Indicates whether there is at least one listener for the specified event type on this object or any of its\nancestors (parent, parent's parent, etc). A return value of true indicates that if a bubbling event of the\nspecified type is dispatched from this object, it will trigger at least one listener.\n\nThis is similar to {{#crossLink \"EventDispatcher/hasEventListener\"}}{{/crossLink}}, but it searches the entire\nevent flow for a listener, not just this object.", "itemtype": "method", "name": "willTrigger", "params": [ { "name": "type", "description": "The string type of the event.", "type": "String" } ], "return": { "description": "Returns `true` if there is at least one listener for the specified event.", "type": "Boolean" }, "class": "EventDispatcher", "module": "CreateJS" }, { "file": "createjs/events/EventDispatcher.js", "line": 370, "itemtype": "method", "name": "toString", "return": { "description": "a string representation of the instance.", "type": "String" }, "class": "EventDispatcher", "module": "CreateJS" }, { "file": "createjs/events/EventDispatcher.js", "line": 380, "itemtype": "method", "name": "_dispatchEvent", "params": [ { "name": "eventObj", "description": "", "type": "Object | Event" }, { "name": "eventPhase", "description": "", "type": "Object" } ], "access": "protected", "tagname": "", "class": "EventDispatcher", "module": "CreateJS" }, { "file": "createjs/utils/Ticker.js", "line": 69, "description": "In this mode, Ticker uses the requestAnimationFrame API, but attempts to synch the ticks to target framerate. It\nuses a simple heuristic that compares the time of the RAF return to the target time for the current frame and\ndispatches the tick when the time is within a certain threshold.\n\nThis mode has a higher variance for time between frames than {{#crossLink \"Ticker/TIMEOUT:property\"}}{{/crossLink}},\nbut does not require that content be time based as with {{#crossLink \"Ticker/RAF:property\"}}{{/crossLink}} while\ngaining the benefits of that API (screen synch, background throttling).\n\nVariance is usually lowest for framerates that are a divisor of the RAF frequency. This is usually 60, so\nframerates of 10, 12, 15, 20, and 30 work well.\n\nFalls back to {{#crossLink \"Ticker/TIMEOUT:property\"}}{{/crossLink}} if the requestAnimationFrame API is not\nsupported.", "itemtype": "property", "name": "RAF_SYNCHED", "static": 1, "type": "{String}", "default": "\"synched\"", "readonly": "", "class": "Ticker", "module": "CreateJS" }, { "file": "createjs/utils/Ticker.js", "line": 91, "description": "In this mode, Ticker passes through the requestAnimationFrame heartbeat, ignoring the target framerate completely.\nBecause requestAnimationFrame frequency is not deterministic, any content using this mode should be time based.\nYou can leverage {{#crossLink \"Ticker/getTime\"}}{{/crossLink}} and the {{#crossLink \"Ticker/tick:event\"}}{{/crossLink}}\nevent object's \"delta\" properties to make this easier.\n\nFalls back on {{#crossLink \"Ticker/TIMEOUT:property\"}}{{/crossLink}} if the requestAnimationFrame API is not\nsupported.", "itemtype": "property", "name": "RAF", "static": 1, "type": "{String}", "default": "\"raf\"", "readonly": "", "class": "Ticker", "module": "CreateJS" }, { "file": "createjs/utils/Ticker.js", "line": 107, "description": "In this mode, Ticker uses the setTimeout API. This provides predictable, adaptive frame timing, but does not\nprovide the benefits of requestAnimationFrame (screen synch, background throttling).", "itemtype": "property", "name": "TIMEOUT", "static": 1, "type": "{String}", "default": "\"timeout\"", "readonly": "", "class": "Ticker", "module": "CreateJS" }, { "file": "createjs/utils/Ticker.js", "line": 120, "description": "Dispatched each tick. The event will be dispatched to each listener even when the Ticker has been paused using\n{{#crossLink \"Ticker/paused:property\"}}{{/crossLink}}.\n\n

Example

\n\n createjs.Ticker.addEventListener(\"tick\", handleTick);\n function handleTick(event) {\n console.log(\"Paused:\", event.paused, event.delta);\n }", "itemtype": "event", "name": "tick", "params": [ { "name": "target", "description": "The object that dispatched the event.", "type": "Object" }, { "name": "type", "description": "The event type.", "type": "String" }, { "name": "paused", "description": "Indicates whether the ticker is currently paused.", "type": "Boolean" }, { "name": "delta", "description": "The time elapsed in ms since the last tick.", "type": "Number" }, { "name": "time", "description": "The total time in ms since Ticker was initialized.", "type": "Number" }, { "name": "runTime", "description": "The total time in ms that Ticker was not paused since it was initialized. For example,\n\tyou could determine the amount of time that the Ticker has been paused since initialization with `time-runTime`.", "type": "Number" } ], "since": "0.6.0", "class": "Ticker", "module": "CreateJS" }, { "file": "createjs/utils/Ticker.js", "line": 144, "description": "Specifies the timing api (setTimeout or requestAnimationFrame) and mode to use. See\n{{#crossLink \"Ticker/TIMEOUT:property\"}}{{/crossLink}}, {{#crossLink \"Ticker/RAF:property\"}}{{/crossLink}}, and\n{{#crossLink \"Ticker/RAF_SYNCHED:property\"}}{{/crossLink}} for mode details.", "itemtype": "property", "name": "timingMode", "static": 1, "type": "{String}", "default": "Ticker.TIMEOUT", "class": "Ticker", "module": "CreateJS" }, { "file": "createjs/utils/Ticker.js", "line": 155, "description": "Specifies a maximum value for the delta property in the tick event object. This is useful when building time\nbased animations and systems to prevent issues caused by large time gaps caused by background tabs, system sleep,\nalert dialogs, or other blocking routines. Double the expected frame duration is often an effective value\n(ex. maxDelta=50 when running at 40fps).\n\nThis does not impact any other values (ex. time, runTime, etc), so you may experience issues if you enable maxDelta\nwhen using both delta and other values.\n\nIf 0, there is no maximum.", "itemtype": "property", "name": "maxDelta", "static": 1, "type": "{number}", "default": "0", "class": "Ticker", "module": "CreateJS" }, { "file": "createjs/utils/Ticker.js", "line": 172, "description": "When the ticker is paused, all listeners will still receive a tick event, but the paused property\nof the event will be `true`. Also, while paused the `runTime` will not increase. See {{#crossLink \"Ticker/tick:event\"}}{{/crossLink}},\n{{#crossLink \"Ticker/getTime\"}}{{/crossLink}}, and {{#crossLink \"Ticker/getEventTime\"}}{{/crossLink}} for more\ninfo.\n\n

Example

\n\n createjs.Ticker.addEventListener(\"tick\", handleTick);\n createjs.Ticker.paused = true;\n function handleTick(event) {\n console.log(event.paused,\n \tcreatejs.Ticker.getTime(false),\n \tcreatejs.Ticker.getTime(true));\n }", "itemtype": "property", "name": "paused", "static": 1, "type": "{Boolean}", "default": "false", "class": "Ticker", "module": "CreateJS" }, { "file": "createjs/utils/Ticker.js", "line": 212, "itemtype": "property", "name": "_inited", "static": 1, "type": "{Boolean}", "access": "private", "tagname": "", "class": "Ticker", "module": "CreateJS" }, { "file": "createjs/utils/Ticker.js", "line": 220, "itemtype": "property", "name": "_startTime", "static": 1, "type": "{Number}", "access": "private", "tagname": "", "class": "Ticker", "module": "CreateJS" }, { "file": "createjs/utils/Ticker.js", "line": 228, "itemtype": "property", "name": "_pausedTime", "static": 1, "type": "{Number}", "access": "private", "tagname": "", "class": "Ticker", "module": "CreateJS" }, { "file": "createjs/utils/Ticker.js", "line": 236, "description": "The number of ticks that have passed", "itemtype": "property", "name": "_ticks", "static": 1, "type": "{Number}", "access": "private", "tagname": "", "class": "Ticker", "module": "CreateJS" }, { "file": "createjs/utils/Ticker.js", "line": 245, "description": "The number of ticks that have passed while Ticker has been paused", "itemtype": "property", "name": "_pausedTicks", "static": 1, "type": "{Number}", "access": "private", "tagname": "", "class": "Ticker", "module": "CreateJS" }, { "file": "createjs/utils/Ticker.js", "line": 254, "itemtype": "property", "name": "_interval", "static": 1, "type": "{Number}", "access": "private", "tagname": "", "class": "Ticker", "module": "CreateJS" }, { "file": "createjs/utils/Ticker.js", "line": 262, "itemtype": "property", "name": "_lastTime", "static": 1, "type": "{Number}", "access": "private", "tagname": "", "class": "Ticker", "module": "CreateJS" }, { "file": "createjs/utils/Ticker.js", "line": 270, "itemtype": "property", "name": "_times", "static": 1, "type": "{Array}", "access": "private", "tagname": "", "class": "Ticker", "module": "CreateJS" }, { "file": "createjs/utils/Ticker.js", "line": 278, "itemtype": "property", "name": "_tickTimes", "static": 1, "type": "{Array}", "access": "private", "tagname": "", "class": "Ticker", "module": "CreateJS" }, { "file": "createjs/utils/Ticker.js", "line": 286, "description": "Stores the timeout or requestAnimationFrame id.", "itemtype": "property", "name": "_timerId", "static": 1, "type": "{Number}", "access": "private", "tagname": "", "class": "Ticker", "module": "CreateJS" }, { "file": "createjs/utils/Ticker.js", "line": 295, "description": "True if currently using requestAnimationFrame, false if using setTimeout. This may be different than timingMode\nif that property changed and a tick hasn't fired.", "itemtype": "property", "name": "_raf", "static": 1, "type": "{Boolean}", "access": "private", "tagname": "", "class": "Ticker", "module": "CreateJS" }, { "file": "createjs/utils/Ticker.js", "line": 307, "description": "Use the {{#crossLink \"Ticker/interval:property\"}}{{/crossLink}} property instead.", "itemtype": "method", "name": "_setInterval", "access": "private", "tagname": "", "static": 1, "params": [ { "name": "interval", "description": "", "type": "Number" } ], "class": "Ticker", "module": "CreateJS" }, { "file": "createjs/utils/Ticker.js", "line": 322, "description": "Use the {{#crossLink \"Ticker/interval:property\"}}{{/crossLink}} property instead.", "itemtype": "method", "name": "_getInterval", "access": "private", "tagname": "", "static": 1, "return": { "description": "", "type": "Number" }, "class": "Ticker", "module": "CreateJS" }, { "file": "createjs/utils/Ticker.js", "line": 335, "description": "Use the {{#crossLink \"Ticker/framerate:property\"}}{{/crossLink}} property instead.", "itemtype": "method", "name": "_setFPS", "access": "private", "tagname": "", "static": 1, "params": [ { "name": "value", "description": "", "type": "Number" } ], "class": "Ticker", "module": "CreateJS" }, { "file": "createjs/utils/Ticker.js", "line": 348, "description": "Use the {{#crossLink \"Ticker/framerate:property\"}}{{/crossLink}} property instead.", "itemtype": "method", "name": "_getFPS", "static": 1, "access": "private", "tagname": "", "return": { "description": "", "type": "Number" }, "class": "Ticker", "module": "CreateJS" }, { "file": "createjs/utils/Ticker.js", "line": 361, "description": "Indicates the target time (in milliseconds) between ticks. Default is 50 (20 FPS).\nNote that actual time between ticks may be more than specified depending on CPU load.\nThis property is ignored if the ticker is using the `RAF` timing mode.", "itemtype": "property", "name": "interval", "static": 1, "type": "{Number}", "class": "Ticker", "module": "CreateJS" }, { "file": "createjs/utils/Ticker.js", "line": 370, "description": "Indicates the target frame rate in frames per second (FPS). Effectively just a shortcut to `interval`, where\n`framerate == 1000/interval`.", "itemtype": "property", "name": "framerate", "static": 1, "type": "{Number}", "class": "Ticker", "module": "CreateJS" }, { "file": "createjs/utils/Ticker.js", "line": 386, "description": "Starts the tick. This is called automatically when the first listener is added.", "itemtype": "method", "name": "init", "static": 1, "class": "Ticker", "module": "CreateJS" }, { "file": "createjs/utils/Ticker.js", "line": 401, "description": "Stops the Ticker and removes all listeners. Use init() to restart the Ticker.", "itemtype": "method", "name": "reset", "static": 1, "class": "Ticker", "module": "CreateJS" }, { "file": "createjs/utils/Ticker.js", "line": 419, "description": "Returns the average time spent within a tick. This can vary significantly from the value provided by getMeasuredFPS\nbecause it only measures the time spent within the tick execution stack. \n\nExample 1: With a target FPS of 20, getMeasuredFPS() returns 20fps, which indicates an average of 50ms between \nthe end of one tick and the end of the next. However, getMeasuredTickTime() returns 15ms. This indicates that \nthere may be up to 35ms of \"idle\" time between the end of one tick and the start of the next.\n\nExample 2: With a target FPS of 30, {{#crossLink \"Ticker/framerate:property\"}}{{/crossLink}} returns 10fps, which\nindicates an average of 100ms between the end of one tick and the end of the next. However, {{#crossLink \"Ticker/getMeasuredTickTime\"}}{{/crossLink}}\nreturns 20ms. This would indicate that something other than the tick is using ~80ms (another script, DOM\nrendering, etc).", "itemtype": "method", "name": "getMeasuredTickTime", "static": 1, "params": [ { "name": "ticks", "description": "The number of previous ticks over which to measure the average time spent in a tick.\nDefaults to the number of ticks per second. To get only the last tick's time, pass in 1.", "type": "Number", "optional": true } ], "return": { "description": "The average time spent in a tick in milliseconds.", "type": "Number" }, "class": "Ticker", "module": "CreateJS" }, { "file": "createjs/utils/Ticker.js", "line": 447, "description": "Returns the actual frames / ticks per second.", "itemtype": "method", "name": "getMeasuredFPS", "static": 1, "params": [ { "name": "ticks", "description": "The number of previous ticks over which to measure the actual frames / ticks per second.\nDefaults to the number of ticks per second.", "type": "Number", "optional": true } ], "return": { "description": "The actual frames / ticks per second. Depending on performance, this may differ\nfrom the target frames per second.", "type": "Number" }, "class": "Ticker", "module": "CreateJS" }, { "file": "createjs/utils/Ticker.js", "line": 465, "description": "Returns the number of milliseconds that have elapsed since Ticker was initialized via {{#crossLink \"Ticker/init\"}}.\nReturns -1 if Ticker has not been initialized. For example, you could use\nthis in a time synchronized animation to determine the exact amount of time that has elapsed.", "itemtype": "method", "name": "getTime", "static": 1, "params": [ { "name": "runTime", "description": "If true only time elapsed while Ticker was not paused will be returned.\nIf false, the value returned will be total time elapsed since the first tick event listener was added.", "type": "Boolean", "optional": true, "optdefault": "false" } ], "return": { "description": "Number of milliseconds that have elapsed since Ticker was initialized or -1.", "type": "Number" }, "class": "Ticker", "module": "CreateJS" }, { "file": "createjs/utils/Ticker.js", "line": 479, "description": "Similar to the {{#crossLink \"Ticker/getTime\"}}{{/crossLink}} method, but returns the time on the most recent {{#crossLink \"Ticker/tick:event\"}}{{/crossLink}}\nevent object.", "itemtype": "method", "name": "getEventTime", "static": 1, "params": [ { "name": "runTime", "description": "[runTime=false] If true, the runTime property will be returned instead of time.", "type": "Boolean" } ], "return": { "description": "The time or runTime property from the most recent tick event or -1.", "type": "Number" }, "class": "Ticker", "module": "CreateJS" }, { "file": "createjs/utils/Ticker.js", "line": 491, "description": "Returns the number of ticks that have been broadcast by Ticker.", "itemtype": "method", "name": "getTicks", "static": 1, "params": [ { "name": "pauseable", "description": "Indicates whether to include ticks that would have been broadcast\nwhile Ticker was paused. If true only tick events broadcast while Ticker is not paused will be returned.\nIf false, tick events that would have been broadcast while Ticker was paused will be included in the return\nvalue. The default value is false.", "type": "Boolean" } ], "return": { "description": "of ticks that have been broadcast.", "type": "Number" }, "class": "Ticker", "module": "CreateJS" }, { "file": "createjs/utils/Ticker.js", "line": 507, "itemtype": "method", "name": "_handleSynch", "static": 1, "access": "private", "tagname": "", "class": "Ticker", "module": "CreateJS" }, { "file": "createjs/utils/Ticker.js", "line": 522, "itemtype": "method", "name": "_handleRAF", "static": 1, "access": "private", "tagname": "", "class": "Ticker", "module": "CreateJS" }, { "file": "createjs/utils/Ticker.js", "line": 533, "itemtype": "method", "name": "_handleTimeout", "static": 1, "access": "private", "tagname": "", "class": "Ticker", "module": "CreateJS" }, { "file": "createjs/utils/Ticker.js", "line": 544, "itemtype": "method", "name": "_setupTick", "static": 1, "access": "private", "tagname": "", "class": "Ticker", "module": "CreateJS" }, { "file": "createjs/utils/Ticker.js", "line": 565, "itemtype": "method", "name": "_tick", "static": 1, "access": "private", "tagname": "", "class": "Ticker", "module": "CreateJS" }, { "file": "createjs/utils/Ticker.js", "line": 599, "itemtype": "method", "name": "_getTime", "static": 1, "access": "private", "tagname": "", "class": "Ticker", "module": "CreateJS" }, { "file": "createjs/utils/deprecate.js", "line": 40, "description": "Wraps deprecated methods so they still be used, but throw warnings to developers.\n\n\tobj.deprecatedMethod = createjs.deprecate(\"Old Method Name\", obj._fallbackMethod);\n\nThe recommended approach for deprecated properties is:\n\n\ttry {\n\t\tObj\tect.defineProperties(object, {\n\t\t\treadyOnlyProp: { get: createjs.deprecate(\"readOnlyProp\", function() { return this.alternateProp; }) },\n\t\t\treadWriteProp: {\n\t\t\t\tget: createjs.deprecate(\"readOnlyProp\", function() { return this.alternateProp; }),\n\t\t\t\tset: createjs.deprecate(\"readOnlyProp\", function(val) { this.alternateProp = val; })\n\t\t});\n\t} catch (e) {}", "itemtype": "method", "name": "deprecate", "params": [ { "name": "fallbackMethod", "description": "A method to call when the deprecated method is used. See the example for how", "type": "Function", "optional": true, "optdefault": "null" }, { "name": "name", "description": "The name of the method or property to display in the console warning.\nto deprecate properties.", "type": "String", "optional": true, "optdefault": "null" } ], "return": { "description": "If a fallbackMethod is supplied, returns a closure that will call the fallback method after\nlogging the warning in the console.", "type": "Function" }, "class": "Utility Methods", "module": "CreateJS" }, { "file": "createjs/utils/extend.js", "line": 40, "description": "Sets up the prototype chain and constructor property for a new class.\n\nThis should be called right after creating the class constructor.\n\n\tfunction MySubClass() {}\n\tcreatejs.extend(MySubClass, MySuperClass);\n\tMySubClass.prototype.doSomething = function() { }\n\n\tvar foo = new MySubClass();\n\tconsole.log(foo instanceof MySuperClass); // true\n\tconsole.log(foo.prototype.constructor === MySubClass); // true", "itemtype": "method", "name": "extend", "params": [ { "name": "subclass", "description": "The subclass.", "type": "Function" }, { "name": "superclass", "description": "The superclass to extend.", "type": "Function" } ], "return": { "description": "Returns the subclass's new prototype.", "type": "Function" }, "class": "Utility Methods", "module": "CreateJS" }, { "file": "createjs/utils/indexOf.js", "line": 40, "description": "Finds the first occurrence of a specified value searchElement in the passed in array, and returns the index of\nthat value. Returns -1 if value is not found.\n\n var i = createjs.indexOf(myArray, myElementToFind);", "itemtype": "method", "name": "indexOf", "params": [ { "name": "array", "description": "Array to search for searchElement", "type": "Array" }, { "name": "searchElement", "description": "Element to find in array." } ], "return": { "description": "The first index of searchElement in array.", "type": "Number" }, "class": "Utility Methods", "module": "CreateJS" }, { "file": "createjs/utils/promote.js", "line": 40, "description": "Promotes any methods on the super class that were overridden, by creating an alias in the format `prefix_methodName`.\nIt is recommended to use the super class's name as the prefix.\nAn alias to the super class's constructor is always added in the format `prefix_constructor`.\nThis allows the subclass to call super class methods without using `function.call`, providing better performance.\n\nFor example, if `MySubClass` extends `MySuperClass`, and both define a `draw` method, then calling `promote(MySubClass, \"MySuperClass\")`\nwould add a `MySuperClass_constructor` method to MySubClass and promote the `draw` method on `MySuperClass` to the\nprototype of `MySubClass` as `MySuperClass_draw`.\n\nThis should be called after the class's prototype is fully defined.\n\n\tfunction ClassA(name) {\n\t\tthis.name = name;\n\t}\n\tClassA.prototype.greet = function() {\n\t\treturn \"Hello \"+this.name;\n\t}\n\n\tfunction ClassB(name, punctuation) {\n\t\tthis.ClassA_constructor(name);\n\t\tthis.punctuation = punctuation;\n\t}\n\tcreatejs.extend(ClassB, ClassA);\n\tClassB.prototype.greet = function() {\n\t\treturn this.ClassA_greet()+this.punctuation;\n\t}\n\tcreatejs.promote(ClassB, \"ClassA\");\n\n\tvar foo = new ClassB(\"World\", \"!?!\");\n\tconsole.log(foo.greet()); // Hello World!?!", "itemtype": "method", "name": "promote", "params": [ { "name": "subclass", "description": "The class to promote super class methods on.", "type": "Function" }, { "name": "prefix", "description": "The prefix to add to the promoted method names. Usually the name of the superclass.", "type": "String" } ], "return": { "description": "Returns the subclass.", "type": "Function" }, "class": "Utility Methods", "module": "CreateJS" }, { "file": "easeljs/display/Bitmap.js", "line": 73, "description": "The source image to display. This can be a CanvasImageSource\n(image, video, canvas), an object with a `getImage` method that returns a CanvasImageSource, or a string URL to an image.\nIf the latter, a new Image instance with the URL as its src will be used.", "itemtype": "property", "name": "image", "type": "CanvasImageSource | Object", "class": "Bitmap", "module": "EaselJS" }, { "file": "easeljs/display/Bitmap.js", "line": 87, "description": "Specifies an area of the source image to draw. If omitted, the whole image will be drawn.\nNotes:\n", "itemtype": "property", "name": "sourceRect", "type": "Rectangle", "default": "null", "class": "Bitmap", "module": "EaselJS" }, { "file": "easeljs/display/Bitmap.js", "line": 101, "description": "Docced in superclass.", "class": "Bitmap", "module": "EaselJS" }, { "file": "easeljs/display/Bitmap.js", "line": 110, "description": "Constructor alias for backwards compatibility. This method will be removed in future versions.\nSubclasses should be updated to use {{#crossLink \"Utility Methods/extends\"}}{{/crossLink}}.", "itemtype": "method", "name": "initialize", "deprecated": true, "deprecationMessage": "in favour of `createjs.promote()`", "class": "Bitmap", "module": "EaselJS" }, { "file": "easeljs/display/Bitmap.js", "line": 118, "description": "Returns true or false indicating whether the display object would be visible if drawn to a canvas.\nThis does not account for whether it would be visible within the boundaries of the stage.\n\nNOTE: This method is mainly for internal use, though it may be useful for advanced uses.", "itemtype": "method", "name": "isVisible", "return": { "description": "Boolean indicating whether the display object would be visible if drawn to a canvas", "type": "Boolean" }, "class": "Bitmap", "module": "EaselJS" }, { "file": "easeljs/display/Bitmap.js", "line": 132, "description": "Draws the display object into the specified context ignoring its visible, alpha, shadow, and transform.\nReturns true if the draw was handled (useful for overriding functionality).\n\nNOTE: This method is mainly for internal use, though it may be useful for advanced uses.", "itemtype": "method", "name": "draw", "params": [ { "name": "ctx", "description": "The canvas 2D context object to draw into.", "type": "CanvasRenderingContext2D" }, { "name": "ignoreCache", "description": "Indicates whether the draw operation should ignore any current cache.\nFor example, used for drawing the cache (to prevent it from simply drawing an existing cache back\ninto itself).", "type": "Boolean", "optional": true, "optdefault": "false" } ], "return": { "description": "", "type": "Boolean" }, "class": "Bitmap", "module": "EaselJS" }, { "file": "easeljs/display/Bitmap.js", "line": 166, "description": "Because the content of a Bitmap is already in a simple format, cache is unnecessary for Bitmap instances.\nYou should not cache Bitmap instances as it can degrade performance.\n\nHowever: If you want to use a filter on a Bitmap, you MUST cache it, or it will not work.\nTo see the API for caching, please visit the DisplayObject {{#crossLink \"DisplayObject/cache\"}}{{/crossLink}}\nmethod.", "itemtype": "method", "name": "cache", "class": "Bitmap", "module": "EaselJS" }, { "file": "easeljs/display/Bitmap.js", "line": 176, "description": "Because the content of a Bitmap is already in a simple format, cache is unnecessary for Bitmap instances.\nYou should not cache Bitmap instances as it can degrade performance.\n\nHowever: If you want to use a filter on a Bitmap, you MUST cache it, or it will not work.\nTo see the API for caching, please visit the DisplayObject {{#crossLink \"DisplayObject/cache\"}}{{/crossLink}}\nmethod.", "itemtype": "method", "name": "updateCache", "class": "Bitmap", "module": "EaselJS" }, { "file": "easeljs/display/Bitmap.js", "line": 186, "description": "Because the content of a Bitmap is already in a simple format, cache is unnecessary for Bitmap instances.\nYou should not cache Bitmap instances as it can degrade performance.\n\nHowever: If you want to use a filter on a Bitmap, you MUST cache it, or it will not work.\nTo see the API for caching, please visit the DisplayObject {{#crossLink \"DisplayObject/cache\"}}{{/crossLink}}\nmethod.", "itemtype": "method", "name": "uncache", "class": "Bitmap", "module": "EaselJS" }, { "file": "easeljs/display/Bitmap.js", "line": 196, "description": "Docced in superclass.", "class": "Bitmap", "module": "EaselJS" }, { "file": "easeljs/display/Bitmap.js", "line": 207, "description": "Returns a clone of the Bitmap instance.", "itemtype": "method", "name": "clone", "params": [ { "name": "node", "description": "Whether the underlying dom element should be cloned as well.", "type": "Boolean" } ], "return": { "description": "a clone of the Bitmap instance.", "type": "Bitmap" }, "class": "Bitmap", "module": "EaselJS" }, { "file": "easeljs/display/Bitmap.js", "line": 222, "description": "Returns a string representation of this object.", "itemtype": "method", "name": "toString", "return": { "description": "a string representation of the instance.", "type": "String" }, "class": "Bitmap", "module": "EaselJS" }, { "file": "easeljs/display/BitmapText.js", "line": 56, "description": "The text to display.", "itemtype": "property", "name": "text", "type": "String", "default": "\"\"", "class": "BitmapText", "module": "EaselJS" }, { "file": "easeljs/display/BitmapText.js", "line": 64, "description": "A SpriteSheet instance that defines the glyphs for this bitmap text. Each glyph/character\nshould have a single frame animation defined in the sprite sheet named the same as\ncorresponding character. For example, the following animation definition:\n\n\t\t\"A\": {frames: [0]}\n\nwould indicate that the frame at index 0 of the spritesheet should be drawn for the \"A\" character. The short form\nis also acceptable:\n\n\t\t\"A\": 0\n\nNote that if a character in the text is not found in the sprite sheet, it will also\ntry to use the alternate case (upper or lower).\n\nSee SpriteSheet for more information on defining sprite sheet data.", "itemtype": "property", "name": "spriteSheet", "type": "SpriteSheet", "default": "null", "class": "BitmapText", "module": "EaselJS" }, { "file": "easeljs/display/BitmapText.js", "line": 86, "description": "The height of each line of text. If 0, then it will use a line height calculated\nby checking for the height of the \"1\", \"T\", or \"L\" character (in that order). If\nthose characters are not defined, it will use the height of the first frame of the\nsprite sheet.", "itemtype": "property", "name": "lineHeight", "type": "Number", "default": "0", "class": "BitmapText", "module": "EaselJS" }, { "file": "easeljs/display/BitmapText.js", "line": 97, "description": "This spacing (in pixels) will be added after each character in the output.", "itemtype": "property", "name": "letterSpacing", "type": "Number", "default": "0", "class": "BitmapText", "module": "EaselJS" }, { "file": "easeljs/display/BitmapText.js", "line": 105, "description": "If a space character is not defined in the sprite sheet, then empty pixels equal to\nspaceWidth will be inserted instead. If 0, then it will use a value calculated\nby checking for the width of the \"1\", \"l\", \"E\", or \"A\" character (in that order). If\nthose characters are not defined, it will use the width of the first frame of the\nsprite sheet.", "itemtype": "property", "name": "spaceWidth", "type": "Number", "default": "0", "class": "BitmapText", "module": "EaselJS" }, { "file": "easeljs/display/BitmapText.js", "line": 119, "itemtype": "property", "name": "_oldProps", "type": "Object", "access": "protected", "tagname": "", "class": "BitmapText", "module": "EaselJS" }, { "file": "easeljs/display/BitmapText.js", "line": 126, "description": "Used to track the object which this class attached listeners to, helps optimize listener attachment.", "itemtype": "property", "name": "_oldStage", "type": "Stage", "access": "protected", "tagname": "", "class": "BitmapText", "module": "EaselJS" }, { "file": "easeljs/display/BitmapText.js", "line": 133, "description": "The event listener proxy triggered drawing draw for special circumstances.", "itemtype": "property", "name": "_drawAction", "type": "function", "access": "protected", "tagname": "", "class": "BitmapText", "module": "EaselJS" }, { "file": "easeljs/display/BitmapText.js", "line": 144, "description": "BitmapText uses Sprite instances to draw text. To reduce the creation and destruction of instances (and thus garbage collection), it maintains\nan internal object pool of sprite instances to reuse. Increasing this value can cause more sprites to be\nretained, slightly increasing memory use, but reducing instantiation.", "itemtype": "property", "name": "maxPoolSize", "type": "Number", "static": 1, "default": "100", "class": "BitmapText", "module": "EaselJS" }, { "file": "easeljs/display/BitmapText.js", "line": 155, "description": "Sprite object pool.", "type": "{Array}", "static": 1, "access": "private", "tagname": "", "class": "BitmapText", "module": "EaselJS" }, { "file": "easeljs/display/BitmapText.js", "line": 165, "description": "Docced in superclass.", "class": "BitmapText", "module": "EaselJS" }, { "file": "easeljs/display/BitmapText.js", "line": 174, "description": "Docced in superclass.", "class": "BitmapText", "module": "EaselJS" }, { "file": "easeljs/display/BitmapText.js", "line": 182, "description": "Returns true or false indicating whether the display object would be visible if drawn to a canvas.\nThis does not account for whether it would be visible within the boundaries of the stage.\nNOTE: This method is mainly for internal use, though it may be useful for advanced uses.", "itemtype": "method", "name": "isVisible", "return": { "description": "Boolean indicating whether the display object would be visible if drawn to a canvas", "type": "Boolean" }, "class": "BitmapText", "module": "EaselJS" }, { "file": "easeljs/display/BitmapText.js", "line": 198, "description": "Disabled in BitmapText.", "itemtype": "method", "name": "addChild", "class": "BitmapText", "module": "EaselJS" }, { "file": "easeljs/display/BitmapText.js", "line": 202, "description": "Disabled in BitmapText.", "itemtype": "method", "name": "addChildAt", "class": "BitmapText", "module": "EaselJS" }, { "file": "easeljs/display/BitmapText.js", "line": 206, "description": "Disabled in BitmapText.", "itemtype": "method", "name": "removeChild", "class": "BitmapText", "module": "EaselJS" }, { "file": "easeljs/display/BitmapText.js", "line": 210, "description": "Disabled in BitmapText.", "itemtype": "method", "name": "removeChildAt", "class": "BitmapText", "module": "EaselJS" }, { "file": "easeljs/display/BitmapText.js", "line": 214, "description": "Disabled in BitmapText.", "itemtype": "method", "name": "removeAllChildren", "class": "BitmapText", "module": "EaselJS" }, { "file": "easeljs/display/BitmapText.js", "line": 222, "description": "Docced in superclass.", "class": "BitmapText", "module": "EaselJS" }, { "file": "easeljs/display/BitmapText.js", "line": 229, "itemtype": "method", "name": "_cloneProps", "params": [ { "name": "o", "description": "", "type": "BitmapText" } ], "return": { "description": "o", "type": "BitmapText" }, "access": "protected", "tagname": "", "class": "BitmapText", "module": "EaselJS" }, { "file": "easeljs/display/BitmapText.js", "line": 243, "itemtype": "method", "name": "_getFrameIndex", "params": [ { "name": "character", "description": "", "type": "String" }, { "name": "spriteSheet", "description": "", "type": "SpriteSheet" } ], "return": { "description": "", "type": "Number" }, "access": "protected", "tagname": "", "class": "BitmapText", "module": "EaselJS" }, { "file": "easeljs/display/BitmapText.js", "line": 259, "itemtype": "method", "name": "_getFrame", "params": [ { "name": "character", "description": "", "type": "String" }, { "name": "spriteSheet", "description": "", "type": "SpriteSheet" } ], "return": { "description": "", "type": "Object" }, "access": "protected", "tagname": "", "class": "BitmapText", "module": "EaselJS" }, { "file": "easeljs/display/BitmapText.js", "line": 271, "itemtype": "method", "name": "_getLineHeight", "params": [ { "name": "ss", "description": "", "type": "SpriteSheet" } ], "return": { "description": "", "type": "Number" }, "access": "protected", "tagname": "", "class": "BitmapText", "module": "EaselJS" }, { "file": "easeljs/display/BitmapText.js", "line": 282, "itemtype": "method", "name": "_getSpaceWidth", "params": [ { "name": "ss", "description": "", "type": "SpriteSheet" } ], "return": { "description": "", "type": "Number" }, "access": "protected", "tagname": "", "class": "BitmapText", "module": "EaselJS" }, { "file": "easeljs/display/BitmapText.js", "line": 293, "itemtype": "method", "name": "_updateText", "access": "protected", "tagname": "", "class": "BitmapText", "module": "EaselJS" }, { "file": "easeljs/display/Container.js", "line": 62, "description": "The array of children in the display list. You should usually use the child management methods such as\n{{#crossLink \"Container/addChild\"}}{{/crossLink}}, {{#crossLink \"Container/removeChild\"}}{{/crossLink}},\n{{#crossLink \"Container/swapChildren\"}}{{/crossLink}}, etc, rather than accessing this directly, but it is\nincluded for advanced uses.", "itemtype": "property", "name": "children", "type": "Array", "default": "null", "class": "Container", "module": "EaselJS" }, { "file": "easeljs/display/Container.js", "line": 73, "description": "Indicates whether the children of this container are independently enabled for mouse/pointer interaction.\nIf false, the children will be aggregated under the container - for example, a click on a child shape would\ntrigger a click event on the container.", "itemtype": "property", "name": "mouseChildren", "type": "Boolean", "default": "true", "class": "Container", "module": "EaselJS" }, { "file": "easeljs/display/Container.js", "line": 83, "description": "If false, the tick will not be propagated to children of this Container. This can provide some performance benefits.\nIn addition to preventing the \"tick\" event from being dispatched, it will also prevent tick related updates\non some display objects (ex. Sprite & MovieClip frame advancing, DOMElement visibility handling).", "itemtype": "property", "name": "tickChildren", "type": "Boolean", "default": "true", "class": "Container", "module": "EaselJS" }, { "file": "easeljs/display/Container.js", "line": 97, "description": "Use the {{#crossLink \"Container/numChildren:property\"}}{{/crossLink}} property instead.", "itemtype": "method", "name": "_getNumChildren", "access": "protected", "tagname": "", "return": { "description": "", "type": "Number" }, "class": "Container", "module": "EaselJS" }, { "file": "easeljs/display/Container.js", "line": 109, "description": "Returns the number of children in the container.", "itemtype": "property", "name": "numChildren", "type": "{Number}", "readonly": "", "class": "Container", "module": "EaselJS" }, { "file": "easeljs/display/Container.js", "line": 123, "description": "Constructor alias for backwards compatibility. This method will be removed in future versions.\nSubclasses should be updated to use {{#crossLink \"Utility Methods/extends\"}}{{/crossLink}}.", "itemtype": "method", "name": "initialize", "deprecated": true, "deprecationMessage": "in favour of `createjs.promote()`", "class": "Container", "module": "EaselJS" }, { "file": "easeljs/display/Container.js", "line": 131, "description": "Returns true or false indicating whether the display object would be visible if drawn to a canvas.\nThis does not account for whether it would be visible within the boundaries of the stage.\n\nNOTE: This method is mainly for internal use, though it may be useful for advanced uses.", "itemtype": "method", "name": "isVisible", "return": { "description": "Boolean indicating whether the display object would be visible if drawn to a canvas", "type": "Boolean" }, "class": "Container", "module": "EaselJS" }, { "file": "easeljs/display/Container.js", "line": 144, "description": "Draws the display object into the specified context ignoring its visible, alpha, shadow, and transform.\nReturns true if the draw was handled (useful for overriding functionality).\n\nNOTE: This method is mainly for internal use, though it may be useful for advanced uses.", "itemtype": "method", "name": "draw", "params": [ { "name": "ctx", "description": "The canvas 2D context object to draw into.", "type": "CanvasRenderingContext2D" }, { "name": "ignoreCache", "description": "Indicates whether the draw operation should ignore any current cache.\nFor example, used for drawing the cache (to prevent it from simply drawing an existing cache back\ninto itself).", "type": "Boolean", "optional": true, "optdefault": "false" } ], "class": "Container", "module": "EaselJS" }, { "file": "easeljs/display/Container.js", "line": 173, "description": "Adds a child to the top of the display list.\n\n

Example

\n\n\t\tcontainer.addChild(bitmapInstance);\n\nYou can also add multiple children at once:\n\n\t\tcontainer.addChild(bitmapInstance, shapeInstance, textInstance);", "itemtype": "method", "name": "addChild", "params": [ { "name": "child", "description": "The display object to add.", "type": "DisplayObject" } ], "return": { "description": "The child that was added, or the last child if multiple children were added.", "type": "DisplayObject" }, "class": "Container", "module": "EaselJS" }, { "file": "easeljs/display/Container.js", "line": 204, "description": "Adds a child to the display list at the specified index, bumping children at equal or greater indexes up one, and\nsetting its parent to this Container.\n\n

Example

\n\n addChildAt(child1, index);\n\nYou can also add multiple children, such as:\n\n addChildAt(child1, child2, ..., index);\n\nThe index must be between 0 and numChildren. For example, to add myShape under otherShape in the display list,\nyou could use:\n\n container.addChildAt(myShape, container.getChildIndex(otherShape));\n\nThis would also bump otherShape's index up by one. Fails silently if the index is out of range.", "itemtype": "method", "name": "addChildAt", "params": [ { "name": "child", "description": "The display object to add.", "type": "DisplayObject" }, { "name": "index", "description": "The index to add the child at.", "type": "Number" } ], "return": { "description": "Returns the last child that was added, or the last child if multiple children were added.", "type": "DisplayObject" }, "class": "Container", "module": "EaselJS" }, { "file": "easeljs/display/Container.js", "line": 244, "description": "Removes the specified child from the display list. Note that it is faster to use removeChildAt() if the index is\nalready known.\n\n

Example

\n\n container.removeChild(child);\n\nYou can also remove multiple children:\n\n removeChild(child1, child2, ...);\n\nReturns true if the child (or children) was removed, or false if it was not in the display list.", "itemtype": "method", "name": "removeChild", "params": [ { "name": "child", "description": "The child to remove.", "type": "DisplayObject" } ], "return": { "description": "true if the child (or children) was removed, or false if it was not in the display list.", "type": "Boolean" }, "class": "Container", "module": "EaselJS" }, { "file": "easeljs/display/Container.js", "line": 271, "description": "Removes the child at the specified index from the display list, and sets its parent to null.\n\n

Example

\n\n container.removeChildAt(2);\n\nYou can also remove multiple children:\n\n container.removeChild(2, 7, ...)\n\nReturns true if the child (or children) was removed, or false if any index was out of range.", "itemtype": "method", "name": "removeChildAt", "params": [ { "name": "index", "description": "The index of the child to remove.", "type": "Number" } ], "return": { "description": "true if the child (or children) was removed, or false if any index was out of range.", "type": "Boolean" }, "class": "Container", "module": "EaselJS" }, { "file": "easeljs/display/Container.js", "line": 300, "description": "Removes all children from the display list.\n\n

Example

\n\n\tcontainer.removeAllChildren();", "itemtype": "method", "name": "removeAllChildren", "class": "Container", "module": "EaselJS" }, { "file": "easeljs/display/Container.js", "line": 314, "description": "Returns the child at the specified index.\n\n

Example

\n\n container.getChildAt(2);", "itemtype": "method", "name": "getChildAt", "params": [ { "name": "index", "description": "The index of the child to return.", "type": "Number" } ], "return": { "description": "The child at the specified index. Returns null if there is no child at the index.", "type": "DisplayObject" }, "class": "Container", "module": "EaselJS" }, { "file": "easeljs/display/Container.js", "line": 329, "description": "Returns the child with the specified name.", "itemtype": "method", "name": "getChildByName", "params": [ { "name": "name", "description": "The name of the child to return.", "type": "String" } ], "return": { "description": "The child with the specified name.", "type": "DisplayObject" }, "class": "Container", "module": "EaselJS" }, { "file": "easeljs/display/Container.js", "line": 343, "description": "Performs an array sort operation on the child list.\n\n

Example: Display children with a higher y in front.

\n\n var sortFunction = function(obj1, obj2, options) {\n if (obj1.y > obj2.y) { return 1; }\n if (obj1.y < obj2.y) { return -1; }\n return 0;\n }\n container.sortChildren(sortFunction);", "itemtype": "method", "name": "sortChildren", "params": [ { "name": "sortFunction", "description": "the function to use to sort the child list. See JavaScript's Array.sort\ndocumentation for details.", "type": "Function" } ], "class": "Container", "module": "EaselJS" }, { "file": "easeljs/display/Container.js", "line": 363, "description": "Returns the index of the specified child in the display list, or -1 if it is not in the display list.\n\n

Example

\n\n var index = container.getChildIndex(child);", "itemtype": "method", "name": "getChildIndex", "params": [ { "name": "child", "description": "The child to return the index of.", "type": "DisplayObject" } ], "return": { "description": "The index of the specified child. -1 if the child is not found.", "type": "Number" }, "class": "Container", "module": "EaselJS" }, { "file": "easeljs/display/Container.js", "line": 378, "description": "Swaps the children at the specified indexes. Fails silently if either index is out of range.", "itemtype": "method", "name": "swapChildrenAt", "params": [ { "name": "index1", "description": "", "type": "Number" }, { "name": "index2", "description": "", "type": "Number" } ], "class": "Container", "module": "EaselJS" }, { "file": "easeljs/display/Container.js", "line": 393, "description": "Swaps the specified children's depth in the display list. Fails silently if either child is not a child of this\nContainer.", "itemtype": "method", "name": "swapChildren", "params": [ { "name": "child1", "description": "", "type": "DisplayObject" }, { "name": "child2", "description": "", "type": "DisplayObject" } ], "class": "Container", "module": "EaselJS" }, { "file": "easeljs/display/Container.js", "line": 413, "description": "Changes the depth of the specified child. Fails silently if the child is not a child of this container, or the index is out of range.", "params": [ { "name": "child", "description": "", "type": "DisplayObject" }, { "name": "index", "description": "", "type": "Number" } ], "itemtype": "method", "name": "setChildIndex", "class": "Container", "module": "EaselJS" }, { "file": "easeljs/display/Container.js", "line": 430, "description": "Returns true if the specified display object either is this container or is a descendent (child, grandchild, etc)\nof this container.", "itemtype": "method", "name": "contains", "params": [ { "name": "child", "description": "The DisplayObject to be checked.", "type": "DisplayObject" } ], "return": { "description": "true if the specified display object either is this container or is a descendent.", "type": "Boolean" }, "class": "Container", "module": "EaselJS" }, { "file": "easeljs/display/Container.js", "line": 445, "description": "Tests whether the display object intersects the specified local point (ie. draws a pixel with alpha > 0 at the\nspecified position). This ignores the alpha, shadow and compositeOperation of the display object, and all\ntransform properties including regX/Y.", "itemtype": "method", "name": "hitTest", "params": [ { "name": "x", "description": "The x position to check in the display object's local coordinates.", "type": "Number" }, { "name": "y", "description": "The y position to check in the display object's local coordinates.", "type": "Number" } ], "return": { "description": "A Boolean indicating whether there is a visible section of a DisplayObject that overlaps the specified\ncoordinates.", "type": "Boolean" }, "class": "Container", "module": "EaselJS" }, { "file": "easeljs/display/Container.js", "line": 460, "description": "Returns an array of all display objects under the specified coordinates that are in this container's display\nlist. This routine ignores any display objects with {{#crossLink \"DisplayObject/mouseEnabled:property\"}}{{/crossLink}}\nset to `false`. The array will be sorted in order of visual depth, with the top-most display object at index 0.\nThis uses shape based hit detection, and can be an expensive operation to run, so it is best to use it carefully.\nFor example, if testing for objects under the mouse, test on tick (instead of on {{#crossLink \"DisplayObject/mousemove:event\"}}{{/crossLink}}),\nand only if the mouse's position has changed.\n\n