Bitmap Fonts added
Docs updated
This commit is contained in:
parent
ae98487b16
commit
b378c1ab85
68 changed files with 12469 additions and 3614 deletions
875
bin/pixi.dev.js
875
bin/pixi.dev.js
File diff suppressed because it is too large
Load diff
File diff suppressed because one or more lines are too long
|
@ -3,9 +3,12 @@ YUI.add("yuidoc-meta", function(Y) {
|
||||||
"classes": [
|
"classes": [
|
||||||
"AssetLoader",
|
"AssetLoader",
|
||||||
"BaseTexture",
|
"BaseTexture",
|
||||||
|
"BitmapFontLoader",
|
||||||
|
"BitmapText",
|
||||||
"CanvasRenderer",
|
"CanvasRenderer",
|
||||||
"DisplayObject",
|
"DisplayObject",
|
||||||
"DisplayObjectContainer",
|
"DisplayObjectContainer",
|
||||||
|
"ImageLoader",
|
||||||
"InteractionData",
|
"InteractionData",
|
||||||
"InteractionManager",
|
"InteractionManager",
|
||||||
"MovieClip",
|
"MovieClip",
|
||||||
|
|
|
@ -45,12 +45,18 @@
|
||||||
|
|
||||||
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||||
|
@ -146,9 +152,9 @@
|
||||||
|
|
||||||
|
|
||||||
<div class="box intro">
|
<div class="box intro">
|
||||||
<p>A Class that loads a bunch of images / sprite sheet files. Once the assets have been loaded they are added to the PIXI Texture cache and can be accessed easily through PIXI.Texture.fromFrame(), PIXI.Texture.fromImage() and PIXI.Sprite.fromImage(), PIXI.Sprite.fromFromeId()
|
<p>A Class that loads a bunch of images / sprite sheet / bitmap font files. Once the assets have been loaded they are added to the PIXI Texture cache and can be accessed easily through PIXI.Texture.fromImage() and PIXI.Sprite.fromImage()
|
||||||
When all items have been loaded this class will dispatch a 'loaded' event
|
When all items have been loaded this class will dispatch a "onLoaded" event
|
||||||
As each individual item is loaded this class will dispatch a 'progress' event</p>
|
As each individual item is loaded this class will dispatch a "onProgress" event</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
@ -225,7 +231,7 @@ As each individual item is loaded this class will dispatch a 'progress' event</p
|
||||||
|
|
||||||
|
|
||||||
<div class="param-description">
|
<div class="param-description">
|
||||||
<p>an array of image/sprite sheet urls that you would like loaded supported. Supported image formats include "jpeg", "jpg", "png", "gif". Supported sprite sheet data formats only include "JSON" at this time</p>
|
<p>an array of image/sprite sheet urls that you would like loaded supported. Supported image formats include "jpeg", "jpg", "png", "gif". Supported sprite sheet data formats only include "JSON" at this time. Supported bitmap font data formats include "xml" and "fnt".</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
@ -391,7 +397,7 @@ As each individual item is loaded this class will dispatch a 'progress' event</p
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_pixi_loaders_AssetLoader.js.html#l35"><code>src/pixi/loaders/AssetLoader.js:35</code></a>
|
<a href="../files/src_pixi_loaders_AssetLoader.js.html#l43"><code>src/pixi/loaders/AssetLoader.js:43</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
@ -434,7 +440,7 @@ As each individual item is loaded this class will dispatch a 'progress' event</p
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_pixi_loaders_AssetLoader.js.html#l30"><code>src/pixi/loaders/AssetLoader.js:30</code></a>
|
<a href="../files/src_pixi_loaders_AssetLoader.js.html#l38"><code>src/pixi/loaders/AssetLoader.js:38</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
|
@ -45,12 +45,18 @@
|
||||||
|
|
||||||
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||||
|
|
322
docs/classes/BitmapFontLoader.html
Normal file
322
docs/classes/BitmapFontLoader.html
Normal file
|
@ -0,0 +1,322 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>BitmapFontLoader - Pixi.JS</title>
|
||||||
|
<link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0/build/cssgrids/cssgrids-min.css">
|
||||||
|
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
|
||||||
|
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
|
||||||
|
<link rel="shortcut icon" type="image/png" href="../assets/favicon.png">
|
||||||
|
<script src="http://yui.yahooapis.com/combo?3.8.0/build/yui/yui-min.js"></script>
|
||||||
|
</head>
|
||||||
|
<body class="yui3-skin-sam">
|
||||||
|
|
||||||
|
<div id="doc">
|
||||||
|
<div id="hd" class="yui3-g header">
|
||||||
|
<div class="yui3-u-3-4">
|
||||||
|
|
||||||
|
<h1><img src="http://www.goodboydigital.com/pixijs/logo_small.png" title="Pixi.JS"></h1>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="yui3-u-1-4 version">
|
||||||
|
<em>API Docs for: 1.0.0</em>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="bd" class="yui3-g">
|
||||||
|
|
||||||
|
<div class="yui3-u-1-4">
|
||||||
|
<div id="docs-sidebar" class="sidebar apidocs">
|
||||||
|
<div id="api-list">
|
||||||
|
<h2 class="off-left">APIs</h2>
|
||||||
|
<div id="api-tabview" class="tabview">
|
||||||
|
<ul class="tabs">
|
||||||
|
<li><a href="#api-classes">Classes</a></li>
|
||||||
|
<li><a href="#api-modules">Modules</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<div id="api-tabview-filter">
|
||||||
|
<input type="search" id="api-filter" placeholder="Type to filter APIs">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="api-tabview-panel">
|
||||||
|
<ul id="api-classes" class="apis classes">
|
||||||
|
|
||||||
|
<li><a href="../classes/AssetLoader.html">AssetLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/MovieClip.html">MovieClip</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/Point.html">Point</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/Rectangle.html">Rectangle</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/Sprite.html">Sprite</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/Stage.html">Stage</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/Text.html">Text</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/Texture.html">Texture</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/TilingSprite.html">TilingSprite</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/WebGLBatch.html">WebGLBatch</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/WebGLRenderer.html">WebGLRenderer</a></li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<ul id="api-modules" class="apis modules">
|
||||||
|
|
||||||
|
<li><a href="../modules/PIXI.html">PIXI</a></li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="yui3-u-3-4">
|
||||||
|
<div id="api-options">
|
||||||
|
Show:
|
||||||
|
<label for="api-show-inherited">
|
||||||
|
<input type="checkbox" id="api-show-inherited" checked>
|
||||||
|
Inherited
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<label for="api-show-protected">
|
||||||
|
<input type="checkbox" id="api-show-protected">
|
||||||
|
Protected
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<label for="api-show-private">
|
||||||
|
<input type="checkbox" id="api-show-private">
|
||||||
|
Private
|
||||||
|
</label>
|
||||||
|
<label for="api-show-deprecated">
|
||||||
|
<input type="checkbox" id="api-show-deprecated">
|
||||||
|
Deprecated
|
||||||
|
</label>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="apidocs">
|
||||||
|
<div id="docs-main">
|
||||||
|
<div class="content">
|
||||||
|
<h1>BitmapFontLoader Class</h1>
|
||||||
|
<div class="box meta">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="extends">
|
||||||
|
Extends EventTarget
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="foundat">
|
||||||
|
Defined in: <a href="../files/src_pixi_loaders_BitmapFontLoader.js.html#l5"><code>src/pixi/loaders/BitmapFontLoader.js:5</code></a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Module: <a href="../modules/PIXI.html">PIXI</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="box intro">
|
||||||
|
<p>The xml loader is used to load in XML bitmap font data ("xml" or "fnt")
|
||||||
|
To generate the data you can use http://www.angelcode.com/products/bmfont/
|
||||||
|
This loader will also load the image file as the data.
|
||||||
|
When loaded this class will dispatch a "loaded" event</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="constructor">
|
||||||
|
<h2>Constructor</h2>
|
||||||
|
<div id="method_BitmapFontLoader" class="method item">
|
||||||
|
<h3 class="name"><code>BitmapFontLoader</code></h3>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="args">
|
||||||
|
<span class="paren">(</span><ul class="args-list inline commas">
|
||||||
|
|
||||||
|
<li class="arg">
|
||||||
|
|
||||||
|
<code>url</code>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="arg">
|
||||||
|
|
||||||
|
<code>crossorigin</code>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul><span class="paren">)</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="meta">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<p>
|
||||||
|
|
||||||
|
Defined in
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a href="../files/src_pixi_loaders_BitmapFontLoader.js.html#l5"><code>src/pixi/loaders/BitmapFontLoader.js:5</code></a>
|
||||||
|
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="description">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="params">
|
||||||
|
<h4>Parameters:</h4>
|
||||||
|
|
||||||
|
<ul class="params-list">
|
||||||
|
|
||||||
|
<li class="param">
|
||||||
|
|
||||||
|
<code class="param-name">url</code>
|
||||||
|
<span class="type">String</span>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="param-description">
|
||||||
|
<p>the url of the sprite sheet JSON file</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="param">
|
||||||
|
|
||||||
|
<code class="param-name">crossorigin</code>
|
||||||
|
<span class="type">Boolean</span>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="param-description">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div id="classdocs" class="tabview">
|
||||||
|
<ul class="api-class-tabs">
|
||||||
|
<li class="api-class-tab index"><a href="#index">Index</a></li>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<div id="index" class="api-class-tabpanel index">
|
||||||
|
<h2 class="off-left">Item Index</h2>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script src="../assets/vendor/prettify/prettify-min.js"></script>
|
||||||
|
<script>prettyPrint();</script>
|
||||||
|
<script src="../assets/js/yui-prettify.js"></script>
|
||||||
|
<script src="../assets/../api.js"></script>
|
||||||
|
<script src="../assets/js/api-filter.js"></script>
|
||||||
|
<script src="../assets/js/api-list.js"></script>
|
||||||
|
<script src="../assets/js/api-search.js"></script>
|
||||||
|
<script src="../assets/js/apidocs.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
2496
docs/classes/BitmapText.html
Normal file
2496
docs/classes/BitmapText.html
Normal file
File diff suppressed because it is too large
Load diff
|
@ -45,12 +45,18 @@
|
||||||
|
|
||||||
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||||
|
|
|
@ -45,12 +45,18 @@
|
||||||
|
|
||||||
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||||
|
|
|
@ -45,12 +45,18 @@
|
||||||
|
|
||||||
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||||
|
|
321
docs/classes/ImageLoader.html
Normal file
321
docs/classes/ImageLoader.html
Normal file
|
@ -0,0 +1,321 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>ImageLoader - Pixi.JS</title>
|
||||||
|
<link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0/build/cssgrids/cssgrids-min.css">
|
||||||
|
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
|
||||||
|
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
|
||||||
|
<link rel="shortcut icon" type="image/png" href="../assets/favicon.png">
|
||||||
|
<script src="http://yui.yahooapis.com/combo?3.8.0/build/yui/yui-min.js"></script>
|
||||||
|
</head>
|
||||||
|
<body class="yui3-skin-sam">
|
||||||
|
|
||||||
|
<div id="doc">
|
||||||
|
<div id="hd" class="yui3-g header">
|
||||||
|
<div class="yui3-u-3-4">
|
||||||
|
|
||||||
|
<h1><img src="http://www.goodboydigital.com/pixijs/logo_small.png" title="Pixi.JS"></h1>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="yui3-u-1-4 version">
|
||||||
|
<em>API Docs for: 1.0.0</em>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="bd" class="yui3-g">
|
||||||
|
|
||||||
|
<div class="yui3-u-1-4">
|
||||||
|
<div id="docs-sidebar" class="sidebar apidocs">
|
||||||
|
<div id="api-list">
|
||||||
|
<h2 class="off-left">APIs</h2>
|
||||||
|
<div id="api-tabview" class="tabview">
|
||||||
|
<ul class="tabs">
|
||||||
|
<li><a href="#api-classes">Classes</a></li>
|
||||||
|
<li><a href="#api-modules">Modules</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<div id="api-tabview-filter">
|
||||||
|
<input type="search" id="api-filter" placeholder="Type to filter APIs">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="api-tabview-panel">
|
||||||
|
<ul id="api-classes" class="apis classes">
|
||||||
|
|
||||||
|
<li><a href="../classes/AssetLoader.html">AssetLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/MovieClip.html">MovieClip</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/Point.html">Point</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/Rectangle.html">Rectangle</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/Sprite.html">Sprite</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/Stage.html">Stage</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/Text.html">Text</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/Texture.html">Texture</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/TilingSprite.html">TilingSprite</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/WebGLBatch.html">WebGLBatch</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/WebGLRenderer.html">WebGLRenderer</a></li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<ul id="api-modules" class="apis modules">
|
||||||
|
|
||||||
|
<li><a href="../modules/PIXI.html">PIXI</a></li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="yui3-u-3-4">
|
||||||
|
<div id="api-options">
|
||||||
|
Show:
|
||||||
|
<label for="api-show-inherited">
|
||||||
|
<input type="checkbox" id="api-show-inherited" checked>
|
||||||
|
Inherited
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<label for="api-show-protected">
|
||||||
|
<input type="checkbox" id="api-show-protected">
|
||||||
|
Protected
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<label for="api-show-private">
|
||||||
|
<input type="checkbox" id="api-show-private">
|
||||||
|
Private
|
||||||
|
</label>
|
||||||
|
<label for="api-show-deprecated">
|
||||||
|
<input type="checkbox" id="api-show-deprecated">
|
||||||
|
Deprecated
|
||||||
|
</label>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="apidocs">
|
||||||
|
<div id="docs-main">
|
||||||
|
<div class="content">
|
||||||
|
<h1>ImageLoader Class</h1>
|
||||||
|
<div class="box meta">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="extends">
|
||||||
|
Extends EventTarget
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="foundat">
|
||||||
|
Defined in: <a href="../files/src_pixi_loaders_ImageLoader.js.html#l5"><code>src/pixi/loaders/ImageLoader.js:5</code></a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Module: <a href="../modules/PIXI.html">PIXI</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="box intro">
|
||||||
|
<p>The image loader class is responsible for loading images file formats ("jpeg", "jpg", "png" and "gif")
|
||||||
|
Once the image has been loaded it is stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFromeId()
|
||||||
|
When loaded this class will dispatch a 'loaded' event</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="constructor">
|
||||||
|
<h2>Constructor</h2>
|
||||||
|
<div id="method_ImageLoader" class="method item">
|
||||||
|
<h3 class="name"><code>ImageLoader</code></h3>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="args">
|
||||||
|
<span class="paren">(</span><ul class="args-list inline commas">
|
||||||
|
|
||||||
|
<li class="arg">
|
||||||
|
|
||||||
|
<code>url</code>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="arg">
|
||||||
|
|
||||||
|
<code>crossorigin</code>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul><span class="paren">)</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="meta">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<p>
|
||||||
|
|
||||||
|
Defined in
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a href="../files/src_pixi_loaders_ImageLoader.js.html#l5"><code>src/pixi/loaders/ImageLoader.js:5</code></a>
|
||||||
|
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="description">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="params">
|
||||||
|
<h4>Parameters:</h4>
|
||||||
|
|
||||||
|
<ul class="params-list">
|
||||||
|
|
||||||
|
<li class="param">
|
||||||
|
|
||||||
|
<code class="param-name">url</code>
|
||||||
|
<span class="type">String</span>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="param-description">
|
||||||
|
<p>The url of the image</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="param">
|
||||||
|
|
||||||
|
<code class="param-name">crossorigin</code>
|
||||||
|
<span class="type">Boolean</span>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="param-description">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div id="classdocs" class="tabview">
|
||||||
|
<ul class="api-class-tabs">
|
||||||
|
<li class="api-class-tab index"><a href="#index">Index</a></li>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<div id="index" class="api-class-tabpanel index">
|
||||||
|
<h2 class="off-left">Item Index</h2>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script src="../assets/vendor/prettify/prettify-min.js"></script>
|
||||||
|
<script>prettyPrint();</script>
|
||||||
|
<script src="../assets/js/yui-prettify.js"></script>
|
||||||
|
<script src="../assets/../api.js"></script>
|
||||||
|
<script src="../assets/js/api-filter.js"></script>
|
||||||
|
<script src="../assets/js/api-list.js"></script>
|
||||||
|
<script src="../assets/js/api-search.js"></script>
|
||||||
|
<script src="../assets/js/apidocs.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -45,12 +45,18 @@
|
||||||
|
|
||||||
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||||
|
|
|
@ -45,12 +45,18 @@
|
||||||
|
|
||||||
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||||
|
|
|
@ -45,12 +45,18 @@
|
||||||
|
|
||||||
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||||
|
|
|
@ -45,12 +45,18 @@
|
||||||
|
|
||||||
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||||
|
|
|
@ -45,12 +45,18 @@
|
||||||
|
|
||||||
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||||
|
|
|
@ -45,12 +45,18 @@
|
||||||
|
|
||||||
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||||
|
|
|
@ -45,12 +45,18 @@
|
||||||
|
|
||||||
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||||
|
@ -149,10 +155,10 @@
|
||||||
<p>The sprite sheet loader is used to load in JSON sprite sheet data
|
<p>The sprite sheet loader is used to load in JSON sprite sheet data
|
||||||
To generate the data you can use http://www.codeandweb.com/texturepacker and publish the "JSON" format
|
To generate the data you can use http://www.codeandweb.com/texturepacker and publish the "JSON" format
|
||||||
There is a free version so thats nice, although the paid version is great value for money.
|
There is a free version so thats nice, although the paid version is great value for money.
|
||||||
It is highly recommended to use Sprite sheets (also know as texture atlas') as it means sprite's can be batched and drawn together for highly increased rendering speed.
|
It is highly recommended to use Sprite sheets (also know as texture atlas") as it means sprite"s can be batched and drawn together for highly increased rendering speed.
|
||||||
Once the data has been loaded the frames are stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFromeId()
|
Once the data has been loaded the frames are stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFromeId()
|
||||||
This loader will also load the image file that the Spritesheet points to as well as the data.
|
This loader will also load the image file that the Spritesheet points to as well as the data.
|
||||||
When loaded this class will dispatch a 'loaded' event</p>
|
When loaded this class will dispatch a "loaded" event</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
@ -171,6 +177,12 @@ When loaded this class will dispatch a 'loaded' event</p>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<li class="arg">
|
||||||
|
|
||||||
|
<code>crossorigin</code>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
</ul><span class="paren">)</span>
|
</ul><span class="paren">)</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -235,6 +247,21 @@ When loaded this class will dispatch a 'loaded' event</p>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<li class="param">
|
||||||
|
|
||||||
|
<code class="param-name">crossorigin</code>
|
||||||
|
<span class="type">Boolean</span>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="param-description">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -45,12 +45,18 @@
|
||||||
|
|
||||||
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||||
|
|
|
@ -45,12 +45,18 @@
|
||||||
|
|
||||||
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||||
|
@ -130,7 +136,7 @@
|
||||||
|
|
||||||
|
|
||||||
<div class="foundat">
|
<div class="foundat">
|
||||||
Defined in: <a href="../files/src_pixi_Text.js.html#l5"><code>src/pixi/Text.js:5</code></a>
|
Defined in: <a href="../files/src_pixi_text_Text.js.html#l5"><code>src/pixi/text/Text.js:5</code></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
@ -146,7 +152,7 @@
|
||||||
|
|
||||||
|
|
||||||
<div class="box intro">
|
<div class="box intro">
|
||||||
<p>A Text Object will create a line of text</p>
|
<p>A Text Object will create a line(s) of text to split a line you can use "\n"</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
@ -167,25 +173,7 @@
|
||||||
|
|
||||||
<li class="arg">
|
<li class="arg">
|
||||||
|
|
||||||
<code>fontStyle</code>
|
<code class="optional">[style]</code>
|
||||||
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="arg">
|
|
||||||
|
|
||||||
<code>fillStyle</code>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="arg">
|
|
||||||
|
|
||||||
<code>strokeStyle</code>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="arg">
|
|
||||||
|
|
||||||
<code>strokeThickness</code>
|
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
@ -218,7 +206,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_pixi_Text.js.html#l5"><code>src/pixi/Text.js:5</code></a>
|
<a href="../files/src_pixi_text_Text.js.html#l5"><code>src/pixi/text/Text.js:5</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
@ -255,44 +243,29 @@
|
||||||
|
|
||||||
<li class="param">
|
<li class="param">
|
||||||
|
|
||||||
<code class="param-name">fontStyle</code>
|
<code class="param-name optional">[style]</code>
|
||||||
<span class="type">String</span>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="param-description">
|
|
||||||
<p>the style and size of the font eg "bold 20px Arial"</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="param">
|
|
||||||
|
|
||||||
<code class="param-name">fillStyle</code>
|
|
||||||
<span class="type">Object</span>
|
<span class="type">Object</span>
|
||||||
|
<span class="flag optional" title="This parameter is optional.">optional</span>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="param-description">
|
<div class="param-description">
|
||||||
<p>a canvas fillstyle that will be used on the text eg "red", "#00FF00" can also be null</p>
|
<p>The style parameters</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</li>
|
<ul class="params-list">
|
||||||
|
|
||||||
<li class="param">
|
<li class="param">
|
||||||
|
|
||||||
<code class="param-name">strokeStyle</code>
|
<code class="param-name optional">[font]</code>
|
||||||
<span class="type">String</span>
|
<span class="type">String</span>
|
||||||
|
<span class="flag optional" title="This parameter is optional.">optional</span>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="param-description">
|
<div class="param-description">
|
||||||
<p>a canvas fillstyle that will be used on the text stroke eg "blue", "#FCFF00" can also be null</p>
|
<p>default "bold 20pt Arial" The style and size of the font</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
@ -300,19 +273,64 @@
|
||||||
|
|
||||||
<li class="param">
|
<li class="param">
|
||||||
|
|
||||||
<code class="param-name">strokeThickness</code>
|
<code class="param-name optional">[fill="black"]</code>
|
||||||
<span class="type">Number</span>
|
<span class="type">Object</span>
|
||||||
|
<span class="flag optional" title="This parameter is optional.">optional</span>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="param-description">
|
<div class="param-description">
|
||||||
<p>A number that represents the thicknes of the stroke. default is 0 (no stroke)</p>
|
<p>A canvas fillstyle that will be used on the text eg "red", "#00FF00"</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<li class="param">
|
||||||
|
|
||||||
|
<code class="param-name optional">[align="left"]</code>
|
||||||
|
<span class="type">String</span>
|
||||||
|
<span class="flag optional" title="This parameter is optional.">optional</span>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="param-description">
|
||||||
|
<p>An alignment of the multiline text ("left", "center" or "right")</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="param">
|
||||||
|
|
||||||
|
<code class="param-name optional">[stroke]</code>
|
||||||
|
<span class="type">String</span>
|
||||||
|
<span class="flag optional" title="This parameter is optional.">optional</span>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="param-description">
|
||||||
|
<p>A canvas fillstyle that will be used on the text stroke eg "blue", "#FCFF00"</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="param">
|
||||||
|
|
||||||
|
<code class="param-name optional">[strokeThickness=0]</code>
|
||||||
|
<span class="type">Number</span>
|
||||||
|
<span class="flag optional" title="This parameter is optional.">optional</span>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="param-description">
|
||||||
|
<p>A number that represents the thickness of the stroke. Default is 0 (no stroke)</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -1560,25 +1578,13 @@ for this callback to be fired, The touch must have started over the displayObjec
|
||||||
|
|
||||||
<li class="arg">
|
<li class="arg">
|
||||||
|
|
||||||
<code>fontStyle</code>
|
<code class="optional">[style]</code>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="arg">
|
<li class="arg">
|
||||||
|
|
||||||
<code>fillStyle</code>
|
<code>[style.font="bold</code>
|
||||||
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="arg">
|
|
||||||
|
|
||||||
<code>strokeStyle</code>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="arg">
|
|
||||||
|
|
||||||
<code>strokeThickness</code>
|
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
@ -1611,7 +1617,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_pixi_Text.js.html#l47"><code>src/pixi/Text.js:47</code></a>
|
<a href="../files/src_pixi_text_Text.js.html#l34"><code>src/pixi/text/Text.js:34</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
@ -1633,29 +1639,29 @@ for this callback to be fired, The touch must have started over the displayObjec
|
||||||
|
|
||||||
<li class="param">
|
<li class="param">
|
||||||
|
|
||||||
<code class="param-name">fontStyle</code>
|
<code class="param-name optional">[style]</code>
|
||||||
<span class="type">String</span>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="param-description">
|
|
||||||
<p>the style and size of the font eg "bold 20px Arial"</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="param">
|
|
||||||
|
|
||||||
<code class="param-name">fillStyle</code>
|
|
||||||
<span class="type">Object</span>
|
<span class="type">Object</span>
|
||||||
|
<span class="flag optional" title="This parameter is optional.">optional</span>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="param-description">
|
<div class="param-description">
|
||||||
<p>a canvas fillstyle that will be used on the text eg "red", "#00FF00" can also be null</p>
|
<p>The style parameters</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<ul class="params-list">
|
||||||
|
|
||||||
|
<li class="param">
|
||||||
|
|
||||||
|
<code class="param-name optional">[fill="black"]</code>
|
||||||
|
<span class="type">Object</span>
|
||||||
|
<span class="flag optional" title="This parameter is optional.">optional</span>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="param-description">
|
||||||
|
<p>A canvas fillstyle that will be used on the text eg "red", "#00FF00"</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
@ -1663,29 +1669,60 @@ for this callback to be fired, The touch must have started over the displayObjec
|
||||||
|
|
||||||
<li class="param">
|
<li class="param">
|
||||||
|
|
||||||
<code class="param-name">strokeStyle</code>
|
<code class="param-name optional">[align="left"]</code>
|
||||||
|
<span class="type">String</span>
|
||||||
|
<span class="flag optional" title="This parameter is optional.">optional</span>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="param-description">
|
||||||
|
<p>An alignment of the multiline text ("left", "center" or "right")</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="param">
|
||||||
|
|
||||||
|
<code class="param-name optional">[stroke]</code>
|
||||||
|
<span class="type">String</span>
|
||||||
|
<span class="flag optional" title="This parameter is optional.">optional</span>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="param-description">
|
||||||
|
<p>A canvas fillstyle that will be used on the text stroke eg "blue", "#FCFF00"</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="param">
|
||||||
|
|
||||||
|
<code class="param-name optional">[strokeThickness=0]</code>
|
||||||
|
<span class="type">Number</span>
|
||||||
|
<span class="flag optional" title="This parameter is optional.">optional</span>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="param-description">
|
||||||
|
<p>A number that represents the thickness of the stroke. Default is 0 (no stroke)</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="param">
|
||||||
|
|
||||||
|
<code class="param-name">[style.font="bold</code>
|
||||||
<span class="type">String</span>
|
<span class="type">String</span>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="param-description">
|
<div class="param-description">
|
||||||
<p>a canvas fillstyle that will be used on the text stroke eg "blue", "#FCFF00" can also be null</p>
|
<p>20pt Arial"] The style and size of the font</p>
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="param">
|
|
||||||
|
|
||||||
<code class="param-name">strokeThickness</code>
|
|
||||||
<span class="type">Number</span>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="param-description">
|
|
||||||
<p>A number that represents the thicknes of the stroke. default is 0 (no stroke)</p>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -45,12 +45,18 @@
|
||||||
|
|
||||||
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||||
|
|
|
@ -45,12 +45,18 @@
|
||||||
|
|
||||||
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||||
|
|
|
@ -45,12 +45,18 @@
|
||||||
|
|
||||||
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||||
|
|
|
@ -45,12 +45,18 @@
|
||||||
|
|
||||||
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||||
|
|
706
docs/data.json
706
docs/data.json
|
@ -39,6 +39,24 @@
|
||||||
"fors": {},
|
"fors": {},
|
||||||
"namespaces": {}
|
"namespaces": {}
|
||||||
},
|
},
|
||||||
|
"src/pixi/loaders/BitmapFontLoader.js": {
|
||||||
|
"name": "src/pixi/loaders/BitmapFontLoader.js",
|
||||||
|
"modules": {},
|
||||||
|
"classes": {
|
||||||
|
"BitmapFontLoader": 1
|
||||||
|
},
|
||||||
|
"fors": {},
|
||||||
|
"namespaces": {}
|
||||||
|
},
|
||||||
|
"src/pixi/loaders/ImageLoader.js": {
|
||||||
|
"name": "src/pixi/loaders/ImageLoader.js",
|
||||||
|
"modules": {},
|
||||||
|
"classes": {
|
||||||
|
"ImageLoader": 1
|
||||||
|
},
|
||||||
|
"fors": {},
|
||||||
|
"namespaces": {}
|
||||||
|
},
|
||||||
"src/pixi/loaders/SpriteSheetLoader.js": {
|
"src/pixi/loaders/SpriteSheetLoader.js": {
|
||||||
"name": "src/pixi/loaders/SpriteSheetLoader.js",
|
"name": "src/pixi/loaders/SpriteSheetLoader.js",
|
||||||
"modules": {},
|
"modules": {},
|
||||||
|
@ -82,6 +100,24 @@
|
||||||
"fors": {},
|
"fors": {},
|
||||||
"namespaces": {}
|
"namespaces": {}
|
||||||
},
|
},
|
||||||
|
"src/pixi/text/BitmapText.js": {
|
||||||
|
"name": "src/pixi/text/BitmapText.js",
|
||||||
|
"modules": {},
|
||||||
|
"classes": {
|
||||||
|
"BitmapText": 1
|
||||||
|
},
|
||||||
|
"fors": {},
|
||||||
|
"namespaces": {}
|
||||||
|
},
|
||||||
|
"src/pixi/text/Text.js": {
|
||||||
|
"name": "src/pixi/text/Text.js",
|
||||||
|
"modules": {},
|
||||||
|
"classes": {
|
||||||
|
"Text": 1
|
||||||
|
},
|
||||||
|
"fors": {},
|
||||||
|
"namespaces": {}
|
||||||
|
},
|
||||||
"src/pixi/textures/BaseTexture.js": {
|
"src/pixi/textures/BaseTexture.js": {
|
||||||
"name": "src/pixi/textures/BaseTexture.js",
|
"name": "src/pixi/textures/BaseTexture.js",
|
||||||
"modules": {},
|
"modules": {},
|
||||||
|
@ -149,6 +185,13 @@
|
||||||
"fors": {},
|
"fors": {},
|
||||||
"namespaces": {}
|
"namespaces": {}
|
||||||
},
|
},
|
||||||
|
"src/pixi/Intro.js": {
|
||||||
|
"name": "src/pixi/Intro.js",
|
||||||
|
"modules": {},
|
||||||
|
"classes": {},
|
||||||
|
"fors": {},
|
||||||
|
"namespaces": {}
|
||||||
|
},
|
||||||
"src/pixi/MovieClip.js": {
|
"src/pixi/MovieClip.js": {
|
||||||
"name": "src/pixi/MovieClip.js",
|
"name": "src/pixi/MovieClip.js",
|
||||||
"modules": {},
|
"modules": {},
|
||||||
|
@ -158,6 +201,13 @@
|
||||||
"fors": {},
|
"fors": {},
|
||||||
"namespaces": {}
|
"namespaces": {}
|
||||||
},
|
},
|
||||||
|
"src/pixi/Outro.js": {
|
||||||
|
"name": "src/pixi/Outro.js",
|
||||||
|
"modules": {},
|
||||||
|
"classes": {},
|
||||||
|
"fors": {},
|
||||||
|
"namespaces": {}
|
||||||
|
},
|
||||||
"src/pixi/Pixi.js": {
|
"src/pixi/Pixi.js": {
|
||||||
"name": "src/pixi/Pixi.js",
|
"name": "src/pixi/Pixi.js",
|
||||||
"modules": {
|
"modules": {
|
||||||
|
@ -202,15 +252,6 @@
|
||||||
},
|
},
|
||||||
"fors": {},
|
"fors": {},
|
||||||
"namespaces": {}
|
"namespaces": {}
|
||||||
},
|
|
||||||
"src/pixi/Text.js": {
|
|
||||||
"name": "src/pixi/Text.js",
|
|
||||||
"modules": {},
|
|
||||||
"classes": {
|
|
||||||
"Text": 1
|
|
||||||
},
|
|
||||||
"fors": {},
|
|
||||||
"namespaces": {}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"modules": {
|
"modules": {
|
||||||
|
@ -220,10 +261,14 @@
|
||||||
"classes": {
|
"classes": {
|
||||||
"TilingSprite": 1,
|
"TilingSprite": 1,
|
||||||
"AssetLoader": 1,
|
"AssetLoader": 1,
|
||||||
|
"BitmapFontLoader": 1,
|
||||||
|
"ImageLoader": 1,
|
||||||
"SpriteSheetLoader": 1,
|
"SpriteSheetLoader": 1,
|
||||||
"CanvasRenderer": 1,
|
"CanvasRenderer": 1,
|
||||||
"WebGLBatch": 1,
|
"WebGLBatch": 1,
|
||||||
"WebGLRenderer": 1,
|
"WebGLRenderer": 1,
|
||||||
|
"BitmapText": 1,
|
||||||
|
"Text": 1,
|
||||||
"BaseTexture": 1,
|
"BaseTexture": 1,
|
||||||
"Texture": 1,
|
"Texture": 1,
|
||||||
"DisplayObject": 1,
|
"DisplayObject": 1,
|
||||||
|
@ -234,13 +279,12 @@
|
||||||
"Point": 1,
|
"Point": 1,
|
||||||
"Rectangle": 1,
|
"Rectangle": 1,
|
||||||
"Sprite": 1,
|
"Sprite": 1,
|
||||||
"Stage": 1,
|
"Stage": 1
|
||||||
"Text": 1
|
|
||||||
},
|
},
|
||||||
"fors": {},
|
"fors": {},
|
||||||
"namespaces": {},
|
"namespaces": {},
|
||||||
"tag": "module",
|
"tag": "module",
|
||||||
"file": "src/pixi/Text.js",
|
"file": "src/pixi/Stage.js",
|
||||||
"line": 5
|
"line": 5
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -288,17 +332,71 @@
|
||||||
"module": "PIXI",
|
"module": "PIXI",
|
||||||
"file": "src/pixi/loaders/AssetLoader.js",
|
"file": "src/pixi/loaders/AssetLoader.js",
|
||||||
"line": 5,
|
"line": 5,
|
||||||
"description": "A Class that loads a bunch of images / sprite sheet files. Once the assets have been loaded they are added to the PIXI Texture cache and can be accessed easily through PIXI.Texture.fromFrame(), PIXI.Texture.fromImage() and PIXI.Sprite.fromImage(), PIXI.Sprite.fromFromeId()\nWhen all items have been loaded this class will dispatch a 'loaded' event\nAs each individual item is loaded this class will dispatch a 'progress' event",
|
"description": "A Class that loads a bunch of images / sprite sheet / bitmap font files. Once the assets have been loaded they are added to the PIXI Texture cache and can be accessed easily through PIXI.Texture.fromImage() and PIXI.Sprite.fromImage()\nWhen all items have been loaded this class will dispatch a \"onLoaded\" event\nAs each individual item is loaded this class will dispatch a \"onProgress\" event",
|
||||||
"is_constructor": 1,
|
"is_constructor": 1,
|
||||||
"extends": "EventTarget",
|
"extends": "EventTarget",
|
||||||
"params": [
|
"params": [
|
||||||
{
|
{
|
||||||
"name": "assetURLs",
|
"name": "assetURLs",
|
||||||
"description": "an array of image/sprite sheet urls that you would like loaded supported. Supported image formats include \"jpeg\", \"jpg\", \"png\", \"gif\". Supported sprite sheet data formats only include \"JSON\" at this time",
|
"description": "an array of image/sprite sheet urls that you would like loaded supported. Supported image formats include \"jpeg\", \"jpg\", \"png\", \"gif\". Supported sprite sheet data formats only include \"JSON\" at this time. Supported bitmap font data formats include \"xml\" and \"fnt\".",
|
||||||
"type": "Array"
|
"type": "Array"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"BitmapFontLoader": {
|
||||||
|
"name": "BitmapFontLoader",
|
||||||
|
"shortname": "BitmapFontLoader",
|
||||||
|
"classitems": [],
|
||||||
|
"plugins": [],
|
||||||
|
"extensions": [],
|
||||||
|
"plugin_for": [],
|
||||||
|
"extension_for": [],
|
||||||
|
"module": "PIXI",
|
||||||
|
"file": "src/pixi/loaders/BitmapFontLoader.js",
|
||||||
|
"line": 5,
|
||||||
|
"description": "The xml loader is used to load in XML bitmap font data (\"xml\" or \"fnt\")\nTo generate the data you can use http://www.angelcode.com/products/bmfont/\nThis loader will also load the image file as the data.\nWhen loaded this class will dispatch a \"loaded\" event",
|
||||||
|
"extends": "EventTarget",
|
||||||
|
"is_constructor": 1,
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"name": "url",
|
||||||
|
"description": "the url of the sprite sheet JSON file",
|
||||||
|
"type": "String"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "crossorigin",
|
||||||
|
"description": "",
|
||||||
|
"type": "Boolean"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"ImageLoader": {
|
||||||
|
"name": "ImageLoader",
|
||||||
|
"shortname": "ImageLoader",
|
||||||
|
"classitems": [],
|
||||||
|
"plugins": [],
|
||||||
|
"extensions": [],
|
||||||
|
"plugin_for": [],
|
||||||
|
"extension_for": [],
|
||||||
|
"module": "PIXI",
|
||||||
|
"file": "src/pixi/loaders/ImageLoader.js",
|
||||||
|
"line": 5,
|
||||||
|
"description": "The image loader class is responsible for loading images file formats (\"jpeg\", \"jpg\", \"png\" and \"gif\")\nOnce the image has been loaded it is stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFromeId()\nWhen loaded this class will dispatch a 'loaded' event",
|
||||||
|
"extends": "EventTarget",
|
||||||
|
"is_constructor": 1,
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"name": "url",
|
||||||
|
"description": "The url of the image",
|
||||||
|
"type": "String"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "crossorigin",
|
||||||
|
"description": "",
|
||||||
|
"type": "Boolean"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"SpriteSheetLoader": {
|
"SpriteSheetLoader": {
|
||||||
"name": "SpriteSheetLoader",
|
"name": "SpriteSheetLoader",
|
||||||
"shortname": "SpriteSheetLoader",
|
"shortname": "SpriteSheetLoader",
|
||||||
|
@ -310,7 +408,7 @@
|
||||||
"module": "PIXI",
|
"module": "PIXI",
|
||||||
"file": "src/pixi/loaders/SpriteSheetLoader.js",
|
"file": "src/pixi/loaders/SpriteSheetLoader.js",
|
||||||
"line": 5,
|
"line": 5,
|
||||||
"description": "The sprite sheet loader is used to load in JSON sprite sheet data\nTo generate the data you can use http://www.codeandweb.com/texturepacker and publish the \"JSON\" format\nThere is a free version so thats nice, although the paid version is great value for money.\nIt is highly recommended to use Sprite sheets (also know as texture atlas') as it means sprite's can be batched and drawn together for highly increased rendering speed.\nOnce the data has been loaded the frames are stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFromeId()\nThis loader will also load the image file that the Spritesheet points to as well as the data.\nWhen loaded this class will dispatch a 'loaded' event",
|
"description": "The sprite sheet loader is used to load in JSON sprite sheet data\nTo generate the data you can use http://www.codeandweb.com/texturepacker and publish the \"JSON\" format\nThere is a free version so thats nice, although the paid version is great value for money.\nIt is highly recommended to use Sprite sheets (also know as texture atlas\") as it means sprite\"s can be batched and drawn together for highly increased rendering speed.\nOnce the data has been loaded the frames are stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFromeId()\nThis loader will also load the image file that the Spritesheet points to as well as the data.\nWhen loaded this class will dispatch a \"loaded\" event",
|
||||||
"extends": "EventTarget",
|
"extends": "EventTarget",
|
||||||
"is_constructor": 1,
|
"is_constructor": 1,
|
||||||
"params": [
|
"params": [
|
||||||
|
@ -318,6 +416,11 @@
|
||||||
"name": "url",
|
"name": "url",
|
||||||
"description": "the url of the sprite sheet JSON file",
|
"description": "the url of the sprite sheet JSON file",
|
||||||
"type": "String"
|
"type": "String"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "crossorigin",
|
||||||
|
"description": "",
|
||||||
|
"type": "Boolean"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -418,6 +521,112 @@
|
||||||
],
|
],
|
||||||
"default": "false"
|
"default": "false"
|
||||||
},
|
},
|
||||||
|
"BitmapText": {
|
||||||
|
"name": "BitmapText",
|
||||||
|
"shortname": "BitmapText",
|
||||||
|
"classitems": [],
|
||||||
|
"plugins": [],
|
||||||
|
"extensions": [],
|
||||||
|
"plugin_for": [],
|
||||||
|
"extension_for": [],
|
||||||
|
"module": "PIXI",
|
||||||
|
"file": "src/pixi/text/BitmapText.js",
|
||||||
|
"line": 5,
|
||||||
|
"description": "A Text Object will create a line(s) of text using bitmap font \nYou can generate the fnt files using \nhttp://www.angelcode.com/products/bmfont/ for windows of\nhttp://www.bmglyph.com/ for mac.",
|
||||||
|
"extends": "DisplayObjectContainer",
|
||||||
|
"is_constructor": 1,
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"name": "text",
|
||||||
|
"description": "The copy that you would like the text to display",
|
||||||
|
"type": "String"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "style",
|
||||||
|
"description": "The style parameters",
|
||||||
|
"type": "Object",
|
||||||
|
"optional": true,
|
||||||
|
"props": [
|
||||||
|
{
|
||||||
|
"name": "font",
|
||||||
|
"description": "default is \"20pt Arial\" The size and bitmap font id (must have loaded previously)",
|
||||||
|
"type": "String",
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "align",
|
||||||
|
"description": "An alignment of the multiline text (\"left\", \"center\" or \"right\")",
|
||||||
|
"type": "String",
|
||||||
|
"optional": true,
|
||||||
|
"optdefault": "\"left\""
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Text": {
|
||||||
|
"name": "Text",
|
||||||
|
"shortname": "Text",
|
||||||
|
"classitems": [],
|
||||||
|
"plugins": [],
|
||||||
|
"extensions": [],
|
||||||
|
"plugin_for": [],
|
||||||
|
"extension_for": [],
|
||||||
|
"module": "PIXI",
|
||||||
|
"file": "src/pixi/text/Text.js",
|
||||||
|
"line": 5,
|
||||||
|
"description": "A Text Object will create a line(s) of text to split a line you can use \"\\n\"",
|
||||||
|
"extends": "Sprite",
|
||||||
|
"is_constructor": 1,
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"name": "text",
|
||||||
|
"description": "The copy that you would like the text to display",
|
||||||
|
"type": "String"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "style",
|
||||||
|
"description": "The style parameters",
|
||||||
|
"type": "Object",
|
||||||
|
"optional": true,
|
||||||
|
"props": [
|
||||||
|
{
|
||||||
|
"name": "font",
|
||||||
|
"description": "default \"bold 20pt Arial\" The style and size of the font",
|
||||||
|
"type": "String",
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "fill",
|
||||||
|
"description": "A canvas fillstyle that will be used on the text eg \"red\", \"#00FF00\"",
|
||||||
|
"type": "Object",
|
||||||
|
"optional": true,
|
||||||
|
"optdefault": "\"black\""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "align",
|
||||||
|
"description": "An alignment of the multiline text (\"left\", \"center\" or \"right\")",
|
||||||
|
"type": "String",
|
||||||
|
"optional": true,
|
||||||
|
"optdefault": "\"left\""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "stroke",
|
||||||
|
"description": "A canvas fillstyle that will be used on the text stroke eg \"blue\", \"#FCFF00\"",
|
||||||
|
"type": "String",
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "strokeThickness",
|
||||||
|
"description": "A number that represents the thickness of the stroke. Default is 0 (no stroke)",
|
||||||
|
"type": "Number",
|
||||||
|
"optional": true,
|
||||||
|
"optdefault": "0"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"BaseTexture": {
|
"BaseTexture": {
|
||||||
"name": "BaseTexture",
|
"name": "BaseTexture",
|
||||||
"shortname": "BaseTexture",
|
"shortname": "BaseTexture",
|
||||||
|
@ -667,49 +876,6 @@
|
||||||
"type": "Boolean"
|
"type": "Boolean"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
|
||||||
"Text": {
|
|
||||||
"name": "Text",
|
|
||||||
"shortname": "Text",
|
|
||||||
"classitems": [],
|
|
||||||
"plugins": [],
|
|
||||||
"extensions": [],
|
|
||||||
"plugin_for": [],
|
|
||||||
"extension_for": [],
|
|
||||||
"module": "PIXI",
|
|
||||||
"namespace": "",
|
|
||||||
"file": "src/pixi/Text.js",
|
|
||||||
"line": 5,
|
|
||||||
"description": "A Text Object will create a line of text",
|
|
||||||
"extends": "Sprite",
|
|
||||||
"is_constructor": 1,
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"name": "text",
|
|
||||||
"description": "The copy that you would like the text to display",
|
|
||||||
"type": "String"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "fontStyle",
|
|
||||||
"description": "the style and size of the font eg \"bold 20px Arial\"",
|
|
||||||
"type": "String"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "fillStyle",
|
|
||||||
"description": "a canvas fillstyle that will be used on the text eg \"red\", \"#00FF00\" can also be null",
|
|
||||||
"type": "Object"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "strokeStyle",
|
|
||||||
"description": "a canvas fillstyle that will be used on the text stroke eg \"blue\", \"#FCFF00\" can also be null",
|
|
||||||
"type": "String"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "strokeThickness",
|
|
||||||
"description": "A number that represents the thicknes of the stroke. default is 0 (no stroke)",
|
|
||||||
"type": "Number"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"classitems": [
|
"classitems": [
|
||||||
|
@ -766,7 +932,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/pixi/loaders/AssetLoader.js",
|
"file": "src/pixi/loaders/AssetLoader.js",
|
||||||
"line": 30,
|
"line": 38,
|
||||||
"description": "Fired when an item has loaded",
|
"description": "Fired when an item has loaded",
|
||||||
"itemtype": "event",
|
"itemtype": "event",
|
||||||
"name": "onProgress",
|
"name": "onProgress",
|
||||||
|
@ -774,7 +940,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/pixi/loaders/AssetLoader.js",
|
"file": "src/pixi/loaders/AssetLoader.js",
|
||||||
"line": 35,
|
"line": 43,
|
||||||
"description": "Fired when all the assets have loaded",
|
"description": "Fired when all the assets have loaded",
|
||||||
"itemtype": "event",
|
"itemtype": "event",
|
||||||
"name": "onComplete",
|
"name": "onComplete",
|
||||||
|
@ -782,10 +948,66 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/pixi/loaders/AssetLoader.js",
|
"file": "src/pixi/loaders/AssetLoader.js",
|
||||||
"line": 43,
|
"line": 51,
|
||||||
"description": "This will begin loading the assets sequentially",
|
"description": "This will begin loading the assets sequentially",
|
||||||
"class": "AssetLoader"
|
"class": "AssetLoader"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"file": "src/pixi/loaders/AssetLoader.js",
|
||||||
|
"line": 79,
|
||||||
|
"description": "Invoked after each file is loaded",
|
||||||
|
"access": "private",
|
||||||
|
"tagname": "",
|
||||||
|
"class": "AssetLoader"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"file": "src/pixi/loaders/BitmapFontLoader.js",
|
||||||
|
"line": 1,
|
||||||
|
"author": "Mat Groves http://matgroves.com/ @Doormat23",
|
||||||
|
"class": "BitmapFontLoader"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"file": "src/pixi/loaders/BitmapFontLoader.js",
|
||||||
|
"line": 34,
|
||||||
|
"description": "This will begin loading the JSON file",
|
||||||
|
"class": "BitmapFontLoader"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"file": "src/pixi/loaders/BitmapFontLoader.js",
|
||||||
|
"line": 51,
|
||||||
|
"description": "Invoked when XML file is loaded",
|
||||||
|
"access": "private",
|
||||||
|
"tagname": "",
|
||||||
|
"class": "BitmapFontLoader"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"file": "src/pixi/loaders/BitmapFontLoader.js",
|
||||||
|
"line": 118,
|
||||||
|
"description": "Invoked when all files are loaded (xml/fnt and texture)",
|
||||||
|
"access": "private",
|
||||||
|
"tagname": "",
|
||||||
|
"class": "BitmapFontLoader"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"file": "src/pixi/loaders/ImageLoader.js",
|
||||||
|
"line": 1,
|
||||||
|
"author": "Mat Groves http://matgroves.com/ @Doormat23",
|
||||||
|
"class": "ImageLoader"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"file": "src/pixi/loaders/ImageLoader.js",
|
||||||
|
"line": 24,
|
||||||
|
"description": "Loads image or takes it from cache",
|
||||||
|
"class": "ImageLoader"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"file": "src/pixi/loaders/ImageLoader.js",
|
||||||
|
"line": 43,
|
||||||
|
"description": "Invoked when image file is loaded or it is already cached and ready to use",
|
||||||
|
"access": "private",
|
||||||
|
"tagname": "",
|
||||||
|
"class": "ImageLoader"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"file": "src/pixi/loaders/SpriteSheetLoader.js",
|
"file": "src/pixi/loaders/SpriteSheetLoader.js",
|
||||||
"line": 1,
|
"line": 1,
|
||||||
|
@ -794,10 +1016,26 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/pixi/loaders/SpriteSheetLoader.js",
|
"file": "src/pixi/loaders/SpriteSheetLoader.js",
|
||||||
"line": 37,
|
"line": 38,
|
||||||
"description": "This will begin loading the JSON file",
|
"description": "This will begin loading the JSON file",
|
||||||
"class": "SpriteSheetLoader"
|
"class": "SpriteSheetLoader"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"file": "src/pixi/loaders/SpriteSheetLoader.js",
|
||||||
|
"line": 55,
|
||||||
|
"description": "Invoke when JSON file is loaded",
|
||||||
|
"access": "private",
|
||||||
|
"tagname": "",
|
||||||
|
"class": "SpriteSheetLoader"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"file": "src/pixi/loaders/SpriteSheetLoader.js",
|
||||||
|
"line": 97,
|
||||||
|
"description": "Invoke when all files are loaded (json and texture)",
|
||||||
|
"access": "private",
|
||||||
|
"tagname": "",
|
||||||
|
"class": "SpriteSheetLoader"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"file": "src/pixi/renderers/CanvasRenderer.js",
|
"file": "src/pixi/renderers/CanvasRenderer.js",
|
||||||
"line": 1,
|
"line": 1,
|
||||||
|
@ -1205,7 +1443,165 @@
|
||||||
"file": "src/pixi/renderers/WebGLShaders.js",
|
"file": "src/pixi/renderers/WebGLShaders.js",
|
||||||
"line": 2,
|
"line": 2,
|
||||||
"author": "Mat Groves http://matgroves.com/ @Doormat23",
|
"author": "Mat Groves http://matgroves.com/ @Doormat23",
|
||||||
"class": "BaseTexture"
|
"class": "BitmapText"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"file": "src/pixi/text/BitmapText.js",
|
||||||
|
"line": 1,
|
||||||
|
"author": "Mat Groves http://matgroves.com/ @Doormat23",
|
||||||
|
"class": "BitmapText"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"file": "src/pixi/text/BitmapText.js",
|
||||||
|
"line": 34,
|
||||||
|
"description": "Set the copy for the text object",
|
||||||
|
"methos": "setText",
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"name": "text",
|
||||||
|
"description": "The copy that you would like the text to display",
|
||||||
|
"type": "String"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"class": "BitmapText"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"file": "src/pixi/text/BitmapText.js",
|
||||||
|
"line": 45,
|
||||||
|
"description": "Set the style of the text",
|
||||||
|
"itemtype": "method",
|
||||||
|
"name": "setStyle",
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"name": "style",
|
||||||
|
"description": "The style parameters",
|
||||||
|
"type": "Object",
|
||||||
|
"optional": true,
|
||||||
|
"props": [
|
||||||
|
{
|
||||||
|
"name": "font",
|
||||||
|
"description": "The style and size of the font. If font size is not specified, it uses default bitmap font size. Font name is required",
|
||||||
|
"type": "Object"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "align",
|
||||||
|
"description": "An alignment of the multiline text (\"left\", \"center\" or \"right\")",
|
||||||
|
"type": "String",
|
||||||
|
"optional": true,
|
||||||
|
"optdefault": "\"left\""
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"class": "BitmapText"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"file": "src/pixi/text/BitmapText.js",
|
||||||
|
"line": 65,
|
||||||
|
"description": "Renders text",
|
||||||
|
"access": "private",
|
||||||
|
"tagname": "",
|
||||||
|
"class": "BitmapText"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"file": "src/pixi/text/BitmapText.js",
|
||||||
|
"line": 138,
|
||||||
|
"access": "private",
|
||||||
|
"tagname": "",
|
||||||
|
"class": "BitmapText"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"file": "src/pixi/text/Text.js",
|
||||||
|
"line": 1,
|
||||||
|
"author": "Mat Groves http://matgroves.com/ @Doormat23",
|
||||||
|
"class": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"file": "src/pixi/text/Text.js",
|
||||||
|
"line": 34,
|
||||||
|
"description": "Set the style of the text",
|
||||||
|
"itemtype": "method",
|
||||||
|
"name": "setStyle",
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"name": "style",
|
||||||
|
"description": "The style parameters",
|
||||||
|
"type": "Object",
|
||||||
|
"optional": true,
|
||||||
|
"props": [
|
||||||
|
{
|
||||||
|
"name": "fill",
|
||||||
|
"description": "A canvas fillstyle that will be used on the text eg \"red\", \"#00FF00\"",
|
||||||
|
"type": "Object",
|
||||||
|
"optional": true,
|
||||||
|
"optdefault": "\"black\""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "align",
|
||||||
|
"description": "An alignment of the multiline text (\"left\", \"center\" or \"right\")",
|
||||||
|
"type": "String",
|
||||||
|
"optional": true,
|
||||||
|
"optdefault": "\"left\""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "stroke",
|
||||||
|
"description": "A canvas fillstyle that will be used on the text stroke eg \"blue\", \"#FCFF00\"",
|
||||||
|
"type": "String",
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "strokeThickness",
|
||||||
|
"description": "A number that represents the thickness of the stroke. Default is 0 (no stroke)",
|
||||||
|
"type": "Number",
|
||||||
|
"optional": true,
|
||||||
|
"optdefault": "0"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "[style.font=\"bold",
|
||||||
|
"description": "20pt Arial\"] The style and size of the font",
|
||||||
|
"type": "String"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"class": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"file": "src/pixi/text/Text.js",
|
||||||
|
"line": 55,
|
||||||
|
"description": "Set the copy for the text object. To split a line you can use \"\\n\"",
|
||||||
|
"methos": "setText",
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"name": "text",
|
||||||
|
"description": "The copy that you would like the text to display",
|
||||||
|
"type": "String"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"class": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"file": "src/pixi/text/Text.js",
|
||||||
|
"line": 66,
|
||||||
|
"description": "Renders text",
|
||||||
|
"access": "private",
|
||||||
|
"tagname": "",
|
||||||
|
"class": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"file": "src/pixi/text/Text.js",
|
||||||
|
"line": 129,
|
||||||
|
"description": "Updates texture size based on canvas size",
|
||||||
|
"access": "private",
|
||||||
|
"tagname": "",
|
||||||
|
"class": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"file": "src/pixi/text/Text.js",
|
||||||
|
"line": 143,
|
||||||
|
"access": "private",
|
||||||
|
"tagname": "",
|
||||||
|
"class": "Text"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/pixi/textures/BaseTexture.js",
|
"file": "src/pixi/textures/BaseTexture.js",
|
||||||
|
@ -1885,6 +2281,12 @@
|
||||||
},
|
},
|
||||||
"class": "InteractionData"
|
"class": "InteractionData"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"file": "src/pixi/Intro.js",
|
||||||
|
"line": 1,
|
||||||
|
"author": "Mat Groves http://matgroves.com/ @Doormat23",
|
||||||
|
"class": "MovieClip"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"file": "src/pixi/MovieClip.js",
|
"file": "src/pixi/MovieClip.js",
|
||||||
"line": 1,
|
"line": 1,
|
||||||
|
@ -1991,6 +2393,12 @@
|
||||||
],
|
],
|
||||||
"class": "MovieClip"
|
"class": "MovieClip"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"file": "src/pixi/Outro.js",
|
||||||
|
"line": 1,
|
||||||
|
"author": "Mat Groves http://matgroves.com/ @Doormat23",
|
||||||
|
"class": "Point"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"file": "src/pixi/Pixi.js",
|
"file": "src/pixi/Pixi.js",
|
||||||
"line": 1,
|
"line": 1,
|
||||||
|
@ -2257,68 +2665,6 @@
|
||||||
},
|
},
|
||||||
"class": "Stage",
|
"class": "Stage",
|
||||||
"module": "PIXI"
|
"module": "PIXI"
|
||||||
},
|
|
||||||
{
|
|
||||||
"file": "src/pixi/Text.js",
|
|
||||||
"line": 1,
|
|
||||||
"author": "Mat Groves http://matgroves.com/ @Doormat23",
|
|
||||||
"class": "Text",
|
|
||||||
"module": "PIXI"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"file": "src/pixi/Text.js",
|
|
||||||
"line": 36,
|
|
||||||
"description": "Set the copy for the text object",
|
|
||||||
"methos": "setText",
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"name": "text",
|
|
||||||
"description": "The copy that you would like the text to display",
|
|
||||||
"type": "String"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"class": "Text",
|
|
||||||
"module": "PIXI"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"file": "src/pixi/Text.js",
|
|
||||||
"line": 47,
|
|
||||||
"description": "Set the style of the text",
|
|
||||||
"itemtype": "method",
|
|
||||||
"name": "setStyle",
|
|
||||||
"is_constructor": 1,
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"name": "fontStyle",
|
|
||||||
"description": "the style and size of the font eg \"bold 20px Arial\"",
|
|
||||||
"type": "String"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "fillStyle",
|
|
||||||
"description": "a canvas fillstyle that will be used on the text eg \"red\", \"#00FF00\" can also be null",
|
|
||||||
"type": "Object"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "strokeStyle",
|
|
||||||
"description": "a canvas fillstyle that will be used on the text stroke eg \"blue\", \"#FCFF00\" can also be null",
|
|
||||||
"type": "String"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "strokeThickness",
|
|
||||||
"description": "A number that represents the thicknes of the stroke. default is 0 (no stroke)",
|
|
||||||
"type": "Number"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"class": "Text",
|
|
||||||
"module": "PIXI"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"file": "src/pixi/Text.js",
|
|
||||||
"line": 66,
|
|
||||||
"access": "private",
|
|
||||||
"tagname": "",
|
|
||||||
"class": "Text",
|
|
||||||
"module": "PIXI"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"warnings": [
|
"warnings": [
|
||||||
|
@ -2327,12 +2673,16 @@
|
||||||
"line": " src/pixi/renderers/WebGLBatch.js:292"
|
"line": " src/pixi/renderers/WebGLBatch.js:292"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"message": "unknown tag: internal",
|
"message": "unknown tag: methos",
|
||||||
"line": " src/pixi/Stage.js:37"
|
"line": " src/pixi/text/BitmapText.js:34"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"message": "unknown tag: methos",
|
"message": "unknown tag: methos",
|
||||||
"line": " src/pixi/Text.js:36"
|
"line": " src/pixi/text/Text.js:55"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"message": "unknown tag: internal",
|
||||||
|
"line": " src/pixi/Stage.js:37"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"message": "Missing item type",
|
"message": "Missing item type",
|
||||||
|
@ -2352,7 +2702,39 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"message": "Missing item type\nThis will begin loading the assets sequentially",
|
"message": "Missing item type\nThis will begin loading the assets sequentially",
|
||||||
"line": " src/pixi/loaders/AssetLoader.js:43"
|
"line": " src/pixi/loaders/AssetLoader.js:51"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"message": "Missing item type\nInvoked after each file is loaded",
|
||||||
|
"line": " src/pixi/loaders/AssetLoader.js:79"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"message": "Missing item type",
|
||||||
|
"line": " src/pixi/loaders/BitmapFontLoader.js:1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"message": "Missing item type\nThis will begin loading the JSON file",
|
||||||
|
"line": " src/pixi/loaders/BitmapFontLoader.js:34"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"message": "Missing item type\nInvoked when XML file is loaded",
|
||||||
|
"line": " src/pixi/loaders/BitmapFontLoader.js:51"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"message": "Missing item type\nInvoked when all files are loaded (xml/fnt and texture)",
|
||||||
|
"line": " src/pixi/loaders/BitmapFontLoader.js:118"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"message": "Missing item type",
|
||||||
|
"line": " src/pixi/loaders/ImageLoader.js:1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"message": "Missing item type\nLoads image or takes it from cache",
|
||||||
|
"line": " src/pixi/loaders/ImageLoader.js:24"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"message": "Missing item type\nInvoked when image file is loaded or it is already cached and ready to use",
|
||||||
|
"line": " src/pixi/loaders/ImageLoader.js:43"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"message": "Missing item type",
|
"message": "Missing item type",
|
||||||
|
@ -2360,7 +2742,15 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"message": "Missing item type\nThis will begin loading the JSON file",
|
"message": "Missing item type\nThis will begin loading the JSON file",
|
||||||
"line": " src/pixi/loaders/SpriteSheetLoader.js:37"
|
"line": " src/pixi/loaders/SpriteSheetLoader.js:38"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"message": "Missing item type\nInvoke when JSON file is loaded",
|
||||||
|
"line": " src/pixi/loaders/SpriteSheetLoader.js:55"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"message": "Missing item type\nInvoke when all files are loaded (json and texture)",
|
||||||
|
"line": " src/pixi/loaders/SpriteSheetLoader.js:97"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"message": "Missing item type",
|
"message": "Missing item type",
|
||||||
|
@ -2470,6 +2860,42 @@
|
||||||
"message": "Missing item type",
|
"message": "Missing item type",
|
||||||
"line": " src/pixi/renderers/WebGLShaders.js:2"
|
"line": " src/pixi/renderers/WebGLShaders.js:2"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"message": "Missing item type",
|
||||||
|
"line": " src/pixi/text/BitmapText.js:1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"message": "Missing item type\nSet the copy for the text object",
|
||||||
|
"line": " src/pixi/text/BitmapText.js:34"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"message": "Missing item type\nRenders text",
|
||||||
|
"line": " src/pixi/text/BitmapText.js:65"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"message": "Missing item type",
|
||||||
|
"line": " src/pixi/text/BitmapText.js:138"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"message": "Missing item type",
|
||||||
|
"line": " src/pixi/text/Text.js:1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"message": "Missing item type\nSet the copy for the text object. To split a line you can use \"\\n\"",
|
||||||
|
"line": " src/pixi/text/Text.js:55"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"message": "Missing item type\nRenders text",
|
||||||
|
"line": " src/pixi/text/Text.js:66"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"message": "Missing item type\nUpdates texture size based on canvas size",
|
||||||
|
"line": " src/pixi/text/Text.js:129"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"message": "Missing item type",
|
||||||
|
"line": " src/pixi/text/Text.js:143"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"message": "Missing item type",
|
"message": "Missing item type",
|
||||||
"line": " src/pixi/textures/BaseTexture.js:1"
|
"line": " src/pixi/textures/BaseTexture.js:1"
|
||||||
|
@ -2514,10 +2940,18 @@
|
||||||
"message": "Missing item type",
|
"message": "Missing item type",
|
||||||
"line": " src/pixi/InteractionManager.js:1"
|
"line": " src/pixi/InteractionManager.js:1"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"message": "Missing item type",
|
||||||
|
"line": " src/pixi/Intro.js:1"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"message": "Missing item type",
|
"message": "Missing item type",
|
||||||
"line": " src/pixi/MovieClip.js:1"
|
"line": " src/pixi/MovieClip.js:1"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"message": "Missing item type",
|
||||||
|
"line": " src/pixi/Outro.js:1"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"message": "Missing item type",
|
"message": "Missing item type",
|
||||||
"line": " src/pixi/Pixi.js:1"
|
"line": " src/pixi/Pixi.js:1"
|
||||||
|
@ -2541,18 +2975,6 @@
|
||||||
{
|
{
|
||||||
"message": "Missing item type",
|
"message": "Missing item type",
|
||||||
"line": " src/pixi/Stage.js:1"
|
"line": " src/pixi/Stage.js:1"
|
||||||
},
|
|
||||||
{
|
|
||||||
"message": "Missing item type",
|
|
||||||
"line": " src/pixi/Text.js:1"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"message": "Missing item type\nSet the copy for the text object",
|
|
||||||
"line": " src/pixi/Text.js:36"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"message": "Missing item type",
|
|
||||||
"line": " src/pixi/Text.js:66"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
|
@ -45,12 +45,18 @@
|
||||||
|
|
||||||
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||||
|
|
|
@ -45,12 +45,18 @@
|
||||||
|
|
||||||
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||||
|
|
|
@ -45,12 +45,18 @@
|
||||||
|
|
||||||
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||||
|
|
157
docs/files/src_pixi_Intro.js.html
Normal file
157
docs/files/src_pixi_Intro.js.html
Normal file
|
@ -0,0 +1,157 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>src/pixi/Intro.js - Pixi.JS</title>
|
||||||
|
<link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0/build/cssgrids/cssgrids-min.css">
|
||||||
|
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
|
||||||
|
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
|
||||||
|
<link rel="shortcut icon" type="image/png" href="../assets/favicon.png">
|
||||||
|
<script src="http://yui.yahooapis.com/combo?3.8.0/build/yui/yui-min.js"></script>
|
||||||
|
</head>
|
||||||
|
<body class="yui3-skin-sam">
|
||||||
|
|
||||||
|
<div id="doc">
|
||||||
|
<div id="hd" class="yui3-g header">
|
||||||
|
<div class="yui3-u-3-4">
|
||||||
|
|
||||||
|
<h1><img src="http://www.goodboydigital.com/pixijs/logo_small.png" title="Pixi.JS"></h1>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="yui3-u-1-4 version">
|
||||||
|
<em>API Docs for: 1.0.0</em>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="bd" class="yui3-g">
|
||||||
|
|
||||||
|
<div class="yui3-u-1-4">
|
||||||
|
<div id="docs-sidebar" class="sidebar apidocs">
|
||||||
|
<div id="api-list">
|
||||||
|
<h2 class="off-left">APIs</h2>
|
||||||
|
<div id="api-tabview" class="tabview">
|
||||||
|
<ul class="tabs">
|
||||||
|
<li><a href="#api-classes">Classes</a></li>
|
||||||
|
<li><a href="#api-modules">Modules</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<div id="api-tabview-filter">
|
||||||
|
<input type="search" id="api-filter" placeholder="Type to filter APIs">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="api-tabview-panel">
|
||||||
|
<ul id="api-classes" class="apis classes">
|
||||||
|
|
||||||
|
<li><a href="../classes/AssetLoader.html">AssetLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/MovieClip.html">MovieClip</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/Point.html">Point</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/Rectangle.html">Rectangle</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/Sprite.html">Sprite</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/Stage.html">Stage</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/Text.html">Text</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/Texture.html">Texture</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/TilingSprite.html">TilingSprite</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/WebGLBatch.html">WebGLBatch</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/WebGLRenderer.html">WebGLRenderer</a></li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<ul id="api-modules" class="apis modules">
|
||||||
|
|
||||||
|
<li><a href="../modules/PIXI.html">PIXI</a></li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="yui3-u-3-4">
|
||||||
|
<div id="api-options">
|
||||||
|
Show:
|
||||||
|
<label for="api-show-inherited">
|
||||||
|
<input type="checkbox" id="api-show-inherited" checked>
|
||||||
|
Inherited
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<label for="api-show-protected">
|
||||||
|
<input type="checkbox" id="api-show-protected">
|
||||||
|
Protected
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<label for="api-show-private">
|
||||||
|
<input type="checkbox" id="api-show-private">
|
||||||
|
Private
|
||||||
|
</label>
|
||||||
|
<label for="api-show-deprecated">
|
||||||
|
<input type="checkbox" id="api-show-deprecated">
|
||||||
|
Deprecated
|
||||||
|
</label>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="apidocs">
|
||||||
|
<div id="docs-main">
|
||||||
|
<div class="content">
|
||||||
|
<h1 class="file-heading">File: src/pixi/Intro.js</h1>
|
||||||
|
|
||||||
|
<div class="file">
|
||||||
|
<pre class="code prettyprint linenums">
|
||||||
|
/**
|
||||||
|
* @author Mat Groves http://matgroves.com/ @Doormat23
|
||||||
|
*/
|
||||||
|
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
var root = this;
|
||||||
|
|
||||||
|
</pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script src="../assets/vendor/prettify/prettify-min.js"></script>
|
||||||
|
<script>prettyPrint();</script>
|
||||||
|
<script src="../assets/js/yui-prettify.js"></script>
|
||||||
|
<script src="../assets/../api.js"></script>
|
||||||
|
<script src="../assets/js/api-filter.js"></script>
|
||||||
|
<script src="../assets/js/api-list.js"></script>
|
||||||
|
<script src="../assets/js/api-search.js"></script>
|
||||||
|
<script src="../assets/js/apidocs.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -45,12 +45,18 @@
|
||||||
|
|
||||||
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||||
|
|
164
docs/files/src_pixi_Outro.js.html
Normal file
164
docs/files/src_pixi_Outro.js.html
Normal file
|
@ -0,0 +1,164 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>src/pixi/Outro.js - Pixi.JS</title>
|
||||||
|
<link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0/build/cssgrids/cssgrids-min.css">
|
||||||
|
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
|
||||||
|
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
|
||||||
|
<link rel="shortcut icon" type="image/png" href="../assets/favicon.png">
|
||||||
|
<script src="http://yui.yahooapis.com/combo?3.8.0/build/yui/yui-min.js"></script>
|
||||||
|
</head>
|
||||||
|
<body class="yui3-skin-sam">
|
||||||
|
|
||||||
|
<div id="doc">
|
||||||
|
<div id="hd" class="yui3-g header">
|
||||||
|
<div class="yui3-u-3-4">
|
||||||
|
|
||||||
|
<h1><img src="http://www.goodboydigital.com/pixijs/logo_small.png" title="Pixi.JS"></h1>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="yui3-u-1-4 version">
|
||||||
|
<em>API Docs for: 1.0.0</em>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="bd" class="yui3-g">
|
||||||
|
|
||||||
|
<div class="yui3-u-1-4">
|
||||||
|
<div id="docs-sidebar" class="sidebar apidocs">
|
||||||
|
<div id="api-list">
|
||||||
|
<h2 class="off-left">APIs</h2>
|
||||||
|
<div id="api-tabview" class="tabview">
|
||||||
|
<ul class="tabs">
|
||||||
|
<li><a href="#api-classes">Classes</a></li>
|
||||||
|
<li><a href="#api-modules">Modules</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<div id="api-tabview-filter">
|
||||||
|
<input type="search" id="api-filter" placeholder="Type to filter APIs">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="api-tabview-panel">
|
||||||
|
<ul id="api-classes" class="apis classes">
|
||||||
|
|
||||||
|
<li><a href="../classes/AssetLoader.html">AssetLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/MovieClip.html">MovieClip</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/Point.html">Point</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/Rectangle.html">Rectangle</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/Sprite.html">Sprite</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/Stage.html">Stage</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/Text.html">Text</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/Texture.html">Texture</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/TilingSprite.html">TilingSprite</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/WebGLBatch.html">WebGLBatch</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/WebGLRenderer.html">WebGLRenderer</a></li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<ul id="api-modules" class="apis modules">
|
||||||
|
|
||||||
|
<li><a href="../modules/PIXI.html">PIXI</a></li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="yui3-u-3-4">
|
||||||
|
<div id="api-options">
|
||||||
|
Show:
|
||||||
|
<label for="api-show-inherited">
|
||||||
|
<input type="checkbox" id="api-show-inherited" checked>
|
||||||
|
Inherited
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<label for="api-show-protected">
|
||||||
|
<input type="checkbox" id="api-show-protected">
|
||||||
|
Protected
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<label for="api-show-private">
|
||||||
|
<input type="checkbox" id="api-show-private">
|
||||||
|
Private
|
||||||
|
</label>
|
||||||
|
<label for="api-show-deprecated">
|
||||||
|
<input type="checkbox" id="api-show-deprecated">
|
||||||
|
Deprecated
|
||||||
|
</label>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="apidocs">
|
||||||
|
<div id="docs-main">
|
||||||
|
<div class="content">
|
||||||
|
<h1 class="file-heading">File: src/pixi/Outro.js</h1>
|
||||||
|
|
||||||
|
<div class="file">
|
||||||
|
<pre class="code prettyprint linenums">
|
||||||
|
/**
|
||||||
|
* @author Mat Groves http://matgroves.com/ @Doormat23
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (typeof exports !== 'undefined') {
|
||||||
|
if (typeof module !== 'undefined' && module.exports) {
|
||||||
|
exports = module.exports = PIXI;
|
||||||
|
}
|
||||||
|
exports.PIXI = PIXI;
|
||||||
|
} else {
|
||||||
|
root.PIXI = PIXI;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}).call(this);
|
||||||
|
</pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script src="../assets/vendor/prettify/prettify-min.js"></script>
|
||||||
|
<script>prettyPrint();</script>
|
||||||
|
<script src="../assets/js/yui-prettify.js"></script>
|
||||||
|
<script src="../assets/../api.js"></script>
|
||||||
|
<script src="../assets/js/api-filter.js"></script>
|
||||||
|
<script src="../assets/js/api-list.js"></script>
|
||||||
|
<script src="../assets/js/api-search.js"></script>
|
||||||
|
<script src="../assets/js/apidocs.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -45,12 +45,18 @@
|
||||||
|
|
||||||
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||||
|
|
|
@ -45,12 +45,18 @@
|
||||||
|
|
||||||
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||||
|
|
|
@ -45,12 +45,18 @@
|
||||||
|
|
||||||
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||||
|
|
|
@ -45,12 +45,18 @@
|
||||||
|
|
||||||
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||||
|
|
|
@ -45,12 +45,18 @@
|
||||||
|
|
||||||
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||||
|
|
|
@ -45,12 +45,18 @@
|
||||||
|
|
||||||
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||||
|
|
|
@ -45,12 +45,18 @@
|
||||||
|
|
||||||
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||||
|
|
|
@ -45,12 +45,18 @@
|
||||||
|
|
||||||
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||||
|
|
|
@ -45,12 +45,18 @@
|
||||||
|
|
||||||
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||||
|
@ -127,17 +133,17 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A Class that loads a bunch of images / sprite sheet files. Once the assets have been loaded they are added to the PIXI Texture cache and can be accessed easily through PIXI.Texture.fromFrame(), PIXI.Texture.fromImage() and PIXI.Sprite.fromImage(), PIXI.Sprite.fromFromeId()
|
* A Class that loads a bunch of images / sprite sheet / bitmap font files. Once the assets have been loaded they are added to the PIXI Texture cache and can be accessed easily through PIXI.Texture.fromImage() and PIXI.Sprite.fromImage()
|
||||||
* When all items have been loaded this class will dispatch a 'loaded' event
|
* When all items have been loaded this class will dispatch a "onLoaded" event
|
||||||
* As each individual item is loaded this class will dispatch a 'progress' event
|
* As each individual item is loaded this class will dispatch a "onProgress" event
|
||||||
* @class AssetLoader
|
* @class AssetLoader
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends EventTarget
|
* @extends EventTarget
|
||||||
* @param assetURLs {Array} an array of image/sprite sheet urls that you would like loaded supported. Supported image formats include "jpeg", "jpg", "png", "gif". Supported sprite sheet data formats only include "JSON" at this time
|
* @param {Array} assetURLs an array of image/sprite sheet urls that you would like loaded supported. Supported image formats include "jpeg", "jpg", "png", "gif". Supported sprite sheet data formats only include "JSON" at this time. Supported bitmap font data formats include "xml" and "fnt".
|
||||||
*/
|
*/
|
||||||
PIXI.AssetLoader = function(assetURLs)
|
PIXI.AssetLoader = function(assetURLs)
|
||||||
{
|
{
|
||||||
PIXI.EventTarget.call( this );
|
PIXI.EventTarget.call(this);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The array of asset URLs that are going to be loaded
|
* The array of asset URLs that are going to be loaded
|
||||||
|
@ -146,10 +152,18 @@ PIXI.AssetLoader = function(assetURLs)
|
||||||
*/
|
*/
|
||||||
this.assetURLs = assetURLs;
|
this.assetURLs = assetURLs;
|
||||||
|
|
||||||
this.assets = [];
|
|
||||||
|
|
||||||
this.crossorigin = false;
|
this.crossorigin = false;
|
||||||
}
|
|
||||||
|
this.loadersByType = {
|
||||||
|
"jpg": PIXI.ImageLoader,
|
||||||
|
"jpeg": PIXI.ImageLoader,
|
||||||
|
"png": PIXI.ImageLoader,
|
||||||
|
"gif": PIXI.ImageLoader,
|
||||||
|
"json": PIXI.SpriteSheetLoader,
|
||||||
|
"xml": PIXI.BitmapFontLoader,
|
||||||
|
"fnt": PIXI.BitmapFontLoader
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Fired when an item has loaded
|
Fired when an item has loaded
|
||||||
|
@ -169,105 +183,45 @@ PIXI.AssetLoader.constructor = PIXI.AssetLoader;
|
||||||
*/
|
*/
|
||||||
PIXI.AssetLoader.prototype.load = function()
|
PIXI.AssetLoader.prototype.load = function()
|
||||||
{
|
{
|
||||||
this.loadCount = this.assetURLs.length;
|
var scope = this;
|
||||||
var imageTypes = ["jpeg", "jpg", "png", "gif"];
|
|
||||||
|
|
||||||
var spriteSheetTypes = ["json"];
|
this.loadCount = this.assetURLs.length;
|
||||||
|
|
||||||
for (var i=0; i < this.assetURLs.length; i++)
|
for (var i=0; i < this.assetURLs.length; i++)
|
||||||
{
|
{
|
||||||
var filename = this.assetURLs[i];
|
var fileName = this.assetURLs[i];
|
||||||
var fileType = filename.split('.').pop().toLowerCase();
|
var fileType = fileName.split(".").pop().toLowerCase();
|
||||||
// what are we loading?
|
|
||||||
var type = null;
|
|
||||||
|
|
||||||
for (var j=0; j < imageTypes.length; j++)
|
var loaderClass = this.loadersByType[fileType];
|
||||||
{
|
if(!loaderClass)
|
||||||
if(fileType == imageTypes[j])
|
throw new Error(fileType + " is an unsupported file type");
|
||||||
{
|
|
||||||
type = "img";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(type != "img")
|
var loader = new loaderClass(fileName, this.crossorigin);
|
||||||
{
|
|
||||||
for (var j=0; j < spriteSheetTypes.length; j++)
|
|
||||||
{
|
|
||||||
if(fileType == spriteSheetTypes[j])
|
|
||||||
{
|
|
||||||
type = "atlas";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(type == "img")
|
loader.addEventListener("loaded", function()
|
||||||
{
|
|
||||||
|
|
||||||
var texture = PIXI.Texture.fromImage(filename, this.crossorigin);
|
|
||||||
if(!texture.baseTexture.hasLoaded)
|
|
||||||
{
|
|
||||||
|
|
||||||
var scope = this;
|
|
||||||
texture.baseTexture.addEventListener( 'loaded', function ( event )
|
|
||||||
{
|
{
|
||||||
scope.onAssetLoaded();
|
scope.onAssetLoaded();
|
||||||
});
|
});
|
||||||
|
loader.load();
|
||||||
this.assets.push(texture);
|
|
||||||
}
|
}
|
||||||
else
|
};
|
||||||
{
|
|
||||||
|
|
||||||
// already loaded!
|
|
||||||
this.loadCount--;
|
|
||||||
// if this hits zero here.. then everything was cached!
|
|
||||||
if(this.loadCount == 0)
|
|
||||||
{
|
|
||||||
this.dispatchEvent( { type: 'onComplete', content: this } );
|
|
||||||
if(this.onComplete)this.onComplete();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
else if(type == "atlas")
|
|
||||||
{
|
|
||||||
var spriteSheetLoader = new PIXI.SpriteSheetLoader(filename);
|
|
||||||
spriteSheetLoader.crossorigin = this.crossorigin;
|
|
||||||
this.assets.push(spriteSheetLoader);
|
|
||||||
|
|
||||||
var scope = this;
|
|
||||||
spriteSheetLoader.addEventListener( 'loaded', function ( event )
|
|
||||||
{
|
|
||||||
scope.onAssetLoaded();
|
|
||||||
});
|
|
||||||
|
|
||||||
spriteSheetLoader.load();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// dont know what the file is! :/
|
|
||||||
//this.loadCount--;
|
|
||||||
throw new Error(filename + " is an unsupported file type " + this);
|
|
||||||
}
|
|
||||||
|
|
||||||
//this.assets[i].load();
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Invoked after each file is loaded
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
PIXI.AssetLoader.prototype.onAssetLoaded = function()
|
PIXI.AssetLoader.prototype.onAssetLoaded = function()
|
||||||
{
|
{
|
||||||
this.loadCount--;
|
this.loadCount--;
|
||||||
this.dispatchEvent( { type: 'onProgress', content: this } );
|
this.dispatchEvent({type: "onProgress", content: this});
|
||||||
if(this.onProgress)this.onProgress();
|
if(this.onProgress) this.onProgress();
|
||||||
|
|
||||||
if(this.loadCount == 0)
|
if(this.loadCount == 0)
|
||||||
{
|
{
|
||||||
this.dispatchEvent( { type: 'onComplete', content: this } );
|
this.dispatchEvent({type: "onComplete", content: this});
|
||||||
if(this.onComplete)this.onComplete();
|
if(this.onComplete) this.onComplete();
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
|
|
||||||
</pre>
|
</pre>
|
||||||
|
|
275
docs/files/src_pixi_loaders_BitmapFontLoader.js.html
Normal file
275
docs/files/src_pixi_loaders_BitmapFontLoader.js.html
Normal file
|
@ -0,0 +1,275 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>src/pixi/loaders/BitmapFontLoader.js - Pixi.JS</title>
|
||||||
|
<link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0/build/cssgrids/cssgrids-min.css">
|
||||||
|
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
|
||||||
|
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
|
||||||
|
<link rel="shortcut icon" type="image/png" href="../assets/favicon.png">
|
||||||
|
<script src="http://yui.yahooapis.com/combo?3.8.0/build/yui/yui-min.js"></script>
|
||||||
|
</head>
|
||||||
|
<body class="yui3-skin-sam">
|
||||||
|
|
||||||
|
<div id="doc">
|
||||||
|
<div id="hd" class="yui3-g header">
|
||||||
|
<div class="yui3-u-3-4">
|
||||||
|
|
||||||
|
<h1><img src="http://www.goodboydigital.com/pixijs/logo_small.png" title="Pixi.JS"></h1>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="yui3-u-1-4 version">
|
||||||
|
<em>API Docs for: 1.0.0</em>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="bd" class="yui3-g">
|
||||||
|
|
||||||
|
<div class="yui3-u-1-4">
|
||||||
|
<div id="docs-sidebar" class="sidebar apidocs">
|
||||||
|
<div id="api-list">
|
||||||
|
<h2 class="off-left">APIs</h2>
|
||||||
|
<div id="api-tabview" class="tabview">
|
||||||
|
<ul class="tabs">
|
||||||
|
<li><a href="#api-classes">Classes</a></li>
|
||||||
|
<li><a href="#api-modules">Modules</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<div id="api-tabview-filter">
|
||||||
|
<input type="search" id="api-filter" placeholder="Type to filter APIs">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="api-tabview-panel">
|
||||||
|
<ul id="api-classes" class="apis classes">
|
||||||
|
|
||||||
|
<li><a href="../classes/AssetLoader.html">AssetLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/MovieClip.html">MovieClip</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/Point.html">Point</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/Rectangle.html">Rectangle</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/Sprite.html">Sprite</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/Stage.html">Stage</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/Text.html">Text</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/Texture.html">Texture</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/TilingSprite.html">TilingSprite</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/WebGLBatch.html">WebGLBatch</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/WebGLRenderer.html">WebGLRenderer</a></li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<ul id="api-modules" class="apis modules">
|
||||||
|
|
||||||
|
<li><a href="../modules/PIXI.html">PIXI</a></li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="yui3-u-3-4">
|
||||||
|
<div id="api-options">
|
||||||
|
Show:
|
||||||
|
<label for="api-show-inherited">
|
||||||
|
<input type="checkbox" id="api-show-inherited" checked>
|
||||||
|
Inherited
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<label for="api-show-protected">
|
||||||
|
<input type="checkbox" id="api-show-protected">
|
||||||
|
Protected
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<label for="api-show-private">
|
||||||
|
<input type="checkbox" id="api-show-private">
|
||||||
|
Private
|
||||||
|
</label>
|
||||||
|
<label for="api-show-deprecated">
|
||||||
|
<input type="checkbox" id="api-show-deprecated">
|
||||||
|
Deprecated
|
||||||
|
</label>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="apidocs">
|
||||||
|
<div id="docs-main">
|
||||||
|
<div class="content">
|
||||||
|
<h1 class="file-heading">File: src/pixi/loaders/BitmapFontLoader.js</h1>
|
||||||
|
|
||||||
|
<div class="file">
|
||||||
|
<pre class="code prettyprint linenums">
|
||||||
|
/**
|
||||||
|
* @author Mat Groves http://matgroves.com/ @Doormat23
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The xml loader is used to load in XML bitmap font data ("xml" or "fnt")
|
||||||
|
* To generate the data you can use http://www.angelcode.com/products/bmfont/
|
||||||
|
* This loader will also load the image file as the data.
|
||||||
|
* When loaded this class will dispatch a "loaded" event
|
||||||
|
* @class BitmapFontLoader
|
||||||
|
* @extends EventTarget
|
||||||
|
* @constructor
|
||||||
|
* @param {String} url the url of the sprite sheet JSON file
|
||||||
|
* @param {Boolean} crossorigin
|
||||||
|
*/
|
||||||
|
|
||||||
|
PIXI.BitmapFontLoader = function(url, crossorigin)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* i use texture packer to load the assets..
|
||||||
|
* http://www.codeandweb.com/texturepacker
|
||||||
|
* make sure to set the format as "JSON"
|
||||||
|
*/
|
||||||
|
PIXI.EventTarget.call(this);
|
||||||
|
this.url = url;
|
||||||
|
this.baseUrl = url.replace(/[^\/]*$/, "");
|
||||||
|
this.texture = null;
|
||||||
|
this.crossorigin = crossorigin;
|
||||||
|
};
|
||||||
|
|
||||||
|
// constructor
|
||||||
|
PIXI.BitmapFontLoader.constructor = PIXI.BitmapFontLoader;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This will begin loading the JSON file
|
||||||
|
*/
|
||||||
|
PIXI.BitmapFontLoader.prototype.load = function()
|
||||||
|
{
|
||||||
|
this.ajaxRequest = new XMLHttpRequest();
|
||||||
|
var scope = this;
|
||||||
|
this.ajaxRequest.onreadystatechange = function()
|
||||||
|
{
|
||||||
|
scope.onXMLLoaded();
|
||||||
|
};
|
||||||
|
|
||||||
|
this.ajaxRequest.open("GET", this.url, true);
|
||||||
|
if (this.ajaxRequest.overrideMimeType) this.ajaxRequest.overrideMimeType("application/xml");
|
||||||
|
this.ajaxRequest.send(null)
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Invoked when XML file is loaded
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
|
PIXI.BitmapFontLoader.prototype.onXMLLoaded = function()
|
||||||
|
{
|
||||||
|
if (this.ajaxRequest.readyState == 4)
|
||||||
|
{
|
||||||
|
if (this.ajaxRequest.status == 200 || window.location.href.indexOf("http") == -1)
|
||||||
|
{
|
||||||
|
var textureUrl = this.baseUrl + this.ajaxRequest.responseXML.getElementsByTagName("page")[0].attributes.getNamedItem("file").nodeValue;
|
||||||
|
var image = new PIXI.ImageLoader(textureUrl, this.crossorigin);
|
||||||
|
this.texture = image.texture.baseTexture;
|
||||||
|
|
||||||
|
var data = {};
|
||||||
|
var info = this.ajaxRequest.responseXML.getElementsByTagName("info")[0];
|
||||||
|
var common = this.ajaxRequest.responseXML.getElementsByTagName("common")[0];
|
||||||
|
data.font = info.attributes.getNamedItem("face").nodeValue;
|
||||||
|
data.size = parseInt(info.attributes.getNamedItem("size").nodeValue, 10);
|
||||||
|
data.lineHeight = parseInt(common.attributes.getNamedItem("lineHeight").nodeValue, 10);
|
||||||
|
data.chars = {};
|
||||||
|
|
||||||
|
//parse letters
|
||||||
|
var letters = this.ajaxRequest.responseXML.getElementsByTagName("char");
|
||||||
|
|
||||||
|
for (var i = 0; i < letters.length; i++)
|
||||||
|
{
|
||||||
|
var charCode = parseInt(letters[i].attributes.getNamedItem("id").nodeValue, 10);
|
||||||
|
|
||||||
|
var textureRect = {
|
||||||
|
x: parseInt(letters[i].attributes.getNamedItem("x").nodeValue, 10),
|
||||||
|
y: parseInt(letters[i].attributes.getNamedItem("y").nodeValue, 10),
|
||||||
|
width: parseInt(letters[i].attributes.getNamedItem("width").nodeValue, 10),
|
||||||
|
height: parseInt(letters[i].attributes.getNamedItem("height").nodeValue, 10)
|
||||||
|
};
|
||||||
|
PIXI.TextureCache[charCode] = new PIXI.Texture(this.texture, textureRect);
|
||||||
|
|
||||||
|
data.chars[charCode] = {
|
||||||
|
xOffset: parseInt(letters[i].attributes.getNamedItem("xoffset").nodeValue, 10),
|
||||||
|
yOffset: parseInt(letters[i].attributes.getNamedItem("yoffset").nodeValue, 10),
|
||||||
|
xAdvance: parseInt(letters[i].attributes.getNamedItem("xadvance").nodeValue, 10),
|
||||||
|
kerning: {}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
//parse kernings
|
||||||
|
var kernings = this.ajaxRequest.responseXML.getElementsByTagName("kerning");
|
||||||
|
for (i = 0; i < kernings.length; i++)
|
||||||
|
{
|
||||||
|
var first = parseInt(kernings[i].attributes.getNamedItem("first").nodeValue, 10);
|
||||||
|
var second = parseInt(kernings[i].attributes.getNamedItem("second").nodeValue, 10);
|
||||||
|
var amount = parseInt(kernings[i].attributes.getNamedItem("amount").nodeValue, 10);
|
||||||
|
|
||||||
|
data.chars[second].kerning[first] = amount;
|
||||||
|
|
||||||
|
}
|
||||||
|
PIXI.BitmapText.fonts[data.font] = data;
|
||||||
|
|
||||||
|
var scope = this;
|
||||||
|
image.addEventListener("loaded", function() {
|
||||||
|
scope.onLoaded();
|
||||||
|
});
|
||||||
|
image.load();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Invoked when all files are loaded (xml/fnt and texture)
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
|
PIXI.BitmapFontLoader.prototype.onLoaded = function()
|
||||||
|
{
|
||||||
|
this.dispatchEvent({type: "loaded", content: this});
|
||||||
|
};
|
||||||
|
|
||||||
|
</pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script src="../assets/vendor/prettify/prettify-min.js"></script>
|
||||||
|
<script>prettyPrint();</script>
|
||||||
|
<script src="../assets/js/yui-prettify.js"></script>
|
||||||
|
<script src="../assets/../api.js"></script>
|
||||||
|
<script src="../assets/js/api-filter.js"></script>
|
||||||
|
<script src="../assets/js/api-list.js"></script>
|
||||||
|
<script src="../assets/js/api-search.js"></script>
|
||||||
|
<script src="../assets/js/apidocs.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
200
docs/files/src_pixi_loaders_ImageLoader.js.html
Normal file
200
docs/files/src_pixi_loaders_ImageLoader.js.html
Normal file
|
@ -0,0 +1,200 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>src/pixi/loaders/ImageLoader.js - Pixi.JS</title>
|
||||||
|
<link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0/build/cssgrids/cssgrids-min.css">
|
||||||
|
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
|
||||||
|
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
|
||||||
|
<link rel="shortcut icon" type="image/png" href="../assets/favicon.png">
|
||||||
|
<script src="http://yui.yahooapis.com/combo?3.8.0/build/yui/yui-min.js"></script>
|
||||||
|
</head>
|
||||||
|
<body class="yui3-skin-sam">
|
||||||
|
|
||||||
|
<div id="doc">
|
||||||
|
<div id="hd" class="yui3-g header">
|
||||||
|
<div class="yui3-u-3-4">
|
||||||
|
|
||||||
|
<h1><img src="http://www.goodboydigital.com/pixijs/logo_small.png" title="Pixi.JS"></h1>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="yui3-u-1-4 version">
|
||||||
|
<em>API Docs for: 1.0.0</em>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="bd" class="yui3-g">
|
||||||
|
|
||||||
|
<div class="yui3-u-1-4">
|
||||||
|
<div id="docs-sidebar" class="sidebar apidocs">
|
||||||
|
<div id="api-list">
|
||||||
|
<h2 class="off-left">APIs</h2>
|
||||||
|
<div id="api-tabview" class="tabview">
|
||||||
|
<ul class="tabs">
|
||||||
|
<li><a href="#api-classes">Classes</a></li>
|
||||||
|
<li><a href="#api-modules">Modules</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<div id="api-tabview-filter">
|
||||||
|
<input type="search" id="api-filter" placeholder="Type to filter APIs">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="api-tabview-panel">
|
||||||
|
<ul id="api-classes" class="apis classes">
|
||||||
|
|
||||||
|
<li><a href="../classes/AssetLoader.html">AssetLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/MovieClip.html">MovieClip</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/Point.html">Point</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/Rectangle.html">Rectangle</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/Sprite.html">Sprite</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/Stage.html">Stage</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/Text.html">Text</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/Texture.html">Texture</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/TilingSprite.html">TilingSprite</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/WebGLBatch.html">WebGLBatch</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/WebGLRenderer.html">WebGLRenderer</a></li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<ul id="api-modules" class="apis modules">
|
||||||
|
|
||||||
|
<li><a href="../modules/PIXI.html">PIXI</a></li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="yui3-u-3-4">
|
||||||
|
<div id="api-options">
|
||||||
|
Show:
|
||||||
|
<label for="api-show-inherited">
|
||||||
|
<input type="checkbox" id="api-show-inherited" checked>
|
||||||
|
Inherited
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<label for="api-show-protected">
|
||||||
|
<input type="checkbox" id="api-show-protected">
|
||||||
|
Protected
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<label for="api-show-private">
|
||||||
|
<input type="checkbox" id="api-show-private">
|
||||||
|
Private
|
||||||
|
</label>
|
||||||
|
<label for="api-show-deprecated">
|
||||||
|
<input type="checkbox" id="api-show-deprecated">
|
||||||
|
Deprecated
|
||||||
|
</label>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="apidocs">
|
||||||
|
<div id="docs-main">
|
||||||
|
<div class="content">
|
||||||
|
<h1 class="file-heading">File: src/pixi/loaders/ImageLoader.js</h1>
|
||||||
|
|
||||||
|
<div class="file">
|
||||||
|
<pre class="code prettyprint linenums">
|
||||||
|
/**
|
||||||
|
* @author Mat Groves http://matgroves.com/ @Doormat23
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The image loader class is responsible for loading images file formats ("jpeg", "jpg", "png" and "gif")
|
||||||
|
* Once the image has been loaded it is stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFromeId()
|
||||||
|
* When loaded this class will dispatch a 'loaded' event
|
||||||
|
* @class ImageLoader
|
||||||
|
* @extends EventTarget
|
||||||
|
* @constructor
|
||||||
|
* @param {String} url The url of the image
|
||||||
|
* @param {Boolean} crossorigin
|
||||||
|
*/
|
||||||
|
PIXI.ImageLoader = function(url, crossorigin)
|
||||||
|
{
|
||||||
|
PIXI.EventTarget.call(this);
|
||||||
|
this.texture = PIXI.Texture.fromImage(url, crossorigin);
|
||||||
|
};
|
||||||
|
|
||||||
|
// constructor
|
||||||
|
PIXI.ImageLoader.constructor = PIXI.ImageLoader;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Loads image or takes it from cache
|
||||||
|
*/
|
||||||
|
PIXI.ImageLoader.prototype.load = function()
|
||||||
|
{
|
||||||
|
if(!this.texture.baseTexture.hasLoaded)
|
||||||
|
{
|
||||||
|
var scope = this;
|
||||||
|
this.texture.baseTexture.addEventListener("loaded", function()
|
||||||
|
{
|
||||||
|
scope.onLoaded();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.onLoaded();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Invoked when image file is loaded or it is already cached and ready to use
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
|
PIXI.ImageLoader.prototype.onLoaded = function()
|
||||||
|
{
|
||||||
|
this.dispatchEvent({type: "loaded", content: this});
|
||||||
|
};
|
||||||
|
|
||||||
|
</pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script src="../assets/vendor/prettify/prettify-min.js"></script>
|
||||||
|
<script>prettyPrint();</script>
|
||||||
|
<script src="../assets/js/yui-prettify.js"></script>
|
||||||
|
<script src="../assets/../api.js"></script>
|
||||||
|
<script src="../assets/js/api-filter.js"></script>
|
||||||
|
<script src="../assets/js/api-list.js"></script>
|
||||||
|
<script src="../assets/js/api-search.js"></script>
|
||||||
|
<script src="../assets/js/apidocs.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -45,12 +45,18 @@
|
||||||
|
|
||||||
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||||
|
@ -130,30 +136,31 @@
|
||||||
* The sprite sheet loader is used to load in JSON sprite sheet data
|
* The sprite sheet loader is used to load in JSON sprite sheet data
|
||||||
* To generate the data you can use http://www.codeandweb.com/texturepacker and publish the "JSON" format
|
* To generate the data you can use http://www.codeandweb.com/texturepacker and publish the "JSON" format
|
||||||
* There is a free version so thats nice, although the paid version is great value for money.
|
* There is a free version so thats nice, although the paid version is great value for money.
|
||||||
* It is highly recommended to use Sprite sheets (also know as texture atlas') as it means sprite's can be batched and drawn together for highly increased rendering speed.
|
* It is highly recommended to use Sprite sheets (also know as texture atlas") as it means sprite"s can be batched and drawn together for highly increased rendering speed.
|
||||||
* Once the data has been loaded the frames are stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFromeId()
|
* Once the data has been loaded the frames are stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFromeId()
|
||||||
* This loader will also load the image file that the Spritesheet points to as well as the data.
|
* This loader will also load the image file that the Spritesheet points to as well as the data.
|
||||||
* When loaded this class will dispatch a 'loaded' event
|
* When loaded this class will dispatch a "loaded" event
|
||||||
* @class SpriteSheetLoader
|
* @class SpriteSheetLoader
|
||||||
* @extends EventTarget
|
* @extends EventTarget
|
||||||
* @constructor
|
* @constructor
|
||||||
* @param url {String} the url of the sprite sheet JSON file
|
* @param {String} url the url of the sprite sheet JSON file
|
||||||
|
* @param {Boolean} crossorigin
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PIXI.SpriteSheetLoader = function(url)
|
PIXI.SpriteSheetLoader = function(url, crossorigin)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* i use texture packer to load the assets..
|
* i use texture packer to load the assets..
|
||||||
* http://www.codeandweb.com/texturepacker
|
* http://www.codeandweb.com/texturepacker
|
||||||
* make sure to set the format as "JSON"
|
* make sure to set the format as "JSON"
|
||||||
*/
|
*/
|
||||||
PIXI.EventTarget.call( this );
|
PIXI.EventTarget.call(this);
|
||||||
this.url = url;
|
this.url = url;
|
||||||
this.baseUrl = url.replace(/[^\/]*$/, '');
|
this.baseUrl = url.replace(/[^\/]*$/, "");
|
||||||
this.texture;
|
this.texture = null;
|
||||||
this.frames = {};
|
this.frames = {};
|
||||||
this.crossorigin = false;
|
this.crossorigin = crossorigin;
|
||||||
}
|
};
|
||||||
|
|
||||||
// constructor
|
// constructor
|
||||||
PIXI.SpriteSheetLoader.constructor = PIXI.SpriteSheetLoader;
|
PIXI.SpriteSheetLoader.constructor = PIXI.SpriteSheetLoader;
|
||||||
|
@ -165,31 +172,37 @@ PIXI.SpriteSheetLoader.prototype.load = function()
|
||||||
{
|
{
|
||||||
this.ajaxRequest = new AjaxRequest();
|
this.ajaxRequest = new AjaxRequest();
|
||||||
var scope = this;
|
var scope = this;
|
||||||
this.ajaxRequest.onreadystatechange=function()
|
this.ajaxRequest.onreadystatechange = function()
|
||||||
{
|
{
|
||||||
scope.onLoaded();
|
scope.onJSONLoaded();
|
||||||
}
|
};
|
||||||
|
|
||||||
this.ajaxRequest.open("GET", this.url, true)
|
this.ajaxRequest.open("GET", this.url, true);
|
||||||
if (this.ajaxRequest.overrideMimeType) this.ajaxRequest.overrideMimeType("application/json");
|
if (this.ajaxRequest.overrideMimeType) this.ajaxRequest.overrideMimeType("application/json");
|
||||||
this.ajaxRequest.send(null)
|
this.ajaxRequest.send(null)
|
||||||
}
|
};
|
||||||
|
|
||||||
PIXI.SpriteSheetLoader.prototype.onLoaded = function()
|
/**
|
||||||
|
* Invoke when JSON file is loaded
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
|
PIXI.SpriteSheetLoader.prototype.onJSONLoaded = function()
|
||||||
{
|
{
|
||||||
if (this.ajaxRequest.readyState==4)
|
if (this.ajaxRequest.readyState == 4)
|
||||||
{
|
{
|
||||||
if (this.ajaxRequest.status==200 || window.location.href.indexOf("http")==-1)
|
if (this.ajaxRequest.status == 200 || window.location.href.indexOf("http") == -1)
|
||||||
{
|
{
|
||||||
var jsondata = eval("("+this.ajaxRequest.responseText+")");
|
var jsonData = eval("(" + this.ajaxRequest.responseText + ")");
|
||||||
|
var textureUrl = this.baseUrl + jsonData.meta.image;
|
||||||
|
|
||||||
var textureUrl = this.baseUrl + jsondata.meta.image;
|
var image = new PIXI.ImageLoader(textureUrl, this.crossorigin);
|
||||||
|
this.texture = image.texture.baseTexture;
|
||||||
|
var scope = this;
|
||||||
|
image.addEventListener("loaded", function(event) {
|
||||||
|
scope.onLoaded();
|
||||||
|
});
|
||||||
|
|
||||||
this.texture = PIXI.Texture.fromImage(textureUrl, this.crossorigin).baseTexture;
|
var frameData = jsonData.frames;
|
||||||
|
|
||||||
// if(!this.texture)this.texture = new PIXI.Texture(textureUrl);
|
|
||||||
|
|
||||||
var frameData = jsondata.frames;
|
|
||||||
for (var i in frameData)
|
for (var i in frameData)
|
||||||
{
|
{
|
||||||
var rect = frameData[i].frame;
|
var rect = frameData[i].frame;
|
||||||
|
@ -201,32 +214,24 @@ PIXI.SpriteSheetLoader.prototype.onLoaded = function()
|
||||||
{
|
{
|
||||||
//var realSize = frameData[i].spriteSourceSize;
|
//var realSize = frameData[i].spriteSourceSize;
|
||||||
PIXI.TextureCache[i].realSize = frameData[i].spriteSourceSize;
|
PIXI.TextureCache[i].realSize = frameData[i].spriteSourceSize;
|
||||||
PIXI.TextureCache[i].trim.x = 0// (realSize.x / rect.w)
|
PIXI.TextureCache[i].trim.x = 0;// (realSize.x / rect.w)
|
||||||
// calculate the offset!
|
// calculate the offset!
|
||||||
}
|
}
|
||||||
// this.frames[i] = ;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.texture.hasLoaded)
|
image.load();
|
||||||
{
|
|
||||||
this.dispatchEvent( { type: 'loaded', content: this } );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var scope = this;
|
|
||||||
// wait for the texture to load..
|
|
||||||
this.texture.addEventListener('loaded', function(){
|
|
||||||
|
|
||||||
scope.dispatchEvent( { type: 'loaded', content: scope } );
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
/**
|
||||||
}
|
* Invoke when all files are loaded (json and texture)
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
|
PIXI.SpriteSheetLoader.prototype.onLoaded = function()
|
||||||
|
{
|
||||||
|
this.dispatchEvent({type: "loaded", content: this});
|
||||||
|
};
|
||||||
|
|
||||||
</pre>
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -45,12 +45,18 @@
|
||||||
|
|
||||||
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||||
|
|
|
@ -45,12 +45,18 @@
|
||||||
|
|
||||||
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||||
|
|
|
@ -45,12 +45,18 @@
|
||||||
|
|
||||||
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||||
|
|
|
@ -45,12 +45,18 @@
|
||||||
|
|
||||||
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||||
|
|
306
docs/files/src_pixi_text_BitmapText.js.html
Normal file
306
docs/files/src_pixi_text_BitmapText.js.html
Normal file
|
@ -0,0 +1,306 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>src/pixi/text/BitmapText.js - Pixi.JS</title>
|
||||||
|
<link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0/build/cssgrids/cssgrids-min.css">
|
||||||
|
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
|
||||||
|
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
|
||||||
|
<link rel="shortcut icon" type="image/png" href="../assets/favicon.png">
|
||||||
|
<script src="http://yui.yahooapis.com/combo?3.8.0/build/yui/yui-min.js"></script>
|
||||||
|
</head>
|
||||||
|
<body class="yui3-skin-sam">
|
||||||
|
|
||||||
|
<div id="doc">
|
||||||
|
<div id="hd" class="yui3-g header">
|
||||||
|
<div class="yui3-u-3-4">
|
||||||
|
|
||||||
|
<h1><img src="http://www.goodboydigital.com/pixijs/logo_small.png" title="Pixi.JS"></h1>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="yui3-u-1-4 version">
|
||||||
|
<em>API Docs for: 1.0.0</em>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="bd" class="yui3-g">
|
||||||
|
|
||||||
|
<div class="yui3-u-1-4">
|
||||||
|
<div id="docs-sidebar" class="sidebar apidocs">
|
||||||
|
<div id="api-list">
|
||||||
|
<h2 class="off-left">APIs</h2>
|
||||||
|
<div id="api-tabview" class="tabview">
|
||||||
|
<ul class="tabs">
|
||||||
|
<li><a href="#api-classes">Classes</a></li>
|
||||||
|
<li><a href="#api-modules">Modules</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<div id="api-tabview-filter">
|
||||||
|
<input type="search" id="api-filter" placeholder="Type to filter APIs">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="api-tabview-panel">
|
||||||
|
<ul id="api-classes" class="apis classes">
|
||||||
|
|
||||||
|
<li><a href="../classes/AssetLoader.html">AssetLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/MovieClip.html">MovieClip</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/Point.html">Point</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/Rectangle.html">Rectangle</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/Sprite.html">Sprite</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/Stage.html">Stage</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/Text.html">Text</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/Texture.html">Texture</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/TilingSprite.html">TilingSprite</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/WebGLBatch.html">WebGLBatch</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/WebGLRenderer.html">WebGLRenderer</a></li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<ul id="api-modules" class="apis modules">
|
||||||
|
|
||||||
|
<li><a href="../modules/PIXI.html">PIXI</a></li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="yui3-u-3-4">
|
||||||
|
<div id="api-options">
|
||||||
|
Show:
|
||||||
|
<label for="api-show-inherited">
|
||||||
|
<input type="checkbox" id="api-show-inherited" checked>
|
||||||
|
Inherited
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<label for="api-show-protected">
|
||||||
|
<input type="checkbox" id="api-show-protected">
|
||||||
|
Protected
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<label for="api-show-private">
|
||||||
|
<input type="checkbox" id="api-show-private">
|
||||||
|
Private
|
||||||
|
</label>
|
||||||
|
<label for="api-show-deprecated">
|
||||||
|
<input type="checkbox" id="api-show-deprecated">
|
||||||
|
Deprecated
|
||||||
|
</label>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="apidocs">
|
||||||
|
<div id="docs-main">
|
||||||
|
<div class="content">
|
||||||
|
<h1 class="file-heading">File: src/pixi/text/BitmapText.js</h1>
|
||||||
|
|
||||||
|
<div class="file">
|
||||||
|
<pre class="code prettyprint linenums">
|
||||||
|
/**
|
||||||
|
* @author Mat Groves http://matgroves.com/ @Doormat23
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A Text Object will create a line(s) of text using bitmap font
|
||||||
|
* You can generate the fnt files using
|
||||||
|
* http://www.angelcode.com/products/bmfont/ for windows of
|
||||||
|
* http://www.bmglyph.com/ for mac.
|
||||||
|
* @class BitmapText
|
||||||
|
* @extends DisplayObjectContainer
|
||||||
|
* @constructor
|
||||||
|
* @param {String} text The copy that you would like the text to display
|
||||||
|
* @param {Object} [style] The style parameters
|
||||||
|
* @param {String} [style.font] default is "20pt Arial" The size and bitmap font id (must have loaded previously)
|
||||||
|
* @param {String} [style.align="left"] An alignment of the multiline text ("left", "center" or "right")
|
||||||
|
*/
|
||||||
|
//* @param {Object} [style.font="bold 20pt Arial"] The style and size of the font
|
||||||
|
PIXI.BitmapText = function(text, style)
|
||||||
|
{
|
||||||
|
PIXI.DisplayObjectContainer.call(this);
|
||||||
|
|
||||||
|
this.setText(text);
|
||||||
|
this.setStyle(style);
|
||||||
|
this.updateText();
|
||||||
|
this.dirty = false
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
// constructor
|
||||||
|
PIXI.BitmapText.constructor = PIXI.BitmapText;
|
||||||
|
PIXI.BitmapText.prototype = Object.create(PIXI.DisplayObjectContainer.prototype);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the copy for the text object
|
||||||
|
* @methos setText
|
||||||
|
* @param {String} text The copy that you would like the text to display
|
||||||
|
*/
|
||||||
|
PIXI.BitmapText.prototype.setText = function(text)
|
||||||
|
{
|
||||||
|
this.text = text || " ";
|
||||||
|
this.dirty = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the style of the text
|
||||||
|
* @method setStyle
|
||||||
|
* @param {Object} [style] The style parameters
|
||||||
|
* @param {Object} style.font The style and size of the font. If font size is not specified, it uses default bitmap font size. Font name is required
|
||||||
|
* @param {String} [style.align="left"] An alignment of the multiline text ("left", "center" or "right")
|
||||||
|
*/
|
||||||
|
PIXI.BitmapText.prototype.setStyle = function(style)
|
||||||
|
{
|
||||||
|
style = style || {};
|
||||||
|
style.align = style.align || "left";
|
||||||
|
this.style = style;
|
||||||
|
|
||||||
|
var font = style.font.split(" ");
|
||||||
|
this.fontName = font[font.length - 1];
|
||||||
|
this.fontSize = font.length >= 2 ? parseInt(font[font.length - 2], 10) : PIXI.BitmapText.fonts[this.fontName].size;
|
||||||
|
|
||||||
|
this.dirty = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Renders text
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
|
PIXI.BitmapText.prototype.updateText = function()
|
||||||
|
{
|
||||||
|
var data = PIXI.BitmapText.fonts[this.fontName];
|
||||||
|
var pos = new PIXI.Point();
|
||||||
|
var prevCharCode = null;
|
||||||
|
var chars = [];
|
||||||
|
var maxLineWidth = 0;
|
||||||
|
var lineWidths = [];
|
||||||
|
var line = 0;
|
||||||
|
var scale = this.fontSize / data.size;
|
||||||
|
for(var i = 0; i < this.text.length; i++)
|
||||||
|
{
|
||||||
|
var charCode = this.text.charCodeAt(i);
|
||||||
|
if(charCode == "\n".charCodeAt(0))
|
||||||
|
{
|
||||||
|
lineWidths.push(pos.x);
|
||||||
|
maxLineWidth = Math.max(maxLineWidth, pos.x);
|
||||||
|
line++;
|
||||||
|
|
||||||
|
pos.x = 0;
|
||||||
|
pos.y += data.lineHeight;
|
||||||
|
prevCharCode = null;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
var charData = data.chars[charCode];
|
||||||
|
if(!charData) continue;
|
||||||
|
|
||||||
|
if(prevCharCode && charData[prevCharCode])
|
||||||
|
{
|
||||||
|
pos.x += charData.kerning[prevCharCode];
|
||||||
|
}
|
||||||
|
chars.push({line: line, charCode: charCode, position: new PIXI.Point(pos.x + charData.xOffset, pos.y + charData.yOffset)});
|
||||||
|
pos.x += charData.xAdvance;
|
||||||
|
|
||||||
|
prevCharCode = charCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
lineWidths.push(pos.x);
|
||||||
|
maxLineWidth = Math.max(maxLineWidth, pos.x);
|
||||||
|
|
||||||
|
var lineAlignOffsets = [];
|
||||||
|
for(i = 0; i <= line; i++)
|
||||||
|
{
|
||||||
|
var alignOffset = 0;
|
||||||
|
if(this.style.align == "right")
|
||||||
|
{
|
||||||
|
alignOffset = maxLineWidth - lineWidths[i];
|
||||||
|
}
|
||||||
|
else if(this.style.align == "center")
|
||||||
|
{
|
||||||
|
alignOffset = (maxLineWidth - lineWidths[i]) / 2;
|
||||||
|
}
|
||||||
|
lineAlignOffsets.push(alignOffset);
|
||||||
|
}
|
||||||
|
|
||||||
|
for(i = 0; i < chars.length; i++)
|
||||||
|
{
|
||||||
|
var char = PIXI.Sprite.fromFrame(chars[i].charCode);
|
||||||
|
char.position.x = (chars[i].position.x + lineAlignOffsets[chars[i].line]) * scale;
|
||||||
|
char.position.y = chars[i].position.y * scale;
|
||||||
|
char.scale.x = char.scale.y = scale;
|
||||||
|
this.addChild(char);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.width = pos.x * scale;
|
||||||
|
this.height = (pos.y + data.lineHeight) * scale;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
|
PIXI.BitmapText.prototype.updateTransform = function()
|
||||||
|
{
|
||||||
|
if(this.dirty)
|
||||||
|
{
|
||||||
|
while(this.children.length > 0)
|
||||||
|
{
|
||||||
|
this.removeChild(this.getChildAt(0));
|
||||||
|
}
|
||||||
|
this.updateText();
|
||||||
|
|
||||||
|
this.dirty = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
PIXI.DisplayObjectContainer.prototype.updateTransform.call(this);
|
||||||
|
};
|
||||||
|
|
||||||
|
PIXI.BitmapText.fonts = {};
|
||||||
|
</pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script src="../assets/vendor/prettify/prettify-min.js"></script>
|
||||||
|
<script>prettyPrint();</script>
|
||||||
|
<script src="../assets/js/yui-prettify.js"></script>
|
||||||
|
<script src="../assets/../api.js"></script>
|
||||||
|
<script src="../assets/js/api-filter.js"></script>
|
||||||
|
<script src="../assets/js/api-list.js"></script>
|
||||||
|
<script src="../assets/js/api-search.js"></script>
|
||||||
|
<script src="../assets/js/apidocs.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -2,7 +2,7 @@
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>src/pixi/Text.js - Pixi.JS</title>
|
<title>src/pixi/text/Text.js - Pixi.JS</title>
|
||||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0/build/cssgrids/cssgrids-min.css">
|
<link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0/build/cssgrids/cssgrids-min.css">
|
||||||
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
|
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
|
||||||
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
|
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
|
||||||
|
@ -45,12 +45,18 @@
|
||||||
|
|
||||||
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||||
|
@ -118,7 +124,7 @@
|
||||||
<div class="apidocs">
|
<div class="apidocs">
|
||||||
<div id="docs-main">
|
<div id="docs-main">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<h1 class="file-heading">File: src/pixi/Text.js</h1>
|
<h1 class="file-heading">File: src/pixi/text/Text.js</h1>
|
||||||
|
|
||||||
<div class="file">
|
<div class="file">
|
||||||
<pre class="code prettyprint linenums">
|
<pre class="code prettyprint linenums">
|
||||||
|
@ -127,110 +133,156 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A Text Object will create a line of text
|
* A Text Object will create a line(s) of text to split a line you can use "\n"
|
||||||
* @class Text
|
* @class Text
|
||||||
* @extends Sprite
|
* @extends Sprite
|
||||||
* @constructor
|
* @constructor
|
||||||
* @param text {String} The copy that you would like the text to display
|
* @param {String} text The copy that you would like the text to display
|
||||||
* @param fontStyle {String} the style and size of the font eg "bold 20px Arial"
|
* @param {Object} [style] The style parameters
|
||||||
* @param fillStyle {Object} a canvas fillstyle that will be used on the text eg "red", "#00FF00" can also be null
|
* @param {String} [style.font] default "bold 20pt Arial" The style and size of the font
|
||||||
* @param strokeStyle {String} a canvas fillstyle that will be used on the text stroke eg "blue", "#FCFF00" can also be null
|
* @param {Object} [style.fill="black"] A canvas fillstyle that will be used on the text eg "red", "#00FF00"
|
||||||
* @param strokeThickness {Number} A number that represents the thicknes of the stroke. default is 0 (no stroke)
|
* @param {String} [style.align="left"] An alignment of the multiline text ("left", "center" or "right")
|
||||||
|
* @param {String} [style.stroke] A canvas fillstyle that will be used on the text stroke eg "blue", "#FCFF00"
|
||||||
|
* @param {Number} [style.strokeThickness=0] A number that represents the thickness of the stroke. Default is 0 (no stroke)
|
||||||
*/
|
*/
|
||||||
PIXI.Text = function(text, fontStyle, fillStyle, strokeStyle, strokeThickness)
|
PIXI.Text = function(text, style)
|
||||||
{
|
{
|
||||||
this.canvas = document.createElement("canvas");
|
this.canvas = document.createElement("canvas");
|
||||||
|
|
||||||
this.context = this.canvas.getContext("2d");
|
this.context = this.canvas.getContext("2d");
|
||||||
//document.body.appendChild(this.canvas);
|
PIXI.Sprite.call(this, PIXI.Texture.fromCanvas(this.canvas));
|
||||||
|
|
||||||
this.setText(text);
|
this.setText(text);
|
||||||
this.setStyle(fontStyle, fillStyle, strokeStyle, strokeThickness);
|
this.setStyle(style);
|
||||||
|
|
||||||
this.updateText();
|
this.updateText();
|
||||||
|
this.dirty = false;
|
||||||
PIXI.Sprite.call( this, PIXI.Texture.fromCanvas(this.canvas));
|
};
|
||||||
|
|
||||||
// need to store a canvas that can
|
|
||||||
}
|
|
||||||
|
|
||||||
// constructor
|
// constructor
|
||||||
PIXI.Text.constructor = PIXI.Text;
|
PIXI.Text.constructor = PIXI.Text;
|
||||||
PIXI.Text.prototype = Object.create( PIXI.Sprite.prototype );
|
PIXI.Text.prototype = Object.create(PIXI.Sprite.prototype);
|
||||||
|
|
||||||
/**
|
|
||||||
* Set the copy for the text object
|
|
||||||
* @methos setText
|
|
||||||
* @param text {String} The copy that you would like the text to display
|
|
||||||
*/
|
|
||||||
PIXI.Text.prototype.setText = function(text)
|
|
||||||
{
|
|
||||||
this.text = text || " ";
|
|
||||||
this.dirty = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the style of the text
|
* Set the style of the text
|
||||||
* @method setStyle
|
* @method setStyle
|
||||||
* @constructor
|
* @param {Object} [style] The style parameters
|
||||||
* @param fontStyle {String} the style and size of the font eg "bold 20px Arial"
|
* @param {String} [style.font="bold 20pt Arial"] The style and size of the font
|
||||||
* @param fillStyle {Object} a canvas fillstyle that will be used on the text eg "red", "#00FF00" can also be null
|
* @param {Object} [style.fill="black"] A canvas fillstyle that will be used on the text eg "red", "#00FF00"
|
||||||
* @param strokeStyle {String} a canvas fillstyle that will be used on the text stroke eg "blue", "#FCFF00" can also be null
|
* @param {String} [style.align="left"] An alignment of the multiline text ("left", "center" or "right")
|
||||||
* @param strokeThickness {Number} A number that represents the thicknes of the stroke. default is 0 (no stroke)
|
* @param {String} [style.stroke] A canvas fillstyle that will be used on the text stroke eg "blue", "#FCFF00"
|
||||||
|
* @param {Number} [style.strokeThickness=0] A number that represents the thickness of the stroke. Default is 0 (no stroke)
|
||||||
*/
|
*/
|
||||||
PIXI.Text.prototype.setStyle = function(fontStyle, fillStyle, strokeStyle, strokeThickness)
|
PIXI.Text.prototype.setStyle = function(style)
|
||||||
{
|
{
|
||||||
this.fontStyle = fontStyle || "bold 20pt Arial";
|
style = style || {};
|
||||||
this.fillStyle = fillStyle;
|
style.font = style.font || "bold 20pt Arial";
|
||||||
this.strokeStyle = strokeStyle;
|
style.fill = style.fill || "black";
|
||||||
this.strokeThickness = strokeThickness || 0;
|
style.align = style.align || "left";
|
||||||
|
style.strokeThickness = style.strokeThickness || 0;
|
||||||
|
this.style = style;
|
||||||
this.dirty = true;
|
this.dirty = true;
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Set the copy for the text object. To split a line you can use "\n"
|
||||||
|
* @methos setText
|
||||||
|
* @param {String} text The copy that you would like the text to display
|
||||||
|
*/
|
||||||
|
PIXI.Sprite.prototype.setText = function(text)
|
||||||
|
{
|
||||||
|
this.text = text || " ";
|
||||||
|
this.dirty = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Renders text
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
PIXI.Text.prototype.updateText = function()
|
PIXI.Text.prototype.updateText = function()
|
||||||
{
|
{
|
||||||
// console.log(this.text);
|
this.context.font = this.style.font;
|
||||||
this.context.font = this.fontStyle;
|
|
||||||
|
|
||||||
this.canvas.width = this.context.measureText(this.text).width + this.strokeThickness//textDimensions.width;
|
//split text into lines
|
||||||
this.canvas.height = this.determineFontHeight("font: " + this.fontStyle + ";")+ this.strokeThickness;// textDimensions.height;
|
var lines = this.text.split("\n");
|
||||||
|
|
||||||
this.context.fillStyle = this.fillStyle;
|
//calculate text width
|
||||||
this.context.font = this.fontStyle;
|
var lineWidths = [];
|
||||||
|
var maxLineWidth = 0;
|
||||||
|
for (var i = 0; i < lines.length; i++)
|
||||||
|
{
|
||||||
|
var lineWidth = this.context.measureText(lines[i]).width;
|
||||||
|
lineWidths[i] = lineWidth;
|
||||||
|
maxLineWidth = Math.max(maxLineWidth, lineWidth);
|
||||||
|
}
|
||||||
|
this.canvas.width = maxLineWidth + this.style.strokeThickness;
|
||||||
|
|
||||||
this.context.strokeStyle = this.strokeStyle;
|
//calculate text height
|
||||||
this.context.lineWidth = this.strokeThickness;
|
var lineHeight = this.determineFontHeight("font: " + this.style.font + ";") + this.style.strokeThickness;
|
||||||
|
this.canvas.height = lineHeight * lines.length;
|
||||||
|
|
||||||
this.context.textBaseline="top";
|
//set canvas text styles
|
||||||
|
this.context.fillStyle = this.style.fill;
|
||||||
|
this.context.font = this.style.font;
|
||||||
|
|
||||||
if(this.strokeStyle && this.strokeThickness)this.context.strokeText(this.text, this.strokeThickness/2, this.strokeThickness/2);
|
this.context.strokeStyle = this.style.stroke;
|
||||||
if(this.fillStyle)this.context.fillText(this.text, this.strokeThickness/2, this.strokeThickness/2);
|
this.context.lineWidth = this.style.strokeThickness;
|
||||||
|
|
||||||
|
this.context.textBaseline = "top";
|
||||||
|
|
||||||
// console.log("//")
|
//draw lines line by line
|
||||||
}
|
for (i = 0; i < lines.length; i++)
|
||||||
|
{
|
||||||
|
var linePosition = new PIXI.Point(this.style.strokeThickness / 2, this.style.strokeThickness / 2 + i * lineHeight);
|
||||||
|
|
||||||
|
if(this.style.align == "right")
|
||||||
|
{
|
||||||
|
linePosition.x += maxLineWidth - lineWidths[i];
|
||||||
|
}
|
||||||
|
else if(this.style.align == "center")
|
||||||
|
{
|
||||||
|
linePosition.x += (maxLineWidth - lineWidths[i]) / 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(this.style.stroke && this.style.strokeThickness)
|
||||||
|
{
|
||||||
|
this.context.strokeText(lines[i], linePosition.x, linePosition.y);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(this.style.fill)
|
||||||
|
{
|
||||||
|
this.context.fillText(lines[i], linePosition.x, linePosition.y);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.updateTexture();
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates texture size based on canvas size
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
|
PIXI.Text.prototype.updateTexture = function()
|
||||||
|
{
|
||||||
|
|
||||||
|
this.texture.baseTexture.width = this.canvas.width;
|
||||||
|
this.texture.baseTexture.height = this.canvas.height;
|
||||||
|
this.texture.frame.width = this.canvas.width;
|
||||||
|
this.texture.frame.height = this.canvas.height;
|
||||||
|
PIXI.texturesToUpdate.push(this.texture.baseTexture);
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
PIXI.Text.prototype.updateTransform = function()
|
PIXI.Text.prototype.updateTransform = function()
|
||||||
{
|
{
|
||||||
if(this.dirty)
|
if(this.dirty)
|
||||||
{
|
{
|
||||||
this.updateText();
|
this.updateText();
|
||||||
|
|
||||||
// update the texture..
|
|
||||||
this.texture.baseTexture.width = this.canvas.width;
|
|
||||||
this.texture.baseTexture.height = this.canvas.height;
|
|
||||||
this.texture.frame.width = this.canvas.width;
|
|
||||||
this.texture.frame.height = this.canvas.height;
|
|
||||||
|
|
||||||
PIXI.texturesToUpdate.push(this.texture.baseTexture);
|
|
||||||
this.dirty = false;
|
this.dirty = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
PIXI.Sprite.prototype.updateTransform.call( this );
|
PIXI.Sprite.prototype.updateTransform.call(this);
|
||||||
}
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* http://stackoverflow.com/users/34441/ellisbben
|
* http://stackoverflow.com/users/34441/ellisbben
|
||||||
|
@ -238,9 +290,9 @@ PIXI.Text.prototype.updateTransform = function()
|
||||||
*/
|
*/
|
||||||
PIXI.Text.prototype.determineFontHeight = function(fontStyle)
|
PIXI.Text.prototype.determineFontHeight = function(fontStyle)
|
||||||
{
|
{
|
||||||
// build a little refference dictionary so if the font style has been used return a
|
// build a little reference dictionary so if the font style has been used return a
|
||||||
// cached version...
|
// cached version...
|
||||||
var result = PIXI.Text.heightCache[fontStyle]
|
var result = PIXI.Text.heightCache[fontStyle];
|
||||||
|
|
||||||
if(!result)
|
if(!result)
|
||||||
{
|
{
|
||||||
|
@ -252,7 +304,7 @@ PIXI.Text.prototype.determineFontHeight = function(fontStyle)
|
||||||
body.appendChild(dummy);
|
body.appendChild(dummy);
|
||||||
|
|
||||||
result = dummy.offsetHeight;
|
result = dummy.offsetHeight;
|
||||||
PIXI.Text.heightCache[fontStyle] = result
|
PIXI.Text.heightCache[fontStyle] = result;
|
||||||
|
|
||||||
body.removeChild(dummy);
|
body.removeChild(dummy);
|
||||||
}
|
}
|
||||||
|
@ -267,7 +319,7 @@ PIXI.Text.prototype.destroy = function(destroyTexture)
|
||||||
this.texture.destroy();
|
this.texture.destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
};
|
||||||
|
|
||||||
PIXI.Text.heightCache = {};
|
PIXI.Text.heightCache = {};
|
||||||
|
|
|
@ -45,12 +45,18 @@
|
||||||
|
|
||||||
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||||
|
|
|
@ -45,12 +45,18 @@
|
||||||
|
|
||||||
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||||
|
|
|
@ -45,12 +45,18 @@
|
||||||
|
|
||||||
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||||
|
|
|
@ -45,12 +45,18 @@
|
||||||
|
|
||||||
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||||
|
|
|
@ -45,12 +45,18 @@
|
||||||
|
|
||||||
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||||
|
|
|
@ -45,12 +45,18 @@
|
||||||
|
|
||||||
<li><a href="./classes/BaseTexture.html">BaseTexture</a></li>
|
<li><a href="./classes/BaseTexture.html">BaseTexture</a></li>
|
||||||
|
|
||||||
|
<li><a href="./classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="./classes/BitmapText.html">BitmapText</a></li>
|
||||||
|
|
||||||
<li><a href="./classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
<li><a href="./classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||||
|
|
||||||
<li><a href="./classes/DisplayObject.html">DisplayObject</a></li>
|
<li><a href="./classes/DisplayObject.html">DisplayObject</a></li>
|
||||||
|
|
||||||
<li><a href="./classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
<li><a href="./classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||||
|
|
||||||
|
<li><a href="./classes/ImageLoader.html">ImageLoader</a></li>
|
||||||
|
|
||||||
<li><a href="./classes/InteractionData.html">InteractionData</a></li>
|
<li><a href="./classes/InteractionData.html">InteractionData</a></li>
|
||||||
|
|
||||||
<li><a href="./classes/InteractionManager.html">InteractionManager</a></li>
|
<li><a href="./classes/InteractionManager.html">InteractionManager</a></li>
|
||||||
|
|
|
@ -45,12 +45,18 @@
|
||||||
|
|
||||||
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||||
|
|
||||||
|
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||||
|
|
||||||
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||||
|
@ -126,7 +132,7 @@
|
||||||
|
|
||||||
|
|
||||||
<div class="foundat">
|
<div class="foundat">
|
||||||
Defined in: <a href="../files/src_pixi_Text.js.html#l5"><code>src/pixi/Text.js:5</code></a>
|
Defined in: <a href="../files/src_pixi_Stage.js.html#l5"><code>src/pixi/Stage.js:5</code></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
@ -160,6 +166,18 @@
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<li class="module-class">
|
||||||
|
<a href="../classes/BitmapFontLoader.html">
|
||||||
|
BitmapFontLoader
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="module-class">
|
||||||
|
<a href="../classes/BitmapText.html">
|
||||||
|
BitmapText
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
<li class="module-class">
|
<li class="module-class">
|
||||||
<a href="../classes/CanvasRenderer.html">
|
<a href="../classes/CanvasRenderer.html">
|
||||||
CanvasRenderer
|
CanvasRenderer
|
||||||
|
@ -178,6 +196,12 @@
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<li class="module-class">
|
||||||
|
<a href="../classes/ImageLoader.html">
|
||||||
|
ImageLoader
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
<li class="module-class">
|
<li class="module-class">
|
||||||
<a href="../classes/InteractionData.html">
|
<a href="../classes/InteractionData.html">
|
||||||
InteractionData
|
InteractionData
|
||||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -4,22 +4,21 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A Text Object will create a line(s) of text using bitmap font
|
* A Text Object will create a line(s) of text using bitmap font
|
||||||
* @class DisplayObjectContainer
|
* You can generate the fnt files using
|
||||||
* @extends Sprite
|
* http://www.angelcode.com/products/bmfont/ for windows of
|
||||||
|
* http://www.bmglyph.com/ for mac.
|
||||||
|
* @class BitmapText
|
||||||
|
* @extends DisplayObjectContainer
|
||||||
* @constructor
|
* @constructor
|
||||||
* @param {String} text The copy that you would like the text to display
|
* @param {String} text The copy that you would like the text to display
|
||||||
* @param {Object} [style] The style parameters
|
* @param {Object} [style] The style parameters
|
||||||
* @param {Object} [style.font="bold 20pt Arial"] The style and size of the font
|
* @param {String} [style.font] default is "20pt Arial" The size and bitmap font id (must have loaded previously)
|
||||||
* @param {Object} [style.fill="black"] A canvas fillstyle that will be used on the text eg "red", "#00FF00"
|
|
||||||
* @param {String} [style.align="left"] An alignment of the multiline text ("left", "center" or "right")
|
* @param {String} [style.align="left"] An alignment of the multiline text ("left", "center" or "right")
|
||||||
* @param {String} [style.stroke] A canvas fillstyle that will be used on the text stroke eg "blue", "#FCFF00"
|
|
||||||
* @param {Number} [style.strokeThickness=0] A number that represents the thickness of the stroke. Default is 0 (no stroke)
|
|
||||||
*/
|
*/
|
||||||
|
//* @param {Object} [style.font="bold 20pt Arial"] The style and size of the font
|
||||||
PIXI.BitmapText = function(text, style)
|
PIXI.BitmapText = function(text, style)
|
||||||
{
|
{
|
||||||
this.canvas = document.createElement("canvas");
|
PIXI.DisplayObjectContainer.call(this);
|
||||||
this.context = this.canvas.getContext("2d");
|
|
||||||
PIXI.DisplayObjectContainer.call(this, PIXI.Texture.fromCanvas(this.canvas));
|
|
||||||
|
|
||||||
this.setText(text);
|
this.setText(text);
|
||||||
this.setStyle(style);
|
this.setStyle(style);
|
||||||
|
@ -91,6 +90,7 @@ PIXI.BitmapText.prototype.updateText = function()
|
||||||
prevCharCode = null;
|
prevCharCode = null;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
var charData = data.chars[charCode];
|
var charData = data.chars[charCode];
|
||||||
if(!charData) continue;
|
if(!charData) continue;
|
||||||
|
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A Text Object will create a line(s) of text
|
* A Text Object will create a line(s) of text to split a line you can use "\n"
|
||||||
* @class Text
|
* @class Text
|
||||||
* @extends Sprite
|
* @extends Sprite
|
||||||
* @constructor
|
* @constructor
|
||||||
* @param {String} text The copy that you would like the text to display
|
* @param {String} text The copy that you would like the text to display
|
||||||
* @param {Object} [style] The style parameters
|
* @param {Object} [style] The style parameters
|
||||||
* @param {Object} [style.font="bold 20pt Arial"] The style and size of the font
|
* @param {String} [style.font] default "bold 20pt Arial" The style and size of the font
|
||||||
* @param {Object} [style.fill="black"] A canvas fillstyle that will be used on the text eg "red", "#00FF00"
|
* @param {Object} [style.fill="black"] A canvas fillstyle that will be used on the text eg "red", "#00FF00"
|
||||||
* @param {String} [style.align="left"] An alignment of the multiline text ("left", "center" or "right")
|
* @param {String} [style.align="left"] An alignment of the multiline text ("left", "center" or "right")
|
||||||
* @param {String} [style.stroke] A canvas fillstyle that will be used on the text stroke eg "blue", "#FCFF00"
|
* @param {String} [style.stroke] A canvas fillstyle that will be used on the text stroke eg "blue", "#FCFF00"
|
||||||
|
@ -35,7 +35,7 @@ PIXI.Text.prototype = Object.create(PIXI.Sprite.prototype);
|
||||||
* Set the style of the text
|
* Set the style of the text
|
||||||
* @method setStyle
|
* @method setStyle
|
||||||
* @param {Object} [style] The style parameters
|
* @param {Object} [style] The style parameters
|
||||||
* @param {Object} [style.font="bold 20pt Arial"] The style and size of the font
|
* @param {String} [style.font="bold 20pt Arial"] The style and size of the font
|
||||||
* @param {Object} [style.fill="black"] A canvas fillstyle that will be used on the text eg "red", "#00FF00"
|
* @param {Object} [style.fill="black"] A canvas fillstyle that will be used on the text eg "red", "#00FF00"
|
||||||
* @param {String} [style.align="left"] An alignment of the multiline text ("left", "center" or "right")
|
* @param {String} [style.align="left"] An alignment of the multiline text ("left", "center" or "right")
|
||||||
* @param {String} [style.stroke] A canvas fillstyle that will be used on the text stroke eg "blue", "#FCFF00"
|
* @param {String} [style.stroke] A canvas fillstyle that will be used on the text stroke eg "blue", "#FCFF00"
|
||||||
|
@ -49,12 +49,11 @@ PIXI.Text.prototype.setStyle = function(style)
|
||||||
style.align = style.align || "left";
|
style.align = style.align || "left";
|
||||||
style.strokeThickness = style.strokeThickness || 0;
|
style.strokeThickness = style.strokeThickness || 0;
|
||||||
this.style = style;
|
this.style = style;
|
||||||
|
|
||||||
this.dirty = true;
|
this.dirty = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the copy for the text object
|
* Set the copy for the text object. To split a line you can use "\n"
|
||||||
* @methos setText
|
* @methos setText
|
||||||
* @param {String} text The copy that you would like the text to display
|
* @param {String} text The copy that you would like the text to display
|
||||||
*/
|
*/
|
||||||
|
@ -103,6 +102,7 @@ PIXI.Text.prototype.updateText = function()
|
||||||
for (i = 0; i < lines.length; i++)
|
for (i = 0; i < lines.length; i++)
|
||||||
{
|
{
|
||||||
var linePosition = new PIXI.Point(this.style.strokeThickness / 2, this.style.strokeThickness / 2 + i * lineHeight);
|
var linePosition = new PIXI.Point(this.style.strokeThickness / 2, this.style.strokeThickness / 2 + i * lineHeight);
|
||||||
|
|
||||||
if(this.style.align == "right")
|
if(this.style.align == "right")
|
||||||
{
|
{
|
||||||
linePosition.x += maxLineWidth - lineWidths[i];
|
linePosition.x += maxLineWidth - lineWidths[i];
|
||||||
|
@ -122,6 +122,7 @@ PIXI.Text.prototype.updateText = function()
|
||||||
this.context.fillText(lines[i], linePosition.x, linePosition.y);
|
this.context.fillText(lines[i], linePosition.x, linePosition.y);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.updateTexture();
|
this.updateTexture();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue