Compare commits
35 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e63c2b9c2c | ||
|
|
67db97c924 | ||
|
|
f3792f44c2 | ||
|
|
d2e300038d | ||
|
|
d3b1c45ad1 | ||
|
|
3d35d1d934 | ||
|
|
138c3b11d0 | ||
|
|
73d3bc0e11 | ||
|
|
9ba4539a90 | ||
|
|
ad73c5fa20 | ||
|
|
710b0fbe5e | ||
|
|
1599b15c21 | ||
|
|
d52f360f15 | ||
|
|
e4bd364a9f | ||
|
|
1b9184d679 | ||
|
|
8419c199df | ||
|
|
951865f219 | ||
|
|
d33dbb4304 | ||
|
|
0154dff2e2 | ||
|
|
fe7646b6dd | ||
|
|
dd9fd183fb | ||
|
|
be97309b3d | ||
|
|
9c911161d3 | ||
|
|
cfbb7bc8e1 | ||
|
|
2b6d8bdc2c | ||
|
|
dfd621a24d | ||
|
|
91b23a130a | ||
|
|
661c5bc137 | ||
|
|
49c2ce1ca0 | ||
|
|
c781ebaab6 | ||
|
|
8a0036178e | ||
|
|
564f883640 | ||
|
|
fcd2033d40 | ||
|
|
8658124a4b | ||
|
|
44330fa419 |
75 changed files with 23550 additions and 1089 deletions
|
|
@ -5,6 +5,7 @@ module.exports = function(grunt) {
|
|||
grunt.loadNpmTasks('grunt-contrib-uglify');
|
||||
grunt.loadNpmTasks('grunt-contrib-connect');
|
||||
grunt.loadNpmTasks('grunt-contrib-yuidoc');
|
||||
grunt.loadNpmTasks('grunt-contrib-watch');
|
||||
|
||||
grunt.loadTasks('tasks');
|
||||
|
||||
|
|
@ -184,10 +185,11 @@ module.exports = function(grunt) {
|
|||
}
|
||||
}
|
||||
},
|
||||
//Watches and builds for _development_ (source maps)
|
||||
watch: {
|
||||
scripts: {
|
||||
files: ['<%= dirs.src %>/**/*.js'],
|
||||
tasks: ['concat'],
|
||||
tasks: ['concat_sourcemap'],
|
||||
options: {
|
||||
spawn: false,
|
||||
}
|
||||
|
|
@ -213,6 +215,6 @@ module.exports = function(grunt) {
|
|||
grunt.registerTask('travis', ['build', 'test']);
|
||||
|
||||
grunt.registerTask('default', ['build', 'test']);
|
||||
|
||||
grunt.registerTask('debug-watch', ['concat', 'watch']);
|
||||
|
||||
grunt.registerTask('debug-watch', ['concat_sourcemap', 'watch:debug']);
|
||||
};
|
||||
|
|
|
|||
606
bin/pixi.dev.js
606
bin/pixi.dev.js
File diff suppressed because it is too large
Load diff
14
bin/pixi.js
14
bin/pixi.js
File diff suppressed because one or more lines are too long
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "pixi.js",
|
||||
"version": "1.5.1",
|
||||
"version": "1.5.0",
|
||||
|
||||
"main": "bin/pixi.js",
|
||||
|
||||
|
|
|
|||
926
docs/classes/AjaxRequest.html
Normal file
926
docs/classes/AjaxRequest.html
Normal file
|
|
@ -0,0 +1,926 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>AjaxRequest - pixi.js</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.9.1/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.9.1/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.5.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/AbstractFilter.html">AbstractFilter</a></li>
|
||||
|
||||
<li><a href="../classes/AjaxRequest.html">AjaxRequest</a></li>
|
||||
|
||||
<li><a href="../classes/AlphaMaskFilter.html">AlphaMaskFilter</a></li>
|
||||
|
||||
<li><a href="../classes/AssetLoader.html">AssetLoader</a></li>
|
||||
|
||||
<li><a href="../classes/AtlasLoader.html">AtlasLoader</a></li>
|
||||
|
||||
<li><a href="../classes/autoDetectRenderer.html">autoDetectRenderer</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/BlurFilter.html">BlurFilter</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasMaskManager.html">CanvasMaskManager</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasTinter.html">CanvasTinter</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/ColorMatrixFilter.html">ColorMatrixFilter</a></li>
|
||||
|
||||
<li><a href="../classes/ColorStepFilter.html">ColorStepFilter</a></li>
|
||||
|
||||
<li><a href="../classes/DisplacementFilter.html">DisplacementFilter</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/DotScreenFilter.html">DotScreenFilter</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/EventTarget.html">EventTarget</a></li>
|
||||
|
||||
<li><a href="../classes/FilterTexture.html">FilterTexture</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/GrayFilter.html">GrayFilter</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/InvertFilter.html">InvertFilter</a></li>
|
||||
|
||||
<li><a href="../classes/JsonLoader.html">JsonLoader</a></li>
|
||||
|
||||
<li><a href="../classes/MovieClip.html">MovieClip</a></li>
|
||||
|
||||
<li><a href="../classes/NormalMapFilter.html">NormalMapFilter</a></li>
|
||||
|
||||
<li><a href="../classes/PixelateFilter.html">PixelateFilter</a></li>
|
||||
|
||||
<li><a href="../classes/PixiFastShader.html">PixiFastShader</a></li>
|
||||
|
||||
<li><a href="../classes/PixiShader.html">PixiShader</a></li>
|
||||
|
||||
<li><a href="../classes/Point.html">Point</a></li>
|
||||
|
||||
<li><a href="../classes/Polygon.html">Polygon</a></li>
|
||||
|
||||
<li><a href="../classes/PolyK.html">PolyK</a></li>
|
||||
|
||||
<li><a href="../classes/PrimitiveShader.html">PrimitiveShader</a></li>
|
||||
|
||||
<li><a href="../classes/Rectangle.html">Rectangle</a></li>
|
||||
|
||||
<li><a href="../classes/Rope.html">Rope</a></li>
|
||||
|
||||
<li><a href="../classes/SepiaFilter.html">SepiaFilter</a></li>
|
||||
|
||||
<li><a href="../classes/Spine.html">Spine</a></li>
|
||||
|
||||
<li><a href="../classes/Sprite.html">Sprite</a></li>
|
||||
|
||||
<li><a href="../classes/SpriteBatch.html">SpriteBatch</a></li>
|
||||
|
||||
<li><a href="../classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
|
||||
|
||||
<li><a href="../classes/Stage.html">Stage</a></li>
|
||||
|
||||
<li><a href="../classes/Strip.html">Strip</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/TwistFilter.html">TwistFilter</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLFilterManager.html">WebGLFilterManager</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLGraphics.html">WebGLGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLMaskManager.html">WebGLMaskManager</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLRenderer.html">WebGLRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLShaderManager.html">WebGLShaderManager</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLSpriteBatch.html">WebGLSpriteBatch</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>AjaxRequest Class</h1>
|
||||
<div class="box meta">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="foundat">
|
||||
Defined in: <a href="../files/src_pixi_utils_Utils.js.html#l99"><code>src/pixi/utils/Utils.js:99</code></a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
Module: <a href="../modules/PIXI.html">PIXI</a>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="box intro">
|
||||
<p>A wrapper for ajax requests to be handled cross browser</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="constructor">
|
||||
<h2>Constructor</h2>
|
||||
<div id="method_AjaxRequest" class="method item">
|
||||
<h3 class="name"><code>AjaxRequest</code></h3>
|
||||
|
||||
|
||||
<span class="paren">()</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_utils_Utils.js.html#l99"><code>src/pixi/utils/Utils.js:99</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
|
||||
</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>
|
||||
|
||||
|
||||
<li class="api-class-tab methods"><a href="#methods">Methods</a></li>
|
||||
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<div>
|
||||
<div id="index" class="api-class-tabpanel index">
|
||||
<h2 class="off-left">Item Index</h2>
|
||||
|
||||
|
||||
<div class="index-section methods">
|
||||
<h3>Methods</h3>
|
||||
|
||||
<ul class="index-list methods">
|
||||
|
||||
<li class="index-item method">
|
||||
<a href="#method_bind">bind</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item method">
|
||||
<a href="#method_cancelAnimationFrame">cancelAnimationFrame</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item method">
|
||||
<a href="#method_canUseNewCanvasBlendModes">canUseNewCanvasBlendModes</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item method">
|
||||
<a href="#method_getNextPowerOfTwo">getNextPowerOfTwo</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item method">
|
||||
<a href="#method_hex2rgb">hex2rgb</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item method">
|
||||
<a href="#method_requestAnimationFrame">requestAnimationFrame</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item method">
|
||||
<a href="#method_rgb2hex">rgb2hex</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="methods" class="api-class-tabpanel">
|
||||
<h2 class="off-left">Methods</h2>
|
||||
|
||||
|
||||
<div id="method_bind" class="method item">
|
||||
<h3 class="name"><code>bind</code></h3>
|
||||
|
||||
|
||||
<span class="paren">()</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_utils_Utils.js.html#l71"><code>src/pixi/utils/Utils.js:71</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>A polyfill for Function.prototype.bind</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="method_cancelAnimationFrame" class="method item">
|
||||
<h3 class="name"><code>cancelAnimationFrame</code></h3>
|
||||
|
||||
|
||||
<span class="paren">()</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_utils_Utils.js.html#l19"><code>src/pixi/utils/Utils.js:19</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>A polyfill for cancelAnimationFrame</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="method_canUseNewCanvasBlendModes" class="method item">
|
||||
<h3 class="name"><code>canUseNewCanvasBlendModes</code></h3>
|
||||
|
||||
|
||||
<span class="paren">()</span>
|
||||
|
||||
|
||||
|
||||
<span class="returns-inline">
|
||||
<span class="type">Boolean</span>
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_utils_Utils.js.html#l159"><code>src/pixi/utils/Utils.js:159</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Checks whether the Canvas BlendModes are supported by the current browser</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="returns">
|
||||
<h4>Returns:</h4>
|
||||
|
||||
<div class="returns-description">
|
||||
|
||||
|
||||
<span class="type">Boolean</span>:
|
||||
|
||||
<p>whether they are supported</p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="method_getNextPowerOfTwo" class="method item">
|
||||
<h3 class="name"><code>getNextPowerOfTwo</code></h3>
|
||||
|
||||
|
||||
<div class="args">
|
||||
<span class="paren">(</span><ul class="args-list inline commas">
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>number</code>
|
||||
|
||||
</li>
|
||||
|
||||
</ul><span class="paren">)</span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<span class="returns-inline">
|
||||
<span class="type">Number</span>
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_utils_Utils.js.html#l179"><code>src/pixi/utils/Utils.js:179</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Given a number, this function returns the closest number that is a power of two
|
||||
this function is taken from Starling Framework as its pretty neat ;)</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="params">
|
||||
<h4>Parameters:</h4>
|
||||
|
||||
<ul class="params-list">
|
||||
|
||||
<li class="param">
|
||||
|
||||
<code class="param-name">number</code>
|
||||
<span class="type">Number</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="returns">
|
||||
<h4>Returns:</h4>
|
||||
|
||||
<div class="returns-description">
|
||||
|
||||
|
||||
<span class="type">Number</span>:
|
||||
|
||||
<p>the closest number that is a power of two</p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="method_hex2rgb" class="method item">
|
||||
<h3 class="name"><code>hex2rgb</code></h3>
|
||||
|
||||
|
||||
<div class="args">
|
||||
<span class="paren">(</span><ul class="args-list inline commas">
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>hex</code>
|
||||
|
||||
</li>
|
||||
|
||||
</ul><span class="paren">)</span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_utils_Utils.js.html#l51"><code>src/pixi/utils/Utils.js:51</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Converts a hex color number to an [R, G, B] array</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="params">
|
||||
<h4>Parameters:</h4>
|
||||
|
||||
<ul class="params-list">
|
||||
|
||||
<li class="param">
|
||||
|
||||
<code class="param-name">hex</code>
|
||||
<span class="type">Number</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="method_requestAnimationFrame" class="method item">
|
||||
<h3 class="name"><code>requestAnimationFrame</code></h3>
|
||||
|
||||
|
||||
<span class="paren">()</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_utils_Utils.js.html#l12"><code>src/pixi/utils/Utils.js:12</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>A polyfill for requestAnimationFrame
|
||||
You can actually use both requestAnimationFrame and requestAnimFrame,
|
||||
you will still benefit from the polyfill</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="method_rgb2hex" class="method item">
|
||||
<h3 class="name"><code>rgb2hex</code></h3>
|
||||
|
||||
|
||||
<div class="args">
|
||||
<span class="paren">(</span><ul class="args-list inline commas">
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>rgb</code>
|
||||
|
||||
</li>
|
||||
|
||||
</ul><span class="paren">)</span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_utils_Utils.js.html#l61"><code>src/pixi/utils/Utils.js:61</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Converts a color as an [R, G, B] array to a hex number</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="params">
|
||||
<h4>Parameters:</h4>
|
||||
|
||||
<ul class="params-list">
|
||||
|
||||
<li class="param">
|
||||
|
||||
<code class="param-name">rgb</code>
|
||||
<span class="type">Array</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</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>
|
||||
511
docs/classes/CanvasMaskManager.html
Normal file
511
docs/classes/CanvasMaskManager.html
Normal file
|
|
@ -0,0 +1,511 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CanvasMaskManager - pixi.js</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.9.1/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.9.1/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.5.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/AbstractFilter.html">AbstractFilter</a></li>
|
||||
|
||||
<li><a href="../classes/AjaxRequest.html">AjaxRequest</a></li>
|
||||
|
||||
<li><a href="../classes/AlphaMaskFilter.html">AlphaMaskFilter</a></li>
|
||||
|
||||
<li><a href="../classes/AssetLoader.html">AssetLoader</a></li>
|
||||
|
||||
<li><a href="../classes/AtlasLoader.html">AtlasLoader</a></li>
|
||||
|
||||
<li><a href="../classes/autoDetectRenderer.html">autoDetectRenderer</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/BlurFilter.html">BlurFilter</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasMaskManager.html">CanvasMaskManager</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasTinter.html">CanvasTinter</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/ColorMatrixFilter.html">ColorMatrixFilter</a></li>
|
||||
|
||||
<li><a href="../classes/ColorStepFilter.html">ColorStepFilter</a></li>
|
||||
|
||||
<li><a href="../classes/DisplacementFilter.html">DisplacementFilter</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/DotScreenFilter.html">DotScreenFilter</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/EventTarget.html">EventTarget</a></li>
|
||||
|
||||
<li><a href="../classes/FilterTexture.html">FilterTexture</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/GrayFilter.html">GrayFilter</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/InvertFilter.html">InvertFilter</a></li>
|
||||
|
||||
<li><a href="../classes/JsonLoader.html">JsonLoader</a></li>
|
||||
|
||||
<li><a href="../classes/MovieClip.html">MovieClip</a></li>
|
||||
|
||||
<li><a href="../classes/NormalMapFilter.html">NormalMapFilter</a></li>
|
||||
|
||||
<li><a href="../classes/PixelateFilter.html">PixelateFilter</a></li>
|
||||
|
||||
<li><a href="../classes/PixiFastShader.html">PixiFastShader</a></li>
|
||||
|
||||
<li><a href="../classes/PixiShader.html">PixiShader</a></li>
|
||||
|
||||
<li><a href="../classes/Point.html">Point</a></li>
|
||||
|
||||
<li><a href="../classes/Polygon.html">Polygon</a></li>
|
||||
|
||||
<li><a href="../classes/PolyK.html">PolyK</a></li>
|
||||
|
||||
<li><a href="../classes/PrimitiveShader.html">PrimitiveShader</a></li>
|
||||
|
||||
<li><a href="../classes/Rectangle.html">Rectangle</a></li>
|
||||
|
||||
<li><a href="../classes/Rope.html">Rope</a></li>
|
||||
|
||||
<li><a href="../classes/SepiaFilter.html">SepiaFilter</a></li>
|
||||
|
||||
<li><a href="../classes/Spine.html">Spine</a></li>
|
||||
|
||||
<li><a href="../classes/Sprite.html">Sprite</a></li>
|
||||
|
||||
<li><a href="../classes/SpriteBatch.html">SpriteBatch</a></li>
|
||||
|
||||
<li><a href="../classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
|
||||
|
||||
<li><a href="../classes/Stage.html">Stage</a></li>
|
||||
|
||||
<li><a href="../classes/Strip.html">Strip</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/TwistFilter.html">TwistFilter</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLFilterManager.html">WebGLFilterManager</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLGraphics.html">WebGLGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLMaskManager.html">WebGLMaskManager</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLRenderer.html">WebGLRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLShaderManager.html">WebGLShaderManager</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLSpriteBatch.html">WebGLSpriteBatch</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>CanvasMaskManager Class</h1>
|
||||
<div class="box meta">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="foundat">
|
||||
Defined in: <a href="../files/src_pixi_renderers_canvas_utils_CanvasMaskManager.js.html#l6"><code>src/pixi/renderers/canvas/utils/CanvasMaskManager.js:6</code></a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
Module: <a href="../modules/PIXI.html">PIXI</a>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="box intro">
|
||||
<p>A set of functions used to handle masking</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="classdocs" class="tabview">
|
||||
<ul class="api-class-tabs">
|
||||
<li class="api-class-tab index"><a href="#index">Index</a></li>
|
||||
|
||||
|
||||
<li class="api-class-tab methods"><a href="#methods">Methods</a></li>
|
||||
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<div>
|
||||
<div id="index" class="api-class-tabpanel index">
|
||||
<h2 class="off-left">Item Index</h2>
|
||||
|
||||
|
||||
<div class="index-section methods">
|
||||
<h3>Methods</h3>
|
||||
|
||||
<ul class="index-list methods">
|
||||
|
||||
<li class="index-item method">
|
||||
<a href="#method_popMask">popMask</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item method">
|
||||
<a href="#method_pushMask">pushMask</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="methods" class="api-class-tabpanel">
|
||||
<h2 class="off-left">Methods</h2>
|
||||
|
||||
|
||||
<div id="method_popMask" class="method item">
|
||||
<h3 class="name"><code>popMask</code></h3>
|
||||
|
||||
|
||||
<div class="args">
|
||||
<span class="paren">(</span><ul class="args-list inline commas">
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>context</code>
|
||||
|
||||
</li>
|
||||
|
||||
</ul><span class="paren">)</span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_canvas_utils_CanvasMaskManager.js.html#l39"><code>src/pixi/renderers/canvas/utils/CanvasMaskManager.js:39</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Restores the current drawing context to the state it was before the mask was applied</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="params">
|
||||
<h4>Parameters:</h4>
|
||||
|
||||
<ul class="params-list">
|
||||
|
||||
<li class="param">
|
||||
|
||||
<code class="param-name">context</code>
|
||||
<span class="type">Context2D</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
<p>the 2d drawing method of the canvas</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="method_pushMask" class="method item">
|
||||
<h3 class="name"><code>pushMask</code></h3>
|
||||
|
||||
|
||||
<div class="args">
|
||||
<span class="paren">(</span><ul class="args-list inline commas">
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>maskData</code>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>context</code>
|
||||
|
||||
</li>
|
||||
|
||||
</ul><span class="paren">)</span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_canvas_utils_CanvasMaskManager.js.html#l16"><code>src/pixi/renderers/canvas/utils/CanvasMaskManager.js:16</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>This method adds it to the current stack of masks</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="params">
|
||||
<h4>Parameters:</h4>
|
||||
|
||||
<ul class="params-list">
|
||||
|
||||
<li class="param">
|
||||
|
||||
<code class="param-name">maskData</code>
|
||||
<span class="type">Object</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
<p>the maskData that will be pushed</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="param">
|
||||
|
||||
<code class="param-name">context</code>
|
||||
<span class="type">Context2D</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
<p>the 2d drawing method of the canvas</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</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>
|
||||
1162
docs/classes/CanvasTinter.html
Normal file
1162
docs/classes/CanvasTinter.html
Normal file
File diff suppressed because it is too large
Load diff
957
docs/classes/FilterTexture.html
Normal file
957
docs/classes/FilterTexture.html
Normal file
|
|
@ -0,0 +1,957 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>FilterTexture - pixi.js</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.9.1/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.9.1/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.5.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/AbstractFilter.html">AbstractFilter</a></li>
|
||||
|
||||
<li><a href="../classes/AjaxRequest.html">AjaxRequest</a></li>
|
||||
|
||||
<li><a href="../classes/AlphaMaskFilter.html">AlphaMaskFilter</a></li>
|
||||
|
||||
<li><a href="../classes/AssetLoader.html">AssetLoader</a></li>
|
||||
|
||||
<li><a href="../classes/AtlasLoader.html">AtlasLoader</a></li>
|
||||
|
||||
<li><a href="../classes/autoDetectRenderer.html">autoDetectRenderer</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/BlurFilter.html">BlurFilter</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasMaskManager.html">CanvasMaskManager</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasTinter.html">CanvasTinter</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/ColorMatrixFilter.html">ColorMatrixFilter</a></li>
|
||||
|
||||
<li><a href="../classes/ColorStepFilter.html">ColorStepFilter</a></li>
|
||||
|
||||
<li><a href="../classes/DisplacementFilter.html">DisplacementFilter</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/DotScreenFilter.html">DotScreenFilter</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/EventTarget.html">EventTarget</a></li>
|
||||
|
||||
<li><a href="../classes/FilterTexture.html">FilterTexture</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/GrayFilter.html">GrayFilter</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/InvertFilter.html">InvertFilter</a></li>
|
||||
|
||||
<li><a href="../classes/JsonLoader.html">JsonLoader</a></li>
|
||||
|
||||
<li><a href="../classes/MovieClip.html">MovieClip</a></li>
|
||||
|
||||
<li><a href="../classes/NormalMapFilter.html">NormalMapFilter</a></li>
|
||||
|
||||
<li><a href="../classes/PixelateFilter.html">PixelateFilter</a></li>
|
||||
|
||||
<li><a href="../classes/PixiFastShader.html">PixiFastShader</a></li>
|
||||
|
||||
<li><a href="../classes/PixiShader.html">PixiShader</a></li>
|
||||
|
||||
<li><a href="../classes/Point.html">Point</a></li>
|
||||
|
||||
<li><a href="../classes/Polygon.html">Polygon</a></li>
|
||||
|
||||
<li><a href="../classes/PolyK.html">PolyK</a></li>
|
||||
|
||||
<li><a href="../classes/PrimitiveShader.html">PrimitiveShader</a></li>
|
||||
|
||||
<li><a href="../classes/Rectangle.html">Rectangle</a></li>
|
||||
|
||||
<li><a href="../classes/Rope.html">Rope</a></li>
|
||||
|
||||
<li><a href="../classes/SepiaFilter.html">SepiaFilter</a></li>
|
||||
|
||||
<li><a href="../classes/Spine.html">Spine</a></li>
|
||||
|
||||
<li><a href="../classes/Sprite.html">Sprite</a></li>
|
||||
|
||||
<li><a href="../classes/SpriteBatch.html">SpriteBatch</a></li>
|
||||
|
||||
<li><a href="../classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
|
||||
|
||||
<li><a href="../classes/Stage.html">Stage</a></li>
|
||||
|
||||
<li><a href="../classes/Strip.html">Strip</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/TwistFilter.html">TwistFilter</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLFilterManager.html">WebGLFilterManager</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLGraphics.html">WebGLGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLMaskManager.html">WebGLMaskManager</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLRenderer.html">WebGLRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLShaderManager.html">WebGLShaderManager</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLSpriteBatch.html">WebGLSpriteBatch</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>FilterTexture Class</h1>
|
||||
<div class="box meta">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="foundat">
|
||||
Defined in: <a href="../files/src_pixi_renderers_webgl_utils_FilterTexture.js.html#l5"><code>src/pixi/renderers/webgl/utils/FilterTexture.js:5</code></a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
Module: <a href="../modules/PIXI.html">PIXI</a>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="box intro">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="constructor">
|
||||
<h2>Constructor</h2>
|
||||
<div id="method_FilterTexture" class="method item private">
|
||||
<h3 class="name"><code>FilterTexture</code></h3>
|
||||
|
||||
|
||||
<div class="args">
|
||||
<span class="paren">(</span><ul class="args-list inline commas">
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>gl</code>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>width</code>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>height</code>
|
||||
|
||||
</li>
|
||||
|
||||
</ul><span class="paren">)</span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="flag private">private</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_webgl_utils_FilterTexture.js.html#l5"><code>src/pixi/renderers/webgl/utils/FilterTexture.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">gl</code>
|
||||
<span class="type">WebGLContext</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
<p>the current WebGL drawing context</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="param">
|
||||
|
||||
<code class="param-name">width</code>
|
||||
<span class="type">Number</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
<p>the horizontal range of the filter</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="param">
|
||||
|
||||
<code class="param-name">height</code>
|
||||
<span class="type">Number</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
<p>the vertical range of the filter</p>
|
||||
|
||||
</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>
|
||||
|
||||
|
||||
<li class="api-class-tab methods"><a href="#methods">Methods</a></li>
|
||||
|
||||
|
||||
<li class="api-class-tab properties"><a href="#properties">Properties</a></li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<div>
|
||||
<div id="index" class="api-class-tabpanel index">
|
||||
<h2 class="off-left">Item Index</h2>
|
||||
|
||||
|
||||
<div class="index-section methods">
|
||||
<h3>Methods</h3>
|
||||
|
||||
<ul class="index-list methods">
|
||||
|
||||
<li class="index-item method">
|
||||
<a href="#method_clear">clear</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item method">
|
||||
<a href="#method_destroy">destroy</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item method">
|
||||
<a href="#method_init">init</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item method">
|
||||
<a href="#method_resize">resize</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="index-section properties">
|
||||
<h3>Properties</h3>
|
||||
|
||||
<ul class="index-list properties">
|
||||
|
||||
<li class="index-item property">
|
||||
<a href="#property_fragmentSrc - The fragment shader.">fragmentSrc - The fragment shader.</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property">
|
||||
<a href="#property_fragmentSrc - The fragment shader.">fragmentSrc - The fragment shader.</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property">
|
||||
<a href="#property_gl">gl</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property">
|
||||
<a href="#property_program - The WebGL program.">program - The WebGL program.</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="methods" class="api-class-tabpanel">
|
||||
<h2 class="off-left">Methods</h2>
|
||||
|
||||
|
||||
<div id="method_clear" class="method item">
|
||||
<h3 class="name"><code>clear</code></h3>
|
||||
|
||||
|
||||
<span class="paren">()</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_webgl_utils_FilterTexture.js.html#l39"><code>src/pixi/renderers/webgl/utils/FilterTexture.js:39</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Clears the filter texture</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="method_destroy" class="method item">
|
||||
<h3 class="name"><code>destroy</code></h3>
|
||||
|
||||
|
||||
<span class="paren">()</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_webgl_utils_FilterTexture.js.html#l72"><code>src/pixi/renderers/webgl/utils/FilterTexture.js:72</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Destroys the filter texture</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="method_init" class="method item">
|
||||
<h3 class="name"><code>init</code></h3>
|
||||
|
||||
|
||||
<span class="paren">()</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_webgl_shaders_StripShader.js.html#l52"><code>src/pixi/renderers/webgl/shaders/StripShader.js:52</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Initialises the shader</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="method_resize" class="method item">
|
||||
<h3 class="name"><code>resize</code></h3>
|
||||
|
||||
|
||||
<div class="args">
|
||||
<span class="paren">(</span><ul class="args-list inline commas">
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>width</code>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>height</code>
|
||||
|
||||
</li>
|
||||
|
||||
</ul><span class="paren">)</span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_webgl_utils_FilterTexture.js.html#l51"><code>src/pixi/renderers/webgl/utils/FilterTexture.js:51</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Resizes the texture to the specified width and height</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="params">
|
||||
<h4>Parameters:</h4>
|
||||
|
||||
<ul class="params-list">
|
||||
|
||||
<li class="param">
|
||||
|
||||
<code class="param-name">width</code>
|
||||
<span class="type">Number</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
<p>the new width of the texture</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="param">
|
||||
|
||||
<code class="param-name">height</code>
|
||||
<span class="type">Number</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
<p>the new height of the texture</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="properties" class="api-class-tabpanel">
|
||||
<h2 class="off-left">Properties</h2>
|
||||
|
||||
|
||||
<div id="property_fragmentSrc - The fragment shader." class="property item">
|
||||
<h3 class="name"><code>fragmentSrc - The fragment shader.</code></h3>
|
||||
<span class="type">Array</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_webgl_shaders_StripShader.js.html#l13"><code>src/pixi/renderers/webgl/shaders/StripShader.js:13</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="property_fragmentSrc - The fragment shader." class="property item">
|
||||
<h3 class="name"><code>fragmentSrc - The fragment shader.</code></h3>
|
||||
<span class="type">Array</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_webgl_shaders_StripShader.js.html#l29"><code>src/pixi/renderers/webgl/shaders/StripShader.js:29</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="property_gl" class="property item">
|
||||
<h3 class="name"><code>gl</code></h3>
|
||||
<span class="type">WebGLContext</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_webgl_utils_FilterTexture.js.html#l15"><code>src/pixi/renderers/webgl/utils/FilterTexture.js:15</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="property_program - The WebGL program." class="property item">
|
||||
<h3 class="name"><code>program - The WebGL program.</code></h3>
|
||||
<span class="type">Any</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_webgl_shaders_StripShader.js.html#l8"><code>src/pixi/renderers/webgl/shaders/StripShader.js:8</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</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>
|
||||
640
docs/classes/InteractionData.html
Normal file
640
docs/classes/InteractionData.html
Normal file
|
|
@ -0,0 +1,640 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>InteractionData - pixi.js</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.9.1/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.9.1/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.5.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/AbstractFilter.html">AbstractFilter</a></li>
|
||||
|
||||
<li><a href="../classes/AjaxRequest.html">AjaxRequest</a></li>
|
||||
|
||||
<li><a href="../classes/AlphaMaskFilter.html">AlphaMaskFilter</a></li>
|
||||
|
||||
<li><a href="../classes/AssetLoader.html">AssetLoader</a></li>
|
||||
|
||||
<li><a href="../classes/AtlasLoader.html">AtlasLoader</a></li>
|
||||
|
||||
<li><a href="../classes/autoDetectRenderer.html">autoDetectRenderer</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/BlurFilter.html">BlurFilter</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasMaskManager.html">CanvasMaskManager</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasTinter.html">CanvasTinter</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/ColorMatrixFilter.html">ColorMatrixFilter</a></li>
|
||||
|
||||
<li><a href="../classes/ColorStepFilter.html">ColorStepFilter</a></li>
|
||||
|
||||
<li><a href="../classes/DisplacementFilter.html">DisplacementFilter</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/DotScreenFilter.html">DotScreenFilter</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/EventTarget.html">EventTarget</a></li>
|
||||
|
||||
<li><a href="../classes/FilterTexture.html">FilterTexture</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/GrayFilter.html">GrayFilter</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/InvertFilter.html">InvertFilter</a></li>
|
||||
|
||||
<li><a href="../classes/JsonLoader.html">JsonLoader</a></li>
|
||||
|
||||
<li><a href="../classes/MovieClip.html">MovieClip</a></li>
|
||||
|
||||
<li><a href="../classes/NormalMapFilter.html">NormalMapFilter</a></li>
|
||||
|
||||
<li><a href="../classes/PixelateFilter.html">PixelateFilter</a></li>
|
||||
|
||||
<li><a href="../classes/PixiFastShader.html">PixiFastShader</a></li>
|
||||
|
||||
<li><a href="../classes/PixiShader.html">PixiShader</a></li>
|
||||
|
||||
<li><a href="../classes/Point.html">Point</a></li>
|
||||
|
||||
<li><a href="../classes/Polygon.html">Polygon</a></li>
|
||||
|
||||
<li><a href="../classes/PolyK.html">PolyK</a></li>
|
||||
|
||||
<li><a href="../classes/PrimitiveShader.html">PrimitiveShader</a></li>
|
||||
|
||||
<li><a href="../classes/Rectangle.html">Rectangle</a></li>
|
||||
|
||||
<li><a href="../classes/Rope.html">Rope</a></li>
|
||||
|
||||
<li><a href="../classes/SepiaFilter.html">SepiaFilter</a></li>
|
||||
|
||||
<li><a href="../classes/Spine.html">Spine</a></li>
|
||||
|
||||
<li><a href="../classes/Sprite.html">Sprite</a></li>
|
||||
|
||||
<li><a href="../classes/SpriteBatch.html">SpriteBatch</a></li>
|
||||
|
||||
<li><a href="../classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
|
||||
|
||||
<li><a href="../classes/Stage.html">Stage</a></li>
|
||||
|
||||
<li><a href="../classes/Strip.html">Strip</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/TwistFilter.html">TwistFilter</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLFilterManager.html">WebGLFilterManager</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLGraphics.html">WebGLGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLMaskManager.html">WebGLMaskManager</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLRenderer.html">WebGLRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLShaderManager.html">WebGLShaderManager</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLSpriteBatch.html">WebGLSpriteBatch</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>InteractionData Class</h1>
|
||||
<div class="box meta">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="foundat">
|
||||
Defined in: <a href="../files/src_pixi_InteractionData.js.html#l5"><code>src/pixi/InteractionData.js:5</code></a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
Module: <a href="../modules/PIXI.html">PIXI</a>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="box intro">
|
||||
<p>Holds all information related to an Interaction event</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="constructor">
|
||||
<h2>Constructor</h2>
|
||||
<div id="method_InteractionData" class="method item">
|
||||
<h3 class="name"><code>InteractionData</code></h3>
|
||||
|
||||
|
||||
<span class="paren">()</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_InteractionData.js.html#l5"><code>src/pixi/InteractionData.js:5</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
|
||||
</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>
|
||||
|
||||
|
||||
<li class="api-class-tab methods"><a href="#methods">Methods</a></li>
|
||||
|
||||
|
||||
<li class="api-class-tab properties"><a href="#properties">Properties</a></li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<div>
|
||||
<div id="index" class="api-class-tabpanel index">
|
||||
<h2 class="off-left">Item Index</h2>
|
||||
|
||||
|
||||
<div class="index-section methods">
|
||||
<h3>Methods</h3>
|
||||
|
||||
<ul class="index-list methods">
|
||||
|
||||
<li class="index-item method">
|
||||
<a href="#method_getLocalPosition">getLocalPosition</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="index-section properties">
|
||||
<h3>Properties</h3>
|
||||
|
||||
<ul class="index-list properties">
|
||||
|
||||
<li class="index-item property">
|
||||
<a href="#property_global">global</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property">
|
||||
<a href="#property_originalEvent">originalEvent</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property">
|
||||
<a href="#property_target">target</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="methods" class="api-class-tabpanel">
|
||||
<h2 class="off-left">Methods</h2>
|
||||
|
||||
|
||||
<div id="method_getLocalPosition" class="method item">
|
||||
<h3 class="name"><code>getLocalPosition</code></h3>
|
||||
|
||||
|
||||
<div class="args">
|
||||
<span class="paren">(</span><ul class="args-list inline commas">
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>displayObject</code>
|
||||
|
||||
</li>
|
||||
|
||||
</ul><span class="paren">)</span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<span class="returns-inline">
|
||||
<span class="type"><a href="../classes/Point.html" class="crosslink">Point</a></span>
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_InteractionData.js.html#l41"><code>src/pixi/InteractionData.js:41</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>This will return the local coordinates of the specified displayObject for this InteractionData</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="params">
|
||||
<h4>Parameters:</h4>
|
||||
|
||||
<ul class="params-list">
|
||||
|
||||
<li class="param">
|
||||
|
||||
<code class="param-name">displayObject</code>
|
||||
<span class="type"><a href="../classes/DisplayObject.html" class="crosslink">DisplayObject</a></span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
<p>The DisplayObject that you would like the local coords off</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="returns">
|
||||
<h4>Returns:</h4>
|
||||
|
||||
<div class="returns-description">
|
||||
|
||||
|
||||
<span class="type"><a href="../classes/Point.html" class="crosslink">Point</a></span>:
|
||||
|
||||
<p>A point containing the coordinates of the InteractionData position relative to the DisplayObject</p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="properties" class="api-class-tabpanel">
|
||||
<h2 class="off-left">Properties</h2>
|
||||
|
||||
|
||||
<div id="property_global" class="property item">
|
||||
<h3 class="name"><code>global</code></h3>
|
||||
<span class="type"><a href="../classes/Point.html" class="crosslink">Point</a></span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_InteractionData.js.html#l13"><code>src/pixi/InteractionData.js:13</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>This point stores the global coords of where the touch/mouse event happened</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="property_originalEvent" class="property item">
|
||||
<h3 class="name"><code>originalEvent</code></h3>
|
||||
<span class="type">Event</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_InteractionData.js.html#l32"><code>src/pixi/InteractionData.js:32</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>When passed to an event handler, this will be the original DOM Event that was captured</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="property_target" class="property item">
|
||||
<h3 class="name"><code>target</code></h3>
|
||||
<span class="type"><a href="../classes/Sprite.html" class="crosslink">Sprite</a></span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_InteractionData.js.html#l24"><code>src/pixi/InteractionData.js:24</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>The target Sprite that was interacted with</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</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>
|
||||
2065
docs/classes/InteractionManager.html
Normal file
2065
docs/classes/InteractionManager.html
Normal file
File diff suppressed because it is too large
Load diff
455
docs/classes/NormalMapFilter.html
Normal file
455
docs/classes/NormalMapFilter.html
Normal file
|
|
@ -0,0 +1,455 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>NormalMapFilter - pixi.js</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.9.1/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.9.1/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.5.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/AbstractFilter.html">AbstractFilter</a></li>
|
||||
|
||||
<li><a href="../classes/AjaxRequest.html">AjaxRequest</a></li>
|
||||
|
||||
<li><a href="../classes/AlphaMaskFilter.html">AlphaMaskFilter</a></li>
|
||||
|
||||
<li><a href="../classes/AssetLoader.html">AssetLoader</a></li>
|
||||
|
||||
<li><a href="../classes/AtlasLoader.html">AtlasLoader</a></li>
|
||||
|
||||
<li><a href="../classes/autoDetectRenderer.html">autoDetectRenderer</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/BlurFilter.html">BlurFilter</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasMaskManager.html">CanvasMaskManager</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasTinter.html">CanvasTinter</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/ColorMatrixFilter.html">ColorMatrixFilter</a></li>
|
||||
|
||||
<li><a href="../classes/ColorStepFilter.html">ColorStepFilter</a></li>
|
||||
|
||||
<li><a href="../classes/DisplacementFilter.html">DisplacementFilter</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/DotScreenFilter.html">DotScreenFilter</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/EventTarget.html">EventTarget</a></li>
|
||||
|
||||
<li><a href="../classes/FilterTexture.html">FilterTexture</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/GrayFilter.html">GrayFilter</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/InvertFilter.html">InvertFilter</a></li>
|
||||
|
||||
<li><a href="../classes/JsonLoader.html">JsonLoader</a></li>
|
||||
|
||||
<li><a href="../classes/MovieClip.html">MovieClip</a></li>
|
||||
|
||||
<li><a href="../classes/NormalMapFilter.html">NormalMapFilter</a></li>
|
||||
|
||||
<li><a href="../classes/PixelateFilter.html">PixelateFilter</a></li>
|
||||
|
||||
<li><a href="../classes/PixiFastShader.html">PixiFastShader</a></li>
|
||||
|
||||
<li><a href="../classes/PixiShader.html">PixiShader</a></li>
|
||||
|
||||
<li><a href="../classes/Point.html">Point</a></li>
|
||||
|
||||
<li><a href="../classes/Polygon.html">Polygon</a></li>
|
||||
|
||||
<li><a href="../classes/PolyK.html">PolyK</a></li>
|
||||
|
||||
<li><a href="../classes/PrimitiveShader.html">PrimitiveShader</a></li>
|
||||
|
||||
<li><a href="../classes/Rectangle.html">Rectangle</a></li>
|
||||
|
||||
<li><a href="../classes/Rope.html">Rope</a></li>
|
||||
|
||||
<li><a href="../classes/SepiaFilter.html">SepiaFilter</a></li>
|
||||
|
||||
<li><a href="../classes/Spine.html">Spine</a></li>
|
||||
|
||||
<li><a href="../classes/Sprite.html">Sprite</a></li>
|
||||
|
||||
<li><a href="../classes/SpriteBatch.html">SpriteBatch</a></li>
|
||||
|
||||
<li><a href="../classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
|
||||
|
||||
<li><a href="../classes/Stage.html">Stage</a></li>
|
||||
|
||||
<li><a href="../classes/Strip.html">Strip</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/TwistFilter.html">TwistFilter</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLFilterManager.html">WebGLFilterManager</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLGraphics.html">WebGLGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLMaskManager.html">WebGLMaskManager</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLRenderer.html">WebGLRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLShaderManager.html">WebGLShaderManager</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLSpriteBatch.html">WebGLSpriteBatch</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>NormalMapFilter Class</h1>
|
||||
<div class="box meta">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="foundat">
|
||||
Defined in: <a href="../files/src_pixi_filters_NormalMapFilter.js.html#l6"><code>src/pixi/filters/NormalMapFilter.js:6</code></a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
Module: <a href="../modules/PIXI.html">PIXI</a>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="box intro">
|
||||
<p>The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object.
|
||||
You can use this filter to apply all manor of crazy warping effects
|
||||
Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="classdocs" class="tabview">
|
||||
<ul class="api-class-tabs">
|
||||
<li class="api-class-tab index"><a href="#index">Index</a></li>
|
||||
|
||||
|
||||
|
||||
<li class="api-class-tab properties"><a href="#properties">Properties</a></li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<div>
|
||||
<div id="index" class="api-class-tabpanel index">
|
||||
<h2 class="off-left">Item Index</h2>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="index-section properties">
|
||||
<h3>Properties</h3>
|
||||
|
||||
<ul class="index-list properties">
|
||||
|
||||
<li class="index-item property">
|
||||
<a href="#property_map">map</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property">
|
||||
<a href="#property_offset">offset</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property">
|
||||
<a href="#property_scale">scale</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="properties" class="api-class-tabpanel">
|
||||
<h2 class="off-left">Properties</h2>
|
||||
|
||||
|
||||
<div id="property_map" class="property item">
|
||||
<h3 class="name"><code>map</code></h3>
|
||||
<span class="type"><a href="../classes/Texture.html" class="crosslink">Texture</a></span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_filters_NormalMapFilter.js.html#l181"><code>src/pixi/filters/NormalMapFilter.js:181</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>The texture used for the displacemtent map * must be power of 2 texture at the moment</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="property_offset" class="property item">
|
||||
<h3 class="name"><code>offset</code></h3>
|
||||
<span class="type"><a href="../classes/Point.html" class="crosslink">Point</a></span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_filters_NormalMapFilter.js.html#l211"><code>src/pixi/filters/NormalMapFilter.js:211</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>The offset used to move the displacement map.</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="property_scale" class="property item">
|
||||
<h3 class="name"><code>scale</code></h3>
|
||||
<span class="type"><a href="../classes/Point.html" class="crosslink">Point</a></span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_filters_NormalMapFilter.js.html#l196"><code>src/pixi/filters/NormalMapFilter.js:196</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>The multiplier used to scale the displacement result from the map calculation.</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</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>
|
||||
782
docs/classes/PixiFastShader.html
Normal file
782
docs/classes/PixiFastShader.html
Normal file
|
|
@ -0,0 +1,782 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>PixiFastShader - pixi.js</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.9.1/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.9.1/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.5.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/AbstractFilter.html">AbstractFilter</a></li>
|
||||
|
||||
<li><a href="../classes/AjaxRequest.html">AjaxRequest</a></li>
|
||||
|
||||
<li><a href="../classes/AlphaMaskFilter.html">AlphaMaskFilter</a></li>
|
||||
|
||||
<li><a href="../classes/AssetLoader.html">AssetLoader</a></li>
|
||||
|
||||
<li><a href="../classes/AtlasLoader.html">AtlasLoader</a></li>
|
||||
|
||||
<li><a href="../classes/autoDetectRenderer.html">autoDetectRenderer</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/BlurFilter.html">BlurFilter</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasMaskManager.html">CanvasMaskManager</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasTinter.html">CanvasTinter</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/ColorMatrixFilter.html">ColorMatrixFilter</a></li>
|
||||
|
||||
<li><a href="../classes/ColorStepFilter.html">ColorStepFilter</a></li>
|
||||
|
||||
<li><a href="../classes/DisplacementFilter.html">DisplacementFilter</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/DotScreenFilter.html">DotScreenFilter</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/EventTarget.html">EventTarget</a></li>
|
||||
|
||||
<li><a href="../classes/FilterTexture.html">FilterTexture</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/GrayFilter.html">GrayFilter</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/InvertFilter.html">InvertFilter</a></li>
|
||||
|
||||
<li><a href="../classes/JsonLoader.html">JsonLoader</a></li>
|
||||
|
||||
<li><a href="../classes/MovieClip.html">MovieClip</a></li>
|
||||
|
||||
<li><a href="../classes/NormalMapFilter.html">NormalMapFilter</a></li>
|
||||
|
||||
<li><a href="../classes/PixelateFilter.html">PixelateFilter</a></li>
|
||||
|
||||
<li><a href="../classes/PixiFastShader.html">PixiFastShader</a></li>
|
||||
|
||||
<li><a href="../classes/PixiShader.html">PixiShader</a></li>
|
||||
|
||||
<li><a href="../classes/Point.html">Point</a></li>
|
||||
|
||||
<li><a href="../classes/Polygon.html">Polygon</a></li>
|
||||
|
||||
<li><a href="../classes/PolyK.html">PolyK</a></li>
|
||||
|
||||
<li><a href="../classes/PrimitiveShader.html">PrimitiveShader</a></li>
|
||||
|
||||
<li><a href="../classes/Rectangle.html">Rectangle</a></li>
|
||||
|
||||
<li><a href="../classes/Rope.html">Rope</a></li>
|
||||
|
||||
<li><a href="../classes/SepiaFilter.html">SepiaFilter</a></li>
|
||||
|
||||
<li><a href="../classes/Spine.html">Spine</a></li>
|
||||
|
||||
<li><a href="../classes/Sprite.html">Sprite</a></li>
|
||||
|
||||
<li><a href="../classes/SpriteBatch.html">SpriteBatch</a></li>
|
||||
|
||||
<li><a href="../classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
|
||||
|
||||
<li><a href="../classes/Stage.html">Stage</a></li>
|
||||
|
||||
<li><a href="../classes/Strip.html">Strip</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/TwistFilter.html">TwistFilter</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLFilterManager.html">WebGLFilterManager</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLGraphics.html">WebGLGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLMaskManager.html">WebGLMaskManager</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLRenderer.html">WebGLRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLShaderManager.html">WebGLShaderManager</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLSpriteBatch.html">WebGLSpriteBatch</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>PixiFastShader Class</h1>
|
||||
<div class="box meta">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="foundat">
|
||||
Defined in: <a href="../files/src_pixi_renderers_webgl_shaders_PixiFastShader.js.html#l6"><code>src/pixi/renderers/webgl/shaders/PixiFastShader.js:6</code></a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
Module: <a href="../modules/PIXI.html">PIXI</a>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="box intro">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="constructor">
|
||||
<h2>Constructor</h2>
|
||||
<div id="method_PixiFastShader" class="method item">
|
||||
<h3 class="name"><code>PixiFastShader</code></h3>
|
||||
|
||||
|
||||
<div class="args">
|
||||
<span class="paren">(</span><ul class="args-list inline commas">
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>gl</code>
|
||||
|
||||
</li>
|
||||
|
||||
</ul><span class="paren">)</span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_webgl_shaders_PixiFastShader.js.html#l6"><code>src/pixi/renderers/webgl/shaders/PixiFastShader.js:6</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">gl</code>
|
||||
<span class="type">WebGLContext</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
<p>the current WebGL drawing context</p>
|
||||
|
||||
</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>
|
||||
|
||||
|
||||
<li class="api-class-tab methods"><a href="#methods">Methods</a></li>
|
||||
|
||||
|
||||
<li class="api-class-tab properties"><a href="#properties">Properties</a></li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<div>
|
||||
<div id="index" class="api-class-tabpanel index">
|
||||
<h2 class="off-left">Item Index</h2>
|
||||
|
||||
|
||||
<div class="index-section methods">
|
||||
<h3>Methods</h3>
|
||||
|
||||
<ul class="index-list methods">
|
||||
|
||||
<li class="index-item method">
|
||||
<a href="#method_destroy">destroy</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item method">
|
||||
<a href="#method_init">init</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="index-section properties">
|
||||
<h3>Properties</h3>
|
||||
|
||||
<ul class="index-list properties">
|
||||
|
||||
<li class="index-item property">
|
||||
<a href="#property_fragmentSrc - The fragment shader.">fragmentSrc - The fragment shader.</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property">
|
||||
<a href="#property_gl">gl</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property">
|
||||
<a href="#property_program - The WebGL program.">program - The WebGL program.</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property">
|
||||
<a href="#property_textureCount - A local texture counter for multi-texture shaders.">textureCount - A local texture counter for multi-texture shaders.</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property">
|
||||
<a href="#property_vertexSrc - The vertex shader">vertexSrc - The vertex shader</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="methods" class="api-class-tabpanel">
|
||||
<h2 class="off-left">Methods</h2>
|
||||
|
||||
|
||||
<div id="method_destroy" class="method item">
|
||||
<h3 class="name"><code>destroy</code></h3>
|
||||
|
||||
|
||||
<span class="paren">()</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_webgl_shaders_PixiFastShader.js.html#l134"><code>src/pixi/renderers/webgl/shaders/PixiFastShader.js:134</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Destroys the shader</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="method_init" class="method item">
|
||||
<h3 class="name"><code>init</code></h3>
|
||||
|
||||
|
||||
<span class="paren">()</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_webgl_shaders_PixiFastShader.js.html#l81"><code>src/pixi/renderers/webgl/shaders/PixiFastShader.js:81</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Initialises the shader</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="properties" class="api-class-tabpanel">
|
||||
<h2 class="off-left">Properties</h2>
|
||||
|
||||
|
||||
<div id="property_fragmentSrc - The fragment shader." class="property item">
|
||||
<h3 class="name"><code>fragmentSrc - The fragment shader.</code></h3>
|
||||
<span class="type">Array</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_webgl_shaders_PixiFastShader.js.html#l25"><code>src/pixi/renderers/webgl/shaders/PixiFastShader.js:25</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="property_gl" class="property item">
|
||||
<h3 class="name"><code>gl</code></h3>
|
||||
<span class="type">WebGLContext</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_webgl_shaders_PixiFastShader.js.html#l14"><code>src/pixi/renderers/webgl/shaders/PixiFastShader.js:14</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="property_program - The WebGL program." class="property item">
|
||||
<h3 class="name"><code>program - The WebGL program.</code></h3>
|
||||
<span class="type">Any</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_webgl_shaders_PixiFastShader.js.html#l20"><code>src/pixi/renderers/webgl/shaders/PixiFastShader.js:20</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="property_textureCount - A local texture counter for multi-texture shaders." class="property item">
|
||||
<h3 class="name"><code>textureCount - A local texture counter for multi-texture shaders.</code></h3>
|
||||
<span class="type">Number</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_webgl_shaders_PixiFastShader.js.html#l72"><code>src/pixi/renderers/webgl/shaders/PixiFastShader.js:72</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="property_vertexSrc - The vertex shader" class="property item">
|
||||
<h3 class="name"><code>vertexSrc - The vertex shader</code></h3>
|
||||
<span class="type">Array</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_webgl_shaders_PixiFastShader.js.html#l38"><code>src/pixi/renderers/webgl/shaders/PixiFastShader.js:38</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</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>
|
||||
936
docs/classes/PixiShader.html
Normal file
936
docs/classes/PixiShader.html
Normal file
|
|
@ -0,0 +1,936 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>PixiShader - pixi.js</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.9.1/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.9.1/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.5.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/AbstractFilter.html">AbstractFilter</a></li>
|
||||
|
||||
<li><a href="../classes/AjaxRequest.html">AjaxRequest</a></li>
|
||||
|
||||
<li><a href="../classes/AlphaMaskFilter.html">AlphaMaskFilter</a></li>
|
||||
|
||||
<li><a href="../classes/AssetLoader.html">AssetLoader</a></li>
|
||||
|
||||
<li><a href="../classes/AtlasLoader.html">AtlasLoader</a></li>
|
||||
|
||||
<li><a href="../classes/autoDetectRenderer.html">autoDetectRenderer</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/BlurFilter.html">BlurFilter</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasMaskManager.html">CanvasMaskManager</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasTinter.html">CanvasTinter</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/ColorMatrixFilter.html">ColorMatrixFilter</a></li>
|
||||
|
||||
<li><a href="../classes/ColorStepFilter.html">ColorStepFilter</a></li>
|
||||
|
||||
<li><a href="../classes/DisplacementFilter.html">DisplacementFilter</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/DotScreenFilter.html">DotScreenFilter</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/EventTarget.html">EventTarget</a></li>
|
||||
|
||||
<li><a href="../classes/FilterTexture.html">FilterTexture</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/GrayFilter.html">GrayFilter</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/InvertFilter.html">InvertFilter</a></li>
|
||||
|
||||
<li><a href="../classes/JsonLoader.html">JsonLoader</a></li>
|
||||
|
||||
<li><a href="../classes/MovieClip.html">MovieClip</a></li>
|
||||
|
||||
<li><a href="../classes/NormalMapFilter.html">NormalMapFilter</a></li>
|
||||
|
||||
<li><a href="../classes/PixelateFilter.html">PixelateFilter</a></li>
|
||||
|
||||
<li><a href="../classes/PixiFastShader.html">PixiFastShader</a></li>
|
||||
|
||||
<li><a href="../classes/PixiShader.html">PixiShader</a></li>
|
||||
|
||||
<li><a href="../classes/Point.html">Point</a></li>
|
||||
|
||||
<li><a href="../classes/Polygon.html">Polygon</a></li>
|
||||
|
||||
<li><a href="../classes/PolyK.html">PolyK</a></li>
|
||||
|
||||
<li><a href="../classes/PrimitiveShader.html">PrimitiveShader</a></li>
|
||||
|
||||
<li><a href="../classes/Rectangle.html">Rectangle</a></li>
|
||||
|
||||
<li><a href="../classes/Rope.html">Rope</a></li>
|
||||
|
||||
<li><a href="../classes/SepiaFilter.html">SepiaFilter</a></li>
|
||||
|
||||
<li><a href="../classes/Spine.html">Spine</a></li>
|
||||
|
||||
<li><a href="../classes/Sprite.html">Sprite</a></li>
|
||||
|
||||
<li><a href="../classes/SpriteBatch.html">SpriteBatch</a></li>
|
||||
|
||||
<li><a href="../classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
|
||||
|
||||
<li><a href="../classes/Stage.html">Stage</a></li>
|
||||
|
||||
<li><a href="../classes/Strip.html">Strip</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/TwistFilter.html">TwistFilter</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLFilterManager.html">WebGLFilterManager</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLGraphics.html">WebGLGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLMaskManager.html">WebGLMaskManager</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLRenderer.html">WebGLRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLShaderManager.html">WebGLShaderManager</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLSpriteBatch.html">WebGLSpriteBatch</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>PixiShader Class</h1>
|
||||
<div class="box meta">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="foundat">
|
||||
Defined in: <a href="../files/src_pixi_renderers_webgl_shaders_PixiShader.js.html#l6"><code>src/pixi/renderers/webgl/shaders/PixiShader.js:6</code></a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
Module: <a href="../modules/PIXI.html">PIXI</a>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="box intro">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="constructor">
|
||||
<h2>Constructor</h2>
|
||||
<div id="method_PixiShader" class="method item">
|
||||
<h3 class="name"><code>PixiShader</code></h3>
|
||||
|
||||
|
||||
<span class="paren">()</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_webgl_shaders_PixiShader.js.html#l6"><code>src/pixi/renderers/webgl/shaders/PixiShader.js:6</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
|
||||
</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>
|
||||
|
||||
|
||||
<li class="api-class-tab methods"><a href="#methods">Methods</a></li>
|
||||
|
||||
|
||||
<li class="api-class-tab properties"><a href="#properties">Properties</a></li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<div>
|
||||
<div id="index" class="api-class-tabpanel index">
|
||||
<h2 class="off-left">Item Index</h2>
|
||||
|
||||
|
||||
<div class="index-section methods">
|
||||
<h3>Methods</h3>
|
||||
|
||||
<ul class="index-list methods">
|
||||
|
||||
<li class="index-item method">
|
||||
<a href="#method_destroy">destroy</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item method">
|
||||
<a href="#method_init">init</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item method">
|
||||
<a href="#method_initSampler2D">initSampler2D</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item method">
|
||||
<a href="#method_initUniforms">initUniforms</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item method">
|
||||
<a href="#method_syncUniforms">syncUniforms</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="index-section properties">
|
||||
<h3>Properties</h3>
|
||||
|
||||
<ul class="index-list properties">
|
||||
|
||||
<li class="index-item property">
|
||||
<a href="#property_defaultVertexSrc">defaultVertexSrc</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property">
|
||||
<a href="#property_fragmentSrc - The fragment shader.">fragmentSrc - The fragment shader.</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property">
|
||||
<a href="#property_gl">gl</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property">
|
||||
<a href="#property_program - The WebGL program.">program - The WebGL program.</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property">
|
||||
<a href="#property_textureCount - A local texture counter for multi-texture shaders.">textureCount - A local texture counter for multi-texture shaders.</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="methods" class="api-class-tabpanel">
|
||||
<h2 class="off-left">Methods</h2>
|
||||
|
||||
|
||||
<div id="method_destroy" class="method item">
|
||||
<h3 class="name"><code>destroy</code></h3>
|
||||
|
||||
|
||||
<span class="paren">()</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_webgl_shaders_PixiShader.js.html#l306"><code>src/pixi/renderers/webgl/shaders/PixiShader.js:306</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Destroys the shader</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="method_init" class="method item">
|
||||
<h3 class="name"><code>init</code></h3>
|
||||
|
||||
|
||||
<span class="paren">()</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_webgl_shaders_PixiShader.js.html#l47"><code>src/pixi/renderers/webgl/shaders/PixiShader.js:47</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Initialises the shader</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="method_initSampler2D" class="method item">
|
||||
<h3 class="name"><code>initSampler2D</code></h3>
|
||||
|
||||
|
||||
<span class="paren">()</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_webgl_shaders_PixiShader.js.html#l173"><code>src/pixi/renderers/webgl/shaders/PixiShader.js:173</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded)</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="method_initUniforms" class="method item">
|
||||
<h3 class="name"><code>initUniforms</code></h3>
|
||||
|
||||
|
||||
<span class="paren">()</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_webgl_shaders_PixiShader.js.html#l100"><code>src/pixi/renderers/webgl/shaders/PixiShader.js:100</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Initialises the shader uniform values.
|
||||
Uniforms are specified in the GLSL_ES Specification: <a href="http://www.khronos.org/registry/webgl/specs/latest/1.0/">http://www.khronos.org/registry/webgl/specs/latest/1.0/</a>
|
||||
<a href="http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf">http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf</a></p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="method_syncUniforms" class="method item">
|
||||
<h3 class="name"><code>syncUniforms</code></h3>
|
||||
|
||||
|
||||
<span class="paren">()</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_webgl_shaders_PixiShader.js.html#l248"><code>src/pixi/renderers/webgl/shaders/PixiShader.js:248</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Updates the shader uniform values.</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="properties" class="api-class-tabpanel">
|
||||
<h2 class="off-left">Properties</h2>
|
||||
|
||||
|
||||
<div id="property_defaultVertexSrc" class="property item">
|
||||
<h3 class="name"><code>defaultVertexSrc</code></h3>
|
||||
<span class="type">String</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_webgl_shaders_PixiShader.js.html#l320"><code>src/pixi/renderers/webgl/shaders/PixiShader.js:320</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="property_fragmentSrc - The fragment shader." class="property item">
|
||||
<h3 class="name"><code>fragmentSrc - The fragment shader.</code></h3>
|
||||
<span class="type">Array</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_webgl_shaders_PixiShader.js.html#l23"><code>src/pixi/renderers/webgl/shaders/PixiShader.js:23</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="property_gl" class="property item">
|
||||
<h3 class="name"><code>gl</code></h3>
|
||||
<span class="type">WebGLContext</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_webgl_shaders_PixiShader.js.html#l12"><code>src/pixi/renderers/webgl/shaders/PixiShader.js:12</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="property_program - The WebGL program." class="property item">
|
||||
<h3 class="name"><code>program - The WebGL program.</code></h3>
|
||||
<span class="type">Any</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_webgl_shaders_PixiShader.js.html#l18"><code>src/pixi/renderers/webgl/shaders/PixiShader.js:18</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="property_textureCount - A local texture counter for multi-texture shaders." class="property item">
|
||||
<h3 class="name"><code>textureCount - A local texture counter for multi-texture shaders.</code></h3>
|
||||
<span class="type">Number</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_webgl_shaders_PixiShader.js.html#l37"><code>src/pixi/renderers/webgl/shaders/PixiShader.js:37</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</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>
|
||||
677
docs/classes/PolyK.html
Normal file
677
docs/classes/PolyK.html
Normal file
|
|
@ -0,0 +1,677 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>PolyK - pixi.js</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.9.1/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.9.1/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.5.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/AbstractFilter.html">AbstractFilter</a></li>
|
||||
|
||||
<li><a href="../classes/AjaxRequest.html">AjaxRequest</a></li>
|
||||
|
||||
<li><a href="../classes/AlphaMaskFilter.html">AlphaMaskFilter</a></li>
|
||||
|
||||
<li><a href="../classes/AssetLoader.html">AssetLoader</a></li>
|
||||
|
||||
<li><a href="../classes/AtlasLoader.html">AtlasLoader</a></li>
|
||||
|
||||
<li><a href="../classes/autoDetectRenderer.html">autoDetectRenderer</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/BlurFilter.html">BlurFilter</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasMaskManager.html">CanvasMaskManager</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasTinter.html">CanvasTinter</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/ColorMatrixFilter.html">ColorMatrixFilter</a></li>
|
||||
|
||||
<li><a href="../classes/ColorStepFilter.html">ColorStepFilter</a></li>
|
||||
|
||||
<li><a href="../classes/DisplacementFilter.html">DisplacementFilter</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/DotScreenFilter.html">DotScreenFilter</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/EventTarget.html">EventTarget</a></li>
|
||||
|
||||
<li><a href="../classes/FilterTexture.html">FilterTexture</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/GrayFilter.html">GrayFilter</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/InvertFilter.html">InvertFilter</a></li>
|
||||
|
||||
<li><a href="../classes/JsonLoader.html">JsonLoader</a></li>
|
||||
|
||||
<li><a href="../classes/MovieClip.html">MovieClip</a></li>
|
||||
|
||||
<li><a href="../classes/NormalMapFilter.html">NormalMapFilter</a></li>
|
||||
|
||||
<li><a href="../classes/PixelateFilter.html">PixelateFilter</a></li>
|
||||
|
||||
<li><a href="../classes/PixiFastShader.html">PixiFastShader</a></li>
|
||||
|
||||
<li><a href="../classes/PixiShader.html">PixiShader</a></li>
|
||||
|
||||
<li><a href="../classes/Point.html">Point</a></li>
|
||||
|
||||
<li><a href="../classes/Polygon.html">Polygon</a></li>
|
||||
|
||||
<li><a href="../classes/PolyK.html">PolyK</a></li>
|
||||
|
||||
<li><a href="../classes/PrimitiveShader.html">PrimitiveShader</a></li>
|
||||
|
||||
<li><a href="../classes/Rectangle.html">Rectangle</a></li>
|
||||
|
||||
<li><a href="../classes/Rope.html">Rope</a></li>
|
||||
|
||||
<li><a href="../classes/SepiaFilter.html">SepiaFilter</a></li>
|
||||
|
||||
<li><a href="../classes/Spine.html">Spine</a></li>
|
||||
|
||||
<li><a href="../classes/Sprite.html">Sprite</a></li>
|
||||
|
||||
<li><a href="../classes/SpriteBatch.html">SpriteBatch</a></li>
|
||||
|
||||
<li><a href="../classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
|
||||
|
||||
<li><a href="../classes/Stage.html">Stage</a></li>
|
||||
|
||||
<li><a href="../classes/Strip.html">Strip</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/TwistFilter.html">TwistFilter</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLFilterManager.html">WebGLFilterManager</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLGraphics.html">WebGLGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLMaskManager.html">WebGLMaskManager</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLRenderer.html">WebGLRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLShaderManager.html">WebGLShaderManager</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLSpriteBatch.html">WebGLSpriteBatch</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>PolyK Class</h1>
|
||||
<div class="box meta">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="foundat">
|
||||
Defined in: <a href="../files/src_pixi_utils_Polyk.js.html#l34"><code>src/pixi/utils/Polyk.js:34</code></a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
Module: <a href="../modules/PIXI.html">PIXI</a>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="box intro">
|
||||
<p>Based on the Polyk library <a href="http://polyk.ivank.net">http://polyk.ivank.net</a> released under MIT licence.
|
||||
This is an amazing lib!
|
||||
slightly modified by Mat Groves (matgroves.com);</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="classdocs" class="tabview">
|
||||
<ul class="api-class-tabs">
|
||||
<li class="api-class-tab index"><a href="#index">Index</a></li>
|
||||
|
||||
|
||||
<li class="api-class-tab methods"><a href="#methods">Methods</a></li>
|
||||
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<div>
|
||||
<div id="index" class="api-class-tabpanel index">
|
||||
<h2 class="off-left">Item Index</h2>
|
||||
|
||||
|
||||
<div class="index-section methods">
|
||||
<h3>Methods</h3>
|
||||
|
||||
<ul class="index-list methods">
|
||||
|
||||
<li class="index-item method private">
|
||||
<a href="#method__convex">_convex</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item method private">
|
||||
<a href="#method__PointInTriangle">_PointInTriangle</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item method">
|
||||
<a href="#method_Triangulate">Triangulate</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="methods" class="api-class-tabpanel">
|
||||
<h2 class="off-left">Methods</h2>
|
||||
|
||||
|
||||
<div id="method__convex" class="method item private">
|
||||
<h3 class="name"><code>_convex</code></h3>
|
||||
|
||||
|
||||
<span class="paren">()</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="flag private">private</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_utils_Polyk.js.html#l159"><code>src/pixi/utils/Polyk.js:159</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Checks whether a shape is convex</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="method__PointInTriangle" class="method item private">
|
||||
<h3 class="name"><code>_PointInTriangle</code></h3>
|
||||
|
||||
|
||||
<div class="args">
|
||||
<span class="paren">(</span><ul class="args-list inline commas">
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>px</code>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>py</code>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>ax</code>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>ay</code>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>bx</code>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>by</code>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>cx</code>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>cy</code>
|
||||
|
||||
</li>
|
||||
|
||||
</ul><span class="paren">)</span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="flag private">private</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_utils_Polyk.js.html#l122"><code>src/pixi/utils/Polyk.js:122</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Checks whether a point is within a triangle</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="params">
|
||||
<h4>Parameters:</h4>
|
||||
|
||||
<ul class="params-list">
|
||||
|
||||
<li class="param">
|
||||
|
||||
<code class="param-name">px</code>
|
||||
<span class="type">Number</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
<p>x coordinate of the point to test</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="param">
|
||||
|
||||
<code class="param-name">py</code>
|
||||
<span class="type">Number</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
<p>y coordinate of the point to test</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="param">
|
||||
|
||||
<code class="param-name">ax</code>
|
||||
<span class="type">Number</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
<p>x coordinate of the a point of the triangle</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="param">
|
||||
|
||||
<code class="param-name">ay</code>
|
||||
<span class="type">Number</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
<p>y coordinate of the a point of the triangle</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="param">
|
||||
|
||||
<code class="param-name">bx</code>
|
||||
<span class="type">Number</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
<p>x coordinate of the b point of the triangle</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="param">
|
||||
|
||||
<code class="param-name">by</code>
|
||||
<span class="type">Number</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
<p>y coordinate of the b point of the triangle</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="param">
|
||||
|
||||
<code class="param-name">cx</code>
|
||||
<span class="type">Number</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
<p>x coordinate of the c point of the triangle</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="param">
|
||||
|
||||
<code class="param-name">cy</code>
|
||||
<span class="type">Number</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
<p>y coordinate of the c point of the triangle</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="method_Triangulate" class="method item">
|
||||
<h3 class="name"><code>Triangulate</code></h3>
|
||||
|
||||
|
||||
<span class="paren">()</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_utils_Polyk.js.html#l43"><code>src/pixi/utils/Polyk.js:43</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Triangulates shapes for webGL graphic fills</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</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>
|
||||
731
docs/classes/PrimitiveShader.html
Normal file
731
docs/classes/PrimitiveShader.html
Normal file
|
|
@ -0,0 +1,731 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>PrimitiveShader - pixi.js</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.9.1/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.9.1/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.5.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/AbstractFilter.html">AbstractFilter</a></li>
|
||||
|
||||
<li><a href="../classes/AjaxRequest.html">AjaxRequest</a></li>
|
||||
|
||||
<li><a href="../classes/AlphaMaskFilter.html">AlphaMaskFilter</a></li>
|
||||
|
||||
<li><a href="../classes/AssetLoader.html">AssetLoader</a></li>
|
||||
|
||||
<li><a href="../classes/AtlasLoader.html">AtlasLoader</a></li>
|
||||
|
||||
<li><a href="../classes/autoDetectRenderer.html">autoDetectRenderer</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/BlurFilter.html">BlurFilter</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasMaskManager.html">CanvasMaskManager</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasTinter.html">CanvasTinter</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/ColorMatrixFilter.html">ColorMatrixFilter</a></li>
|
||||
|
||||
<li><a href="../classes/ColorStepFilter.html">ColorStepFilter</a></li>
|
||||
|
||||
<li><a href="../classes/DisplacementFilter.html">DisplacementFilter</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/DotScreenFilter.html">DotScreenFilter</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/EventTarget.html">EventTarget</a></li>
|
||||
|
||||
<li><a href="../classes/FilterTexture.html">FilterTexture</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/GrayFilter.html">GrayFilter</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/InvertFilter.html">InvertFilter</a></li>
|
||||
|
||||
<li><a href="../classes/JsonLoader.html">JsonLoader</a></li>
|
||||
|
||||
<li><a href="../classes/MovieClip.html">MovieClip</a></li>
|
||||
|
||||
<li><a href="../classes/NormalMapFilter.html">NormalMapFilter</a></li>
|
||||
|
||||
<li><a href="../classes/PixelateFilter.html">PixelateFilter</a></li>
|
||||
|
||||
<li><a href="../classes/PixiFastShader.html">PixiFastShader</a></li>
|
||||
|
||||
<li><a href="../classes/PixiShader.html">PixiShader</a></li>
|
||||
|
||||
<li><a href="../classes/Point.html">Point</a></li>
|
||||
|
||||
<li><a href="../classes/Polygon.html">Polygon</a></li>
|
||||
|
||||
<li><a href="../classes/PolyK.html">PolyK</a></li>
|
||||
|
||||
<li><a href="../classes/PrimitiveShader.html">PrimitiveShader</a></li>
|
||||
|
||||
<li><a href="../classes/Rectangle.html">Rectangle</a></li>
|
||||
|
||||
<li><a href="../classes/Rope.html">Rope</a></li>
|
||||
|
||||
<li><a href="../classes/SepiaFilter.html">SepiaFilter</a></li>
|
||||
|
||||
<li><a href="../classes/Spine.html">Spine</a></li>
|
||||
|
||||
<li><a href="../classes/Sprite.html">Sprite</a></li>
|
||||
|
||||
<li><a href="../classes/SpriteBatch.html">SpriteBatch</a></li>
|
||||
|
||||
<li><a href="../classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
|
||||
|
||||
<li><a href="../classes/Stage.html">Stage</a></li>
|
||||
|
||||
<li><a href="../classes/Strip.html">Strip</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/TwistFilter.html">TwistFilter</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLFilterManager.html">WebGLFilterManager</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLGraphics.html">WebGLGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLMaskManager.html">WebGLMaskManager</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLRenderer.html">WebGLRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLShaderManager.html">WebGLShaderManager</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLSpriteBatch.html">WebGLSpriteBatch</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>PrimitiveShader Class</h1>
|
||||
<div class="box meta">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="foundat">
|
||||
Defined in: <a href="../files/src_pixi_renderers_webgl_shaders_PrimitiveShader.js.html#l5"><code>src/pixi/renderers/webgl/shaders/PrimitiveShader.js:5</code></a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
Module: <a href="../modules/PIXI.html">PIXI</a>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="box intro">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="constructor">
|
||||
<h2>Constructor</h2>
|
||||
<div id="method_PrimitiveShader" class="method item">
|
||||
<h3 class="name"><code>PrimitiveShader</code></h3>
|
||||
|
||||
|
||||
<div class="args">
|
||||
<span class="paren">(</span><ul class="args-list inline commas">
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>gl</code>
|
||||
|
||||
</li>
|
||||
|
||||
</ul><span class="paren">)</span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_webgl_shaders_PrimitiveShader.js.html#l5"><code>src/pixi/renderers/webgl/shaders/PrimitiveShader.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">gl</code>
|
||||
<span class="type">WebGLContext</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
<p>the current WebGL drawing context</p>
|
||||
|
||||
</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>
|
||||
|
||||
|
||||
<li class="api-class-tab methods"><a href="#methods">Methods</a></li>
|
||||
|
||||
|
||||
<li class="api-class-tab properties"><a href="#properties">Properties</a></li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<div>
|
||||
<div id="index" class="api-class-tabpanel index">
|
||||
<h2 class="off-left">Item Index</h2>
|
||||
|
||||
|
||||
<div class="index-section methods">
|
||||
<h3>Methods</h3>
|
||||
|
||||
<ul class="index-list methods">
|
||||
|
||||
<li class="index-item method">
|
||||
<a href="#method_destroy">destroy</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item method">
|
||||
<a href="#method_init">init</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="index-section properties">
|
||||
<h3>Properties</h3>
|
||||
|
||||
<ul class="index-list properties">
|
||||
|
||||
<li class="index-item property">
|
||||
<a href="#property_fragmentSrc">fragmentSrc</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property">
|
||||
<a href="#property_gl">gl</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property">
|
||||
<a href="#property_program - The WebGL program.">program - The WebGL program.</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property">
|
||||
<a href="#property_vertexSrc">vertexSrc</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="methods" class="api-class-tabpanel">
|
||||
<h2 class="off-left">Methods</h2>
|
||||
|
||||
|
||||
<div id="method_destroy" class="method item">
|
||||
<h3 class="name"><code>destroy</code></h3>
|
||||
|
||||
|
||||
<span class="paren">()</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_webgl_shaders_PrimitiveShader.js.html#l92"><code>src/pixi/renderers/webgl/shaders/PrimitiveShader.js:92</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Destroys the shader</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="method_init" class="method item">
|
||||
<h3 class="name"><code>init</code></h3>
|
||||
|
||||
|
||||
<span class="paren">()</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_webgl_shaders_PrimitiveShader.js.html#l61"><code>src/pixi/renderers/webgl/shaders/PrimitiveShader.js:61</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Initialises the shader</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="properties" class="api-class-tabpanel">
|
||||
<h2 class="off-left">Properties</h2>
|
||||
|
||||
|
||||
<div id="property_fragmentSrc" class="property item">
|
||||
<h3 class="name"><code>fragmentSrc</code></h3>
|
||||
<span class="type">Array</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_webgl_shaders_PrimitiveShader.js.html#l23"><code>src/pixi/renderers/webgl/shaders/PrimitiveShader.js:23</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="property_gl" class="property item">
|
||||
<h3 class="name"><code>gl</code></h3>
|
||||
<span class="type">WebGLContext</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_webgl_shaders_PrimitiveShader.js.html#l12"><code>src/pixi/renderers/webgl/shaders/PrimitiveShader.js:12</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="property_program - The WebGL program." class="property item">
|
||||
<h3 class="name"><code>program - The WebGL program.</code></h3>
|
||||
<span class="type">Any</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_webgl_shaders_PrimitiveShader.js.html#l18"><code>src/pixi/renderers/webgl/shaders/PrimitiveShader.js:18</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="property_vertexSrc" class="property item">
|
||||
<h3 class="name"><code>vertexSrc</code></h3>
|
||||
<span class="type">Array</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_webgl_shaders_PrimitiveShader.js.html#l36"><code>src/pixi/renderers/webgl/shaders/PrimitiveShader.js:36</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</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>
|
||||
392
docs/classes/Rope.html
Normal file
392
docs/classes/Rope.html
Normal file
|
|
@ -0,0 +1,392 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Rope - pixi.js</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.9.1/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.9.1/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.5.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/AbstractFilter.html">AbstractFilter</a></li>
|
||||
|
||||
<li><a href="../classes/AjaxRequest.html">AjaxRequest</a></li>
|
||||
|
||||
<li><a href="../classes/AlphaMaskFilter.html">AlphaMaskFilter</a></li>
|
||||
|
||||
<li><a href="../classes/AssetLoader.html">AssetLoader</a></li>
|
||||
|
||||
<li><a href="../classes/AtlasLoader.html">AtlasLoader</a></li>
|
||||
|
||||
<li><a href="../classes/autoDetectRenderer.html">autoDetectRenderer</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/BlurFilter.html">BlurFilter</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasMaskManager.html">CanvasMaskManager</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasTinter.html">CanvasTinter</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/ColorMatrixFilter.html">ColorMatrixFilter</a></li>
|
||||
|
||||
<li><a href="../classes/ColorStepFilter.html">ColorStepFilter</a></li>
|
||||
|
||||
<li><a href="../classes/DisplacementFilter.html">DisplacementFilter</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/DotScreenFilter.html">DotScreenFilter</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/EventTarget.html">EventTarget</a></li>
|
||||
|
||||
<li><a href="../classes/FilterTexture.html">FilterTexture</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/GrayFilter.html">GrayFilter</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/InvertFilter.html">InvertFilter</a></li>
|
||||
|
||||
<li><a href="../classes/JsonLoader.html">JsonLoader</a></li>
|
||||
|
||||
<li><a href="../classes/MovieClip.html">MovieClip</a></li>
|
||||
|
||||
<li><a href="../classes/NormalMapFilter.html">NormalMapFilter</a></li>
|
||||
|
||||
<li><a href="../classes/PixelateFilter.html">PixelateFilter</a></li>
|
||||
|
||||
<li><a href="../classes/PixiFastShader.html">PixiFastShader</a></li>
|
||||
|
||||
<li><a href="../classes/PixiShader.html">PixiShader</a></li>
|
||||
|
||||
<li><a href="../classes/Point.html">Point</a></li>
|
||||
|
||||
<li><a href="../classes/Polygon.html">Polygon</a></li>
|
||||
|
||||
<li><a href="../classes/PolyK.html">PolyK</a></li>
|
||||
|
||||
<li><a href="../classes/PrimitiveShader.html">PrimitiveShader</a></li>
|
||||
|
||||
<li><a href="../classes/Rectangle.html">Rectangle</a></li>
|
||||
|
||||
<li><a href="../classes/Rope.html">Rope</a></li>
|
||||
|
||||
<li><a href="../classes/SepiaFilter.html">SepiaFilter</a></li>
|
||||
|
||||
<li><a href="../classes/Spine.html">Spine</a></li>
|
||||
|
||||
<li><a href="../classes/Sprite.html">Sprite</a></li>
|
||||
|
||||
<li><a href="../classes/SpriteBatch.html">SpriteBatch</a></li>
|
||||
|
||||
<li><a href="../classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
|
||||
|
||||
<li><a href="../classes/Stage.html">Stage</a></li>
|
||||
|
||||
<li><a href="../classes/Strip.html">Strip</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/TwistFilter.html">TwistFilter</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLFilterManager.html">WebGLFilterManager</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLGraphics.html">WebGLGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLMaskManager.html">WebGLMaskManager</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLRenderer.html">WebGLRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLShaderManager.html">WebGLShaderManager</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLSpriteBatch.html">WebGLSpriteBatch</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>Rope Class</h1>
|
||||
<div class="box meta">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="foundat">
|
||||
Defined in: <a href="../files/src_pixi_extras_Rope.js.html#l4"><code>src/pixi/extras/Rope.js:4</code></a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
Module: <a href="../modules/PIXI.html">PIXI</a>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="box intro">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="constructor">
|
||||
<h2>Constructor</h2>
|
||||
<div id="method_Rope" class="method item">
|
||||
<h3 class="name"><code>Rope</code></h3>
|
||||
|
||||
|
||||
<div class="args">
|
||||
<span class="paren">(</span><ul class="args-list inline commas">
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>texture</code>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>points</code>
|
||||
|
||||
</li>
|
||||
|
||||
</ul><span class="paren">)</span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_extras_Rope.js.html#l4"><code>src/pixi/extras/Rope.js:4</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">texture</code>
|
||||
<span class="type"><a href="../classes/Texture.html" class="crosslink">Texture</a></span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
<p>The texture to use</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="param">
|
||||
|
||||
<code class="param-name">points</code>
|
||||
<span class="type">Array</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>
|
||||
591
docs/classes/SpriteBatch.html
Normal file
591
docs/classes/SpriteBatch.html
Normal file
|
|
@ -0,0 +1,591 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>SpriteBatch - pixi.js</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.9.1/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.9.1/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.5.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/AbstractFilter.html">AbstractFilter</a></li>
|
||||
|
||||
<li><a href="../classes/AjaxRequest.html">AjaxRequest</a></li>
|
||||
|
||||
<li><a href="../classes/AlphaMaskFilter.html">AlphaMaskFilter</a></li>
|
||||
|
||||
<li><a href="../classes/AssetLoader.html">AssetLoader</a></li>
|
||||
|
||||
<li><a href="../classes/AtlasLoader.html">AtlasLoader</a></li>
|
||||
|
||||
<li><a href="../classes/autoDetectRenderer.html">autoDetectRenderer</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/BlurFilter.html">BlurFilter</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasMaskManager.html">CanvasMaskManager</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasTinter.html">CanvasTinter</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/ColorMatrixFilter.html">ColorMatrixFilter</a></li>
|
||||
|
||||
<li><a href="../classes/ColorStepFilter.html">ColorStepFilter</a></li>
|
||||
|
||||
<li><a href="../classes/DisplacementFilter.html">DisplacementFilter</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/DotScreenFilter.html">DotScreenFilter</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/EventTarget.html">EventTarget</a></li>
|
||||
|
||||
<li><a href="../classes/FilterTexture.html">FilterTexture</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/GrayFilter.html">GrayFilter</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/InvertFilter.html">InvertFilter</a></li>
|
||||
|
||||
<li><a href="../classes/JsonLoader.html">JsonLoader</a></li>
|
||||
|
||||
<li><a href="../classes/MovieClip.html">MovieClip</a></li>
|
||||
|
||||
<li><a href="../classes/NormalMapFilter.html">NormalMapFilter</a></li>
|
||||
|
||||
<li><a href="../classes/PixelateFilter.html">PixelateFilter</a></li>
|
||||
|
||||
<li><a href="../classes/PixiFastShader.html">PixiFastShader</a></li>
|
||||
|
||||
<li><a href="../classes/PixiShader.html">PixiShader</a></li>
|
||||
|
||||
<li><a href="../classes/Point.html">Point</a></li>
|
||||
|
||||
<li><a href="../classes/Polygon.html">Polygon</a></li>
|
||||
|
||||
<li><a href="../classes/PolyK.html">PolyK</a></li>
|
||||
|
||||
<li><a href="../classes/PrimitiveShader.html">PrimitiveShader</a></li>
|
||||
|
||||
<li><a href="../classes/Rectangle.html">Rectangle</a></li>
|
||||
|
||||
<li><a href="../classes/Rope.html">Rope</a></li>
|
||||
|
||||
<li><a href="../classes/SepiaFilter.html">SepiaFilter</a></li>
|
||||
|
||||
<li><a href="../classes/Spine.html">Spine</a></li>
|
||||
|
||||
<li><a href="../classes/Sprite.html">Sprite</a></li>
|
||||
|
||||
<li><a href="../classes/SpriteBatch.html">SpriteBatch</a></li>
|
||||
|
||||
<li><a href="../classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
|
||||
|
||||
<li><a href="../classes/Stage.html">Stage</a></li>
|
||||
|
||||
<li><a href="../classes/Strip.html">Strip</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/TwistFilter.html">TwistFilter</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLFilterManager.html">WebGLFilterManager</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLGraphics.html">WebGLGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLMaskManager.html">WebGLMaskManager</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLRenderer.html">WebGLRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLShaderManager.html">WebGLShaderManager</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLSpriteBatch.html">WebGLSpriteBatch</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>SpriteBatch Class</h1>
|
||||
<div class="box meta">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="foundat">
|
||||
Defined in: <a href="../files/src_pixi_display_SpriteBatch.js.html#l5"><code>src/pixi/display/SpriteBatch.js:5</code></a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
Module: <a href="../modules/PIXI.html">PIXI</a>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="box intro">
|
||||
<p>The SpriteBatch class is a really fast version of the DisplayObjectContainer
|
||||
built solely for speed, so use when you need a lot of sprites or particles.
|
||||
And it's extremely easy to use : </p>
|
||||
<p> var container = new PIXI.SpriteBatch();</p>
|
||||
<p> stage.addChild(container);</p>
|
||||
<p> for(var i = 0; i < 100; i++)
|
||||
{
|
||||
var sprite = new PIXI.Sprite.fromImage("myImage.png");
|
||||
container.addChild(sprite);
|
||||
}
|
||||
And here you have a hundred sprites that will be renderer at the speed of light</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="constructor">
|
||||
<h2>Constructor</h2>
|
||||
<div id="method_SpriteBatch" class="method item">
|
||||
<h3 class="name"><code>SpriteBatch</code></h3>
|
||||
|
||||
|
||||
<div class="args">
|
||||
<span class="paren">(</span><ul class="args-list inline commas">
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>texture</code>
|
||||
|
||||
</li>
|
||||
|
||||
</ul><span class="paren">)</span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_display_SpriteBatch.js.html#l5"><code>src/pixi/display/SpriteBatch.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">texture</code>
|
||||
<span class="type"><a href="../classes/Texture.html" class="crosslink">Texture</a></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>
|
||||
|
||||
|
||||
<li class="api-class-tab methods"><a href="#methods">Methods</a></li>
|
||||
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<div>
|
||||
<div id="index" class="api-class-tabpanel index">
|
||||
<h2 class="off-left">Item Index</h2>
|
||||
|
||||
|
||||
<div class="index-section methods">
|
||||
<h3>Methods</h3>
|
||||
|
||||
<ul class="index-list methods">
|
||||
|
||||
<li class="index-item method private">
|
||||
<a href="#method__renderCanvas">_renderCanvas</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item method private">
|
||||
<a href="#method__renderWebGL">_renderWebGL</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="methods" class="api-class-tabpanel">
|
||||
<h2 class="off-left">Methods</h2>
|
||||
|
||||
|
||||
<div id="method__renderCanvas" class="method item private">
|
||||
<h3 class="name"><code>_renderCanvas</code></h3>
|
||||
|
||||
|
||||
<div class="args">
|
||||
<span class="paren">(</span><ul class="args-list inline commas">
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>renderSession</code>
|
||||
|
||||
</li>
|
||||
|
||||
</ul><span class="paren">)</span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="flag private">private</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_display_SpriteBatch.js.html#l90"><code>src/pixi/display/SpriteBatch.js:90</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Renders the object using the Canvas renderer</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="params">
|
||||
<h4>Parameters:</h4>
|
||||
|
||||
<ul class="params-list">
|
||||
|
||||
<li class="param">
|
||||
|
||||
<code class="param-name">renderSession</code>
|
||||
<span class="type">RenderSession</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="method__renderWebGL" class="method item private">
|
||||
<h3 class="name"><code>_renderWebGL</code></h3>
|
||||
|
||||
|
||||
<div class="args">
|
||||
<span class="paren">(</span><ul class="args-list inline commas">
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>renderSession</code>
|
||||
|
||||
</li>
|
||||
|
||||
</ul><span class="paren">)</span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="flag private">private</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_display_SpriteBatch.js.html#l64"><code>src/pixi/display/SpriteBatch.js:64</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Renders the object using the WebGL renderer</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="params">
|
||||
<h4>Parameters:</h4>
|
||||
|
||||
<ul class="params-list">
|
||||
|
||||
<li class="param">
|
||||
|
||||
<code class="param-name">renderSession</code>
|
||||
<span class="type">RenderSession</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</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>
|
||||
4095
docs/classes/Strip.html
Normal file
4095
docs/classes/Strip.html
Normal file
File diff suppressed because it is too large
Load diff
1066
docs/classes/WebGLFilterManager.html
Normal file
1066
docs/classes/WebGLFilterManager.html
Normal file
File diff suppressed because it is too large
Load diff
1035
docs/classes/WebGLGraphics.html
Normal file
1035
docs/classes/WebGLGraphics.html
Normal file
File diff suppressed because it is too large
Load diff
759
docs/classes/WebGLMaskManager.html
Normal file
759
docs/classes/WebGLMaskManager.html
Normal file
|
|
@ -0,0 +1,759 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>WebGLMaskManager - pixi.js</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.9.1/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.9.1/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.5.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/AbstractFilter.html">AbstractFilter</a></li>
|
||||
|
||||
<li><a href="../classes/AjaxRequest.html">AjaxRequest</a></li>
|
||||
|
||||
<li><a href="../classes/AlphaMaskFilter.html">AlphaMaskFilter</a></li>
|
||||
|
||||
<li><a href="../classes/AssetLoader.html">AssetLoader</a></li>
|
||||
|
||||
<li><a href="../classes/AtlasLoader.html">AtlasLoader</a></li>
|
||||
|
||||
<li><a href="../classes/autoDetectRenderer.html">autoDetectRenderer</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/BlurFilter.html">BlurFilter</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasMaskManager.html">CanvasMaskManager</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasTinter.html">CanvasTinter</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/ColorMatrixFilter.html">ColorMatrixFilter</a></li>
|
||||
|
||||
<li><a href="../classes/ColorStepFilter.html">ColorStepFilter</a></li>
|
||||
|
||||
<li><a href="../classes/DisplacementFilter.html">DisplacementFilter</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/DotScreenFilter.html">DotScreenFilter</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/EventTarget.html">EventTarget</a></li>
|
||||
|
||||
<li><a href="../classes/FilterTexture.html">FilterTexture</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/GrayFilter.html">GrayFilter</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/InvertFilter.html">InvertFilter</a></li>
|
||||
|
||||
<li><a href="../classes/JsonLoader.html">JsonLoader</a></li>
|
||||
|
||||
<li><a href="../classes/MovieClip.html">MovieClip</a></li>
|
||||
|
||||
<li><a href="../classes/NormalMapFilter.html">NormalMapFilter</a></li>
|
||||
|
||||
<li><a href="../classes/PixelateFilter.html">PixelateFilter</a></li>
|
||||
|
||||
<li><a href="../classes/PixiFastShader.html">PixiFastShader</a></li>
|
||||
|
||||
<li><a href="../classes/PixiShader.html">PixiShader</a></li>
|
||||
|
||||
<li><a href="../classes/Point.html">Point</a></li>
|
||||
|
||||
<li><a href="../classes/Polygon.html">Polygon</a></li>
|
||||
|
||||
<li><a href="../classes/PolyK.html">PolyK</a></li>
|
||||
|
||||
<li><a href="../classes/PrimitiveShader.html">PrimitiveShader</a></li>
|
||||
|
||||
<li><a href="../classes/Rectangle.html">Rectangle</a></li>
|
||||
|
||||
<li><a href="../classes/Rope.html">Rope</a></li>
|
||||
|
||||
<li><a href="../classes/SepiaFilter.html">SepiaFilter</a></li>
|
||||
|
||||
<li><a href="../classes/Spine.html">Spine</a></li>
|
||||
|
||||
<li><a href="../classes/Sprite.html">Sprite</a></li>
|
||||
|
||||
<li><a href="../classes/SpriteBatch.html">SpriteBatch</a></li>
|
||||
|
||||
<li><a href="../classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
|
||||
|
||||
<li><a href="../classes/Stage.html">Stage</a></li>
|
||||
|
||||
<li><a href="../classes/Strip.html">Strip</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/TwistFilter.html">TwistFilter</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLFilterManager.html">WebGLFilterManager</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLGraphics.html">WebGLGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLMaskManager.html">WebGLMaskManager</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLRenderer.html">WebGLRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLShaderManager.html">WebGLShaderManager</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLSpriteBatch.html">WebGLSpriteBatch</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>WebGLMaskManager Class</h1>
|
||||
<div class="box meta">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="foundat">
|
||||
Defined in: <a href="../files/src_pixi_renderers_webgl_utils_WebGLMaskManager.js.html#l6"><code>src/pixi/renderers/webgl/utils/WebGLMaskManager.js:6</code></a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
Module: <a href="../modules/PIXI.html">PIXI</a>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="box intro">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="constructor">
|
||||
<h2>Constructor</h2>
|
||||
<div id="method_WebGLMaskManager" class="method item private">
|
||||
<h3 class="name"><code>WebGLMaskManager</code></h3>
|
||||
|
||||
|
||||
<div class="args">
|
||||
<span class="paren">(</span><ul class="args-list inline commas">
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>gl</code>
|
||||
|
||||
</li>
|
||||
|
||||
</ul><span class="paren">)</span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="flag private">private</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_webgl_utils_WebGLMaskManager.js.html#l6"><code>src/pixi/renderers/webgl/utils/WebGLMaskManager.js:6</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">gl</code>
|
||||
<span class="type">WebGLContext</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
<p>the current WebGL drawing context</p>
|
||||
|
||||
</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>
|
||||
|
||||
|
||||
<li class="api-class-tab methods"><a href="#methods">Methods</a></li>
|
||||
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<div>
|
||||
<div id="index" class="api-class-tabpanel index">
|
||||
<h2 class="off-left">Item Index</h2>
|
||||
|
||||
|
||||
<div class="index-section methods">
|
||||
<h3>Methods</h3>
|
||||
|
||||
<ul class="index-list methods">
|
||||
|
||||
<li class="index-item method">
|
||||
<a href="#method_destroy">destroy</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item method">
|
||||
<a href="#method_popMask">popMask</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item method">
|
||||
<a href="#method_pushMask">pushMask</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item method">
|
||||
<a href="#method_setContext">setContext</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="methods" class="api-class-tabpanel">
|
||||
<h2 class="off-left">Methods</h2>
|
||||
|
||||
|
||||
<div id="method_destroy" class="method item">
|
||||
<h3 class="name"><code>destroy</code></h3>
|
||||
|
||||
|
||||
<span class="paren">()</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_webgl_utils_WebGLMaskManager.js.html#l89"><code>src/pixi/renderers/webgl/utils/WebGLMaskManager.js:89</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Destroys the mask stack</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="method_popMask" class="method item">
|
||||
<h3 class="name"><code>popMask</code></h3>
|
||||
|
||||
|
||||
<div class="args">
|
||||
<span class="paren">(</span><ul class="args-list inline commas">
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>renderSession</code>
|
||||
|
||||
</li>
|
||||
|
||||
</ul><span class="paren">)</span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_webgl_utils_WebGLMaskManager.js.html#l60"><code>src/pixi/renderers/webgl/utils/WebGLMaskManager.js:60</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Removes the last filter from the filter stack and doesn't return it</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="params">
|
||||
<h4>Parameters:</h4>
|
||||
|
||||
<ul class="params-list">
|
||||
|
||||
<li class="param">
|
||||
|
||||
<code class="param-name">renderSession</code>
|
||||
<span class="type">RenderSession</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
<p>an object containing all the useful parameters</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="method_pushMask" class="method item">
|
||||
<h3 class="name"><code>pushMask</code></h3>
|
||||
|
||||
|
||||
<div class="args">
|
||||
<span class="paren">(</span><ul class="args-list inline commas">
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>maskData</code>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>renderSession</code>
|
||||
|
||||
</li>
|
||||
|
||||
</ul><span class="paren">)</span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_webgl_utils_WebGLMaskManager.js.html#l30"><code>src/pixi/renderers/webgl/utils/WebGLMaskManager.js:30</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Applies the Mask and adds it to the current filter stack</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="params">
|
||||
<h4>Parameters:</h4>
|
||||
|
||||
<ul class="params-list">
|
||||
|
||||
<li class="param">
|
||||
|
||||
<code class="param-name">maskData</code>
|
||||
<span class="type">Array</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="param">
|
||||
|
||||
<code class="param-name">renderSession</code>
|
||||
<span class="type">RenderSession</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="method_setContext" class="method item">
|
||||
<h3 class="name"><code>setContext</code></h3>
|
||||
|
||||
|
||||
<div class="args">
|
||||
<span class="paren">(</span><ul class="args-list inline commas">
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>gl</code>
|
||||
|
||||
</li>
|
||||
|
||||
</ul><span class="paren">)</span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_webgl_utils_WebGLMaskManager.js.html#l20"><code>src/pixi/renderers/webgl/utils/WebGLMaskManager.js:20</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Sets the drawing context to the one given in parameter</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="params">
|
||||
<h4>Parameters:</h4>
|
||||
|
||||
<ul class="params-list">
|
||||
|
||||
<li class="param">
|
||||
|
||||
<code class="param-name">gl</code>
|
||||
<span class="type">WebGLContext</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
<p>the current WebGL drawing context</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</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>
|
||||
885
docs/classes/WebGLShaderManager.html
Normal file
885
docs/classes/WebGLShaderManager.html
Normal file
|
|
@ -0,0 +1,885 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>WebGLShaderManager - pixi.js</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.9.1/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.9.1/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.5.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/AbstractFilter.html">AbstractFilter</a></li>
|
||||
|
||||
<li><a href="../classes/AjaxRequest.html">AjaxRequest</a></li>
|
||||
|
||||
<li><a href="../classes/AlphaMaskFilter.html">AlphaMaskFilter</a></li>
|
||||
|
||||
<li><a href="../classes/AssetLoader.html">AssetLoader</a></li>
|
||||
|
||||
<li><a href="../classes/AtlasLoader.html">AtlasLoader</a></li>
|
||||
|
||||
<li><a href="../classes/autoDetectRenderer.html">autoDetectRenderer</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/BlurFilter.html">BlurFilter</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasMaskManager.html">CanvasMaskManager</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasTinter.html">CanvasTinter</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/ColorMatrixFilter.html">ColorMatrixFilter</a></li>
|
||||
|
||||
<li><a href="../classes/ColorStepFilter.html">ColorStepFilter</a></li>
|
||||
|
||||
<li><a href="../classes/DisplacementFilter.html">DisplacementFilter</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/DotScreenFilter.html">DotScreenFilter</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/EventTarget.html">EventTarget</a></li>
|
||||
|
||||
<li><a href="../classes/FilterTexture.html">FilterTexture</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/GrayFilter.html">GrayFilter</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/InvertFilter.html">InvertFilter</a></li>
|
||||
|
||||
<li><a href="../classes/JsonLoader.html">JsonLoader</a></li>
|
||||
|
||||
<li><a href="../classes/MovieClip.html">MovieClip</a></li>
|
||||
|
||||
<li><a href="../classes/NormalMapFilter.html">NormalMapFilter</a></li>
|
||||
|
||||
<li><a href="../classes/PixelateFilter.html">PixelateFilter</a></li>
|
||||
|
||||
<li><a href="../classes/PixiFastShader.html">PixiFastShader</a></li>
|
||||
|
||||
<li><a href="../classes/PixiShader.html">PixiShader</a></li>
|
||||
|
||||
<li><a href="../classes/Point.html">Point</a></li>
|
||||
|
||||
<li><a href="../classes/Polygon.html">Polygon</a></li>
|
||||
|
||||
<li><a href="../classes/PolyK.html">PolyK</a></li>
|
||||
|
||||
<li><a href="../classes/PrimitiveShader.html">PrimitiveShader</a></li>
|
||||
|
||||
<li><a href="../classes/Rectangle.html">Rectangle</a></li>
|
||||
|
||||
<li><a href="../classes/Rope.html">Rope</a></li>
|
||||
|
||||
<li><a href="../classes/SepiaFilter.html">SepiaFilter</a></li>
|
||||
|
||||
<li><a href="../classes/Spine.html">Spine</a></li>
|
||||
|
||||
<li><a href="../classes/Sprite.html">Sprite</a></li>
|
||||
|
||||
<li><a href="../classes/SpriteBatch.html">SpriteBatch</a></li>
|
||||
|
||||
<li><a href="../classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
|
||||
|
||||
<li><a href="../classes/Stage.html">Stage</a></li>
|
||||
|
||||
<li><a href="../classes/Strip.html">Strip</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/TwistFilter.html">TwistFilter</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLFilterManager.html">WebGLFilterManager</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLGraphics.html">WebGLGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLMaskManager.html">WebGLMaskManager</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLRenderer.html">WebGLRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLShaderManager.html">WebGLShaderManager</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLSpriteBatch.html">WebGLSpriteBatch</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>WebGLShaderManager Class</h1>
|
||||
<div class="box meta">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="foundat">
|
||||
Defined in: <a href="../files/src_pixi_renderers_webgl_utils_WebGLShaderManager.js.html#l5"><code>src/pixi/renderers/webgl/utils/WebGLShaderManager.js:5</code></a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
Module: <a href="../modules/PIXI.html">PIXI</a>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="box intro">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="constructor">
|
||||
<h2>Constructor</h2>
|
||||
<div id="method_WebGLShaderManager" class="method item private">
|
||||
<h3 class="name"><code>WebGLShaderManager</code></h3>
|
||||
|
||||
|
||||
<div class="args">
|
||||
<span class="paren">(</span><ul class="args-list inline commas">
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>gl</code>
|
||||
|
||||
</li>
|
||||
|
||||
</ul><span class="paren">)</span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="flag private">private</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_webgl_utils_WebGLShaderManager.js.html#l5"><code>src/pixi/renderers/webgl/utils/WebGLShaderManager.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">gl</code>
|
||||
<span class="type">WebGLContext</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
<p>the current WebGL drawing context</p>
|
||||
|
||||
</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>
|
||||
|
||||
|
||||
<li class="api-class-tab methods"><a href="#methods">Methods</a></li>
|
||||
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<div>
|
||||
<div id="index" class="api-class-tabpanel index">
|
||||
<h2 class="off-left">Item Index</h2>
|
||||
|
||||
|
||||
<div class="index-section methods">
|
||||
<h3>Methods</h3>
|
||||
|
||||
<ul class="index-list methods">
|
||||
|
||||
<li class="index-item method">
|
||||
<a href="#method_activatePrimitiveShader">activatePrimitiveShader</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item method">
|
||||
<a href="#method_activateShader">activateShader</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item method">
|
||||
<a href="#method_deactivatePrimitiveShader">deactivatePrimitiveShader</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item method">
|
||||
<a href="#method_destroy">destroy</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item method">
|
||||
<a href="#method_setAttribs">setAttribs</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item method">
|
||||
<a href="#method_setContext">setContext</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="methods" class="api-class-tabpanel">
|
||||
<h2 class="off-left">Methods</h2>
|
||||
|
||||
|
||||
<div id="method_activatePrimitiveShader" class="method item">
|
||||
<h3 class="name"><code>activatePrimitiveShader</code></h3>
|
||||
|
||||
|
||||
<span class="paren">()</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_webgl_utils_WebGLShaderManager.js.html#l113"><code>src/pixi/renderers/webgl/utils/WebGLShaderManager.js:113</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Triggers the primitive shader</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="method_activateShader" class="method item">
|
||||
<h3 class="name"><code>activateShader</code></h3>
|
||||
|
||||
|
||||
<div class="args">
|
||||
<span class="paren">(</span><ul class="args-list inline commas">
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>shader</code>
|
||||
|
||||
</li>
|
||||
|
||||
</ul><span class="paren">)</span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_webgl_utils_WebGLShaderManager.js.html#l96"><code>src/pixi/renderers/webgl/utils/WebGLShaderManager.js:96</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Sets-up the given shader</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="params">
|
||||
<h4>Parameters:</h4>
|
||||
|
||||
<ul class="params-list">
|
||||
|
||||
<li class="param">
|
||||
|
||||
<code class="param-name">shader</code>
|
||||
<span class="type">Object</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
<p>the shader that is going to be activated</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="method_deactivatePrimitiveShader" class="method item">
|
||||
<h3 class="name"><code>deactivatePrimitiveShader</code></h3>
|
||||
|
||||
|
||||
<span class="paren">()</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_webgl_utils_WebGLShaderManager.js.html#l127"><code>src/pixi/renderers/webgl/utils/WebGLShaderManager.js:127</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Disable the primitive shader</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="method_destroy" class="method item">
|
||||
<h3 class="name"><code>destroy</code></h3>
|
||||
|
||||
|
||||
<span class="paren">()</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_webgl_utils_WebGLShaderManager.js.html#l140"><code>src/pixi/renderers/webgl/utils/WebGLShaderManager.js:140</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Destroys</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="method_setAttribs" class="method item">
|
||||
<h3 class="name"><code>setAttribs</code></h3>
|
||||
|
||||
|
||||
<div class="args">
|
||||
<span class="paren">(</span><ul class="args-list inline commas">
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>attribs</code>
|
||||
|
||||
</li>
|
||||
|
||||
</ul><span class="paren">)</span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_webgl_utils_WebGLShaderManager.js.html#l52"><code>src/pixi/renderers/webgl/utils/WebGLShaderManager.js:52</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Takes the attributes given in parameters</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="params">
|
||||
<h4>Parameters:</h4>
|
||||
|
||||
<ul class="params-list">
|
||||
|
||||
<li class="param">
|
||||
|
||||
<code class="param-name">attribs</code>
|
||||
<span class="type">Array</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
<p>attribs</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="method_setContext" class="method item">
|
||||
<h3 class="name"><code>setContext</code></h3>
|
||||
|
||||
|
||||
<div class="args">
|
||||
<span class="paren">(</span><ul class="args-list inline commas">
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>gl</code>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>transparent</code>
|
||||
|
||||
</li>
|
||||
|
||||
</ul><span class="paren">)</span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_webgl_utils_WebGLShaderManager.js.html#l28"><code>src/pixi/renderers/webgl/utils/WebGLShaderManager.js:28</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Initialises the context and the properties</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="params">
|
||||
<h4>Parameters:</h4>
|
||||
|
||||
<ul class="params-list">
|
||||
|
||||
<li class="param">
|
||||
|
||||
<code class="param-name">gl</code>
|
||||
<span class="type">WebGLContext</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
<p>the current WebGL drawing context</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="param">
|
||||
|
||||
<code class="param-name">transparent</code>
|
||||
<span class="type">Boolean</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
<p>Whether or not the drawing context should be transparent</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</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>
|
||||
1396
docs/classes/WebGLSpriteBatch.html
Normal file
1396
docs/classes/WebGLSpriteBatch.html
Normal file
File diff suppressed because it is too large
Load diff
283
docs/classes/autoDetectRenderer.html
Normal file
283
docs/classes/autoDetectRenderer.html
Normal file
|
|
@ -0,0 +1,283 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>autoDetectRenderer - pixi.js</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.9.1/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.9.1/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.5.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/AbstractFilter.html">AbstractFilter</a></li>
|
||||
|
||||
<li><a href="../classes/AjaxRequest.html">AjaxRequest</a></li>
|
||||
|
||||
<li><a href="../classes/AlphaMaskFilter.html">AlphaMaskFilter</a></li>
|
||||
|
||||
<li><a href="../classes/AssetLoader.html">AssetLoader</a></li>
|
||||
|
||||
<li><a href="../classes/AtlasLoader.html">AtlasLoader</a></li>
|
||||
|
||||
<li><a href="../classes/autoDetectRenderer.html">autoDetectRenderer</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/BlurFilter.html">BlurFilter</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasMaskManager.html">CanvasMaskManager</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasTinter.html">CanvasTinter</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/ColorMatrixFilter.html">ColorMatrixFilter</a></li>
|
||||
|
||||
<li><a href="../classes/ColorStepFilter.html">ColorStepFilter</a></li>
|
||||
|
||||
<li><a href="../classes/DisplacementFilter.html">DisplacementFilter</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/DotScreenFilter.html">DotScreenFilter</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/EventTarget.html">EventTarget</a></li>
|
||||
|
||||
<li><a href="../classes/FilterTexture.html">FilterTexture</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/GrayFilter.html">GrayFilter</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/InvertFilter.html">InvertFilter</a></li>
|
||||
|
||||
<li><a href="../classes/JsonLoader.html">JsonLoader</a></li>
|
||||
|
||||
<li><a href="../classes/MovieClip.html">MovieClip</a></li>
|
||||
|
||||
<li><a href="../classes/NormalMapFilter.html">NormalMapFilter</a></li>
|
||||
|
||||
<li><a href="../classes/PixelateFilter.html">PixelateFilter</a></li>
|
||||
|
||||
<li><a href="../classes/PixiFastShader.html">PixiFastShader</a></li>
|
||||
|
||||
<li><a href="../classes/PixiShader.html">PixiShader</a></li>
|
||||
|
||||
<li><a href="../classes/Point.html">Point</a></li>
|
||||
|
||||
<li><a href="../classes/Polygon.html">Polygon</a></li>
|
||||
|
||||
<li><a href="../classes/PolyK.html">PolyK</a></li>
|
||||
|
||||
<li><a href="../classes/PrimitiveShader.html">PrimitiveShader</a></li>
|
||||
|
||||
<li><a href="../classes/Rectangle.html">Rectangle</a></li>
|
||||
|
||||
<li><a href="../classes/Rope.html">Rope</a></li>
|
||||
|
||||
<li><a href="../classes/SepiaFilter.html">SepiaFilter</a></li>
|
||||
|
||||
<li><a href="../classes/Spine.html">Spine</a></li>
|
||||
|
||||
<li><a href="../classes/Sprite.html">Sprite</a></li>
|
||||
|
||||
<li><a href="../classes/SpriteBatch.html">SpriteBatch</a></li>
|
||||
|
||||
<li><a href="../classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
|
||||
|
||||
<li><a href="../classes/Stage.html">Stage</a></li>
|
||||
|
||||
<li><a href="../classes/Strip.html">Strip</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/TwistFilter.html">TwistFilter</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLFilterManager.html">WebGLFilterManager</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLGraphics.html">WebGLGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLMaskManager.html">WebGLMaskManager</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLRenderer.html">WebGLRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLShaderManager.html">WebGLShaderManager</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLSpriteBatch.html">WebGLSpriteBatch</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>autoDetectRenderer Class</h1>
|
||||
<div class="box meta">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="foundat">
|
||||
Defined in: <a href="../files/src_pixi_utils_Detector.js.html#l5"><code>src/pixi/utils/Detector.js:5</code></a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
Module: <a href="../modules/PIXI.html">PIXI</a>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="box intro">
|
||||
<p>This helper function will automatically detect which renderer you should be using.
|
||||
WebGL is the preferred renderer as it is a lot faster. If webGL is not supported by
|
||||
the browser then this function will return a canvas renderer</p>
|
||||
|
||||
</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>
|
||||
288
docs/files/src_pixi_InteractionData.js.html
Normal file
288
docs/files/src_pixi_InteractionData.js.html
Normal file
|
|
@ -0,0 +1,288 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>src/pixi/InteractionData.js - pixi.js</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.9.1/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.9.1/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.5.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/AbstractFilter.html">AbstractFilter</a></li>
|
||||
|
||||
<li><a href="../classes/AjaxRequest.html">AjaxRequest</a></li>
|
||||
|
||||
<li><a href="../classes/AlphaMaskFilter.html">AlphaMaskFilter</a></li>
|
||||
|
||||
<li><a href="../classes/AssetLoader.html">AssetLoader</a></li>
|
||||
|
||||
<li><a href="../classes/AtlasLoader.html">AtlasLoader</a></li>
|
||||
|
||||
<li><a href="../classes/autoDetectRenderer.html">autoDetectRenderer</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/BlurFilter.html">BlurFilter</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasMaskManager.html">CanvasMaskManager</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasTinter.html">CanvasTinter</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/ColorMatrixFilter.html">ColorMatrixFilter</a></li>
|
||||
|
||||
<li><a href="../classes/ColorStepFilter.html">ColorStepFilter</a></li>
|
||||
|
||||
<li><a href="../classes/DisplacementFilter.html">DisplacementFilter</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/DotScreenFilter.html">DotScreenFilter</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/EventTarget.html">EventTarget</a></li>
|
||||
|
||||
<li><a href="../classes/FilterTexture.html">FilterTexture</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/GrayFilter.html">GrayFilter</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/InvertFilter.html">InvertFilter</a></li>
|
||||
|
||||
<li><a href="../classes/JsonLoader.html">JsonLoader</a></li>
|
||||
|
||||
<li><a href="../classes/MovieClip.html">MovieClip</a></li>
|
||||
|
||||
<li><a href="../classes/NormalMapFilter.html">NormalMapFilter</a></li>
|
||||
|
||||
<li><a href="../classes/PixelateFilter.html">PixelateFilter</a></li>
|
||||
|
||||
<li><a href="../classes/PixiFastShader.html">PixiFastShader</a></li>
|
||||
|
||||
<li><a href="../classes/PixiShader.html">PixiShader</a></li>
|
||||
|
||||
<li><a href="../classes/Point.html">Point</a></li>
|
||||
|
||||
<li><a href="../classes/Polygon.html">Polygon</a></li>
|
||||
|
||||
<li><a href="../classes/PolyK.html">PolyK</a></li>
|
||||
|
||||
<li><a href="../classes/PrimitiveShader.html">PrimitiveShader</a></li>
|
||||
|
||||
<li><a href="../classes/Rectangle.html">Rectangle</a></li>
|
||||
|
||||
<li><a href="../classes/Rope.html">Rope</a></li>
|
||||
|
||||
<li><a href="../classes/SepiaFilter.html">SepiaFilter</a></li>
|
||||
|
||||
<li><a href="../classes/Spine.html">Spine</a></li>
|
||||
|
||||
<li><a href="../classes/Sprite.html">Sprite</a></li>
|
||||
|
||||
<li><a href="../classes/SpriteBatch.html">SpriteBatch</a></li>
|
||||
|
||||
<li><a href="../classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
|
||||
|
||||
<li><a href="../classes/Stage.html">Stage</a></li>
|
||||
|
||||
<li><a href="../classes/Strip.html">Strip</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/TwistFilter.html">TwistFilter</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLFilterManager.html">WebGLFilterManager</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLGraphics.html">WebGLGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLMaskManager.html">WebGLMaskManager</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLRenderer.html">WebGLRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLShaderManager.html">WebGLShaderManager</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLSpriteBatch.html">WebGLSpriteBatch</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/InteractionData.js</h1>
|
||||
|
||||
<div class="file">
|
||||
<pre class="code prettyprint linenums">
|
||||
/**
|
||||
* @author Mat Groves http://matgroves.com/ @Doormat23
|
||||
*/
|
||||
|
||||
/**
|
||||
* Holds all information related to an Interaction event
|
||||
*
|
||||
* @class InteractionData
|
||||
* @constructor
|
||||
*/
|
||||
PIXI.InteractionData = function()
|
||||
{
|
||||
/**
|
||||
* This point stores the global coords of where the touch/mouse event happened
|
||||
*
|
||||
* @property global
|
||||
* @type Point
|
||||
*/
|
||||
this.global = new PIXI.Point();
|
||||
|
||||
// this is here for legacy... but will remove
|
||||
this.local = new PIXI.Point();
|
||||
|
||||
/**
|
||||
* The target Sprite that was interacted with
|
||||
*
|
||||
* @property target
|
||||
* @type Sprite
|
||||
*/
|
||||
this.target = null;
|
||||
|
||||
/**
|
||||
* When passed to an event handler, this will be the original DOM Event that was captured
|
||||
*
|
||||
* @property originalEvent
|
||||
* @type Event
|
||||
*/
|
||||
this.originalEvent = null;
|
||||
};
|
||||
|
||||
/**
|
||||
* This will return the local coordinates of the specified displayObject for this InteractionData
|
||||
*
|
||||
* @method getLocalPosition
|
||||
* @param displayObject {DisplayObject} The DisplayObject that you would like the local coords off
|
||||
* @return {Point} A point containing the coordinates of the InteractionData position relative to the DisplayObject
|
||||
*/
|
||||
PIXI.InteractionData.prototype.getLocalPosition = function(displayObject)
|
||||
{
|
||||
var worldTransform = displayObject.worldTransform;
|
||||
var global = this.global;
|
||||
|
||||
// do a cheeky transform to get the mouse coords;
|
||||
var a00 = worldTransform.a, a01 = worldTransform.b, a02 = worldTransform.tx,
|
||||
a10 = worldTransform.c, a11 = worldTransform.d, a12 = worldTransform.ty,
|
||||
id = 1 / (a00 * a11 + a01 * -a10);
|
||||
// set the mouse coords...
|
||||
return new PIXI.Point(a11 * id * global.x + -a01 * id * global.y + (a12 * a01 - a02 * a11) * id,
|
||||
a00 * id * global.y + -a10 * id * global.x + (-a12 * a00 + a02 * a10) * id);
|
||||
};
|
||||
|
||||
// constructor
|
||||
PIXI.InteractionData.prototype.constructor = PIXI.InteractionData;
|
||||
</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>
|
||||
317
docs/files/src_pixi_core_Matrix.js.html
Normal file
317
docs/files/src_pixi_core_Matrix.js.html
Normal file
|
|
@ -0,0 +1,317 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>src/pixi/core/Matrix.js - pixi.js</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.9.1/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.9.1/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.5.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/AbstractFilter.html">AbstractFilter</a></li>
|
||||
|
||||
<li><a href="../classes/AjaxRequest.html">AjaxRequest</a></li>
|
||||
|
||||
<li><a href="../classes/AlphaMaskFilter.html">AlphaMaskFilter</a></li>
|
||||
|
||||
<li><a href="../classes/AssetLoader.html">AssetLoader</a></li>
|
||||
|
||||
<li><a href="../classes/AtlasLoader.html">AtlasLoader</a></li>
|
||||
|
||||
<li><a href="../classes/autoDetectRenderer.html">autoDetectRenderer</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/BlurFilter.html">BlurFilter</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasMaskManager.html">CanvasMaskManager</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasTinter.html">CanvasTinter</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/ColorMatrixFilter.html">ColorMatrixFilter</a></li>
|
||||
|
||||
<li><a href="../classes/ColorStepFilter.html">ColorStepFilter</a></li>
|
||||
|
||||
<li><a href="../classes/DisplacementFilter.html">DisplacementFilter</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/DotScreenFilter.html">DotScreenFilter</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/EventTarget.html">EventTarget</a></li>
|
||||
|
||||
<li><a href="../classes/FilterTexture.html">FilterTexture</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/GrayFilter.html">GrayFilter</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/InvertFilter.html">InvertFilter</a></li>
|
||||
|
||||
<li><a href="../classes/JsonLoader.html">JsonLoader</a></li>
|
||||
|
||||
<li><a href="../classes/MovieClip.html">MovieClip</a></li>
|
||||
|
||||
<li><a href="../classes/NormalMapFilter.html">NormalMapFilter</a></li>
|
||||
|
||||
<li><a href="../classes/PixelateFilter.html">PixelateFilter</a></li>
|
||||
|
||||
<li><a href="../classes/PixiFastShader.html">PixiFastShader</a></li>
|
||||
|
||||
<li><a href="../classes/PixiShader.html">PixiShader</a></li>
|
||||
|
||||
<li><a href="../classes/Point.html">Point</a></li>
|
||||
|
||||
<li><a href="../classes/Polygon.html">Polygon</a></li>
|
||||
|
||||
<li><a href="../classes/PolyK.html">PolyK</a></li>
|
||||
|
||||
<li><a href="../classes/PrimitiveShader.html">PrimitiveShader</a></li>
|
||||
|
||||
<li><a href="../classes/Rectangle.html">Rectangle</a></li>
|
||||
|
||||
<li><a href="../classes/Rope.html">Rope</a></li>
|
||||
|
||||
<li><a href="../classes/SepiaFilter.html">SepiaFilter</a></li>
|
||||
|
||||
<li><a href="../classes/Spine.html">Spine</a></li>
|
||||
|
||||
<li><a href="../classes/Sprite.html">Sprite</a></li>
|
||||
|
||||
<li><a href="../classes/SpriteBatch.html">SpriteBatch</a></li>
|
||||
|
||||
<li><a href="../classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
|
||||
|
||||
<li><a href="../classes/Stage.html">Stage</a></li>
|
||||
|
||||
<li><a href="../classes/Strip.html">Strip</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/TwistFilter.html">TwistFilter</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLFilterManager.html">WebGLFilterManager</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLGraphics.html">WebGLGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLMaskManager.html">WebGLMaskManager</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLRenderer.html">WebGLRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLShaderManager.html">WebGLShaderManager</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLSpriteBatch.html">WebGLSpriteBatch</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/core/Matrix.js</h1>
|
||||
|
||||
<div class="file">
|
||||
<pre class="code prettyprint linenums">
|
||||
/**
|
||||
* @author Mat Groves http://matgroves.com/ @Doormat23
|
||||
*/
|
||||
|
||||
PIXI.determineMatrixArrayType = function() {
|
||||
return (typeof Float32Array !== 'undefined') ? Float32Array : Array;
|
||||
};
|
||||
|
||||
/*
|
||||
* @class Matrix2
|
||||
* The Matrix2 class will choose the best type of array to use between
|
||||
* a regular javascript Array and a Float32Array if the latter is available
|
||||
*
|
||||
*/
|
||||
PIXI.Matrix2 = PIXI.determineMatrixArrayType();
|
||||
|
||||
/*
|
||||
* @class Matrix
|
||||
* The Matrix class is now an object, which makes it a lot faster,
|
||||
* here is a representation of it :
|
||||
* | a | b | tx|
|
||||
* | c | c | ty|
|
||||
* | 0 | 0 | 1 |
|
||||
*
|
||||
*/
|
||||
PIXI.Matrix = function()
|
||||
{
|
||||
this.a = 1;
|
||||
this.b = 0;
|
||||
this.c = 0;
|
||||
this.d = 1;
|
||||
this.tx = 0;
|
||||
this.ty = 0;
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates a pixi matrix object based on the array given as a parameter
|
||||
*
|
||||
* @method fromArray
|
||||
* @param array {Array} The array that the matrix will be filled with
|
||||
*/
|
||||
PIXI.Matrix.prototype.fromArray = function(array)
|
||||
{
|
||||
this.a = array[0];
|
||||
this.b = array[1];
|
||||
this.c = array[3];
|
||||
this.d = array[4];
|
||||
this.tx = array[2];
|
||||
this.ty = array[5];
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates an array from the current Matrix object
|
||||
*
|
||||
* @method toArray
|
||||
* @param transpose {Boolean} Whether we need to transpose the matrix or not
|
||||
* @return array {Array} the newly created array which contains the matrix
|
||||
*/
|
||||
PIXI.Matrix.prototype.toArray = function(transpose)
|
||||
{
|
||||
if(!this.array) this.array = new Float32Array(9);
|
||||
var array = this.array;
|
||||
|
||||
if(transpose)
|
||||
{
|
||||
this.array[0] = this.a;
|
||||
this.array[1] = this.c;
|
||||
this.array[2] = 0;
|
||||
this.array[3] = this.b;
|
||||
this.array[4] = this.d;
|
||||
this.array[5] = 0;
|
||||
this.array[6] = this.tx;
|
||||
this.array[7] = this.ty;
|
||||
this.array[8] = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.array[0] = this.a;
|
||||
this.array[1] = this.b;
|
||||
this.array[2] = this.tx;
|
||||
this.array[3] = this.c;
|
||||
this.array[4] = this.d;
|
||||
this.array[5] = this.ty;
|
||||
this.array[6] = 0;
|
||||
this.array[7] = 0;
|
||||
this.array[8] = 1;
|
||||
}
|
||||
|
||||
return array;//[this.a, this.b, this.tx, this.c, this.d, this.ty, 0, 0, 1];
|
||||
};
|
||||
|
||||
PIXI.identityMatrix = new PIXI.Matrix();
|
||||
</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>
|
||||
400
docs/files/src_pixi_display_SpriteBatch.js.html
Normal file
400
docs/files/src_pixi_display_SpriteBatch.js.html
Normal file
|
|
@ -0,0 +1,400 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>src/pixi/display/SpriteBatch.js - pixi.js</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.9.1/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.9.1/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.5.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/AbstractFilter.html">AbstractFilter</a></li>
|
||||
|
||||
<li><a href="../classes/AjaxRequest.html">AjaxRequest</a></li>
|
||||
|
||||
<li><a href="../classes/AlphaMaskFilter.html">AlphaMaskFilter</a></li>
|
||||
|
||||
<li><a href="../classes/AssetLoader.html">AssetLoader</a></li>
|
||||
|
||||
<li><a href="../classes/AtlasLoader.html">AtlasLoader</a></li>
|
||||
|
||||
<li><a href="../classes/autoDetectRenderer.html">autoDetectRenderer</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/BlurFilter.html">BlurFilter</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasMaskManager.html">CanvasMaskManager</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasTinter.html">CanvasTinter</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/ColorMatrixFilter.html">ColorMatrixFilter</a></li>
|
||||
|
||||
<li><a href="../classes/ColorStepFilter.html">ColorStepFilter</a></li>
|
||||
|
||||
<li><a href="../classes/DisplacementFilter.html">DisplacementFilter</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/DotScreenFilter.html">DotScreenFilter</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/EventTarget.html">EventTarget</a></li>
|
||||
|
||||
<li><a href="../classes/FilterTexture.html">FilterTexture</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/GrayFilter.html">GrayFilter</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/InvertFilter.html">InvertFilter</a></li>
|
||||
|
||||
<li><a href="../classes/JsonLoader.html">JsonLoader</a></li>
|
||||
|
||||
<li><a href="../classes/MovieClip.html">MovieClip</a></li>
|
||||
|
||||
<li><a href="../classes/NormalMapFilter.html">NormalMapFilter</a></li>
|
||||
|
||||
<li><a href="../classes/PixelateFilter.html">PixelateFilter</a></li>
|
||||
|
||||
<li><a href="../classes/PixiFastShader.html">PixiFastShader</a></li>
|
||||
|
||||
<li><a href="../classes/PixiShader.html">PixiShader</a></li>
|
||||
|
||||
<li><a href="../classes/Point.html">Point</a></li>
|
||||
|
||||
<li><a href="../classes/Polygon.html">Polygon</a></li>
|
||||
|
||||
<li><a href="../classes/PolyK.html">PolyK</a></li>
|
||||
|
||||
<li><a href="../classes/PrimitiveShader.html">PrimitiveShader</a></li>
|
||||
|
||||
<li><a href="../classes/Rectangle.html">Rectangle</a></li>
|
||||
|
||||
<li><a href="../classes/Rope.html">Rope</a></li>
|
||||
|
||||
<li><a href="../classes/SepiaFilter.html">SepiaFilter</a></li>
|
||||
|
||||
<li><a href="../classes/Spine.html">Spine</a></li>
|
||||
|
||||
<li><a href="../classes/Sprite.html">Sprite</a></li>
|
||||
|
||||
<li><a href="../classes/SpriteBatch.html">SpriteBatch</a></li>
|
||||
|
||||
<li><a href="../classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
|
||||
|
||||
<li><a href="../classes/Stage.html">Stage</a></li>
|
||||
|
||||
<li><a href="../classes/Strip.html">Strip</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/TwistFilter.html">TwistFilter</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLFilterManager.html">WebGLFilterManager</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLGraphics.html">WebGLGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLMaskManager.html">WebGLMaskManager</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLRenderer.html">WebGLRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLShaderManager.html">WebGLShaderManager</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLSpriteBatch.html">WebGLSpriteBatch</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/display/SpriteBatch.js</h1>
|
||||
|
||||
<div class="file">
|
||||
<pre class="code prettyprint linenums">
|
||||
/**
|
||||
* @author Mat Groves http://matgroves.com/
|
||||
*/
|
||||
|
||||
/**
|
||||
* The SpriteBatch class is a really fast version of the DisplayObjectContainer
|
||||
* built solely for speed, so use when you need a lot of sprites or particles.
|
||||
* And it's extremely easy to use :
|
||||
|
||||
var container = new PIXI.SpriteBatch();
|
||||
|
||||
stage.addChild(container);
|
||||
|
||||
for(var i = 0; i < 100; i++)
|
||||
{
|
||||
var sprite = new PIXI.Sprite.fromImage("myImage.png");
|
||||
container.addChild(sprite);
|
||||
}
|
||||
* And here you have a hundred sprites that will be renderer at the speed of light
|
||||
*
|
||||
* @class SpriteBatch
|
||||
* @constructor
|
||||
* @param texture {Texture}
|
||||
*/
|
||||
PIXI.SpriteBatch = function(texture)
|
||||
{
|
||||
PIXI.DisplayObjectContainer.call( this);
|
||||
|
||||
this.textureThing = texture;
|
||||
|
||||
this.ready = false;
|
||||
};
|
||||
|
||||
PIXI.SpriteBatch.prototype = Object.create(PIXI.DisplayObjectContainer.prototype);
|
||||
PIXI.SpriteBatch.constructor = PIXI.SpriteBatch;
|
||||
|
||||
/*
|
||||
* Initialises the spriteBatch
|
||||
*
|
||||
* @method initWebGL
|
||||
* @param gl {WebGLContext} the current WebGL drawing context
|
||||
*/
|
||||
PIXI.SpriteBatch.prototype.initWebGL = function(gl)
|
||||
{
|
||||
// TODO only one needed for the whole engine really?
|
||||
this.fastSpriteBatch = new PIXI.WebGLFastSpriteBatch(gl);
|
||||
|
||||
this.ready = true;
|
||||
};
|
||||
|
||||
/*
|
||||
* Updates the object transform for rendering
|
||||
*
|
||||
* @method updateTransform
|
||||
* @private
|
||||
*/
|
||||
PIXI.SpriteBatch.prototype.updateTransform = function()
|
||||
{
|
||||
// TODO dont need to!
|
||||
PIXI.DisplayObject.prototype.updateTransform.call( this );
|
||||
// PIXI.DisplayObjectContainer.prototype.updateTransform.call( this );
|
||||
};
|
||||
|
||||
/**
|
||||
* Renders the object using the WebGL renderer
|
||||
*
|
||||
* @method _renderWebGL
|
||||
* @param renderSession {RenderSession}
|
||||
* @private
|
||||
*/
|
||||
PIXI.SpriteBatch.prototype._renderWebGL = function(renderSession)
|
||||
{
|
||||
if(!this.visible || this.alpha <= 0 || !this.children.length)return;
|
||||
|
||||
if(!this.ready)this.initWebGL( renderSession.gl );
|
||||
|
||||
renderSession.spriteBatch.stop();
|
||||
|
||||
renderSession.shaderManager.activateShader(renderSession.shaderManager.fastShader);
|
||||
|
||||
this.fastSpriteBatch.begin(this, renderSession);
|
||||
this.fastSpriteBatch.render(this);
|
||||
|
||||
renderSession.shaderManager.activateShader(renderSession.shaderManager.defaultShader);
|
||||
|
||||
renderSession.spriteBatch.start();
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Renders the object using the Canvas renderer
|
||||
*
|
||||
* @method _renderCanvas
|
||||
* @param renderSession {RenderSession}
|
||||
* @private
|
||||
*/
|
||||
PIXI.SpriteBatch.prototype._renderCanvas = function(renderSession)
|
||||
{
|
||||
var context = renderSession.context;
|
||||
context.globalAlpha = this.worldAlpha;
|
||||
|
||||
var transform = this.worldTransform;
|
||||
|
||||
// alow for trimming
|
||||
|
||||
if (renderSession.roundPixels)
|
||||
{
|
||||
context.setTransform(transform.a, transform.c, transform.b, transform.d, Math.floor(transform.tx), Math.floor(transform.ty));
|
||||
}
|
||||
else
|
||||
{
|
||||
context.setTransform(transform.a, transform.c, transform.b, transform.d, transform.tx, transform.ty);
|
||||
}
|
||||
|
||||
context.save();
|
||||
|
||||
for (var i = 0; i < this.children.length; i++) {
|
||||
|
||||
var child = this.children[i];
|
||||
var texture = child.texture;
|
||||
var frame = texture.frame;
|
||||
|
||||
context.globalAlpha = this.worldAlpha * child.alpha;
|
||||
|
||||
if(child.rotation % (Math.PI * 2) === 0)
|
||||
{
|
||||
|
||||
// this is the fastest way to optimise! - if rotation is 0 then we can avoid any kind of setTransform call
|
||||
context.drawImage(texture.baseTexture.source,
|
||||
frame.x,
|
||||
frame.y,
|
||||
frame.width,
|
||||
frame.height,
|
||||
((child.anchor.x) * (-frame.width * child.scale.x) + child.position.x + 0.5) | 0,
|
||||
((child.anchor.y) * (-frame.height * child.scale.y) + child.position.y + 0.5) | 0,
|
||||
frame.width * child.scale.x,
|
||||
frame.height * child.scale.y);
|
||||
}
|
||||
else
|
||||
{
|
||||
PIXI.DisplayObject.prototype.updateTransform.call(child);
|
||||
|
||||
transform = child.localTransform;
|
||||
|
||||
if(this.rotation !== this.rotationCache)
|
||||
{
|
||||
this.rotationCache = this.rotation;
|
||||
this._sr = Math.sin(this.rotation);
|
||||
this._cr = Math.cos(this.rotation);
|
||||
}
|
||||
|
||||
var a = child._cr * child.scale.x,
|
||||
b = -child._sr * child.scale.y,
|
||||
c = child._sr * child.scale.x,
|
||||
d = child._cr * child.scale.y;
|
||||
|
||||
context.setTransform(a, c, b, d, child.position.x, child.position.y);
|
||||
|
||||
context.drawImage(texture.baseTexture.source,
|
||||
frame.x,
|
||||
frame.y,
|
||||
frame.width,
|
||||
frame.height,
|
||||
((child.anchor.x) * (-frame.width) + 0.5) | 0,
|
||||
((child.anchor.y) * (-frame.height) + 0.5) | 0,
|
||||
frame.width,
|
||||
frame.height);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
context.restore();
|
||||
};
|
||||
|
||||
|
||||
</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>
|
||||
449
docs/files/src_pixi_filters_NormalMapFilter.js.html
Normal file
449
docs/files/src_pixi_filters_NormalMapFilter.js.html
Normal file
|
|
@ -0,0 +1,449 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>src/pixi/filters/NormalMapFilter.js - pixi.js</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.9.1/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.9.1/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.5.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/AbstractFilter.html">AbstractFilter</a></li>
|
||||
|
||||
<li><a href="../classes/AjaxRequest.html">AjaxRequest</a></li>
|
||||
|
||||
<li><a href="../classes/AlphaMaskFilter.html">AlphaMaskFilter</a></li>
|
||||
|
||||
<li><a href="../classes/AssetLoader.html">AssetLoader</a></li>
|
||||
|
||||
<li><a href="../classes/AtlasLoader.html">AtlasLoader</a></li>
|
||||
|
||||
<li><a href="../classes/autoDetectRenderer.html">autoDetectRenderer</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/BlurFilter.html">BlurFilter</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasMaskManager.html">CanvasMaskManager</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasTinter.html">CanvasTinter</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/ColorMatrixFilter.html">ColorMatrixFilter</a></li>
|
||||
|
||||
<li><a href="../classes/ColorStepFilter.html">ColorStepFilter</a></li>
|
||||
|
||||
<li><a href="../classes/DisplacementFilter.html">DisplacementFilter</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/DotScreenFilter.html">DotScreenFilter</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/EventTarget.html">EventTarget</a></li>
|
||||
|
||||
<li><a href="../classes/FilterTexture.html">FilterTexture</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/GrayFilter.html">GrayFilter</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/InvertFilter.html">InvertFilter</a></li>
|
||||
|
||||
<li><a href="../classes/JsonLoader.html">JsonLoader</a></li>
|
||||
|
||||
<li><a href="../classes/MovieClip.html">MovieClip</a></li>
|
||||
|
||||
<li><a href="../classes/NormalMapFilter.html">NormalMapFilter</a></li>
|
||||
|
||||
<li><a href="../classes/PixelateFilter.html">PixelateFilter</a></li>
|
||||
|
||||
<li><a href="../classes/PixiFastShader.html">PixiFastShader</a></li>
|
||||
|
||||
<li><a href="../classes/PixiShader.html">PixiShader</a></li>
|
||||
|
||||
<li><a href="../classes/Point.html">Point</a></li>
|
||||
|
||||
<li><a href="../classes/Polygon.html">Polygon</a></li>
|
||||
|
||||
<li><a href="../classes/PolyK.html">PolyK</a></li>
|
||||
|
||||
<li><a href="../classes/PrimitiveShader.html">PrimitiveShader</a></li>
|
||||
|
||||
<li><a href="../classes/Rectangle.html">Rectangle</a></li>
|
||||
|
||||
<li><a href="../classes/Rope.html">Rope</a></li>
|
||||
|
||||
<li><a href="../classes/SepiaFilter.html">SepiaFilter</a></li>
|
||||
|
||||
<li><a href="../classes/Spine.html">Spine</a></li>
|
||||
|
||||
<li><a href="../classes/Sprite.html">Sprite</a></li>
|
||||
|
||||
<li><a href="../classes/SpriteBatch.html">SpriteBatch</a></li>
|
||||
|
||||
<li><a href="../classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
|
||||
|
||||
<li><a href="../classes/Stage.html">Stage</a></li>
|
||||
|
||||
<li><a href="../classes/Strip.html">Strip</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/TwistFilter.html">TwistFilter</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLFilterManager.html">WebGLFilterManager</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLGraphics.html">WebGLGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLMaskManager.html">WebGLMaskManager</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLRenderer.html">WebGLRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLShaderManager.html">WebGLShaderManager</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLSpriteBatch.html">WebGLSpriteBatch</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/filters/NormalMapFilter.js</h1>
|
||||
|
||||
<div class="file">
|
||||
<pre class="code prettyprint linenums">
|
||||
/**
|
||||
* @author Mat Groves http://matgroves.com/ @Doormat23
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object.
|
||||
* You can use this filter to apply all manor of crazy warping effects
|
||||
* Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.
|
||||
* @class NormalMapFilter
|
||||
* @contructor
|
||||
* @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment
|
||||
*/
|
||||
PIXI.NormalMapFilter = function(texture)
|
||||
{
|
||||
PIXI.AbstractFilter.call( this );
|
||||
|
||||
this.passes = [this];
|
||||
texture.baseTexture._powerOf2 = true;
|
||||
|
||||
// set the uniforms
|
||||
this.uniforms = {
|
||||
displacementMap: {type: 'sampler2D', value:texture},
|
||||
scale: {type: '2f', value:{x:15, y:15}},
|
||||
offset: {type: '2f', value:{x:0, y:0}},
|
||||
mapDimensions: {type: '2f', value:{x:1, y:1}},
|
||||
dimensions: {type: '4f', value:[0,0,0,0]},
|
||||
// LightDir: {type: 'f3', value:[0, 1, 0]},
|
||||
LightPos: {type: '3f', value:[0, 1, 0]}
|
||||
};
|
||||
|
||||
|
||||
if(texture.baseTexture.hasLoaded)
|
||||
{
|
||||
this.uniforms.mapDimensions.value.x = texture.width;
|
||||
this.uniforms.mapDimensions.value.y = texture.height;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.boundLoadedFunction = this.onTextureLoaded.bind(this);
|
||||
|
||||
texture.baseTexture.on("loaded", this.boundLoadedFunction);
|
||||
}
|
||||
|
||||
this.fragmentSrc = [
|
||||
"precision mediump float;",
|
||||
"varying vec2 vTextureCoord;",
|
||||
"varying float vColor;",
|
||||
"uniform sampler2D displacementMap;",
|
||||
"uniform sampler2D uSampler;",
|
||||
|
||||
"uniform vec4 dimensions;",
|
||||
|
||||
"const vec2 Resolution = vec2(1.0,1.0);", //resolution of screen
|
||||
"uniform vec3 LightPos;", //light position, normalized
|
||||
"const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);", //light RGBA -- alpha is intensity
|
||||
"const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.5);", //ambient RGBA -- alpha is intensity
|
||||
"const vec3 Falloff = vec3(0.0, 1.0, 0.2);", //attenuation coefficients
|
||||
|
||||
"uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);",
|
||||
|
||||
|
||||
"uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);",
|
||||
|
||||
|
||||
"void main(void) {",
|
||||
"vec2 mapCords = vTextureCoord.xy;",
|
||||
|
||||
"vec4 color = texture2D(uSampler, vTextureCoord.st);",
|
||||
"vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;",
|
||||
|
||||
|
||||
"mapCords *= vec2(dimensions.x/512.0, dimensions.y/512.0);",
|
||||
|
||||
"mapCords.y *= -1.0;",
|
||||
"mapCords.y += 1.0;",
|
||||
|
||||
//RGBA of our diffuse color
|
||||
"vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);",
|
||||
|
||||
//RGB of our normal map
|
||||
"vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;",
|
||||
|
||||
//The delta position of light
|
||||
//"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);",
|
||||
"vec3 LightDir = vec3(LightPos.xy - (mapCords.xy), LightPos.z);",
|
||||
//Correct for aspect ratio
|
||||
//"LightDir.x *= Resolution.x / Resolution.y;",
|
||||
|
||||
//Determine distance (used for attenuation) BEFORE we normalize our LightDir
|
||||
"float D = length(LightDir);",
|
||||
|
||||
//normalize our vectors
|
||||
"vec3 N = normalize(NormalMap * 2.0 - 1.0);",
|
||||
"vec3 L = normalize(LightDir);",
|
||||
|
||||
//Pre-multiply light color with intensity
|
||||
//Then perform "N dot L" to determine our diffuse term
|
||||
"vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);",
|
||||
|
||||
//pre-multiply ambient color with intensity
|
||||
"vec3 Ambient = AmbientColor.rgb * AmbientColor.a;",
|
||||
|
||||
//calculate attenuation
|
||||
"float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );",
|
||||
|
||||
//the calculation which brings it all together
|
||||
"vec3 Intensity = Ambient + Diffuse * Attenuation;",
|
||||
"vec3 FinalColor = DiffuseColor.rgb * Intensity;",
|
||||
"gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);",
|
||||
//"gl_FragColor = vec4(1.0, 0.0, 0.0, Attenuation);",//vColor * vec4(FinalColor, DiffuseColor.a);",
|
||||
/*
|
||||
// normalise color
|
||||
"vec3 normal = normalize(nColor * 2.0 - 1.0);",
|
||||
|
||||
"vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );",
|
||||
|
||||
"float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);",
|
||||
|
||||
"float d = sqrt(dot(deltaPos, deltaPos));",
|
||||
"float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );",
|
||||
|
||||
"vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;",
|
||||
"result *= color.rgb;",
|
||||
|
||||
"gl_FragColor = vec4(result, 1.0);",*/
|
||||
|
||||
|
||||
|
||||
"}"
|
||||
];
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
void main() {
|
||||
//sample color & normals from our textures
|
||||
vec4 color = texture2D(u_texture, v_texCoords.st);
|
||||
vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb;
|
||||
|
||||
//some bump map programs will need the Y value flipped..
|
||||
nColor.g = yInvert ? 1.0 - nColor.g : nColor.g;
|
||||
|
||||
//this is for debugging purposes, allowing us to lower the intensity of our bump map
|
||||
vec3 nBase = vec3(0.5, 0.5, 1.0);
|
||||
nColor = mix(nBase, nColor, strength);
|
||||
|
||||
//normals need to be converted to [-1.0, 1.0] range and normalized
|
||||
vec3 normal = normalize(nColor * 2.0 - 1.0);
|
||||
|
||||
//here we do a simple distance calculation
|
||||
vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );
|
||||
|
||||
vec3 lightDir = normalize(deltaPos);
|
||||
float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0;
|
||||
|
||||
//now let's get a nice little falloff
|
||||
float d = sqrt(dot(deltaPos, deltaPos));
|
||||
float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0;
|
||||
|
||||
vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;
|
||||
result *= color.rgb;
|
||||
|
||||
gl_FragColor = v_color * vec4(result, color.a);
|
||||
}
|
||||
*/
|
||||
PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype );
|
||||
PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter;
|
||||
|
||||
PIXI.NormalMapFilter.prototype.onTextureLoaded = function()
|
||||
{
|
||||
|
||||
this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width;
|
||||
this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height;
|
||||
|
||||
this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction)
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* The texture used for the displacemtent map * must be power of 2 texture at the moment
|
||||
*
|
||||
* @property map
|
||||
* @type Texture
|
||||
*/
|
||||
Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', {
|
||||
get: function() {
|
||||
return this.uniforms.displacementMap.value;
|
||||
},
|
||||
set: function(value) {
|
||||
this.uniforms.displacementMap.value = value;
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* The multiplier used to scale the displacement result from the map calculation.
|
||||
*
|
||||
* @property scale
|
||||
* @type Point
|
||||
*/
|
||||
Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', {
|
||||
get: function() {
|
||||
return this.uniforms.scale.value;
|
||||
},
|
||||
set: function(value) {
|
||||
this.uniforms.scale.value = value;
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* The offset used to move the displacement map.
|
||||
*
|
||||
* @property offset
|
||||
* @type Point
|
||||
*/
|
||||
Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', {
|
||||
get: function() {
|
||||
return this.uniforms.offset.value;
|
||||
},
|
||||
set: function(value) {
|
||||
this.uniforms.offset.value = value;
|
||||
}
|
||||
});
|
||||
</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>
|
||||
310
docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html
Normal file
310
docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html
Normal file
|
|
@ -0,0 +1,310 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>src/pixi/renderers/webgl/utils/FilterTexture.js - pixi.js</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.9.1/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.9.1/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.5.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/AbstractFilter.html">AbstractFilter</a></li>
|
||||
|
||||
<li><a href="../classes/AjaxRequest.html">AjaxRequest</a></li>
|
||||
|
||||
<li><a href="../classes/AlphaMaskFilter.html">AlphaMaskFilter</a></li>
|
||||
|
||||
<li><a href="../classes/AssetLoader.html">AssetLoader</a></li>
|
||||
|
||||
<li><a href="../classes/AtlasLoader.html">AtlasLoader</a></li>
|
||||
|
||||
<li><a href="../classes/autoDetectRenderer.html">autoDetectRenderer</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/BlurFilter.html">BlurFilter</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasMaskManager.html">CanvasMaskManager</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasTinter.html">CanvasTinter</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/ColorMatrixFilter.html">ColorMatrixFilter</a></li>
|
||||
|
||||
<li><a href="../classes/ColorStepFilter.html">ColorStepFilter</a></li>
|
||||
|
||||
<li><a href="../classes/DisplacementFilter.html">DisplacementFilter</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/DotScreenFilter.html">DotScreenFilter</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/EventTarget.html">EventTarget</a></li>
|
||||
|
||||
<li><a href="../classes/FilterTexture.html">FilterTexture</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/GrayFilter.html">GrayFilter</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/InvertFilter.html">InvertFilter</a></li>
|
||||
|
||||
<li><a href="../classes/JsonLoader.html">JsonLoader</a></li>
|
||||
|
||||
<li><a href="../classes/MovieClip.html">MovieClip</a></li>
|
||||
|
||||
<li><a href="../classes/NormalMapFilter.html">NormalMapFilter</a></li>
|
||||
|
||||
<li><a href="../classes/PixelateFilter.html">PixelateFilter</a></li>
|
||||
|
||||
<li><a href="../classes/PixiFastShader.html">PixiFastShader</a></li>
|
||||
|
||||
<li><a href="../classes/PixiShader.html">PixiShader</a></li>
|
||||
|
||||
<li><a href="../classes/Point.html">Point</a></li>
|
||||
|
||||
<li><a href="../classes/Polygon.html">Polygon</a></li>
|
||||
|
||||
<li><a href="../classes/PolyK.html">PolyK</a></li>
|
||||
|
||||
<li><a href="../classes/PrimitiveShader.html">PrimitiveShader</a></li>
|
||||
|
||||
<li><a href="../classes/Rectangle.html">Rectangle</a></li>
|
||||
|
||||
<li><a href="../classes/Rope.html">Rope</a></li>
|
||||
|
||||
<li><a href="../classes/SepiaFilter.html">SepiaFilter</a></li>
|
||||
|
||||
<li><a href="../classes/Spine.html">Spine</a></li>
|
||||
|
||||
<li><a href="../classes/Sprite.html">Sprite</a></li>
|
||||
|
||||
<li><a href="../classes/SpriteBatch.html">SpriteBatch</a></li>
|
||||
|
||||
<li><a href="../classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
|
||||
|
||||
<li><a href="../classes/Stage.html">Stage</a></li>
|
||||
|
||||
<li><a href="../classes/Strip.html">Strip</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/TwistFilter.html">TwistFilter</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLFilterManager.html">WebGLFilterManager</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLGraphics.html">WebGLGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLMaskManager.html">WebGLMaskManager</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLRenderer.html">WebGLRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLShaderManager.html">WebGLShaderManager</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLSpriteBatch.html">WebGLSpriteBatch</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/renderers/webgl/utils/FilterTexture.js</h1>
|
||||
|
||||
<div class="file">
|
||||
<pre class="code prettyprint linenums">
|
||||
/**
|
||||
* @author Mat Groves http://matgroves.com/ @Doormat23
|
||||
*/
|
||||
|
||||
/**
|
||||
* @class FilterTexture
|
||||
* @constructor
|
||||
* @param gl {WebGLContext} the current WebGL drawing context
|
||||
* @param width {Number} the horizontal range of the filter
|
||||
* @param height {Number} the vertical range of the filter
|
||||
* @private
|
||||
*/
|
||||
PIXI.FilterTexture = function(gl, width, height)
|
||||
{
|
||||
/**
|
||||
* @property gl
|
||||
* @type WebGLContext
|
||||
*/
|
||||
this.gl = gl;
|
||||
|
||||
// next time to create a frame buffer and texture
|
||||
this.frameBuffer = gl.createFramebuffer();
|
||||
this.texture = gl.createTexture();
|
||||
|
||||
gl.bindTexture(gl.TEXTURE_2D, this.texture);
|
||||
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
|
||||
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
|
||||
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
|
||||
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
|
||||
gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer );
|
||||
|
||||
gl.bindFramebuffer(gl.FRAMEBUFFER, this.frameBuffer );
|
||||
gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, this.texture, 0);
|
||||
|
||||
this.resize(width, height);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Clears the filter texture
|
||||
* @method clear
|
||||
*/
|
||||
PIXI.FilterTexture.prototype.clear = function()
|
||||
{
|
||||
var gl = this.gl;
|
||||
|
||||
gl.clearColor(0,0,0, 0);
|
||||
gl.clear(gl.COLOR_BUFFER_BIT);
|
||||
};
|
||||
|
||||
/**
|
||||
* Resizes the texture to the specified width and height
|
||||
*
|
||||
* @method resize
|
||||
* @param width {Number} the new width of the texture
|
||||
* @param height {Number} the new height of the texture
|
||||
*/
|
||||
PIXI.FilterTexture.prototype.resize = function(width, height)
|
||||
{
|
||||
if(this.width === width && this.height === height) return;
|
||||
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
|
||||
var gl = this.gl;
|
||||
|
||||
gl.bindTexture(gl.TEXTURE_2D, this.texture);
|
||||
gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Destroys the filter texture
|
||||
* @method destroy
|
||||
*/
|
||||
PIXI.FilterTexture.prototype.destroy = function()
|
||||
{
|
||||
var gl = this.gl;
|
||||
gl.deleteFramebuffer( this.frameBuffer );
|
||||
gl.deleteTexture( this.texture );
|
||||
|
||||
this.frameBuffer = null;
|
||||
this.texture = null;
|
||||
};
|
||||
|
||||
</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>
|
||||
|
|
@ -14,7 +14,6 @@
|
|||
</head>
|
||||
<body>
|
||||
<script>
|
||||
|
||||
// create an new instance of a pixi stage
|
||||
var stage = new PIXI.Stage(0x66FF99);
|
||||
|
||||
|
|
@ -43,8 +42,7 @@
|
|||
stage.addChild(bunny);
|
||||
|
||||
function animate() {
|
||||
|
||||
requestAnimFrame( animate );
|
||||
requestAnimFrame(animate);
|
||||
|
||||
// just for fun, let's rotate mr rabbit a little
|
||||
bunny.rotation += 0.1;
|
||||
|
|
@ -52,7 +50,6 @@
|
|||
// render the stage
|
||||
renderer.render(stage);
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<!--<link href='http://fonts.googleapis.com/css?family=Snippet|Arvo:700italic|Podkova' rel='stylesheet' type='text/css'>-->
|
||||
<title>pixi.js example 10 Text</title>
|
||||
<style>
|
||||
body {
|
||||
|
|
@ -11,13 +10,11 @@
|
|||
}
|
||||
</style>
|
||||
|
||||
|
||||
<script src="../../bin/pixi.dev.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
|
||||
// Load them google fonts before starting...!
|
||||
// Load them google fonts before starting...!
|
||||
WebFontConfig = {
|
||||
google: {
|
||||
families: [ 'Snippet', 'Arvo:700italic', 'Podkova:700' ]
|
||||
|
|
@ -27,7 +24,6 @@
|
|||
// do something
|
||||
init();
|
||||
}
|
||||
|
||||
};
|
||||
(function() {
|
||||
var wf = document.createElement('script');
|
||||
|
|
@ -41,19 +37,19 @@
|
|||
|
||||
function runList(item)
|
||||
{
|
||||
console.log("_")
|
||||
console.log("_");
|
||||
var safe = 0;
|
||||
var tmp = item;
|
||||
while(tmp._iNext)
|
||||
{
|
||||
safe++;
|
||||
tmp = tmp._iNext;
|
||||
console.log(tmp);//.childIndex);
|
||||
console.log(tmp);
|
||||
|
||||
if(safe > 100)
|
||||
{
|
||||
console.log("BREAK")
|
||||
break
|
||||
console.log("BREAK");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -68,30 +64,23 @@
|
|||
// use callback
|
||||
loader.onComplete = onAssetsLoaded;
|
||||
|
||||
|
||||
|
||||
// create an new instance of a pixi stage
|
||||
var stage = new PIXI.Stage(0x66FF99);
|
||||
|
||||
// begin load
|
||||
loader.load();
|
||||
|
||||
|
||||
function onAssetsLoaded()
|
||||
{
|
||||
var bitmapFontText = new PIXI.BitmapText("bitmap fonts are\n now supported!", {font: "35px Desyrel", align: "right"});
|
||||
var bitmapFontText = new PIXI.BitmapText("bitmap fonts are\n now supported!", { font: "35px Desyrel", align: "right" });
|
||||
bitmapFontText.position.x = 620 - bitmapFontText.textWidth - 20;
|
||||
bitmapFontText.position.y = 20;
|
||||
|
||||
runList(bitmapFontText);
|
||||
|
||||
stage.addChild(bitmapFontText);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// add a shiny background...
|
||||
var background = PIXI.Sprite.fromImage("textDemoBG.jpg");
|
||||
stage.addChild(background);
|
||||
|
|
@ -101,15 +90,13 @@
|
|||
// add the renderer view element to the DOM
|
||||
document.body.appendChild(renderer.view);
|
||||
|
||||
requestAnimFrame(animate);
|
||||
|
||||
// create some white text using the Snippet webfont
|
||||
var textSample = new PIXI.Text("Pixi.js can has\nmultiline text!", {font: "35px Snippet", fill: "white", align: "left"});
|
||||
var textSample = new PIXI.Text("Pixi.js can has\nmultiline text!", { font: "35px Snippet", fill: "white", align: "left" });
|
||||
textSample.position.x = 20;
|
||||
textSample.position.y = 20;
|
||||
|
||||
// create a text object with a nice stroke
|
||||
var spinningText = new PIXI.Text("I'm fun!", {font: "bold 60px Podkova", fill: "#cc00ff", align: "center", stroke: "#FFFFFF", strokeThickness: 6});
|
||||
var spinningText = new PIXI.Text("I'm fun!", { font: "bold 60px Podkova", fill: "#cc00ff", align: "center", stroke: "#FFFFFF", strokeThickness: 6 });
|
||||
|
||||
// setting the anchor point to 0.5 will center align the text... great for spinning!
|
||||
spinningText.anchor.x = spinningText.anchor.y = 0.5;
|
||||
|
|
@ -117,7 +104,7 @@
|
|||
spinningText.position.y = 400 / 2;
|
||||
|
||||
// create a text object that will be updated..
|
||||
var countingText = new PIXI.Text("COUNT 4EVAR: 0", {font: "bold italic 60px Arvo", fill: "#3e1707", align: "center", stroke: "#a4410e", strokeThickness: 7});
|
||||
var countingText = new PIXI.Text("COUNT 4EVAR: 0", { font: "bold italic 60px Arvo", fill: "#3e1707", align: "center", stroke: "#a4410e", strokeThickness: 7 });
|
||||
countingText.position.x = 620 / 2;
|
||||
countingText.position.y = 320;
|
||||
countingText.anchor.x = 0.5;
|
||||
|
|
@ -132,28 +119,11 @@
|
|||
|
||||
stage.removeAll();
|
||||
|
||||
|
||||
|
||||
function animate() {
|
||||
|
||||
// requestAnimFrame(animate);
|
||||
|
||||
// count++;
|
||||
|
||||
// if(count == 50)
|
||||
// {
|
||||
// count = 0;
|
||||
// score++;
|
||||
// // update the text...
|
||||
// countingText.setText("COUNT 4EVAR: " + score);
|
||||
|
||||
// }
|
||||
// // just for fun, let's rotate the text
|
||||
// spinningText.rotation += 0.03;
|
||||
|
||||
// // render the stage
|
||||
// renderer.render(stage);
|
||||
}
|
||||
|
||||
requestAnimFrame(animate);
|
||||
}
|
||||
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@
|
|||
}
|
||||
</style>
|
||||
|
||||
|
||||
<script src="../../bin/pixi.dev.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
|
@ -40,8 +39,8 @@
|
|||
var outputSprite = new PIXI.Sprite(currentTexture);
|
||||
|
||||
// align the sprite
|
||||
outputSprite.position.x = 800/2;
|
||||
outputSprite.position.y = 600/2;
|
||||
outputSprite.position.x = 800 / 2;
|
||||
outputSprite.position.y = 600 / 2;
|
||||
outputSprite.anchor.x = 0.5;
|
||||
outputSprite.anchor.y = 0.5;
|
||||
|
||||
|
|
@ -50,8 +49,8 @@
|
|||
|
||||
var stuffContainer = new PIXI.DisplayObjectContainer();
|
||||
|
||||
stuffContainer.position.x = 800/2;
|
||||
stuffContainer.position.y = 600/2
|
||||
stuffContainer.position.x = 800 / 2;
|
||||
stuffContainer.position.y = 600 / 2
|
||||
|
||||
stage.addChild(stuffContainer);
|
||||
|
||||
|
|
@ -82,14 +81,13 @@
|
|||
// used for spinning!
|
||||
var count = 0;
|
||||
|
||||
|
||||
requestAnimFrame(animate);
|
||||
|
||||
function animate() {
|
||||
|
||||
requestAnimFrame( animate );
|
||||
|
||||
for (var i=0; i < items.length; i++)
|
||||
for (var i = 0; i < items.length; i++)
|
||||
{
|
||||
// rotate each item
|
||||
var item = items[i];
|
||||
|
|
@ -103,13 +101,12 @@
|
|||
renderTexture = renderTexture2;
|
||||
renderTexture2 = temp;
|
||||
|
||||
|
||||
// set the new texture
|
||||
outputSprite.setTexture(renderTexture);
|
||||
|
||||
// twist this up!
|
||||
stuffContainer.rotation -= 0.01
|
||||
outputSprite.scale.x = outputSprite.scale.y = 1 + Math.sin(count) * 0.2;
|
||||
outputSprite.scale.x = outputSprite.scale.y = 1 + Math.sin(count) * 0.2;
|
||||
|
||||
// render the stage to the texture
|
||||
// the true clears the texture before content is rendered
|
||||
|
|
|
|||
|
|
@ -15,15 +15,12 @@
|
|||
</head>
|
||||
<body>
|
||||
<script>
|
||||
|
||||
|
||||
// create an new instance of a pixi stage
|
||||
var stage = new PIXI.Stage(0xFFFFFF, true);
|
||||
|
||||
stage.setInteractive(true);
|
||||
|
||||
var sprite = PIXI.Sprite.fromImage("spinObj_02.png");
|
||||
|
||||
var renderer = PIXI.autoDetectRenderer(620, 380);
|
||||
|
||||
renderer.view.style.display = "block";
|
||||
|
|
@ -33,7 +30,6 @@
|
|||
|
||||
var graphics = new PIXI.Graphics();
|
||||
|
||||
|
||||
// set a fill and line style
|
||||
graphics.beginFill(0xFF3300);
|
||||
graphics.lineStyle(10, 0xffd900, 1);
|
||||
|
|
@ -74,7 +70,6 @@
|
|||
graphics.moveTo(30,30);
|
||||
graphics.lineTo(600, 300);
|
||||
|
||||
|
||||
stage.addChild(graphics);
|
||||
|
||||
// let's create moving shape
|
||||
|
|
|
|||
|
|
@ -24,14 +24,14 @@
|
|||
bg.anchor.x = 0.5;
|
||||
bg.anchor.y = 0.5;
|
||||
|
||||
bg.position.x = 620/2;
|
||||
bg.position.y = 380/2;
|
||||
bg.position.x = 620 / 2;
|
||||
bg.position.y = 380 / 2;
|
||||
|
||||
stage.addChild(bg);
|
||||
|
||||
var container = new PIXI.DisplayObjectContainer();
|
||||
container.position.x = 620/2;
|
||||
container.position.y = 380/2;
|
||||
container.position.x = 620 / 2;
|
||||
container.position.y = 380 / 2;
|
||||
|
||||
var bgFront = PIXI.Sprite.fromImage("SceneRotate.jpg");
|
||||
bgFront.anchor.x = 0.5;
|
||||
|
|
@ -73,8 +73,8 @@
|
|||
// lets create moving shape
|
||||
var thing = new PIXI.Graphics();
|
||||
stage.addChild(thing);
|
||||
thing.position.x = 620/2;
|
||||
thing.position.y = 380/2;
|
||||
thing.position.x = 620 / 2;
|
||||
thing.position.y = 380 / 2;
|
||||
thing.lineStyle(0);
|
||||
|
||||
container.mask = thing;
|
||||
|
|
@ -109,7 +109,7 @@
|
|||
|
||||
logo.click = logo.tap = function()
|
||||
{
|
||||
window.open("https://github.com/GoodBoyDigital/pixi.js", "_blank")
|
||||
window.open("https://github.com/GoodBoyDigital/pixi.js", "_blank");
|
||||
}
|
||||
|
||||
var help = new PIXI.Text("Click to turn masking on / off.", {font:"bold 12pt Arial", fill:"white"});
|
||||
|
|
@ -120,7 +120,6 @@
|
|||
requestAnimFrame(animate);
|
||||
|
||||
function animate() {
|
||||
|
||||
bg.rotation += 0.01;
|
||||
bgFront.rotation -= 0.01;
|
||||
|
||||
|
|
@ -144,7 +143,7 @@
|
|||
|
||||
|
||||
renderer.render(stage);
|
||||
requestAnimFrame( animate );
|
||||
requestAnimFrame(animate);
|
||||
}
|
||||
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@
|
|||
</head>
|
||||
<body>
|
||||
<script>
|
||||
|
||||
var renderer = PIXI.autoDetectRenderer(620, 380);
|
||||
|
||||
// create an new instance of a pixi stage
|
||||
|
|
@ -26,20 +25,19 @@
|
|||
bg.anchor.x = 0.5;
|
||||
bg.anchor.y = 0.5;
|
||||
|
||||
bg.position.x = 620/2;
|
||||
bg.position.y = 380/2;
|
||||
bg.position.x = 620 / 2;
|
||||
bg.position.y = 380 / 2;
|
||||
|
||||
var colorMatrix = [1,0,0,0,
|
||||
0,1,0,0,
|
||||
0,0,1,0,
|
||||
0,0,0,1];
|
||||
|
||||
|
||||
var filter = new PIXI.ColorMatrixFilter();
|
||||
|
||||
var container = new PIXI.DisplayObjectContainer();
|
||||
container.position.x = 620/2;
|
||||
container.position.y = 380/2;
|
||||
container.position.x = 620 / 2;
|
||||
container.position.y = 380 / 2;
|
||||
|
||||
var bgFront = PIXI.Sprite.fromImage("SceneRotate.jpg");
|
||||
bgFront.anchor.x = 0.5;
|
||||
|
|
@ -61,13 +59,11 @@
|
|||
panda.anchor.x = 0.5;
|
||||
panda.anchor.y = 0.5;
|
||||
|
||||
|
||||
container.addChild(panda);
|
||||
|
||||
stage.addChild(container);
|
||||
|
||||
// create a renderer instance
|
||||
|
||||
renderer.view.style.position = "absolute"
|
||||
renderer.view.style.width = window.innerWidth + "px";
|
||||
renderer.view.style.height = window.innerHeight + "px";
|
||||
|
|
@ -76,7 +72,6 @@
|
|||
// add render view to DOM
|
||||
document.body.appendChild(renderer.view);
|
||||
|
||||
|
||||
stage.filters = [filter];
|
||||
|
||||
var count = 0;
|
||||
|
|
@ -94,12 +89,9 @@
|
|||
{
|
||||
stage.filters = null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* Add a pixi Logo!
|
||||
*/
|
||||
// Add a pixi Logo!
|
||||
var logo = PIXI.Sprite.fromImage("../../logo_small.png");
|
||||
|
||||
logo.anchor.x = 1;
|
||||
|
|
@ -114,16 +106,12 @@
|
|||
window.open("https://github.com/GoodBoyDigital/pixi.js", "_blank");
|
||||
}
|
||||
|
||||
var help = new PIXI.Text("Click to turn filters on / off.", {font:"bold 12pt Arial", fill:"white"});
|
||||
var help = new PIXI.Text("Click to turn filters on / off.", { font: "bold 12pt Arial", fill: "white" });
|
||||
help.position.y = 350;
|
||||
help.position.x = 10;
|
||||
stage.addChild(help);
|
||||
|
||||
|
||||
requestAnimFrame(animate);
|
||||
|
||||
function animate() {
|
||||
|
||||
bg.rotation += 0.01;
|
||||
bgFront.rotation -= 0.01;
|
||||
|
||||
|
|
@ -138,17 +126,16 @@
|
|||
colorMatrix[1] = Math.sin(count) * 3;
|
||||
colorMatrix[2] = Math.cos(count);
|
||||
colorMatrix[3] = Math.cos(count) * 1.5;
|
||||
colorMatrix[4] = Math.sin(count/3) * 2;
|
||||
colorMatrix[5] = Math.sin(count/2);
|
||||
colorMatrix[6] = Math.sin(count/4);
|
||||
colorMatrix[4] = Math.sin(count / 3) * 2;
|
||||
colorMatrix[5] = Math.sin(count / 2);
|
||||
colorMatrix[6] = Math.sin(count / 4);
|
||||
filter.matrix = colorMatrix;
|
||||
|
||||
|
||||
|
||||
renderer.render(stage);
|
||||
requestAnimFrame( animate );
|
||||
requestAnimFrame(animate);
|
||||
}
|
||||
|
||||
requestAnimFrame(animate);
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -12,12 +12,10 @@
|
|||
|
||||
<script src="../../bin/pixi.dev.js"></script>
|
||||
<script src="dat.gui.min.js"></script>
|
||||
|
||||
<!-- <script src="pixi.js"></script> -->
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
|
||||
var renderer = PIXI.autoDetectRenderer(630, 410);
|
||||
renderer.view.style.position = "absolute"
|
||||
renderer.view.style.width = window.innerWidth + "px";
|
||||
|
|
@ -29,11 +27,7 @@
|
|||
// add render view to DOM
|
||||
document.body.appendChild(renderer.view);
|
||||
|
||||
var gui = new dat.GUI({
|
||||
//height : 5 * 32 - 1,
|
||||
|
||||
//width : 350
|
||||
});
|
||||
var gui = new dat.GUI({});
|
||||
|
||||
////
|
||||
|
||||
|
|
@ -253,7 +247,6 @@
|
|||
fish.rotation = -fish.direction - Math.PI/2;
|
||||
|
||||
// wrap..
|
||||
|
||||
if(fish.position.x < bounds.x)fish.position.x += bounds.width;
|
||||
if(fish.position.x > bounds.x + bounds.width)fish.position.x -= bounds.width
|
||||
|
||||
|
|
@ -262,11 +255,11 @@
|
|||
}
|
||||
|
||||
|
||||
displacementFilter.offset.x = count * 10//blurAmount * 40;
|
||||
displacementFilter.offset.y = count * 10
|
||||
displacementFilter.offset.x = count * 10;
|
||||
displacementFilter.offset.y = count * 10;
|
||||
|
||||
overlay.tilePosition.x = count * -10//blurAmount * 40;
|
||||
overlay.tilePosition.y = count * -10
|
||||
overlay.tilePosition.x = count * -10;
|
||||
overlay.tilePosition.y = count * -10;
|
||||
|
||||
renderer.render(stage);
|
||||
requestAnimFrame( animate );
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<html>
|
||||
<head>
|
||||
|
||||
<title>Pixi.js Blendmodes</title>
|
||||
<title>Pixi.js Blend Modes</title>
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
|
|
@ -17,15 +17,12 @@
|
|||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script src="pixi.js"></script>
|
||||
<script src="../../bin/pixi.js"></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<script>
|
||||
|
||||
var viewWidth = 630;
|
||||
var viewHeight = 410;
|
||||
|
||||
|
|
@ -45,17 +42,13 @@
|
|||
// create a new background sprite
|
||||
var pondFloorSprite = new PIXI.Sprite(pondFloorTexture);
|
||||
stage.addChild(pondFloorSprite);
|
||||
|
||||
|
||||
|
||||
// create an array to store a refference to the dude in the pond
|
||||
var dudeArray = [];
|
||||
|
||||
var totaldude = 20;
|
||||
|
||||
for (var i = 0; i < totaldude; i++)
|
||||
{
|
||||
|
||||
// create a new Sprite that uses the image name that we just generated as its source
|
||||
var dude = PIXI.Sprite.fromImage("flowerTop.png");
|
||||
|
||||
|
|
@ -72,9 +65,9 @@
|
|||
// time to add the dude to the pond container!
|
||||
stage.addChild(dude);
|
||||
|
||||
// create some extra properties that will control movement
|
||||
|
||||
dude.blendMode = PIXI.blendModes.ADD
|
||||
|
||||
// create some extra properties that will control movement
|
||||
// create a random direction in radians. This is a number between 0 and PI*2 which is the equivalent of 0 - 360 degrees
|
||||
dude.direction = Math.random() * Math.PI * 2;
|
||||
|
||||
|
|
@ -86,7 +79,6 @@
|
|||
|
||||
// finally we push the dude into the dudeArray so it it can be easily accessed later
|
||||
dudeArray.push(dude);
|
||||
|
||||
}
|
||||
|
||||
// create a bounding box box for the little dudes
|
||||
|
|
@ -97,11 +89,7 @@
|
|||
viewWidth + dudeBoundsPadding * 2,
|
||||
viewHeight + dudeBoundsPadding * 2);
|
||||
|
||||
|
||||
var tick = 0;
|
||||
|
||||
requestAnimationFrame(animate);
|
||||
|
||||
function animate()
|
||||
{
|
||||
// iterate through the dudes and update the positions
|
||||
|
|
@ -111,28 +99,30 @@
|
|||
dude.direction += dude.turningSpeed * 0.01;
|
||||
dude.position.x += Math.sin(dude.direction) * dude.speed;
|
||||
dude.position.y += Math.cos(dude.direction) * dude.speed;
|
||||
dude.rotation = -dude.direction - Math.PI/2;
|
||||
dude.rotation = -dude.direction - Math.PI / 2;
|
||||
|
||||
// wrap the dudes by testing there bounds..
|
||||
if(dude.position.x < dudeBounds.x)dude.position.x += dudeBounds.width;
|
||||
else if(dude.position.x > dudeBounds.x + dudeBounds.width)dude.position.x -= dudeBounds.width
|
||||
if (dude.position.x < dudeBounds.x)
|
||||
dude.position.x += dudeBounds.width;
|
||||
else if (dude.position.x > dudeBounds.x + dudeBounds.width)
|
||||
dude.position.x -= dudeBounds.width;
|
||||
|
||||
if(dude.position.y < dudeBounds.y)dude.position.y += dudeBounds.height;
|
||||
else if(dude.position.y > dudeBounds.y + dudeBounds.height)dude.position.y -= dudeBounds.height
|
||||
if (dude.position.y < dudeBounds.y)
|
||||
dude.position.y += dudeBounds.height;
|
||||
else if (dude.position.y > dudeBounds.y + dudeBounds.height)
|
||||
dude.position.y -= dudeBounds.height;
|
||||
}
|
||||
|
||||
// increment the ticker
|
||||
tick += 0.1;
|
||||
|
||||
|
||||
|
||||
// time to render the stage !
|
||||
renderer.render(stage);
|
||||
|
||||
// request another animation frame...
|
||||
requestAnimationFrame(animate);
|
||||
}
|
||||
|
||||
requestAnimationFrame(animate);
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@
|
|||
<body>
|
||||
|
||||
<script>
|
||||
|
||||
var viewWidth = 630;
|
||||
var viewHeight = 410;
|
||||
|
||||
|
|
@ -43,12 +42,10 @@
|
|||
|
||||
// create an array to store a reference to the fish in the pond
|
||||
var dudeArray = [];
|
||||
|
||||
|
||||
var totalDudes = 20;
|
||||
|
||||
for (var i = 0; i < totalDudes; i++)
|
||||
{
|
||||
|
||||
// create a new Sprite that uses the image name that we just generated as its source
|
||||
var dude = PIXI.Sprite.fromImage("eggHead.png");
|
||||
|
||||
|
|
@ -68,7 +65,6 @@
|
|||
dude.tint = Math.random() * 0xFFFFFF;
|
||||
|
||||
// create some extra properties that will control movement
|
||||
|
||||
// create a random direction in radians. This is a number between 0 and PI*2 which is the equivalent of 0 - 360 degrees
|
||||
dude.direction = Math.random() * Math.PI * 2;
|
||||
|
||||
|
|
@ -80,7 +76,6 @@
|
|||
|
||||
// finally we push the dude into the dudeArray so it it can be easily accessed later
|
||||
dudeArray.push(dude);
|
||||
|
||||
}
|
||||
|
||||
// create a bounding box box for the little dudes
|
||||
|
|
@ -90,7 +85,6 @@
|
|||
viewWidth + dudeBoundsPadding * 2,
|
||||
viewHeight + dudeBoundsPadding * 2);
|
||||
|
||||
|
||||
var tick = 0;
|
||||
requestAnimationFrame(animate);
|
||||
|
||||
|
|
@ -103,28 +97,29 @@
|
|||
dude.direction += dude.turningSpeed * 0.01;
|
||||
dude.position.x += Math.sin(dude.direction) * dude.speed;
|
||||
dude.position.y += Math.cos(dude.direction) * dude.speed;
|
||||
dude.rotation = -dude.direction - Math.PI/2;
|
||||
dude.rotation = -dude.direction - Math.PI / 2;
|
||||
|
||||
// wrap the dudes by testing their bounds..
|
||||
if(dude.position.x < dudeBounds.x)dude.position.x += dudeBounds.width;
|
||||
else if(dude.position.x > dudeBounds.x + dudeBounds.width)dude.position.x -= dudeBounds.width
|
||||
if (dude.position.x < dudeBounds.x)
|
||||
dude.position.x += dudeBounds.width;
|
||||
else if (dude.position.x > dudeBounds.x + dudeBounds.width)
|
||||
dude.position.x -= dudeBounds.width;
|
||||
|
||||
if(dude.position.y < dudeBounds.y)dude.position.y += dudeBounds.height;
|
||||
else if(dude.position.y > dudeBounds.y + dudeBounds.height)dude.position.y -= dudeBounds.height
|
||||
if (dude.position.y < dudeBounds.y)
|
||||
dude.position.y += dudeBounds.height;
|
||||
else if (dude.position.y > dudeBounds.y + dudeBounds.height)
|
||||
dude.position.y -= dudeBounds.height;
|
||||
}
|
||||
|
||||
// increment the ticker
|
||||
tick += 0.1;
|
||||
|
||||
|
||||
|
||||
// time to render the state!
|
||||
renderer.render(stage);
|
||||
|
||||
// request another animation frame..
|
||||
requestAnimationFrame( animate );
|
||||
requestAnimationFrame(animate);
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -18,15 +18,12 @@
|
|||
}
|
||||
</style>
|
||||
|
||||
<script src="pixi.js"></script>
|
||||
<script src="../../bin/pixi.dev.js"></script>
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<script>
|
||||
|
||||
var viewWidth = 800;
|
||||
var viewHeight = 600;
|
||||
|
||||
|
|
@ -40,29 +37,21 @@
|
|||
// create an new instance of a pixi stage
|
||||
var stage = new PIXI.Stage(0xFFFFFF);
|
||||
|
||||
var particles = new PIXI.SpriteBatch(PIXI.Texture.fromImage("eggHead.png"));
|
||||
|
||||
stage.addChild(particles);
|
||||
var sprites = new PIXI.SpriteBatch();
|
||||
stage.addChild(sprites);
|
||||
|
||||
var tints = [0xFFFFFF, 0xFFFBEE, 0xFFEEEE, 0xFADEED, 0xE8D4CD];
|
||||
|
||||
// create an array to store a refference to the fish in the pond
|
||||
var dudeArray = [];
|
||||
|
||||
var totalDudes = renderer instanceof PIXI.WebGLRenderer ? 10000 : 100//.view.className = "rendererView";
|
||||
|
||||
var tints = [0xFFFFFF,
|
||||
0xfffbee,
|
||||
0xffeeee,
|
||||
0xfadeed,
|
||||
0xe8d4cd];
|
||||
|
||||
var totalDudes = renderer instanceof PIXI.WebGLRenderer ? 10000 : 100;
|
||||
for (var i = 0; i < totalDudes; i++)
|
||||
{
|
||||
|
||||
// create a new Sprite that uses the image name that we just generated as its source
|
||||
var dude = PIXI.Sprite.fromImage("tinyMaggot.png");
|
||||
|
||||
dude.tint = Math.random() * 0xe8d4cd;
|
||||
dude.tint = Math.random() * 0xE8D4CD;
|
||||
|
||||
// set the anchor point so the the dude texture is centerd on the sprite
|
||||
dude.anchor.x = dude.anchor.y = 0.5;
|
||||
|
|
@ -75,11 +64,8 @@
|
|||
dude.y = Math.random() * viewHeight;
|
||||
|
||||
// create some extra properties that will control movement
|
||||
|
||||
dude.tint = Math.random() * 0x808080;
|
||||
|
||||
//dude.tint = i > 3000 ? 0x977d76 : tints[i % tints.length];//Math.random() * 0xFFFFFF;
|
||||
|
||||
// create a random direction in radians. This is a number between 0 and PI*2 which is the equivalent of 0 - 360 degrees
|
||||
dude.direction = Math.random() * Math.PI * 2;
|
||||
|
||||
|
|
@ -90,10 +76,11 @@
|
|||
dude.speed = (2 + Math.random() * 2) * 0.2;
|
||||
|
||||
dude.offset = Math.random() * 100;
|
||||
|
||||
// finally we push the dude into the dudeArray so it it can be easily accessed later
|
||||
dudeArray.push(dude);
|
||||
|
||||
particles.addChild(dude);
|
||||
sprites.addChild(dude);
|
||||
}
|
||||
|
||||
// create a bounding box box for the little dudes
|
||||
|
|
@ -103,43 +90,42 @@
|
|||
viewWidth + dudeBoundsPadding * 2,
|
||||
viewHeight + dudeBoundsPadding * 2);
|
||||
|
||||
|
||||
var tick = 0;
|
||||
requestAnimationFrame(animate);
|
||||
|
||||
function animate()
|
||||
{
|
||||
// iterate through the dude and update the positiond
|
||||
// iterate through the dude and update the position
|
||||
for (var i = 0; i < dudeArray.length; i++)
|
||||
{
|
||||
var dude = dudeArray[i];
|
||||
dude.scale.y = 0.95 + Math.sin(tick + dude.offset) * 0.05
|
||||
dude.direction += dude.turningSpeed * 0.01;
|
||||
dude.position.x += Math.sin(dude.direction) * (dude.speed * dude.scale.y);
|
||||
dude.position.y += Math.cos(dude.direction) * (dude.speed *dude.scale.y );
|
||||
dude.position.y += Math.cos(dude.direction) * (dude.speed * dude.scale.y);
|
||||
dude.rotation = -dude.direction + Math.PI;
|
||||
|
||||
|
||||
// wrap the dudes by testing their bounds..
|
||||
if(dude.position.x < dudeBounds.x)dude.position.x += dudeBounds.width;
|
||||
else if(dude.position.x > dudeBounds.x + dudeBounds.width)dude.position.x -= dudeBounds.width
|
||||
if (dude.position.x < dudeBounds.x)
|
||||
dude.position.x += dudeBounds.width;
|
||||
else if (dude.position.x > dudeBounds.x + dudeBounds.width)
|
||||
dude.position.x -= dudeBounds.width;
|
||||
|
||||
if(dude.position.y < dudeBounds.y)dude.position.y += dudeBounds.height;
|
||||
else if(dude.position.y > dudeBounds.y + dudeBounds.height)dude.position.y -= dudeBounds.height
|
||||
if (dude.position.y < dudeBounds.y)
|
||||
dude.position.y += dudeBounds.height;
|
||||
else if (dude.position.y > dudeBounds.y + dudeBounds.height)
|
||||
dude.position.y -= dudeBounds.height;
|
||||
}
|
||||
|
||||
// increment the ticker
|
||||
tick += 0.1;
|
||||
|
||||
|
||||
|
||||
// time to render the stage !
|
||||
renderer.render(stage);
|
||||
|
||||
// request another animation frame..
|
||||
requestAnimationFrame( animate );
|
||||
requestAnimationFrame(animate);
|
||||
}
|
||||
|
||||
requestAnimationFrame(animate);
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
|
|
|||
BIN
examples/example 19 - Normal/1223-normal.jpg
Normal file
BIN
examples/example 19 - Normal/1223-normal.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 177 KiB |
BIN
examples/example 19 - Normal/BGrotate.jpg
Normal file
BIN
examples/example 19 - Normal/BGrotate.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 27 KiB |
231
examples/example 19 - Normal/NormalMapFilter.js
Normal file
231
examples/example 19 - Normal/NormalMapFilter.js
Normal file
|
|
@ -0,0 +1,231 @@
|
|||
/**
|
||||
* @author Mat Groves http://matgroves.com/ @Doormat23
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object.
|
||||
* You can use this filter to apply all manor of crazy warping effects
|
||||
* Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.
|
||||
* @class NormalMapFilter
|
||||
* @contructor
|
||||
* @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment
|
||||
*/
|
||||
PIXI.NormalMapFilter = function(texture)
|
||||
{
|
||||
PIXI.AbstractFilter.call( this );
|
||||
|
||||
this.passes = [this];
|
||||
//texture.baseTexture._powerOf2 = true;
|
||||
|
||||
// set the uniforms
|
||||
//console.log()
|
||||
this.uniforms = {
|
||||
displacementMap: {type: 'sampler2D', value:texture},
|
||||
scale: {type: '2f', value:{x:15, y:15}},
|
||||
offset: {type: '2f', value:{x:0, y:0}},
|
||||
mapDimensions: {type: '2f', value:{x:1, y:1}},
|
||||
zoomScale: {type: '2f', value:{x:1, y:1}},
|
||||
dimensions: {type: '4fv', value:[0,0,0,0]},
|
||||
// LightDir: {type: 'f3', value:[0, 1, 0]},
|
||||
LightPos: {type: '3fv', value:[0, 1, 0]}
|
||||
};
|
||||
|
||||
|
||||
if(texture.baseTexture.hasLoaded)
|
||||
{
|
||||
this.uniforms.mapDimensions.value.x = texture.width;
|
||||
this.uniforms.mapDimensions.value.y = texture.height;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.boundLoadedFunction = this.onTextureLoaded.bind(this);
|
||||
|
||||
texture.baseTexture.on("loaded", this.boundLoadedFunction);
|
||||
}
|
||||
|
||||
this.fragmentSrc = [
|
||||
"precision mediump float;",
|
||||
"varying vec2 vTextureCoord;",
|
||||
"varying vec4 vColor;",
|
||||
"uniform sampler2D displacementMap;",
|
||||
"uniform sampler2D uSampler;",
|
||||
|
||||
"uniform vec4 dimensions;",
|
||||
|
||||
"const vec2 Resolution = vec2(1.0,1.0);", //resolution of screen
|
||||
"uniform vec3 LightPos;", //light position, normalized
|
||||
"const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);", //light RGBA -- alpha is intensity
|
||||
"const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.9);", //ambient RGBA -- alpha is intensity
|
||||
"const vec3 Falloff = vec3(0.0, 0.3, 0.4);", //attenuation coefficients
|
||||
|
||||
"uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);",
|
||||
|
||||
|
||||
"uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);",
|
||||
"uniform vec2 zoomScale;",
|
||||
|
||||
"void main(void) {",
|
||||
"vec2 mapCords = vTextureCoord.xy;",
|
||||
|
||||
"vec4 color = texture2D(uSampler, vTextureCoord.st);",
|
||||
|
||||
"vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;",
|
||||
|
||||
//427 × 60
|
||||
"mapCords *= dimensions.xy/mapDimensions;",
|
||||
"mapCords /= zoomScale;",
|
||||
"mapCords.y *= -1.0;",
|
||||
"mapCords.y += 1.0;",
|
||||
|
||||
//RGBA of our diffuse color
|
||||
"vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);",
|
||||
//"vec4 DiffuseColor = vec4(1.0, 0.0, 1.0, 1.0);",
|
||||
//RGB of our normal map
|
||||
"vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;",
|
||||
|
||||
//"LightPos /= mapDimensions;",
|
||||
|
||||
//The delta position of light
|
||||
//"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);",
|
||||
"vec3 LightDir = vec3((LightPos.xy/mapDimensions) - (mapCords.xy), LightPos.z);",
|
||||
//Correct for aspect ratio
|
||||
//"LightDir.x *= Resolution.x / Resolution.y;",
|
||||
|
||||
//Determine distance (used for attenuation) BEFORE we normalize our LightDir
|
||||
"float D = length(LightDir);",
|
||||
|
||||
//normalize our vectors
|
||||
"vec3 N = normalize(NormalMap * 2.0 - 1.0);",
|
||||
"vec3 L = normalize(LightDir);",
|
||||
|
||||
//Pre-multiply light color with intensity
|
||||
//Then perform "N dot L" to determine our diffuse term
|
||||
"vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);",
|
||||
|
||||
//pre-multiply ambient color with intensity
|
||||
"vec3 Ambient = AmbientColor.rgb * AmbientColor.a;",
|
||||
|
||||
//calculate attenuation
|
||||
"float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );",
|
||||
//" Attenuation *=0.2;",
|
||||
" Attenuation = min(Attenuation, 1.0);",
|
||||
//the calculation which brings it all together
|
||||
"vec3 Intensity = Ambient + Diffuse * Attenuation;",
|
||||
"vec3 FinalColor = DiffuseColor.rgb * Intensity * 0.5;",
|
||||
// "FinalColor = mix(FinalColor, vColor.rgb, 1.0);",
|
||||
"gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);",
|
||||
// "gl_FragColor = vec4(NormalMap, 1.0);",//vColor * vec4(FinalColor, DiffuseColor.a);",
|
||||
/*
|
||||
// normalise color
|
||||
"vec3 normal = normalize(nColor * 2.0 - 1.0);",
|
||||
|
||||
"vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );",
|
||||
|
||||
"float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);",
|
||||
|
||||
"float d = sqrt(dot(deltaPos, deltaPos));",
|
||||
"float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );",
|
||||
|
||||
"vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;",
|
||||
"result *= color.rgb;",
|
||||
|
||||
"gl_FragColor = vec4(result, 1.0);",*/
|
||||
|
||||
|
||||
|
||||
"}"
|
||||
];
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
void main() {
|
||||
//sample color & normals from our textures
|
||||
vec4 color = texture2D(u_texture, v_texCoords.st);
|
||||
vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb;
|
||||
|
||||
//some bump map programs will need the Y value flipped..
|
||||
nColor.g = yInvert ? 1.0 - nColor.g : nColor.g;
|
||||
|
||||
//this is for debugging purposes, allowing us to lower the intensity of our bump map
|
||||
vec3 nBase = vec3(0.5, 0.5, 1.0);
|
||||
nColor = mix(nBase, nColor, strength);
|
||||
|
||||
//normals need to be converted to [-1.0, 1.0] range and normalized
|
||||
vec3 normal = normalize(nColor * 2.0 - 1.0);
|
||||
|
||||
//here we do a simple distance calculation
|
||||
vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );
|
||||
|
||||
vec3 lightDir = normalize(deltaPos);
|
||||
float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0;
|
||||
|
||||
//now let's get a nice little falloff
|
||||
float d = sqrt(dot(deltaPos, deltaPos));
|
||||
float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0;
|
||||
|
||||
vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;
|
||||
result *= color.rgb;
|
||||
|
||||
gl_FragColor = v_color * vec4(result, color.a);
|
||||
}
|
||||
*/
|
||||
PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype );
|
||||
PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter;
|
||||
|
||||
PIXI.NormalMapFilter.prototype.onTextureLoaded = function()
|
||||
{
|
||||
|
||||
this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width;
|
||||
this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height;
|
||||
|
||||
this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction)
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* The texture used for the displacemtent map * must be power of 2 texture at the moment
|
||||
*
|
||||
* @property map
|
||||
* @type Texture
|
||||
*/
|
||||
Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', {
|
||||
get: function() {
|
||||
return this.uniforms.displacementMap.value;
|
||||
},
|
||||
set: function(value) {
|
||||
this.uniforms.displacementMap.value = value;
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* The multiplier used to scale the displacement result from the map calculation.
|
||||
*
|
||||
* @property scale
|
||||
* @type Point
|
||||
*/
|
||||
Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', {
|
||||
get: function() {
|
||||
return this.uniforms.scale.value;
|
||||
},
|
||||
set: function(value) {
|
||||
this.uniforms.scale.value = value;
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* The offset used to move the displacement map.
|
||||
*
|
||||
* @property offset
|
||||
* @type Point
|
||||
*/
|
||||
Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', {
|
||||
get: function() {
|
||||
return this.uniforms.offset.value;
|
||||
},
|
||||
set: function(value) {
|
||||
this.uniforms.offset.value = value;
|
||||
}
|
||||
});
|
||||
225
examples/example 19 - Normal/NormalMapFilter__.js
Normal file
225
examples/example 19 - Normal/NormalMapFilter__.js
Normal file
|
|
@ -0,0 +1,225 @@
|
|||
/**
|
||||
* @author Mat Groves http://matgroves.com/ @Doormat23
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object.
|
||||
* You can use this filter to apply all manor of crazy warping effects
|
||||
* Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.
|
||||
* @class NormalMapFilter
|
||||
* @contructor
|
||||
* @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment
|
||||
*/
|
||||
PIXI.NormalMapFilter = function(texture)
|
||||
{
|
||||
PIXI.AbstractFilter.call( this );
|
||||
|
||||
this.passes = [this];
|
||||
texture.baseTexture._powerOf2 = true;
|
||||
|
||||
// set the uniforms
|
||||
//console.log()
|
||||
this.uniforms = {
|
||||
displacementMap: {type: 'sampler2D', value:texture},
|
||||
scale: {type: '2f', value:{x:15, y:15}},
|
||||
offset: {type: '2f', value:{x:0, y:0}},
|
||||
mapDimensions: {type: '2f', value:{x:1, y:1}},
|
||||
dimensions: {type: '4f', value:[0,0,0,0]},
|
||||
// LightDir: {type: 'f3', value:[0, 1, 0]},
|
||||
LightPos: {type: '3f', value:[0, 1, 0]}
|
||||
};
|
||||
|
||||
|
||||
if(texture.baseTexture.hasLoaded)
|
||||
{
|
||||
this.uniforms.mapDimensions.value.x = texture.width;
|
||||
this.uniforms.mapDimensions.value.y = texture.height;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.boundLoadedFunction = this.onTextureLoaded.bind(this);
|
||||
|
||||
texture.baseTexture.on("loaded", this.boundLoadedFunction);
|
||||
}
|
||||
|
||||
this.fragmentSrc = [
|
||||
"precision mediump float;",
|
||||
"varying vec2 vTextureCoord;",
|
||||
"varying float vColor;",
|
||||
"uniform sampler2D displacementMap;",
|
||||
"uniform sampler2D uSampler;",
|
||||
|
||||
"uniform vec4 dimensions;",
|
||||
|
||||
"const vec2 Resolution = vec2(1.0,1.0);", //resolution of screen
|
||||
"uniform vec3 LightPos;", //light position, normalized
|
||||
"const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);", //light RGBA -- alpha is intensity
|
||||
"const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.5);", //ambient RGBA -- alpha is intensity
|
||||
"const vec3 Falloff = vec3(0.0, 1.0, 0.2);", //attenuation coefficients
|
||||
|
||||
"uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);",
|
||||
|
||||
|
||||
"uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);",
|
||||
|
||||
|
||||
"void main(void) {",
|
||||
"vec2 mapCords = vTextureCoord.xy;",
|
||||
|
||||
"vec4 color = texture2D(uSampler, vTextureCoord.st);",
|
||||
"vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;",
|
||||
|
||||
|
||||
"mapCords *= vec2(dimensions.x/512.0, dimensions.y/512.0);",
|
||||
|
||||
"mapCords.y *= -1.0;",
|
||||
"mapCords.y += 1.0;",
|
||||
|
||||
//RGBA of our diffuse color
|
||||
"vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);",
|
||||
|
||||
//RGB of our normal map
|
||||
"vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;",
|
||||
|
||||
//The delta position of light
|
||||
//"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);",
|
||||
"vec3 LightDir = vec3(LightPos.xy - (mapCords.xy), LightPos.z);",
|
||||
//Correct for aspect ratio
|
||||
//"LightDir.x *= Resolution.x / Resolution.y;",
|
||||
|
||||
//Determine distance (used for attenuation) BEFORE we normalize our LightDir
|
||||
"float D = length(LightDir);",
|
||||
|
||||
//normalize our vectors
|
||||
"vec3 N = normalize(NormalMap * 2.0 - 1.0);",
|
||||
"vec3 L = normalize(LightDir);",
|
||||
|
||||
//Pre-multiply light color with intensity
|
||||
//Then perform "N dot L" to determine our diffuse term
|
||||
"vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);",
|
||||
|
||||
//pre-multiply ambient color with intensity
|
||||
"vec3 Ambient = AmbientColor.rgb * AmbientColor.a;",
|
||||
|
||||
//calculate attenuation
|
||||
"float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );",
|
||||
|
||||
//the calculation which brings it all together
|
||||
"vec3 Intensity = Ambient + Diffuse * Attenuation;",
|
||||
"vec3 FinalColor = DiffuseColor.rgb * Intensity;",
|
||||
"gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);",
|
||||
//"gl_FragColor = vec4(1.0, 0.0, 0.0, Attenuation);",//vColor * vec4(FinalColor, DiffuseColor.a);",
|
||||
/*
|
||||
// normalise color
|
||||
"vec3 normal = normalize(nColor * 2.0 - 1.0);",
|
||||
|
||||
"vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );",
|
||||
|
||||
"float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);",
|
||||
|
||||
"float d = sqrt(dot(deltaPos, deltaPos));",
|
||||
"float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );",
|
||||
|
||||
"vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;",
|
||||
"result *= color.rgb;",
|
||||
|
||||
"gl_FragColor = vec4(result, 1.0);",*/
|
||||
|
||||
|
||||
|
||||
"}"
|
||||
];
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
void main() {
|
||||
//sample color & normals from our textures
|
||||
vec4 color = texture2D(u_texture, v_texCoords.st);
|
||||
vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb;
|
||||
|
||||
//some bump map programs will need the Y value flipped..
|
||||
nColor.g = yInvert ? 1.0 - nColor.g : nColor.g;
|
||||
|
||||
//this is for debugging purposes, allowing us to lower the intensity of our bump map
|
||||
vec3 nBase = vec3(0.5, 0.5, 1.0);
|
||||
nColor = mix(nBase, nColor, strength);
|
||||
|
||||
//normals need to be converted to [-1.0, 1.0] range and normalized
|
||||
vec3 normal = normalize(nColor * 2.0 - 1.0);
|
||||
|
||||
//here we do a simple distance calculation
|
||||
vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );
|
||||
|
||||
vec3 lightDir = normalize(deltaPos);
|
||||
float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0;
|
||||
|
||||
//now let's get a nice little falloff
|
||||
float d = sqrt(dot(deltaPos, deltaPos));
|
||||
float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0;
|
||||
|
||||
vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;
|
||||
result *= color.rgb;
|
||||
|
||||
gl_FragColor = v_color * vec4(result, color.a);
|
||||
}
|
||||
*/
|
||||
PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype );
|
||||
PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter;
|
||||
|
||||
PIXI.NormalMapFilter.prototype.onTextureLoaded = function()
|
||||
{
|
||||
|
||||
this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width;
|
||||
this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height;
|
||||
|
||||
this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction)
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* The texture used for the displacemtent map * must be power of 2 texture at the moment
|
||||
*
|
||||
* @property map
|
||||
* @type Texture
|
||||
*/
|
||||
Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', {
|
||||
get: function() {
|
||||
return this.uniforms.displacementMap.value;
|
||||
},
|
||||
set: function(value) {
|
||||
this.uniforms.displacementMap.value = value;
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* The multiplier used to scale the displacement result from the map calculation.
|
||||
*
|
||||
* @property scale
|
||||
* @type Point
|
||||
*/
|
||||
Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', {
|
||||
get: function() {
|
||||
return this.uniforms.scale.value;
|
||||
},
|
||||
set: function(value) {
|
||||
this.uniforms.scale.value = value;
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* The offset used to move the displacement map.
|
||||
*
|
||||
* @property offset
|
||||
* @type Point
|
||||
*/
|
||||
Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', {
|
||||
get: function() {
|
||||
return this.uniforms.offset.value;
|
||||
},
|
||||
set: function(value) {
|
||||
this.uniforms.offset.value = value;
|
||||
}
|
||||
});
|
||||
BIN
examples/example 19 - Normal/click.png
Normal file
BIN
examples/example 19 - Normal/click.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
BIN
examples/example 19 - Normal/heineken-names-small-30262.jpg
Normal file
BIN
examples/example 19 - Normal/heineken-names-small-30262.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 46 KiB |
84
examples/example 19 - Normal/index.html
Normal file
84
examples/example 19 - Normal/index.html
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<title>Sprite Batch</title>
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-color: #000000;
|
||||
}
|
||||
|
||||
.rendererView {
|
||||
position: absolute;
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script src="pixi.js"></script>
|
||||
<script src="../../bin/pixi.dev.js"></script>
|
||||
<script src="NormalMapFilter.js"></script>
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<script>
|
||||
|
||||
var viewWidth = 500;
|
||||
var viewHeight = 500;
|
||||
|
||||
// Create a pixi renderer
|
||||
var renderer = PIXI.autoDetectRenderer(viewWidth, viewHeight);
|
||||
//renderer.view.className = "rendererView";
|
||||
|
||||
// add render view to DOM
|
||||
document.body.appendChild(renderer.view);
|
||||
|
||||
// create an new instance of a pixi stage
|
||||
var stage = new PIXI.Stage(0xFFFFFF);
|
||||
|
||||
// create a background texture
|
||||
var pondFloorTexture = PIXI.Texture.fromImage("1223-normal.jpg");
|
||||
// create a new background sprite
|
||||
// var pondFloorSprite = new PIXI.Sprite(pondFloorTexture);
|
||||
//stage.addChild(pondFloorSprite);
|
||||
|
||||
|
||||
|
||||
var filter = new PIXI.NormalMapFilter(pondFloorTexture);
|
||||
|
||||
var sprite = PIXI.Sprite.fromImage("heineken-names-small-30262.jpg");//(pondFloorTexture);
|
||||
|
||||
sprite.filters = [filter];
|
||||
stage.addChild(sprite);
|
||||
|
||||
|
||||
var tick = 0;
|
||||
requestAnimationFrame(animate);
|
||||
|
||||
function animate()
|
||||
{
|
||||
|
||||
|
||||
// increment the ticker
|
||||
tick += 0.1;
|
||||
|
||||
var mouse = stage.interactionManager.mouse
|
||||
//console.log(stage.interactionManager.mouse);
|
||||
filter.uniforms.LightPos.value[0] = mouse.global.x;
|
||||
filter.uniforms.LightPos.value[1] = mouse.global.y;
|
||||
// time to render the state!
|
||||
renderer.render(stage);
|
||||
|
||||
// request another animation frame..
|
||||
requestAnimationFrame( animate );
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
BIN
examples/example 19 - Normal/logo_small.png
Normal file
BIN
examples/example 19 - Normal/logo_small.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7 KiB |
BIN
examples/example 19 - Normal/tinyMaggot.png
Normal file
BIN
examples/example 19 - Normal/tinyMaggot.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.2 KiB |
|
|
@ -13,7 +13,6 @@
|
|||
</head>
|
||||
<body>
|
||||
<script>
|
||||
|
||||
// create an array of assets to load
|
||||
var assetsToLoader = [ "SpriteSheet.json"];
|
||||
|
||||
|
|
@ -36,8 +35,7 @@
|
|||
var stage = new PIXI.Stage(0xFFFFFF);
|
||||
|
||||
// create a renderer instance.
|
||||
renderer = PIXI.autoDetectRenderer(800, 600);
|
||||
//renderer = new PIXI.CanvasRenderer(800, 600);
|
||||
var renderer = PIXI.autoDetectRenderer(800, 600);
|
||||
|
||||
// add the renderer view element to the DOM
|
||||
document.body.appendChild(renderer.view);
|
||||
|
|
@ -51,15 +49,14 @@
|
|||
|
||||
function onAssetsLoaded()
|
||||
{
|
||||
// create a texture from an image path
|
||||
// add a bunch of aliens
|
||||
// add a bunch of aliens with textures from image paths
|
||||
for (var i = 0; i < 100; i++)
|
||||
{
|
||||
var frameName = alienFrames[i % 4];
|
||||
|
||||
// create an alien using the frame name..
|
||||
var alien = PIXI.Sprite.fromFrame(frameName);
|
||||
alien.tint = Math.random() * 0xFFFFFF//0xFF0000;
|
||||
alien.tint = Math.random() * 0xFFFFFF;
|
||||
|
||||
/*
|
||||
* fun fact for the day :)
|
||||
|
|
@ -67,7 +64,6 @@
|
|||
* var texture = PIXI.Texture.fromFrame(frameName);
|
||||
* var alien = new PIXI.Sprite(texture);
|
||||
*/
|
||||
|
||||
alien.position.x = Math.random() * 800 - 400;
|
||||
alien.position.y = Math.random() * 600 - 300;
|
||||
alien.anchor.x = 0.5;
|
||||
|
|
@ -78,14 +74,9 @@
|
|||
|
||||
// start animating
|
||||
requestAnimFrame(animate);
|
||||
|
||||
|
||||
}
|
||||
|
||||
function animate() {
|
||||
|
||||
requestAnimFrame(animate);
|
||||
|
||||
// just for fun, lets rotate mr rabbit a little
|
||||
for (var i = 0; i < 100; i++)
|
||||
{
|
||||
|
|
@ -94,14 +85,16 @@
|
|||
}
|
||||
|
||||
count += 0.01;
|
||||
alienContainer.scale.x = Math.sin(count)
|
||||
alienContainer.scale.y = Math.sin(count)
|
||||
alienContainer.scale.x = Math.sin(count);
|
||||
alienContainer.scale.y = Math.sin(count);
|
||||
|
||||
alienContainer.rotation += 0.01
|
||||
alienContainer.rotation += 0.01;
|
||||
|
||||
// render the stage
|
||||
renderer.render(stage);
|
||||
}
|
||||
|
||||
requestAnimFrame(animate);
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@
|
|||
</head>
|
||||
<body>
|
||||
<script>
|
||||
|
||||
// create an array of assets to load
|
||||
var assetsToLoader = [ "fighter.json"];
|
||||
|
||||
|
|
@ -29,7 +28,6 @@
|
|||
// holder to store aliens
|
||||
var aliens = [];
|
||||
|
||||
|
||||
var count = 0;
|
||||
|
||||
// create an new instance of a pixi stage
|
||||
|
|
@ -37,7 +35,6 @@
|
|||
|
||||
// create a renderer instance.
|
||||
renderer = PIXI.autoDetectRenderer(800, 600);
|
||||
//renderer = new PIXI.CanvasRenderer(800, 600);
|
||||
|
||||
// add the renderer view element to the DOM
|
||||
document.body.appendChild(renderer.view);
|
||||
|
|
@ -53,15 +50,11 @@
|
|||
{
|
||||
// create a texture from an image path
|
||||
// add a bunch of aliens
|
||||
|
||||
var frames = [];
|
||||
|
||||
for (var i = 0; i < 30; i++) {
|
||||
|
||||
var val = i < 10 ? "0" + i : i;
|
||||
|
||||
frames.push(PIXI.Texture.fromFrame("rollSequence00" + val + ".png"));
|
||||
|
||||
};
|
||||
|
||||
movie = new PIXI.MovieClip(frames);
|
||||
|
|
@ -69,25 +62,23 @@
|
|||
movie.position.x = 300;
|
||||
movie.position.y = 300;
|
||||
|
||||
movie.anchor.x = movie.anchor.y = 0.5//1;
|
||||
movie.anchor.x = movie.anchor.y = 0.5;
|
||||
movie.play();
|
||||
movie.animationSpeed = 0.5;
|
||||
stage.addChild(movie);
|
||||
|
||||
// start animating
|
||||
requestAnimFrame( animate );
|
||||
|
||||
|
||||
requestAnimFrame(animate);
|
||||
}
|
||||
|
||||
function animate() {
|
||||
|
||||
requestAnimFrame( animate );
|
||||
movie.rotation += 0.01;
|
||||
|
||||
// render the stage
|
||||
renderer.render(stage);
|
||||
}
|
||||
|
||||
requestAnimFrame(animate);
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@
|
|||
</head>
|
||||
<body>
|
||||
<script>
|
||||
|
||||
// create an array of assets to load
|
||||
var assetsToLoader = [ "SpriteSheet.json"];
|
||||
|
||||
|
|
@ -26,14 +25,13 @@
|
|||
//begin load
|
||||
loader.load();
|
||||
|
||||
|
||||
// holder to store aliens
|
||||
var explosions = [];
|
||||
|
||||
var count = 0;
|
||||
|
||||
// create an new instance of a pixi stage
|
||||
var stage = new PIXI.Stage(0xFFFFFF);;
|
||||
var stage = new PIXI.Stage(0xFFFFFF);
|
||||
|
||||
// create a renderer instance.
|
||||
renderer = PIXI.autoDetectRenderer(800, 600);
|
||||
|
|
@ -52,21 +50,18 @@
|
|||
explosionTextures.push(texture);
|
||||
};
|
||||
|
||||
// create a texture from an image path
|
||||
// add a bunch of aliens
|
||||
for (var i = 0; i < 50; i++)
|
||||
{
|
||||
// create an explosion MovieClip
|
||||
var explosion = new PIXI.MovieClip(explosionTextures);
|
||||
|
||||
|
||||
explosion.position.x = Math.random() * 800;
|
||||
explosion.position.y = Math.random() * 600;
|
||||
explosion.anchor.x = 0.5;
|
||||
explosion.anchor.y = 0.5;
|
||||
|
||||
explosion.rotation = Math.random() * Math.PI;
|
||||
explosion.scale.x = explosion.scale.y = 0.75 + Math.random() * 0.5
|
||||
explosion.scale.x = explosion.scale.y = 0.75 + Math.random() * 0.5;
|
||||
|
||||
explosion.gotoAndPlay(Math.random() * 27);
|
||||
|
||||
|
|
@ -75,17 +70,13 @@
|
|||
|
||||
// start animating
|
||||
requestAnimFrame( animate );
|
||||
|
||||
|
||||
}
|
||||
|
||||
function animate() {
|
||||
|
||||
requestAnimFrame( animate );
|
||||
|
||||
renderer.render(stage);
|
||||
}
|
||||
|
||||
requestAnimFrame(animate);
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@
|
|||
<div id="sx">SX: 0<br />SY: 0</div>
|
||||
|
||||
<script>
|
||||
|
||||
$(window).resize(resize)
|
||||
window.onorientationchange = resize;
|
||||
|
||||
|
|
@ -31,14 +30,13 @@
|
|||
var slideX = w / 2;
|
||||
var slideY = h / 2;
|
||||
var stars = [];
|
||||
var renderer;
|
||||
var stage;
|
||||
|
||||
function start() {
|
||||
|
||||
var ballTexture = new PIXI.Texture.fromImage("assets/bubble_32x32.png");
|
||||
|
||||
renderer = PIXI.autoDetectRenderer(w, h);
|
||||
|
||||
stage = new PIXI.Stage;
|
||||
stage = new PIXI.Stage();
|
||||
|
||||
document.body.appendChild(renderer.view);
|
||||
|
||||
|
|
@ -62,15 +60,12 @@
|
|||
resize();
|
||||
|
||||
requestAnimFrame(update);
|
||||
|
||||
}
|
||||
|
||||
function newWave () {
|
||||
|
||||
sx = 1.0 + (Math.random() / 20);
|
||||
sy = 1.0 + (Math.random() / 20);
|
||||
document.getElementById('sx').innerHTML = 'SX: ' + sx + '<br />SY: ' + sy;
|
||||
|
||||
}
|
||||
|
||||
function resize()
|
||||
|
|
@ -116,7 +111,6 @@
|
|||
|
||||
requestAnimFrame(update);
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@
|
|||
<a href="http://www.html5gamedevs.com/topic/59-pixijs-has-landed/"><img src="assets/pixi.png" width="56" height="22" id="pixi" title="pixi.js" /></a>
|
||||
|
||||
<script>
|
||||
|
||||
$(window).resize(resize)
|
||||
window.onorientationchange = resize;
|
||||
|
||||
|
|
@ -37,13 +36,12 @@
|
|||
var tpoint2 = [];
|
||||
var tpoint3 = [];
|
||||
var balls = [];
|
||||
var renderer;
|
||||
var stage;
|
||||
|
||||
function start() {
|
||||
|
||||
var ballTexture = new PIXI.Texture.fromImage("assets/pixel.png");
|
||||
|
||||
renderer = PIXI.autoDetectRenderer(w, h);
|
||||
|
||||
stage = new PIXI.Stage;
|
||||
|
||||
document.body.appendChild(renderer.view);
|
||||
|
|
@ -70,32 +68,25 @@
|
|||
setTimeout(nextObject, 5000);
|
||||
|
||||
requestAnimFrame(update);
|
||||
|
||||
}
|
||||
|
||||
function nextObject () {
|
||||
|
||||
function nextObject() {
|
||||
current++;
|
||||
|
||||
if (current > objs)
|
||||
{
|
||||
current = 0;
|
||||
}
|
||||
|
||||
makeObject(current);
|
||||
|
||||
setTimeout(nextObject, 8000);
|
||||
|
||||
}
|
||||
|
||||
function makeObject ( t ) {
|
||||
|
||||
function makeObject(t) {
|
||||
var xd;
|
||||
|
||||
switch (t)
|
||||
{
|
||||
case 0:
|
||||
|
||||
for (var i = 0; i < n; i++)
|
||||
{
|
||||
points1[i] = -50 + Math.round(Math.random() * 100);
|
||||
|
|
@ -103,9 +94,7 @@
|
|||
points3[i] = 0;
|
||||
}
|
||||
break;
|
||||
|
||||
case 1:
|
||||
|
||||
for (var i = 0; i < n; i++)
|
||||
{
|
||||
xd = -90 + Math.round(Math.random() * 180);
|
||||
|
|
@ -114,9 +103,7 @@
|
|||
points3[i] = Math.sin(xd) * 100;
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
|
||||
for (var i = 0; i < n; i++)
|
||||
{
|
||||
xd = -90 + Math.round(Math.random() * 180);
|
||||
|
|
@ -125,7 +112,6 @@
|
|||
points3[i] = Math.sin(i * 360 / n) * 100;
|
||||
}
|
||||
break;
|
||||
|
||||
case 3:
|
||||
|
||||
for (var i = 0; i < n; i++)
|
||||
|
|
@ -136,7 +122,6 @@
|
|||
points3[i] = Math.sin(xd) * 100;
|
||||
}
|
||||
break;
|
||||
|
||||
case 4:
|
||||
|
||||
for (var i = 0; i < n; i++)
|
||||
|
|
@ -147,7 +132,6 @@
|
|||
points3[i] = Math.sin(i * 360 / n) * 100;
|
||||
}
|
||||
break;
|
||||
|
||||
case 5:
|
||||
|
||||
for (var i = 0; i < n; i++)
|
||||
|
|
@ -158,7 +142,6 @@
|
|||
points3[i] = Math.sin(i * 360 / n) * 100;
|
||||
}
|
||||
break;
|
||||
|
||||
case 6:
|
||||
|
||||
for (var i = 0; i < n; i++)
|
||||
|
|
@ -169,7 +152,6 @@
|
|||
points3[i] = Math.sin(i * 360 / n) * 100;
|
||||
}
|
||||
break;
|
||||
|
||||
case 7:
|
||||
|
||||
for (var i = 0; i < n; i++)
|
||||
|
|
@ -180,7 +162,6 @@
|
|||
points3[i] = Math.sin(i * 360 / n) * 100;
|
||||
}
|
||||
break;
|
||||
|
||||
case 8:
|
||||
|
||||
for (var i = 0; i < n; i++)
|
||||
|
|
@ -191,7 +172,6 @@
|
|||
points3[i] = Math.sin(xd) * 100;
|
||||
}
|
||||
break;
|
||||
|
||||
case 9:
|
||||
|
||||
for (var i = 0; i < n; i++)
|
||||
|
|
@ -202,9 +182,7 @@
|
|||
points3[i] = Math.sin(xd) * 100;
|
||||
}
|
||||
break;
|
||||
|
||||
case 10:
|
||||
|
||||
for (var i = 0; i < n; i++)
|
||||
{
|
||||
xd = -90 + Math.round(Math.random() * 180);
|
||||
|
|
@ -213,9 +191,7 @@
|
|||
points3[i] = Math.sin(i * 360 / n) * 100;
|
||||
}
|
||||
break;
|
||||
|
||||
case 11:
|
||||
|
||||
for (var i = 0; i < n; i++)
|
||||
{
|
||||
xd = -90 + Math.round(Math.random() * 180);
|
||||
|
|
@ -224,9 +200,7 @@
|
|||
points3[i] = Math.sin(xd) * 100;
|
||||
}
|
||||
break;
|
||||
|
||||
case 12:
|
||||
|
||||
for (var i = 0; i < n; i++)
|
||||
{
|
||||
xd = -90 + Math.round(Math.random() * 180);
|
||||
|
|
@ -235,9 +209,7 @@
|
|||
points3[i] = Math.sin(i * 360 / n) * 100;
|
||||
}
|
||||
break;
|
||||
|
||||
case 13:
|
||||
|
||||
for (var i = 0; i < n; i++)
|
||||
{
|
||||
xd = -90 + Math.round(Math.random() * 180);
|
||||
|
|
@ -246,9 +218,7 @@
|
|||
points3[i] = Math.sin(i * 360 / n) * 100;
|
||||
}
|
||||
break;
|
||||
|
||||
case 14:
|
||||
|
||||
for (var i = 0; i < n; i++)
|
||||
{
|
||||
xd = -90 + Math.round(Math.random() * 180);
|
||||
|
|
@ -257,9 +227,7 @@
|
|||
points3[i] = Math.sin(i * 360 / n) * 100;
|
||||
}
|
||||
break;
|
||||
|
||||
case 15:
|
||||
|
||||
for (var i = 0; i < n; i++)
|
||||
{
|
||||
xd = -90 + Math.round(Math.random() * 180);
|
||||
|
|
@ -268,9 +236,7 @@
|
|||
points3[i] = Math.sin(i * 360 / n) * 100;
|
||||
}
|
||||
break;
|
||||
|
||||
case 16:
|
||||
|
||||
for (var i = 0; i < n; i++)
|
||||
{
|
||||
xd = -90 + Math.round(Math.random() * 180);
|
||||
|
|
@ -279,9 +245,7 @@
|
|||
points3[i] = Math.sin(xd) * 100;
|
||||
}
|
||||
break;
|
||||
|
||||
case 17:
|
||||
|
||||
for (var i = 0; i < n; i++)
|
||||
{
|
||||
xd = -90 + Math.round(Math.random() * 180);
|
||||
|
|
@ -291,7 +255,6 @@
|
|||
}
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function resize()
|
||||
|
|
@ -338,14 +301,12 @@
|
|||
|
||||
balls[i].position.x = (512 * tx) / (d - tz) + w / 2;
|
||||
balls[i].position.y = (h/2) - (512 * ty) / (d - tz);
|
||||
|
||||
}
|
||||
|
||||
renderer.render(stage);
|
||||
|
||||
requestAnimFrame(update);
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@
|
|||
</head>
|
||||
<body>
|
||||
<script>
|
||||
|
||||
// create an new instance of a pixi stage
|
||||
// the second parameter is interactivity...
|
||||
var interactive = true;
|
||||
|
|
@ -71,18 +70,17 @@
|
|||
button.interactive = true;
|
||||
|
||||
// set the mousedown and touchstart callback..
|
||||
button.mousedown = button.touchstart = function(data){
|
||||
|
||||
button.mousedown = button.touchstart = function(data) {
|
||||
this.isdown = true;
|
||||
this.setTexture(textureButtonDown);
|
||||
this.alpha = 1;
|
||||
}
|
||||
};
|
||||
|
||||
// set the mouseup and touchend callback..
|
||||
button.mouseup = button.touchend = button.mouseupoutside = button.touchendoutside = function(data){
|
||||
button.mouseup = button.touchend = button.mouseupoutside = button.touchendoutside = function(data) {
|
||||
this.isdown = false;
|
||||
|
||||
if(this.isOver)
|
||||
if (this.isOver)
|
||||
{
|
||||
this.setTexture(textureButtonOver);
|
||||
}
|
||||
|
|
@ -90,36 +88,35 @@
|
|||
{
|
||||
this.setTexture(textureButton);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// set the mouseover callback..
|
||||
button.mouseover = function(data){
|
||||
|
||||
button.mouseover = function(data) {
|
||||
this.isOver = true;
|
||||
|
||||
if(this.isdown)return
|
||||
if (this.isdown)
|
||||
return;
|
||||
|
||||
this.setTexture(textureButtonOver)
|
||||
}
|
||||
this.setTexture(textureButtonOver);
|
||||
};
|
||||
|
||||
// set the mouseout callback..
|
||||
button.mouseout = function(data){
|
||||
|
||||
button.mouseout = function(data) {
|
||||
this.isOver = false;
|
||||
|
||||
if(this.isdown)return
|
||||
if (this.isdown)
|
||||
return
|
||||
|
||||
this.setTexture(textureButton)
|
||||
}
|
||||
|
||||
button.click = function(data){
|
||||
};
|
||||
|
||||
button.click = function(data) {
|
||||
console.log("CLICK!");
|
||||
}
|
||||
|
||||
button.tap = function(data){
|
||||
};
|
||||
|
||||
button.tap = function(data) {
|
||||
console.log("TAP!!");
|
||||
}
|
||||
};
|
||||
|
||||
// add it to the stage
|
||||
stage.addChild(button);
|
||||
|
|
@ -129,26 +126,20 @@
|
|||
};
|
||||
|
||||
// set some silly values...
|
||||
|
||||
buttons[0].scale.x = 1.2;
|
||||
|
||||
buttons[1].scale.y = 1.2;
|
||||
|
||||
buttons[2].rotation = Math.PI/10;
|
||||
|
||||
buttons[2].rotation = Math.PI / 10;
|
||||
buttons[3].scale.x = 0.8;
|
||||
buttons[3].scale.y = 0.8;
|
||||
|
||||
buttons[4].scale.x = 0.8;
|
||||
buttons[4].scale.y = 1.2;
|
||||
buttons[4].rotation = Math.PI;
|
||||
|
||||
function animate() {
|
||||
|
||||
requestAnimFrame(animate);
|
||||
|
||||
// render the stage
|
||||
renderer.render(stage);
|
||||
|
||||
requestAnimFrame(animate);
|
||||
}
|
||||
|
||||
// add a logo!
|
||||
|
|
@ -160,13 +151,9 @@
|
|||
pixiLogo.position.x = 620 - 56;
|
||||
pixiLogo.position.y = 400 - 32;
|
||||
|
||||
pixiLogo.setInteractive(true);
|
||||
|
||||
pixiLogo.click = pixiLogo.tap = function(){
|
||||
|
||||
var win=window.open("http://www.pixijs.com", '_blank');
|
||||
|
||||
}
|
||||
pixiLogo.click = pixiLogo.tap = function() {
|
||||
window.open("http://www.pixijs.com", '_blank');
|
||||
};
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -26,25 +26,21 @@
|
|||
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
|
||||
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah</div>
|
||||
<script>
|
||||
|
||||
// create an new instance of a pixi stage
|
||||
var stage = new PIXI.Stage(0x66FF99);
|
||||
|
||||
// create a renderer instance
|
||||
|
||||
var renderer = PIXI.autoDetectRenderer(400, 300, null, true, true);
|
||||
|
||||
|
||||
// add the renderer view element to the DOM
|
||||
document.body.appendChild(renderer.view);
|
||||
renderer.view.style.position = "absolute";
|
||||
renderer.view.style.top = "0px";
|
||||
renderer.view.style.left = "0px";
|
||||
|
||||
requestAnimFrame(animate);
|
||||
|
||||
// create a texture from an image path
|
||||
var texture = PIXI.Texture.fromImage("bunny.png");
|
||||
|
||||
// create a new Sprite using the texture
|
||||
var bunny = new PIXI.Sprite(texture);
|
||||
|
||||
|
|
@ -59,7 +55,6 @@
|
|||
stage.addChild(bunny);
|
||||
|
||||
function animate() {
|
||||
|
||||
requestAnimFrame(animate);
|
||||
|
||||
// just for fun, lets rotate mr rabbit a little
|
||||
|
|
@ -69,6 +64,7 @@
|
|||
renderer.render(stage);
|
||||
}
|
||||
|
||||
requestAnimFrame(animate);
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -14,9 +14,8 @@
|
|||
</head>
|
||||
<body>
|
||||
<script>
|
||||
|
||||
// create an new instance of a pixi stage
|
||||
var stage = new PIXI.Stage(0x97c56e, true);
|
||||
var stage = new PIXI.Stage(0x97C56E, true);
|
||||
|
||||
// create a renderer instance
|
||||
var renderer = PIXI.autoDetectRenderer(window.innerWidth, window.innerHeight, null);
|
||||
|
|
@ -31,7 +30,7 @@
|
|||
// create a texture from an image path
|
||||
var texture = PIXI.Texture.fromImage("bunny.png");
|
||||
|
||||
for (var i=0; i < 10; i++)
|
||||
for (var i = 0; i < 10; i++)
|
||||
{
|
||||
createBunny(Math.random() * window.innerWidth, Math.random() * window.innerHeight)
|
||||
};
|
||||
|
|
|
|||
|
|
@ -7,27 +7,23 @@
|
|||
margin: 0;
|
||||
padding: 0;
|
||||
background-color: #FFFFFF;
|
||||
|
||||
}
|
||||
</style>
|
||||
<script src="../../bin/pixi.dev.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
|
||||
// create an new instance of a pixi stage
|
||||
var stage = new PIXI.Stage(0x97c56e, true);
|
||||
var stage = new PIXI.Stage(0x97C56E, true);
|
||||
|
||||
// create a renderer instance
|
||||
var renderer = PIXI.autoDetectRenderer(window.innerWidth, window.innerHeight, null);
|
||||
var renderer = PIXI.autoDetectRenderer(window.innerWidth, window.innerHeight);
|
||||
|
||||
// add the renderer view element to the DOM
|
||||
document.body.appendChild(renderer.view);
|
||||
renderer.view.style.position = "absolute";
|
||||
renderer.view.style.top = "0px";
|
||||
renderer.view.style.left = "0px";
|
||||
|
||||
requestAnimFrame(animate);
|
||||
document.body.appendChild(renderer.view);
|
||||
|
||||
// create a texture from an image path
|
||||
var texture = PIXI.Texture.fromImage("p2.jpeg");
|
||||
|
|
@ -35,16 +31,11 @@
|
|||
// create a tiling sprite ...
|
||||
// requires a texture, width and height
|
||||
// to work in webGL the texture size must be a power of two
|
||||
var tilingSprite = new PIXI.TilingSprite(texture, window.innerWidth, window.innerHeight)
|
||||
|
||||
var count = 0;
|
||||
|
||||
var tilingSprite = new PIXI.TilingSprite(texture, window.innerWidth, window.innerHeight);
|
||||
stage.addChild(tilingSprite);
|
||||
|
||||
var count = 0;
|
||||
function animate() {
|
||||
|
||||
requestAnimFrame(animate);
|
||||
|
||||
count += 0.005;
|
||||
|
||||
tilingSprite.tileScale.x = 2 + Math.sin(count);
|
||||
|
|
@ -55,8 +46,11 @@
|
|||
|
||||
// render the stage
|
||||
renderer.render(stage);
|
||||
|
||||
requestAnimFrame(animate);
|
||||
}
|
||||
|
||||
requestAnimFrame(animate);
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "pixi.js",
|
||||
"version": "1.5.1",
|
||||
"version": "1.5.0",
|
||||
"description": "Pixi.js is a fast lightweight 2D library that works across all devices.",
|
||||
|
||||
"author": "Mat Groves",
|
||||
|
|
@ -40,6 +40,7 @@
|
|||
"karma-chrome-launcher": "~0.1",
|
||||
"karma-firefox-launcher": "~0.1",
|
||||
"karma-mocha": "~0.1",
|
||||
"karma-spec-reporter": "~0.0.6"
|
||||
"karma-spec-reporter": "~0.0.6",
|
||||
"grunt-contrib-watch": "~0.5.3"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ PIXI.InteractionManager.prototype.collectInteractiveSprite = function(displayObj
|
|||
var child = children[i];
|
||||
|
||||
// push all interactive bits
|
||||
if(child.interactive)
|
||||
if(child._interactive)
|
||||
{
|
||||
iParent.interactiveChildren = true;
|
||||
//child.__iParent = iParent;
|
||||
|
|
@ -204,7 +204,7 @@ PIXI.InteractionManager.prototype.setTargetDomElement = function(domElement)
|
|||
domElement.addEventListener('touchend', this.onTouchEnd, true);
|
||||
domElement.addEventListener('touchmove', this.onTouchMove, true);
|
||||
|
||||
document.body.addEventListener('mouseup', this.onMouseUp, true);
|
||||
window.addEventListener('mouseup', this.onMouseUp, true);
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -226,7 +226,7 @@ PIXI.InteractionManager.prototype.removeEvents = function()
|
|||
|
||||
this.interactionDOMElement = null;
|
||||
|
||||
document.body.removeEventListener('mouseup', this.onMouseUp, true);
|
||||
window.removeEventListener('mouseup', this.onMouseUp, true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -273,7 +273,7 @@ PIXI.InteractionManager.prototype.update = function()
|
|||
var cursor = 'inherit';
|
||||
var over = false;
|
||||
|
||||
for (i = 0; i < length; i++)
|
||||
for (i = length-1; i >= 0; i--)
|
||||
{
|
||||
var item = this.interactiveItems[i];
|
||||
|
||||
|
|
@ -335,7 +335,7 @@ PIXI.InteractionManager.prototype.onMouseMove = function(event)
|
|||
|
||||
var length = this.interactiveItems.length;
|
||||
|
||||
for (var i = 0; i < length; i++)
|
||||
for (var i = length-1; i >= 0; i--)
|
||||
{
|
||||
var item = this.interactiveItems[i];
|
||||
|
||||
|
|
@ -368,7 +368,7 @@ PIXI.InteractionManager.prototype.onMouseDown = function(event)
|
|||
|
||||
// while
|
||||
// hit test
|
||||
for (var i = 0; i < length; i++)
|
||||
for (var i = length-1; i >= 0; i--)
|
||||
{
|
||||
var item = this.interactiveItems[i];
|
||||
|
||||
|
|
@ -403,7 +403,7 @@ PIXI.InteractionManager.prototype.onMouseOut = function()
|
|||
|
||||
this.interactionDOMElement.style.cursor = 'inherit';
|
||||
|
||||
for (var i = 0; i < length; i++)
|
||||
for (var i = length-1; i >= 0; i--)
|
||||
{
|
||||
var item = this.interactiveItems[i];
|
||||
if(item.__isOver)
|
||||
|
|
@ -436,7 +436,7 @@ PIXI.InteractionManager.prototype.onMouseUp = function(event)
|
|||
var length = this.interactiveItems.length;
|
||||
var up = false;
|
||||
|
||||
for (var i = 0; i < length; i++)
|
||||
for (var i = length-1; i >= 0; i--)
|
||||
{
|
||||
var item = this.interactiveItems[i];
|
||||
|
||||
|
|
@ -495,6 +495,20 @@ PIXI.InteractionManager.prototype.hitTest = function(item, interactionData)
|
|||
|
||||
interactionData.target = item;
|
||||
|
||||
var length = item.children.length;
|
||||
|
||||
for (var i = length-1; i >= 0; i--)
|
||||
{
|
||||
var tempItem = item.children[i];
|
||||
var hit = this.hitTest(tempItem, interactionData);
|
||||
if(hit)
|
||||
{
|
||||
// hmm.. TODO SET CORRECT TARGET?
|
||||
interactionData.target = item;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
//a sprite or display object with a hit area defined
|
||||
if(item.hitArea && item.hitArea.contains) {
|
||||
if(item.hitArea.contains(x, y)) {
|
||||
|
|
@ -527,19 +541,6 @@ PIXI.InteractionManager.prototype.hitTest = function(item, interactionData)
|
|||
}
|
||||
}
|
||||
|
||||
var length = item.children.length;
|
||||
|
||||
for (var i = 0; i < length; i++)
|
||||
{
|
||||
var tempItem = item.children[i];
|
||||
var hit = this.hitTest(tempItem, interactionData);
|
||||
if(hit)
|
||||
{
|
||||
// hmm.. TODO SET CORRECT TARGET?
|
||||
interactionData.target = item;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
|
@ -574,7 +575,7 @@ PIXI.InteractionManager.prototype.onTouchMove = function(event)
|
|||
}
|
||||
|
||||
var length = this.interactiveItems.length;
|
||||
for (i = 0; i < length; i++)
|
||||
for (i = length-1; i >= 0; i--)
|
||||
{
|
||||
var item = this.interactiveItems[i];
|
||||
if(item.touchmove)
|
||||
|
|
@ -615,7 +616,7 @@ PIXI.InteractionManager.prototype.onTouchStart = function(event)
|
|||
|
||||
var length = this.interactiveItems.length;
|
||||
|
||||
for (var j = 0; j < length; j++)
|
||||
for (var j = length-1; j >= 0; j--)
|
||||
{
|
||||
var item = this.interactiveItems[j];
|
||||
|
||||
|
|
@ -663,7 +664,7 @@ PIXI.InteractionManager.prototype.onTouchEnd = function(event)
|
|||
}
|
||||
|
||||
var length = this.interactiveItems.length;
|
||||
for (var j = 0; j < length; j++)
|
||||
for (var j = length-1; j >= 0; j--)
|
||||
{
|
||||
var item = this.interactiveItems[j];
|
||||
var itemTouchData = item.__touchData; // <-- Here!
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ PIXI.WEBGL_RENDERER = 0;
|
|||
PIXI.CANVAS_RENDERER = 1;
|
||||
|
||||
// useful for testing against if your lib is using pixi.
|
||||
PIXI.VERSION = "v1.5.1";
|
||||
PIXI.VERSION = "v1.5.0";
|
||||
|
||||
// the various blend modes supported by pixi
|
||||
PIXI.blendModes = {
|
||||
|
|
|
|||
|
|
@ -194,6 +194,10 @@ PIXI.DisplayObject = function()
|
|||
*/
|
||||
this._mask = null;
|
||||
|
||||
this._cacheAsBitmap = false;
|
||||
this._cacheIsDirty = false;
|
||||
|
||||
|
||||
/*
|
||||
* MOUSE Callbacks
|
||||
*/
|
||||
|
|
@ -379,6 +383,28 @@ Object.defineProperty(PIXI.DisplayObject.prototype, 'filters', {
|
|||
}
|
||||
});
|
||||
|
||||
Object.defineProperty(PIXI.DisplayObject.prototype, 'cacheAsBitmap', {
|
||||
get: function() {
|
||||
return this._cacheAsBitmap;
|
||||
},
|
||||
set: function(value) {
|
||||
|
||||
if(this._cacheAsBitmap === value)return;
|
||||
|
||||
if(value)
|
||||
{
|
||||
//this._cacheIsDirty = true;
|
||||
this._generateCachedSprite();
|
||||
}
|
||||
else
|
||||
{
|
||||
this._destroyCachedSprite();
|
||||
}
|
||||
|
||||
this._cacheAsBitmap = value;
|
||||
}
|
||||
});
|
||||
|
||||
/*
|
||||
* Updates the object transform for rendering
|
||||
*
|
||||
|
|
@ -399,6 +425,7 @@ PIXI.DisplayObject.prototype.updateTransform = function()
|
|||
// var localTransform = this.localTransform//.toArray();
|
||||
var parentTransform = this.parent.worldTransform;//.toArray();
|
||||
var worldTransform = this.worldTransform;//.toArray();
|
||||
|
||||
var px = this.pivot.x;
|
||||
var py = this.pivot.y;
|
||||
|
||||
|
|
@ -442,11 +469,10 @@ PIXI.DisplayObject.prototype.getBounds = function( matrix )
|
|||
*/
|
||||
PIXI.DisplayObject.prototype.getLocalBounds = function()
|
||||
{
|
||||
//var matrixCache = this.worldTransform;
|
||||
|
||||
return this.getBounds(PIXI.identityMatrix);///PIXI.EmptyRectangle();
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Sets the object's stage reference, the stage this object is connected to
|
||||
*
|
||||
|
|
@ -459,6 +485,62 @@ PIXI.DisplayObject.prototype.setStageReference = function(stage)
|
|||
if(this._interactive)this.stage.dirty = true;
|
||||
};
|
||||
|
||||
PIXI.DisplayObject.prototype.generateTexture = function(renderer)
|
||||
{
|
||||
var bounds = this.getLocalBounds();
|
||||
|
||||
var renderTexture = new PIXI.RenderTexture(bounds.width | 0, bounds.height | 0, renderer);
|
||||
renderTexture.render(this);
|
||||
|
||||
return renderTexture;
|
||||
};
|
||||
|
||||
PIXI.DisplayObject.prototype.updateCache = function()
|
||||
{
|
||||
this._generateCachedSprite();
|
||||
};
|
||||
|
||||
PIXI.DisplayObject.prototype._renderCachedSprite = function(renderSession)
|
||||
{
|
||||
if(renderSession.gl)
|
||||
{
|
||||
PIXI.Sprite.prototype._renderWebGL.call(this._cachedSprite, renderSession);
|
||||
}
|
||||
else
|
||||
{
|
||||
PIXI.Sprite.prototype._renderCanvas.call(this._cachedSprite, renderSession);
|
||||
}
|
||||
};
|
||||
|
||||
PIXI.DisplayObject.prototype._generateCachedSprite = function()//renderSession)
|
||||
{
|
||||
this._cacheAsBitmap = false;
|
||||
var bounds = this.getLocalBounds();
|
||||
|
||||
if(!this._cachedSprite)
|
||||
{
|
||||
var renderTexture = new PIXI.RenderTexture(bounds.width | 0, bounds.height | 0);//, renderSession.renderer);
|
||||
|
||||
this._cachedSprite = new PIXI.Sprite(renderTexture);
|
||||
this._cachedSprite.worldTransform = this.worldTransform;
|
||||
}
|
||||
else
|
||||
{
|
||||
this._cachedSprite.texture.resize(bounds.width | 0, bounds.height | 0);
|
||||
}
|
||||
|
||||
//REMOVE filter!
|
||||
var tempFilters = this._filters;
|
||||
this._filters = null;
|
||||
|
||||
this._cachedSprite.filters = tempFilters;
|
||||
this._cachedSprite.texture.render(this);
|
||||
|
||||
this._filters = tempFilters;
|
||||
|
||||
this._cacheAsBitmap = true;
|
||||
};
|
||||
|
||||
/**
|
||||
* Renders the object using the WebGL renderer
|
||||
*
|
||||
|
|
@ -466,6 +548,18 @@ PIXI.DisplayObject.prototype.setStageReference = function(stage)
|
|||
* @param renderSession {RenderSession}
|
||||
* @private
|
||||
*/
|
||||
PIXI.DisplayObject.prototype._destroyCachedSprite = function()
|
||||
{
|
||||
if(!this._cachedSprite)return;
|
||||
|
||||
this._cachedSprite.texture.destroy(true);
|
||||
// console.log("DESTROY")
|
||||
// let the gc collect the unused sprite
|
||||
// TODO could be object pooled!
|
||||
this._cachedSprite = null;
|
||||
};
|
||||
|
||||
|
||||
PIXI.DisplayObject.prototype._renderWebGL = function(renderSession)
|
||||
{
|
||||
// OVERWRITE;
|
||||
|
|
|
|||
|
|
@ -205,6 +205,8 @@ PIXI.DisplayObjectContainer.prototype.updateTransform = function()
|
|||
|
||||
PIXI.DisplayObject.prototype.updateTransform.call( this );
|
||||
|
||||
if(this._cacheAsBitmap)return;
|
||||
|
||||
for(var i=0,j=this.children.length; i<j; i++)
|
||||
{
|
||||
this.children[i].updateTransform();
|
||||
|
|
@ -344,6 +346,12 @@ PIXI.DisplayObjectContainer.prototype._renderWebGL = function(renderSession)
|
|||
{
|
||||
if(!this.visible || this.alpha <= 0)return;
|
||||
|
||||
if(this._cacheAsBitmap)
|
||||
{
|
||||
this._renderCachedSprite(renderSession);
|
||||
return;
|
||||
}
|
||||
|
||||
var i,j;
|
||||
|
||||
if(this._mask || this._filters)
|
||||
|
|
@ -395,6 +403,13 @@ PIXI.DisplayObjectContainer.prototype._renderCanvas = function(renderSession)
|
|||
{
|
||||
if(this.visible === false || this.alpha === 0)return;
|
||||
|
||||
if(this._cacheAsBitmap)
|
||||
{
|
||||
|
||||
this._renderCachedSprite(renderSession);
|
||||
return;
|
||||
}
|
||||
|
||||
if(this._mask)
|
||||
{
|
||||
renderSession.maskManager.pushMask(this._mask, renderSession.context);
|
||||
|
|
@ -410,4 +425,4 @@ PIXI.DisplayObjectContainer.prototype._renderCanvas = function(renderSession)
|
|||
{
|
||||
renderSession.maskManager.popMask(renderSession.context);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -345,17 +345,15 @@ PIXI.Sprite.prototype._renderCanvas = function(renderSession)
|
|||
var transform = this.worldTransform;
|
||||
|
||||
// allow for trimming
|
||||
|
||||
if (renderSession.roundPixels)
|
||||
{
|
||||
context.setTransform(transform.a, transform.c, transform.b, transform.d, transform.tx || 0, transform.ty || 0);
|
||||
context.setTransform(transform.a, transform.c, transform.b, transform.d, transform.tx | 0, transform.ty | 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
context.setTransform(transform.a, transform.c, transform.b, transform.d, transform.tx, transform.ty);
|
||||
}
|
||||
|
||||
|
||||
//if smoothingEnabled is supported and we need to change the smoothing property for this texture
|
||||
if(renderSession.smoothProperty && renderSession.scaleMode !== this.texture.baseTexture.scaleMode) {
|
||||
renderSession.scaleMode = this.texture.baseTexture.scaleMode;
|
||||
|
|
|
|||
|
|
@ -1,371 +0,0 @@
|
|||
|
||||
|
||||
PIXI.ParticleBatch = function(texture)
|
||||
{
|
||||
PIXI.DisplayObjectContainer.call( this);
|
||||
|
||||
this.textureThing = texture;
|
||||
|
||||
this.ready = false;
|
||||
}
|
||||
|
||||
PIXI.ParticleBatch.prototype = Object.create( PIXI.DisplayObjectContainer.prototype );
|
||||
PIXI.ParticleBatch.constructor = PIXI.ParticleBatch;
|
||||
|
||||
PIXI.ParticleBatch.prototype.initWebGL = function(gl)
|
||||
{
|
||||
|
||||
var vecShaderSrc = [
|
||||
|
||||
"attribute vec2 aVertexPosition;",
|
||||
"attribute vec2 aMovement;",
|
||||
"attribute vec2 aTexture;",
|
||||
|
||||
"uniform mat3 translationMatrix;",
|
||||
|
||||
"uniform float time;",
|
||||
// "uniform float pos;",
|
||||
|
||||
"uniform vec2 projectionVector;",
|
||||
"varying vec2 vTextureCoord;",
|
||||
"const float PI = 3.14159265358;",
|
||||
|
||||
"void main(void) {",
|
||||
|
||||
"vec2 v = aVertexPosition;",
|
||||
"float x = aMovement.x * 0.01;",
|
||||
"vec2 scaledVertex = aVertexPosition;",
|
||||
"v.x = (scaledVertex.x) * cos(x) - (scaledVertex.y) * sin(x);",
|
||||
"v.y = (scaledVertex.x) * sin(x) + (scaledVertex.y) * cos(x);",
|
||||
|
||||
//"float pos = p * p * ((this._p1 + 1) * p - this._p1);"
|
||||
|
||||
//"v.y = sin(-time*PI * 2.0) * -aMovement.y;",
|
||||
"v += aMovement;",
|
||||
|
||||
// "v += aVertexPosition;",
|
||||
// "v.y *= 1.0 + smoothstep(time, 0.5, 1.0) * 3.0;",
|
||||
// "v.y += aMovement.y * time + aVertexPosition.y;",
|
||||
// "v.y = time * aMovement.y;;",
|
||||
// "v.y += aVertexPosition.y;",
|
||||
//"v.x += aMovement.x ;",
|
||||
|
||||
// "v.y *= -1.0;",
|
||||
|
||||
"v.x += 1280.0/2.0;",
|
||||
"v.y += 800.0/2.0;",
|
||||
|
||||
|
||||
"gl_Position = vec4( v.x / projectionVector.x -1.0, v.y / projectionVector.y + 1.0 , 0.0, 1.0);",
|
||||
|
||||
// "gl_Position = vec4(aVertexPosition, 0.0, 1.0);",
|
||||
"vTextureCoord = aTexture;",
|
||||
|
||||
"}"
|
||||
|
||||
];
|
||||
|
||||
var fragShaderSrc = [
|
||||
"precision lowp float;",
|
||||
"varying vec2 vTextureCoord;",
|
||||
|
||||
"uniform sampler2D uSampler;",
|
||||
"void main(void) {",
|
||||
"gl_FragColor = texture2D(uSampler, vTextureCoord);",
|
||||
"}"
|
||||
];
|
||||
|
||||
|
||||
|
||||
|
||||
this.program = PIXI.compileProgram(gl, vecShaderSrc, fragShaderSrc)
|
||||
|
||||
gl.useProgram(this.program);
|
||||
|
||||
|
||||
this.translationMatrix = gl.getUniformLocation(this.program, "translationMatrix");
|
||||
this.projectionVector = gl.getUniformLocation(this.program, "projectionVector");
|
||||
this.time = gl.getUniformLocation(this.program, "time");
|
||||
|
||||
|
||||
this.aVertexPosition = gl.getAttribLocation(this.program, "aVertexPosition");
|
||||
this.aMovement = gl.getAttribLocation(this.program, "aMovement");
|
||||
this.aTexture = gl.getAttribLocation(this.program, "aTexture");
|
||||
|
||||
// console.log(":::" + this.aMovement)
|
||||
this.totalItems = 10000;
|
||||
|
||||
|
||||
this.verticies = new Float32Array( this.totalItems * 8 );
|
||||
this.movement = new Float32Array( this.totalItems * 8 );
|
||||
|
||||
this.posData = new Float32Array( this.totalItems * 3 );
|
||||
|
||||
this.texture = new Float32Array( this.totalItems * 8 );
|
||||
|
||||
this.indices = new Uint16Array( this.totalItems * 6);
|
||||
|
||||
for (var i = 0; i < this.totalItems * 8; i+=8) {
|
||||
|
||||
var scale = 1// + Math.random()
|
||||
// position..
|
||||
this.verticies[i] = -20 * scale;
|
||||
this.verticies[i+1] = -20 * scale;
|
||||
|
||||
this.verticies[i+2] = 20 * scale;
|
||||
this.verticies[i+3] = -20 * scale;
|
||||
|
||||
this.verticies[i+4] = 20 * scale;
|
||||
this.verticies[i+5] = 20 * scale;
|
||||
|
||||
this.verticies[i+6] = -20 * scale;
|
||||
this.verticies[i+7] = 20 * scale;
|
||||
};
|
||||
|
||||
var fullWidth = 142;
|
||||
var fullHeight= 157;
|
||||
|
||||
var simpleFrame = new PIXI.Rectangle(0, 0, 142, 157);
|
||||
|
||||
var gemCount = 0;
|
||||
|
||||
for (var i = 0; i < this.totalItems * 8; i+=8) {
|
||||
|
||||
gemCount++
|
||||
var gemFrame = this.texture.frame || simpleFrame;//this.gems[gemCount % this.gems.length].frame;
|
||||
// console.log(gemFrame);
|
||||
// position..
|
||||
|
||||
var xoff = gemFrame.x / fullWidth;
|
||||
var yoff = gemFrame.y / fullHeight;
|
||||
|
||||
this.texture[i] = xoff;
|
||||
this.texture[i+1] = yoff;
|
||||
|
||||
this.texture[i+2] = xoff + gemFrame.width / fullWidth;
|
||||
this.texture[i+3] = yoff;
|
||||
|
||||
this.texture[i+4] = xoff + gemFrame.width / fullWidth;
|
||||
this.texture[i+5] = yoff + gemFrame.height / fullHeight;
|
||||
|
||||
this.texture[i+6] = xoff;
|
||||
this.texture[i+7] = yoff + gemFrame.height / fullHeight;
|
||||
|
||||
|
||||
|
||||
//
|
||||
|
||||
};
|
||||
|
||||
for (var i = 0; i < this.totalItems* 8; i+=8) {
|
||||
|
||||
var pos = 0//Math.random() * 200;
|
||||
|
||||
var angle = Math.random() * Math.PI * 2;
|
||||
|
||||
var speed = (0.3 + Math.random() * 0.9) * 0.01;
|
||||
|
||||
var pos = Math.sin(angle) * speed;//Math.random() * 10 - 5;
|
||||
var posY = Math.cos(angle) * speed;
|
||||
|
||||
var scale = 1;
|
||||
// var posY = 0.5 + Math.random()// * 200
|
||||
|
||||
// console.log(pos);
|
||||
this.movement[i] = pos;
|
||||
this.movement[i+1] = posY;
|
||||
|
||||
this.movement[i+2] = scale;
|
||||
this.movement[i+3] = scale;
|
||||
|
||||
this.movement[i+4] = rotation;
|
||||
|
||||
this.movement[i+5] = scale;
|
||||
|
||||
this.movement[i+2] = pos;
|
||||
this.movement[i+3] = posY;
|
||||
|
||||
this.movement[i+4] = pos;
|
||||
this.movement[i+5] = posY;
|
||||
|
||||
this.movement[i+6] = pos;
|
||||
this.movement[i+7] = posY;
|
||||
}
|
||||
|
||||
this.reset();
|
||||
|
||||
for (var i = 0; i < this.totalItems * 6; i+=6) {
|
||||
|
||||
var i3 = (i / 6) * 4;
|
||||
|
||||
this.indices[i] = i3;
|
||||
this.indices[i+1] = i3+1;
|
||||
this.indices[i+2] = i3+2;
|
||||
this.indices[i+3] = i3;
|
||||
this.indices[i+4] = i3+2;
|
||||
this.indices[i+5] = i3+3;
|
||||
|
||||
}
|
||||
|
||||
// console.log(this);
|
||||
this.vertexBuffer = gl.createBuffer();
|
||||
this.textureBuffer = gl.createBuffer();
|
||||
this.movementBuffer = gl.createBuffer();
|
||||
|
||||
this.indexBuffer = gl.createBuffer();
|
||||
|
||||
gl.bindBuffer(gl.ARRAY_BUFFER, this.vertexBuffer);
|
||||
gl.bufferData(gl.ARRAY_BUFFER, this.verticies, gl.STATIC_DRAW);
|
||||
|
||||
gl.bindBuffer(gl.ARRAY_BUFFER, this.textureBuffer);
|
||||
gl.bufferData(gl.ARRAY_BUFFER, this.texture, gl.STATIC_DRAW);
|
||||
|
||||
gl.bindBuffer(gl.ARRAY_BUFFER, this.movementBuffer);
|
||||
gl.bufferData(gl.ARRAY_BUFFER, this.movement, gl.DYNAMIC_DRAW);
|
||||
|
||||
gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this.indexBuffer);
|
||||
gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, this.indices, gl.STATIC_DRAW);
|
||||
|
||||
this.count = 0;
|
||||
this.speed = 18;
|
||||
this.posy = 0;
|
||||
|
||||
this.ready = true;
|
||||
// alert("!")
|
||||
}
|
||||
|
||||
PIXI.ParticleBatch.prototype.addChild = function(child)
|
||||
{
|
||||
PIXI.DisplayObjectContainer.prototype.addChild.call(child);
|
||||
|
||||
|
||||
}
|
||||
|
||||
PIXI.ParticleBatch.prototype.reset = function()
|
||||
{
|
||||
for (var i = 0; i < this.totalItems* 4; i+=4) {
|
||||
|
||||
this.posData[i] = 0; // pos x
|
||||
this.posData[i + 1] = 0; // pos y
|
||||
|
||||
var angle = Math.random() * Math.PI * 2;
|
||||
|
||||
var speed = 10 + Math.random() * 15;
|
||||
|
||||
var pos = Math.sin(angle) * speed;//Math.random() * 10 - 5;
|
||||
var posY = Math.cos(angle) *speed;
|
||||
|
||||
|
||||
this.posData[i + 2] = pos; // speed x
|
||||
this.posData[i + 3] = posY - 10; // speed y
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
PIXI.ParticleBatch.prototype._renderWebGL = function(renderSession)
|
||||
{
|
||||
if(!this.visible)return;
|
||||
|
||||
renderSession.shaderManager.deactivateDefaultShader()
|
||||
if(!this.ready)this.initWebGL( renderSession.gl );
|
||||
|
||||
renderSession.spriteBatch.stop();
|
||||
|
||||
this.speed -= 0.4;
|
||||
|
||||
this.count += this.speed;
|
||||
|
||||
|
||||
var gl = renderSession.gl;
|
||||
var glTexture = this.textureThing.baseTexture._glTextures[gl.id] || PIXI.createWebGLTexture(this.textureThing.baseTexture, gl)
|
||||
|
||||
gl.useProgram(this.program);
|
||||
|
||||
|
||||
gl.enableVertexAttribArray(this.aVertexPosition);
|
||||
gl.enableVertexAttribArray(this.aMovement);
|
||||
gl.enableVertexAttribArray(this.aTexture);
|
||||
|
||||
|
||||
gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
gl.activeTexture(gl.TEXTURE0);
|
||||
gl.bindTexture(gl.TEXTURE_2D, glTexture);
|
||||
|
||||
gl.uniform1f(this.time, this.count);
|
||||
gl.uniform2f(this.projectionVector, renderSession.projection.x, renderSession.projection.y);
|
||||
|
||||
|
||||
gl.bindBuffer(gl.ARRAY_BUFFER, this.vertexBuffer);
|
||||
gl.vertexAttribPointer(this.aVertexPosition, 2, gl.FLOAT, false, 0, 0);
|
||||
|
||||
gl.bindBuffer(gl.ARRAY_BUFFER, this.textureBuffer);
|
||||
gl.vertexAttribPointer(this.aTexture, 2, gl.FLOAT, false, 0, 0);
|
||||
|
||||
|
||||
|
||||
for (var i = 0; i < this.totalItems* 8; i+=8) {
|
||||
|
||||
var val = ( i / 8 ) * 4;
|
||||
|
||||
this.posData[val + 3] += 0.02;
|
||||
|
||||
this.posData[val] += this.posData[val + 2];
|
||||
this.posData[val + 1] += this.posData[val + 3];
|
||||
|
||||
var pos = this.posData[val];
|
||||
var posY = this.posData[val + 1];
|
||||
|
||||
//pos += this.posData[val + 2];
|
||||
//posY += this.posData[val + 3];
|
||||
|
||||
this.movement[i] = pos;
|
||||
this.movement[i+1] = posY;
|
||||
|
||||
this.movement[i+2] = pos;
|
||||
this.movement[i+3] = posY;
|
||||
|
||||
this.movement[i+4] = pos;
|
||||
this.movement[i+5] = posY;
|
||||
|
||||
this.movement[i+6] = pos;
|
||||
this.movement[i+7] = posY;
|
||||
}
|
||||
|
||||
gl.bindBuffer(gl.ARRAY_BUFFER, this.movementBuffer);
|
||||
gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.movement);
|
||||
|
||||
gl.vertexAttribPointer(this.aMovement, 2, gl.FLOAT, false, 0, 0);
|
||||
|
||||
//gl.bindBuffer(gl.ARRAY_BUFFER, this.movementBuffer);
|
||||
gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this.indexBuffer);
|
||||
|
||||
gl.drawElements(gl.TRIANGLES, 6 * this.totalItems , gl.UNSIGNED_SHORT, 0);
|
||||
|
||||
// not sure if both needed? but ya have for now!
|
||||
// override!
|
||||
// disable the current stuff..
|
||||
|
||||
|
||||
// gl.disableVertexAttribArray(PIXI.stripShader.aVertexPosition);
|
||||
//gl.disableVertexAttribArray(PIXI.stripShader.colorAttribute);
|
||||
//gl.disableVertexAttribArray(PIXI.stripShader.aTextureCoord);
|
||||
gl.disableVertexAttribArray(this.aVertexPosition);
|
||||
gl.disableVertexAttribArray(this.aMovement);
|
||||
gl.disableVertexAttribArray(this.aTexture);
|
||||
|
||||
|
||||
renderSession.shaderManager.activateDefaultShader()
|
||||
|
||||
renderSession.spriteBatch.start();
|
||||
/*
|
||||
gl.useProgram(PIXI.defaultShader.program);
|
||||
|
||||
gl.enableVertexAttribArray(PIXI.defaultShader.aVertexPosition);
|
||||
gl.enableVertexAttribArray(PIXI.defaultShader.colorAttribute);
|
||||
gl.enableVertexAttribArray(PIXI.defaultShader.aTextureCoord);
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -99,24 +99,19 @@ PIXI.SpriteBatch.prototype._renderCanvas = function(renderSession)
|
|||
var context = renderSession.context;
|
||||
context.globalAlpha = this.worldAlpha;
|
||||
|
||||
var transform = this.worldTransform;
|
||||
PIXI.DisplayObject.prototype.updateTransform.call(this);
|
||||
|
||||
var transform = this.worldTransform;
|
||||
// alow for trimming
|
||||
|
||||
if (renderSession.roundPixels)
|
||||
{
|
||||
context.setTransform(transform.a, transform.c, transform.b, transform.d, Math.floor(transform.tx), Math.floor(transform.ty));
|
||||
}
|
||||
else
|
||||
{
|
||||
context.setTransform(transform.a, transform.c, transform.b, transform.d, transform.tx, transform.ty);
|
||||
}
|
||||
|
||||
context.save();
|
||||
var isRotated = true;
|
||||
|
||||
for (var i = 0; i < this.children.length; i++) {
|
||||
|
||||
var child = this.children[i];
|
||||
|
||||
if(!child.visible)continue;
|
||||
|
||||
var texture = child.texture;
|
||||
var frame = texture.frame;
|
||||
|
||||
|
|
@ -124,8 +119,13 @@ PIXI.SpriteBatch.prototype._renderCanvas = function(renderSession)
|
|||
|
||||
if(child.rotation % (Math.PI * 2) === 0)
|
||||
{
|
||||
|
||||
// this is the fastest way to optimise! - if rotation is 0 then we can avoid any kind of setTransform call
|
||||
if(isRotated)
|
||||
{
|
||||
context.setTransform(transform.a, transform.c, transform.b, transform.d, transform.tx, transform.ty);
|
||||
isRotated = false;
|
||||
}
|
||||
|
||||
// this is the fastest way to optimise! - if rotation is 0 then we can avoid any kind of setTransform call
|
||||
context.drawImage(texture.baseTexture.source,
|
||||
frame.x,
|
||||
frame.y,
|
||||
|
|
@ -138,24 +138,23 @@ PIXI.SpriteBatch.prototype._renderCanvas = function(renderSession)
|
|||
}
|
||||
else
|
||||
{
|
||||
if(!isRotated)isRotated = true;
|
||||
|
||||
PIXI.DisplayObject.prototype.updateTransform.call(child);
|
||||
|
||||
transform = child.localTransform;
|
||||
var childTransform = child.worldTransform;
|
||||
|
||||
if(this.rotation !== this.rotationCache)
|
||||
// allow for trimming
|
||||
|
||||
if (renderSession.roundPixels)
|
||||
{
|
||||
this.rotationCache = this.rotation;
|
||||
this._sr = Math.sin(this.rotation);
|
||||
this._cr = Math.cos(this.rotation);
|
||||
context.setTransform(childTransform.a, childTransform.c, childTransform.b, childTransform.d, childTransform.tx | 0, childTransform.ty | 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
context.setTransform(childTransform.a, childTransform.c, childTransform.b, childTransform.d, childTransform.tx, childTransform.ty);
|
||||
}
|
||||
|
||||
var a = child._cr * child.scale.x,
|
||||
b = -child._sr * child.scale.y,
|
||||
c = child._sr * child.scale.x,
|
||||
d = child._cr * child.scale.y;
|
||||
|
||||
context.setTransform(a, c, b, d, child.position.x, child.position.y);
|
||||
|
||||
context.drawImage(texture.baseTexture.source,
|
||||
frame.x,
|
||||
frame.y,
|
||||
|
|
@ -165,10 +164,13 @@ PIXI.SpriteBatch.prototype._renderCanvas = function(renderSession)
|
|||
((child.anchor.y) * (-frame.height) + 0.5) | 0,
|
||||
frame.width,
|
||||
frame.height);
|
||||
|
||||
|
||||
}
|
||||
|
||||
// context.restore();
|
||||
}
|
||||
|
||||
context.restore();
|
||||
// context.restore();
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
* A tiling sprite is a fast way of rendering a tiling image
|
||||
*
|
||||
* @class TilingSprite
|
||||
* @extends DisplayObjectContainer
|
||||
* @extends Sprite
|
||||
* @constructor
|
||||
* @param texture {Texture} the texture of the tiling sprite
|
||||
* @param width {Number} the width of the tiling sprite
|
||||
|
|
@ -23,6 +23,7 @@ PIXI.TilingSprite = function(texture, width, height)
|
|||
* @type Number
|
||||
*/
|
||||
this.width = width || 100;
|
||||
|
||||
/**
|
||||
* The height of the tiling sprite
|
||||
*
|
||||
|
|
@ -132,6 +133,36 @@ PIXI.TilingSprite.prototype.onTextureUpdate = function()
|
|||
this.updateFrame = true;
|
||||
};
|
||||
|
||||
PIXI.TilingSprite.prototype.setTexture = function(texture)
|
||||
{
|
||||
if(this.texture === texture)return;
|
||||
|
||||
this.texture = texture;
|
||||
|
||||
this.refreshTexture = true;
|
||||
/*
|
||||
if(this.tilingTexture)
|
||||
{
|
||||
this.generateTilingTexture(true);
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
// stop current texture;
|
||||
if(this.texture.baseTexture !== texture.baseTexture)
|
||||
{
|
||||
this.textureChange = true;
|
||||
this.texture = texture;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.texture = texture;
|
||||
}
|
||||
|
||||
this.updateFrame = true;*/
|
||||
this.cachedTint = 0xFFFFFF;
|
||||
};
|
||||
|
||||
/**
|
||||
* Renders the object using the WebGL renderer
|
||||
*
|
||||
|
|
@ -146,48 +177,46 @@ PIXI.TilingSprite.prototype._renderWebGL = function(renderSession)
|
|||
|
||||
var i,j;
|
||||
|
||||
if(this.mask || this.filters)
|
||||
if(this.mask)
|
||||
{
|
||||
if(this.mask)
|
||||
{
|
||||
renderSession.spriteBatch.stop();
|
||||
renderSession.maskManager.pushMask(this.mask, renderSession);
|
||||
renderSession.spriteBatch.start();
|
||||
}
|
||||
|
||||
if(this.filters)
|
||||
{
|
||||
renderSession.spriteBatch.flush();
|
||||
renderSession.filterManager.pushFilter(this._filterBlock);
|
||||
}
|
||||
|
||||
if(!this.tilingTexture)this.generateTilingTexture(true);
|
||||
else renderSession.spriteBatch.renderTilingSprite(this);
|
||||
|
||||
// simple render children!
|
||||
for(i=0,j=this.children.length; i<j; i++)
|
||||
{
|
||||
this.children[i]._renderWebGL(renderSession);
|
||||
}
|
||||
|
||||
renderSession.spriteBatch.stop();
|
||||
|
||||
if(this.filters)renderSession.filterManager.popFilter();
|
||||
if(this.mask)renderSession.maskManager.popMask(renderSession);
|
||||
|
||||
renderSession.maskManager.pushMask(this.mask, renderSession);
|
||||
renderSession.spriteBatch.start();
|
||||
}
|
||||
else
|
||||
|
||||
if(this.filters)
|
||||
{
|
||||
if(!this.tilingTexture)this.generateTilingTexture(true);
|
||||
else renderSession.spriteBatch.renderTilingSprite(this);
|
||||
|
||||
// simple render children!
|
||||
for(i=0,j=this.children.length; i<j; i++)
|
||||
renderSession.spriteBatch.flush();
|
||||
renderSession.filterManager.pushFilter(this._filterBlock);
|
||||
}
|
||||
|
||||
|
||||
if(!this.tilingTexture || this.refreshTexture)
|
||||
{
|
||||
this.generateTilingTexture(true);
|
||||
if(this.tilingTexture && this.tilingTexture.needsUpdate)
|
||||
{
|
||||
this.children[i]._renderWebGL(renderSession);
|
||||
//TODO - tweaking
|
||||
PIXI.updateWebGLTexture(this.tilingTexture.baseTexture, renderSession.gl);
|
||||
this.tilingTexture.needsUpdate = false;
|
||||
// this.tilingTexture._uvs = null;
|
||||
}
|
||||
}
|
||||
else renderSession.spriteBatch.renderTilingSprite(this);
|
||||
|
||||
|
||||
// simple render children!
|
||||
for(i=0,j=this.children.length; i<j; i++)
|
||||
{
|
||||
this.children[i]._renderWebGL(renderSession);
|
||||
}
|
||||
|
||||
renderSession.spriteBatch.stop();
|
||||
|
||||
if(this.filters)renderSession.filterManager.popFilter();
|
||||
if(this.mask)renderSession.maskManager.popMask(renderSession);
|
||||
|
||||
renderSession.spriteBatch.start();
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -218,10 +247,10 @@ PIXI.TilingSprite.prototype._renderCanvas = function(renderSession)
|
|||
context.setTransform(transform.a, transform.c, transform.b, transform.d, transform.tx, transform.ty);
|
||||
|
||||
|
||||
if(!this.__tilePattern)
|
||||
if(!this.__tilePattern || this.refreshTexture)
|
||||
{
|
||||
this.generateTilingTexture(false);
|
||||
|
||||
|
||||
if(this.tilingTexture)
|
||||
{
|
||||
this.__tilePattern = context.createPattern(this.tilingTexture.baseTexture.source, 'repeat');
|
||||
|
|
@ -360,11 +389,8 @@ PIXI.TilingSprite.prototype.generateTilingTexture = function(forcePowerOfTwo)
|
|||
var targetWidth, targetHeight;
|
||||
|
||||
// check that the frame is the same size as the base texture.
|
||||
|
||||
var isFrame = frame.width !== baseTexture.width || frame.height !== baseTexture.height;
|
||||
|
||||
this.tilingTexture = texture;
|
||||
|
||||
var newTextureRequired = false;
|
||||
|
||||
if(!forcePowerOfTwo)
|
||||
|
|
@ -373,38 +399,68 @@ PIXI.TilingSprite.prototype.generateTilingTexture = function(forcePowerOfTwo)
|
|||
{
|
||||
targetWidth = frame.width;
|
||||
targetHeight = frame.height;
|
||||
|
||||
|
||||
newTextureRequired = true;
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
targetWidth = PIXI.getNextPowerOfTwo(texture.frame.width);
|
||||
targetHeight = PIXI.getNextPowerOfTwo(texture.frame.height);
|
||||
|
||||
targetWidth = PIXI.getNextPowerOfTwo(frame.width);
|
||||
targetHeight = PIXI.getNextPowerOfTwo(frame.height);
|
||||
if(frame.width !== targetWidth && frame.height !== targetHeight)newTextureRequired = true;
|
||||
}
|
||||
|
||||
if(newTextureRequired)
|
||||
{
|
||||
var canvasBuffer = new PIXI.CanvasBuffer(targetWidth, targetHeight);
|
||||
var canvasBuffer;
|
||||
|
||||
if(this.tilingTexture && this.tilingTexture.isTiling)
|
||||
{
|
||||
canvasBuffer = this.tilingTexture.canvasBuffer;
|
||||
canvasBuffer.resize(targetWidth, targetHeight);
|
||||
this.tilingTexture.baseTexture.width = targetWidth;
|
||||
this.tilingTexture.baseTexture.height = targetHeight;
|
||||
this.tilingTexture.needsUpdate = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
canvasBuffer = new PIXI.CanvasBuffer(targetWidth, targetHeight);
|
||||
|
||||
this.tilingTexture = PIXI.Texture.fromCanvas(canvasBuffer.canvas);
|
||||
this.tilingTexture.canvasBuffer = canvasBuffer;
|
||||
this.tilingTexture.isTiling = true;
|
||||
|
||||
}
|
||||
|
||||
canvasBuffer.context.drawImage(texture.baseTexture.source,
|
||||
frame.x,
|
||||
frame.y,
|
||||
frame.width,
|
||||
frame.height,
|
||||
0,
|
||||
0,
|
||||
targetWidth,
|
||||
targetHeight);
|
||||
|
||||
this.tilingTexture = PIXI.Texture.fromCanvas(canvasBuffer.canvas);
|
||||
frame.x,
|
||||
frame.y,
|
||||
frame.width,
|
||||
frame.height,
|
||||
0,
|
||||
0,
|
||||
targetWidth,
|
||||
targetHeight);
|
||||
|
||||
this.tileScaleOffset.x = frame.width / targetWidth;
|
||||
this.tileScaleOffset.y = frame.height / targetHeight;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
//TODO - switching?
|
||||
if(this.tilingTexture && this.tilingTexture.isTiling)
|
||||
{
|
||||
// destroy the tiling texture!
|
||||
// TODO could store this somewhere?
|
||||
this.tilingTexture.destroy(true);
|
||||
}
|
||||
|
||||
this.tileScaleOffset.x = 1;
|
||||
this.tileScaleOffset.y = 1;
|
||||
this.tilingTexture = texture;
|
||||
}
|
||||
this.refreshTexture = false;
|
||||
this.tilingTexture.baseTexture._powerOf2 = true;
|
||||
};
|
||||
|
|
@ -113,7 +113,7 @@ PIXI.AssetLoader.prototype.load = function()
|
|||
var scope = this;
|
||||
|
||||
function onLoad(evt) {
|
||||
scope.onAssetLoaded(evt.loader);
|
||||
scope.onAssetLoaded(evt.content);
|
||||
}
|
||||
|
||||
this.loadCount = this.assetURLs.length;
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ PIXI.WebGLRenderer = function(width, height, view, transparent, antialias)
|
|||
this.renderSession.maskManager = this.maskManager;
|
||||
this.renderSession.filterManager = this.filterManager;
|
||||
this.renderSession.spriteBatch = this.spriteBatch;
|
||||
|
||||
this.renderSession.renderer = this;
|
||||
|
||||
gl.useProgram(this.shaderManager.defaultShader.program);
|
||||
|
||||
|
|
@ -183,6 +183,18 @@ PIXI.WebGLRenderer.prototype.render = function(stage)
|
|||
// update the scene graph
|
||||
stage.updateTransform();
|
||||
|
||||
|
||||
// interaction
|
||||
if(stage._interactive)
|
||||
{
|
||||
//need to add some events!
|
||||
if(!stage._interactiveEventsAdded)
|
||||
{
|
||||
stage._interactiveEventsAdded = true;
|
||||
stage.interactionManager.setTarget(this);
|
||||
}
|
||||
}
|
||||
|
||||
var gl = this.gl;
|
||||
|
||||
// -- Does this need to be set every frame? -- //
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@ PIXI.PixiShader = function(gl)
|
|||
'}'
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* @property {number} textureCount - A local texture counter for multi-texture shaders.
|
||||
*/
|
||||
|
|
@ -51,7 +50,6 @@ PIXI.PixiShader = function(gl)
|
|||
*/
|
||||
PIXI.PixiShader.prototype.init = function()
|
||||
{
|
||||
|
||||
var gl = this.gl;
|
||||
|
||||
var program = PIXI.compileProgram(gl, this.vertexSrc || PIXI.PixiShader.defaultVertexSrc, this.fragmentSrc);
|
||||
|
|
@ -185,7 +183,7 @@ PIXI.PixiShader.prototype.initSampler2D = function(uniform)
|
|||
var gl = this.gl;
|
||||
|
||||
gl.activeTexture(gl['TEXTURE' + this.textureCount]);
|
||||
gl.bindTexture(gl.TEXTURE_2D, uniform.value.baseTexture._glTexture);
|
||||
gl.bindTexture(gl.TEXTURE_2D, uniform.value.baseTexture._glTextures[gl.id]);
|
||||
|
||||
// Extended texture data
|
||||
if (uniform.textureData)
|
||||
|
|
@ -259,7 +257,6 @@ PIXI.PixiShader.prototype.syncUniforms = function()
|
|||
// This would probably be faster in an array and it would guarantee key order
|
||||
for (var key in this.uniforms)
|
||||
{
|
||||
|
||||
uniform = this.uniforms[key];
|
||||
|
||||
if (uniform.glValueLength === 1)
|
||||
|
|
@ -306,7 +303,6 @@ PIXI.PixiShader.prototype.syncUniforms = function()
|
|||
/**
|
||||
* Destroys the shader
|
||||
* @method destroy
|
||||
*
|
||||
*/
|
||||
PIXI.PixiShader.prototype.destroy = function()
|
||||
{
|
||||
|
|
@ -318,7 +314,7 @@ PIXI.PixiShader.prototype.destroy = function()
|
|||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* The Default Vertex shader source
|
||||
* @property defaultVertexSrc
|
||||
* @type String
|
||||
*/
|
||||
|
|
@ -342,7 +338,3 @@ PIXI.PixiShader.defaultVertexSrc = [
|
|||
' vColor = vec4(color * aColor.x, aColor.x);',
|
||||
'}'
|
||||
];
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -122,6 +122,7 @@ PIXI.WebGLFastSpriteBatch.prototype.render = function(spriteBatch)
|
|||
PIXI.WebGLFastSpriteBatch.prototype.renderSprite = function(sprite)
|
||||
{
|
||||
//sprite = children[i];
|
||||
if(!sprite.visible)return;
|
||||
|
||||
// TODO trim??
|
||||
if(sprite.texture.baseTexture !== this.currentBaseTexture)
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ PIXI.WebGLFilterManager.prototype.begin = function(renderSession, buffer)
|
|||
this.defaultShader = renderSession.shaderManager.defaultShader;
|
||||
|
||||
var projection = this.renderSession.projection;
|
||||
|
||||
// console.log(this.width)
|
||||
this.width = projection.x * 2;
|
||||
this.height = -projection.y * 2;
|
||||
this.buffer = buffer;
|
||||
|
|
@ -173,6 +173,7 @@ PIXI.WebGLFilterManager.prototype.popFilter = function()
|
|||
var inputTexture = texture;
|
||||
var outputTexture = this.texturePool.pop();
|
||||
if(!outputTexture)outputTexture = new PIXI.FilterTexture(this.gl, this.width, this.height);
|
||||
outputTexture.resize(this.width, this.height);
|
||||
|
||||
// need to clear this FBO as it may have some left over elements from a previous filter.
|
||||
gl.bindFramebuffer(gl.FRAMEBUFFER, outputTexture.frameBuffer );
|
||||
|
|
@ -223,7 +224,7 @@ PIXI.WebGLFilterManager.prototype.popFilter = function()
|
|||
// time to render the filters texture to the previous scene
|
||||
if(this.filterStack.length === 0)
|
||||
{
|
||||
gl.colorMask(true, true, true, this.transparent);
|
||||
gl.colorMask(true, true, true, true);//this.transparent);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -280,7 +281,12 @@ PIXI.WebGLFilterManager.prototype.popFilter = function()
|
|||
|
||||
gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.uvArray);
|
||||
|
||||
//console.log(this.vertexArray)
|
||||
//console.log(this.uvArray)
|
||||
//console.log(sizeX + " : " + sizeY)
|
||||
|
||||
gl.viewport(0, 0, sizeX, sizeY);
|
||||
|
||||
// bind the buffer
|
||||
gl.bindFramebuffer(gl.FRAMEBUFFER, buffer );
|
||||
|
||||
|
|
@ -344,6 +350,7 @@ PIXI.WebGLFilterManager.prototype.applyFilterPass = function(filter, filterArea,
|
|||
filter.uniforms.dimensions.value[3] = this.vertexArray[5];//filterArea.height;
|
||||
}
|
||||
|
||||
// console.log(this.uvArray )
|
||||
shader.syncUniforms();
|
||||
|
||||
gl.bindBuffer(gl.ARRAY_BUFFER, this.vertexBuffer);
|
||||
|
|
@ -448,4 +455,4 @@ PIXI.WebGLFilterManager.prototype.destroy = function()
|
|||
gl.deleteBuffer(this.uvBuffer);
|
||||
gl.deleteBuffer(this.colorBuffer);
|
||||
gl.deleteBuffer(this.indexBuffer);
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ PIXI.WebGLSpriteBatch = function(gl)
|
|||
* @property size
|
||||
* @type Number
|
||||
*/
|
||||
this.size = 10000;//Math.pow(2, 16) / this.vertSize;
|
||||
this.size = 2000;//Math.pow(2, 16) / this.vertSize;
|
||||
|
||||
//the total number of floats in our batch
|
||||
var numVerts = this.size * 4 * this.vertSize;
|
||||
|
|
@ -137,11 +137,13 @@ PIXI.WebGLSpriteBatch.prototype.end = function()
|
|||
*/
|
||||
PIXI.WebGLSpriteBatch.prototype.render = function(sprite)
|
||||
{
|
||||
var texture = sprite.texture;
|
||||
|
||||
// check texture..
|
||||
if(sprite.texture.baseTexture !== this.currentBaseTexture || this.currentBatchSize >= this.size)
|
||||
if(texture.baseTexture !== this.currentBaseTexture || this.currentBatchSize >= this.size)
|
||||
{
|
||||
this.flush();
|
||||
this.currentBaseTexture = sprite.texture.baseTexture;
|
||||
this.currentBaseTexture = texture.baseTexture;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -162,8 +164,6 @@ PIXI.WebGLSpriteBatch.prototype.render = function(sprite)
|
|||
|
||||
var verticies = this.vertices;
|
||||
|
||||
var width = sprite.texture.frame.width;
|
||||
var height = sprite.texture.frame.height;
|
||||
|
||||
// TODO trim??
|
||||
var aX = sprite.anchor.x;
|
||||
|
|
@ -177,18 +177,19 @@ PIXI.WebGLSpriteBatch.prototype.render = function(sprite)
|
|||
var trim = sprite.texture.trim;
|
||||
|
||||
w1 = trim.x - aX * trim.width;
|
||||
w0 = w1 + width;
|
||||
w0 = w1 + texture.frame.width;
|
||||
|
||||
h1 = trim.y - aY * trim.height;
|
||||
h0 = h1 + height;
|
||||
h0 = h1 + texture.frame.height;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
w0 = (width ) * (1-aX);
|
||||
w1 = (width ) * -aX;
|
||||
w0 = (texture.frame.width ) * (1-aX);
|
||||
w1 = (texture.frame.width ) * -aX;
|
||||
|
||||
h0 = height * (1-aY);
|
||||
h1 = height * -aY;
|
||||
h0 = texture.frame.height * (1-aY);
|
||||
h1 = texture.frame.height * -aY;
|
||||
}
|
||||
|
||||
var index = this.currentBatchSize * 4 * this.vertSize;
|
||||
|
|
@ -277,11 +278,11 @@ PIXI.WebGLSpriteBatch.prototype.renderTilingSprite = function(tilingSprite)
|
|||
|
||||
var uvs = tilingSprite._uvs;
|
||||
|
||||
tilingSprite.tilePosition.x %= texture.baseTexture.width;
|
||||
tilingSprite.tilePosition.y %= texture.baseTexture.height;
|
||||
tilingSprite.tilePosition.x %= texture.baseTexture.width * tilingSprite.tileScaleOffset.x;
|
||||
tilingSprite.tilePosition.y %= texture.baseTexture.height * tilingSprite.tileScaleOffset.y;
|
||||
|
||||
var offsetX = tilingSprite.tilePosition.x/texture.baseTexture.width;
|
||||
var offsetY = tilingSprite.tilePosition.y/texture.baseTexture.height;
|
||||
var offsetX = tilingSprite.tilePosition.x/(texture.baseTexture.width*tilingSprite.tileScaleOffset.x);
|
||||
var offsetY = tilingSprite.tilePosition.y/(texture.baseTexture.height*tilingSprite.tileScaleOffset.y);
|
||||
|
||||
var scaleX = (tilingSprite.width / texture.baseTexture.width) / (tilingSprite.tileScale.x * tilingSprite.tileScaleOffset.x);
|
||||
var scaleY = (tilingSprite.height / texture.baseTexture.height) / (tilingSprite.tileScale.y * tilingSprite.tileScaleOffset.y);
|
||||
|
|
|
|||
|
|
@ -64,6 +64,12 @@ PIXI.BaseTexture = function(source, scaleMode)
|
|||
*/
|
||||
this.source = source;
|
||||
|
||||
//TODO will be used for futer pixi 1.5...
|
||||
this.id = PIXI.BaseTextureCacheIdGenerator++;
|
||||
|
||||
// used for webGL
|
||||
this._glTextures = [];
|
||||
|
||||
if(!source)return;
|
||||
|
||||
if(this.source.complete || this.source.getContext)
|
||||
|
|
@ -93,11 +99,7 @@ PIXI.BaseTexture = function(source, scaleMode)
|
|||
this.imageUrl = null;
|
||||
this._powerOf2 = false;
|
||||
|
||||
//TODO will be used for futer pixi 1.5...
|
||||
this.id = PIXI.BaseTextureCacheIdGenerator++;
|
||||
|
||||
// used for webGL
|
||||
this._glTextures = [];
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
|
@ -147,7 +149,6 @@ PIXI.BaseTexture.prototype.updateSourceImage = function(newSrc)
|
|||
PIXI.BaseTexture.fromImage = function(imageUrl, crossorigin, scaleMode)
|
||||
{
|
||||
var baseTexture = PIXI.BaseTextureCache[imageUrl];
|
||||
crossorigin = !crossorigin;
|
||||
|
||||
if(!baseTexture)
|
||||
{
|
||||
|
|
@ -167,16 +168,6 @@ PIXI.BaseTexture.fromImage = function(imageUrl, crossorigin, scaleMode)
|
|||
return baseTexture;
|
||||
};
|
||||
|
||||
/**
|
||||
* Helper function that returns a base texture based on a canvas element
|
||||
* If the image is not in the base texture cache it will be created and loaded
|
||||
*
|
||||
* @static
|
||||
* @method fromCanvas
|
||||
* @param canvas {Canvas} The canvas element source of the texture
|
||||
* @param scaleMode {Number} Should be one of the PIXI.scaleMode consts
|
||||
* @return BaseTexture
|
||||
*/
|
||||
PIXI.BaseTexture.fromCanvas = function(canvas, scaleMode)
|
||||
{
|
||||
if(!canvas._pixiId)
|
||||
|
|
|
|||
|
|
@ -187,6 +187,8 @@ PIXI.RenderTexture.prototype.renderCanvas = function(displayObject, position, cl
|
|||
{
|
||||
var children = displayObject.children;
|
||||
|
||||
var originalWorldTransform = displayObject.worldTransform;
|
||||
|
||||
displayObject.worldTransform = PIXI.RenderTexture.tempMatrix;
|
||||
|
||||
if(position)
|
||||
|
|
@ -207,6 +209,9 @@ PIXI.RenderTexture.prototype.renderCanvas = function(displayObject, position, cl
|
|||
this.renderer.renderDisplayObject(displayObject, context);
|
||||
|
||||
context.setTransform(1,0,0,1,0,0);
|
||||
|
||||
displayObject.worldTransform = originalWorldTransform;
|
||||
};
|
||||
|
||||
PIXI.RenderTexture.tempMatrix = new PIXI.Matrix();
|
||||
PIXI.RenderTexture.tempMatrix = new PIXI.Matrix();
|
||||
|
||||
|
|
|
|||
|
|
@ -56,6 +56,8 @@ PIXI.Texture = function(baseTexture, frame)
|
|||
|
||||
this.scope = this;
|
||||
|
||||
this._uvs = null;
|
||||
|
||||
if(baseTexture.hasLoaded)
|
||||
{
|
||||
if(this.noFrame)frame = new PIXI.Rectangle(0,0, baseTexture.width, baseTexture.height);
|
||||
|
|
@ -155,7 +157,6 @@ PIXI.Texture.prototype._updateWebGLuvs = function()
|
|||
* @method fromImage
|
||||
* @param imageUrl {String} The image url of the texture
|
||||
* @param crossorigin {Boolean} Whether requests should be treated as crossorigin
|
||||
* @param scaleMode {Number} Should be one of the PIXI.scaleMode consts
|
||||
* @return Texture
|
||||
*/
|
||||
PIXI.Texture.fromImage = function(imageUrl, crossorigin, scaleMode)
|
||||
|
|
@ -194,7 +195,6 @@ PIXI.Texture.fromFrame = function(frameId)
|
|||
* @static
|
||||
* @method fromCanvas
|
||||
* @param canvas {Canvas} The canvas element source of the texture
|
||||
* @param scaleMode {Number} Should be one of the PIXI.scaleMode consts
|
||||
* @return Texture
|
||||
*/
|
||||
PIXI.Texture.fromCanvas = function(canvas, scaleMode)
|
||||
|
|
@ -230,7 +230,8 @@ PIXI.Texture.addTextureToCache = function(texture, id)
|
|||
PIXI.Texture.removeTextureFromCache = function(id)
|
||||
{
|
||||
var texture = PIXI.TextureCache[id];
|
||||
PIXI.TextureCache[id] = null;
|
||||
delete PIXI.TextureCache[id];
|
||||
delete PIXI.BaseTextureCache[id];
|
||||
return texture;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue