pixi_lights 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: f2f5d506ca45bb2d856c26b3548e292fcbc83a81c3b83903ecb5fdadf128b83a
4
+ data.tar.gz: d8606b66885d93542f91aae1e51dbbce7d883ea732b38a05f7ba877258ec9c1d
5
+ SHA512:
6
+ metadata.gz: ef3445bac563b4e743da0bcbc4070b159d7c74c4982f9fc2f69d76db0be78c3b2aeaacc4d624775010f02a7ba932ec3b77c7e047f88db9d939abcb99506fccc7
7
+ data.tar.gz: 44900d4e272e75f8249d93c057b4c93207e554836f2bcbc36c9366b9790b3ad10836840fab9d348858ec379ec5750131e93b92fb29bcd0552838ef53049ed914
Binary file
@@ -0,0 +1,11 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+
10
+ # rspec failure tracking
11
+ .rspec_status
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
@@ -0,0 +1,7 @@
1
+ ---
2
+ sudo: false
3
+ language: ruby
4
+ cache: bundler
5
+ rvm:
6
+ - 2.5.3
7
+ before_install: gem install bundler -v 1.17.2
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source "https://rubygems.org"
2
+
3
+ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
+
5
+ # Specify your gem's dependencies in pixi_lights.gemspec
6
+ gemspec
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2019 Chris Palmweaver
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,39 @@
1
+ # PixiLights
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/pixi_lights`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'pixi_lights'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install pixi_lights
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
29
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
+
31
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/pixi_lights.
36
+
37
+ ## License
38
+
39
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "pixi_lights"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start(__FILE__)
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,8 @@
1
+ require "pixi_lights/version"
2
+
3
+ module PixiLights
4
+ class Error < StandardError; end
5
+ class Engine < ::Rails::Engine;
6
+
7
+ end
8
+ end
@@ -0,0 +1,3 @@
1
+ module PixiLights
2
+ VERSION = "0.1.0"
3
+ end
@@ -0,0 +1,28 @@
1
+
2
+ lib = File.expand_path("../lib", __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require "pixi_lights/version"
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "pixi_lights"
8
+ spec.version = PixiLights::VERSION
9
+ spec.authors = ["Chris Scalf"]
10
+ spec.email = ["shrewdpixeldesign@gmail.com"]
11
+
12
+ spec.summary = %q{A gem for importing the pixi_lights.js canvas library into Rails projects.}
13
+ spec.homepage = "https://github.com/Palmweaver/pixi_lights"
14
+ spec.license = "MIT"
15
+
16
+ # Specify which files should be added to the gem when it is released.
17
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
18
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
19
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
20
+ end
21
+ spec.bindir = "exe"
22
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
23
+ spec.require_paths = ["lib"]
24
+
25
+ spec.add_development_dependency "bundler", "~> 1.17"
26
+ spec.add_development_dependency "rake", "~> 10.0"
27
+ spec.add_development_dependency "rspec", "~> 3.0"
28
+ end
Binary file
Binary file
File without changes
@@ -0,0 +1,9 @@
1
+ /*!
2
+ * pixi-lights - v2.0.2
3
+ * Compiled Tue, 16 Oct 2018 15:33:33 UTC
4
+ *
5
+ * pixi-lights is licensed under the MIT License.
6
+ * http://www.opensource.org/licenses/mit-license
7
+ */
8
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t.PIXI=t.PIXI||{},t.PIXI.lights={}))}(this,function(t){"use strict";PIXI.Circle.prototype.getMesh=function(t,e,r){void 0===t&&(t=40),e=e||new Float32Array(2*(t+1)),r=r||new Uint16Array(t+1);var i=2*Math.PI/t,o=-1;r[++o]=o;for(var n=0;n<=t;++n){var a=2*n,s=i*n;e[a]=Math.cos(s)*this.radius,e[a+1]=Math.sin(s)*this.radius,r[++o]=o}return r[o]=1,{vertices:e,indices:r}};var e={},r=new PIXI.display.Group,i=new PIXI.display.Group,o=new PIXI.display.Group;function n(t,r){e[t]=r}r.useRenderTexture=!0,i.useRenderTexture=!0;var a=function(t){function e(e,r,i,n){t.call(this),this.vertices=i||new Float32Array(8),this.indices=n||new Uint16Array([0,1,2,0,2,3]),this.blendMode=PIXI.BLEND_MODES.ADD,this.drawMode=PIXI.DRAW_MODES.TRIANGLES,this.dirty=0,this.lightHeight=.075,this.falloff=[.75,3,20],this.shaderName=null,this.useViewportQuad=!0,this._color=5066073,this._colorRgba=[.3,.3,.35,.8],(e||0===e)&&(this.color=e),(r||0===r)&&(this.brightness=r),this.parentGroup=o,this._glDatas={},this.shaderName="lights"}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={color:{configurable:!0},brightness:{configurable:!0}};return r.color.get=function(){return this._color},r.color.set=function(t){this._color=t,PIXI.utils.hex2rgb(t,this._colorRgba)},r.brightness.get=function(){return this._colorRgba[3]},r.brightness.set=function(t){this._colorRgba[3]=t},e.prototype.syncShader=function(t){t.uniforms.uUseViewportQuad=this.useViewportQuad;var e=t.uniforms.uLightColor;e&&(e[0]=this._colorRgba[0],e[1]=this._colorRgba[1],e[2]=this._colorRgba[2],e[3]=this._colorRgba[3],t.uniforms.uLightColor=e),t.uniforms.uLightHeight=this.lightHeight;var r=t.uniforms.uLightFalloff;r&&(r[0]=this.falloff[0],r[1]=this.falloff[1],r[2]=this.falloff[2],t.uniforms.uLightFalloff=r)},e.prototype._renderWebGL=function(t){t.setObjectRenderer(t.plugins.lights),t.plugins.lights.render(this)},Object.defineProperties(e.prototype,r),e}(PIXI.Container),s=function(t){function e(r,i,o,n,a){var s={translationMatrix:{type:"mat3",value:new Float32Array(9)},projectionMatrix:{type:"mat3",value:new Float32Array(9)},uSampler:{type:"sampler2D",value:null},uNormalSampler:{type:"sampler2D",value:null},uUseViewportQuad:{type:"bool",value:!0},uViewSize:{type:"2f",value:new Float32Array(2)},uLightColor:{type:"4f",value:new Float32Array([1,1,1,1])},uLightFalloff:{type:"3f",value:new Float32Array([0,0,0])},uLightHeight:{type:"1f",value:.075}};if(n)for(var l in n)s[l]=n[l];var u={aVertexPosition:0};if(a)for(var c in a)u[c]=a[c];t.call(this,r,i||e.defaultVertexSrc,o,u)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(PIXI.Shader);s.defaultVertexSrc="attribute vec2 aVertexPosition;\n\nuniform bool uUseViewportQuad;\nuniform mat3 translationMatrix;\nuniform mat3 projectionMatrix;\n\nvoid main(void) {\n if (uUseViewportQuad) {\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n }\n else\n {\n gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n }\n}\n";var l=function(t){function e(e,r){void 0===e&&(e=16777215),void 0===r&&(r=.5),t.call(this,e,r),this.shaderName="ambientLightShader"}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(a),u="uniform sampler2D uSampler;\nuniform sampler2D uNormalSampler;\n\nuniform mat3 translationMatrix;\n\nuniform vec2 uViewSize; // size of the viewport\n\nuniform vec4 uLightColor; // light color, alpha channel used for intensity.\nuniform vec3 uLightFalloff; // light attenuation coefficients (constant, linear, quadratic)\nuniform float uLightHeight; // light height above the viewport\nuniform float uFlipY; // whether we use renderTexture, FBO is flipped\n",c="vec2 texCoord = gl_FragCoord.xy / uViewSize;\ntexCoord.y = (1.0 - texCoord.y) * uFlipY + texCoord.y * (1.0 - uFlipY); // FBOs positions are flipped.\n",h="vec4 normalColor = texture2D(uNormalSampler, texCoord);\nnormalColor.g = 1.0 - normalColor.g; // Green layer is flipped Y coords.\n\n// bail out early when normal has no data\nif (normalColor.a == 0.0) discard;\n",f="precision highp float;\n\n"+u+"\n\nvoid main(void)\n{\n"+c+"\n"+h+'\n\n // simplified lambert shading that makes assumptions for ambient color\n\n // compute Distance\n float D = 1.0;\n\n // normalize vectors\n vec3 N = normalize(normalColor.xyz * 2.0 - 1.0);\n vec3 L = vec3(1.0, 1.0, 1.0);\n\n // pre-multiply light color with intensity\n // then perform "N dot L" to determine our diffuse\n vec3 diffuse = (uLightColor.rgb * uLightColor.a) * max(dot(N, L), 0.0);\n\n vec4 diffuseColor = texture2D(uSampler, texCoord);\n vec3 finalColor = diffuseColor.rgb * diffuse;\n\n gl_FragColor = vec4(finalColor, diffuseColor.a);\n}\n',d=function(t){function e(e){t.call(this,e,null,f)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(s);n("ambientLightShader",d);var p=function(t){function e(e,r,i){if(void 0===e&&(e=16777215),void 0===r&&(r=1),void 0===i&&(i=1/0),i!==1/0){var o=new PIXI.Circle(0,0,i).getMesh(),n=o.vertices,a=o.indices;t.call(this,e,r,n,a),this.useViewportQuad=!1,this.drawMode=PIXI.DRAW_MODES.TRIANGLE_FAN}else t.call(this,e,r);this.radius=i,this.shaderName="pointLightShader"}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.syncShader=function(e){t.prototype.syncShader.call(this,e),e.uniforms.uLightRadius=this.radius},e}(a),g='// normalize vectors\nvec3 N = normalize(normalColor.xyz * 2.0 - 1.0);\nvec3 L = normalize(lightVector);\n\n// pre-multiply light color with intensity\n// then perform "N dot L" to determine our diffuse\nvec3 diffuse = (uLightColor.rgb * uLightColor.a) * max(dot(N, L), 0.0);\n',v="// calculate final intesity and color, then combine\nvec3 intensity = diffuse * attenuation;\nvec4 diffuseColor = texture2D(uSampler, texCoord);\nvec3 finalColor = diffuseColor.rgb * intensity;\n\ngl_FragColor = vec4(finalColor, diffuseColor.a);\n",m="precision highp float;\n\n// imports the common uniforms like samplers, and ambient color\n"+u+"\n\nuniform float uLightRadius;\n\nvoid main()\n{\n"+c+"\n"+h+"\n\n vec2 lightPosition = translationMatrix[2].xy / uViewSize;\n\n // the directional vector of the light\n vec3 lightVector = vec3(lightPosition - texCoord, uLightHeight);\n\n // correct for aspect ratio\n lightVector.x *= uViewSize.x / uViewSize.y;\n\n // compute Distance\n float D = length(lightVector);\n\n // bail out early when pixel outside of light sphere\n if (D > uLightRadius) discard;\n\n"+g+"\n\n // calculate attenuation\n float attenuation = 1.0 / (uLightFalloff.x + (uLightFalloff.y * D) + (uLightFalloff.z * D * D));\n\n"+v+"\n}\n",y=function(t){function e(e){t.call(this,e,null,m,{uLightRadius:{type:"1f",value:1}})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(s);n("pointLightShader",y);var _=function(t){function e(e,r,i){void 0===e&&(e=16777215),void 0===r&&(r=1),t.call(this,e,r),this.target=i,this._directionVector=new PIXI.Point,this.shaderName="directionalLightShader"}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.updateTransform=function(){this.containerUpdateTransform();var t=this._directionVector,e=this.worldTransform,r=this.target.worldTransform?this.target.worldTransform.tx:this.target.x,i=this.target.worldTransform?this.target.worldTransform.ty:this.target.y;t.x=e.tx-r,t.y=e.ty-i;var o=Math.sqrt(t.x*t.x+t.y*t.y);t.x/=o,t.y/=o},e.prototype.syncShader=function(e){t.prototype.syncShader.call(this,e);var r=e.uniforms.uLightDirection;r[0]=this._directionVector.x,r[1]=this._directionVector.y,e.uniforms.uLightDirection=r},e}(a),x="precision highp float;\n\n// imports the common uniforms like samplers, and ambient/light color\n"+u+"\n\nuniform vec2 uLightDirection;\n\nvoid main()\n{\n"+c+"\n"+h+"\n\n // the directional vector of the light\n vec3 lightVector = vec3(uLightDirection, uLightHeight);\n\n // compute Distance\n float D = length(lightVector);\n\n"+g+"\n\n // calculate attenuation\n float attenuation = 1.0;\n\n"+v+"\n}\n",b=function(t){function e(e){t.call(this,e,null,x,{uLightDirection:{type:"2f",value:new Float32Array(2)}})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(s);n("directionalLightShader",b);var L=function(t){function o(e){t.call(this,e);var r=6*o.MAX_LIGHTS;this.indices=new Uint16Array(r);for(var i=0,n=0;i<r;i+=6,n+=4)this.indices[i+0]=n+0,this.indices[i+1]=n+1,this.indices[i+2]=n+2,this.indices[i+3]=n+0,this.indices[i+4]=n+2,this.indices[i+5]=n+3;this.shaders={},this.lights=[]}return t&&(o.__proto__=t),o.prototype=Object.create(t&&t.prototype),o.prototype.constructor=o,o.prototype.onContextChange=function(){for(var t in this.gl=this.renderer.gl,e)this.shaders[t]=new e[t](this.gl)},o.prototype.render=function(t){var e=this.renderer,r=e.gl;this.lights.push(t);var i=t._glDatas[e.CONTEXT_UID];i||(e.bindVao(null),(i={shader:this.shaders[t.shaderName],vertexBuffer:PIXI.glCore.GLBuffer.createVertexBuffer(r,t.vertices,r.STREAM_DRAW),indexBuffer:PIXI.glCore.GLBuffer.createIndexBuffer(r,t.indices,r.STATIC_DRAW),vao:null,dirty:t.dirty}).vao=new PIXI.glCore.VertexArrayObject(r).addIndex(i.indexBuffer).addAttribute(i.vertexBuffer,i.shader.attributes.aVertexPosition,r.FLOAT,!1,8,0),t._glDatas[e.CONTEXT_UID]=i),e.bindVao(i.vao),t.useViewportQuad&&(t.vertices[2]=t.vertices[4]=e.screen.width,t.vertices[5]=t.vertices[7]=e.screen.height),i.vertexBuffer.upload(t.vertices),i.dirty!==t.dirty&&(i.dirty=t.dirty,i.indexBuffer.upload(t.indices))},o.prototype.flush=function(){for(var t=null,e=null,o=null,n=null,a=this.renderer,s=0;s<this.lights.length;++s){var l=this.lights[s],u=this.lights[s]._activeParentLayer;if(u){if(o!==u){o=u;var c=u._activeStageParent;if(u.diffuseTexture&&u.normalTexture)t=u.diffuseTexture,e=u.normalTexture;else for(var h=0;h<c._activeLayers.length;h++){var f=c._activeLayers[h];f.group===i&&(e=f.getRenderTexture()),f.group===r&&(t=f.getRenderTexture())}a.bindTexture(t,0,!0),a.bindTexture(e,1,!0)}var d=l._glDatas[a.CONTEXT_UID],p=d.shader;if(n!==p){n=p,a.bindShader(p),p.uniforms.uSampler=0,p.uniforms.uNormalSampler=1;var g=p.uniforms.uViewSize;g[0]=a.screen.width,g[1]=a.screen.height,p.uniforms.uViewSize=g,p.uniforms.uFlipY=a._activeRenderTarget.root?1:0}a.bindVao(d.vao),l.syncShader(p),a.state.setBlendMode(l.blendMode),p.uniforms.translationMatrix=l.worldTransform.toArray(!0),d.vao.draw(l.drawMode,l.indices.length,0)}}this.lights.length=0},o.prototype.stop=function(){this.flush()},o}(PIXI.ObjectRenderer);L.MAX_LIGHTS=500,PIXI.WebGLRenderer.registerPlugin("lights",L);var w="attribute vec2 aVertexPosition;\nuniform mat3 projectionMatrix;\n\nvoid main(void) {\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n}",I="void main() {\n gl_FragColor = vec4(0, 0, 0, 1);\n}",S=function(t){function e(e){t.call(this,e,w,I,{aVertexPosition:0})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(PIXI.Shader);n("wireframeShader",S),t.Light=a,t.LightShader=s,t.AmbientLight=l,t.AmbientLightShader=d,t.PointLight=p,t.PointLightShader=y,t.DirectionalLight=_,t.DirectionalLightShader=b,t.LightRenderer=L,t.WireframeShader=S,t.plugins=e,t.diffuseGroup=r,t.normalGroup=i,t.lightGroup=o,t.registerPlugin=n,Object.defineProperty(t,"__esModule",{value:!0})});
9
+ //# sourceMappingURL=pixi-lights.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pixi-lights.js","sources":["../src/mixins/Circle.js","../src/main.js","../src/lights/light/Light.js","../src/lights/light/LightShader.js","../src/lights/ambientLight/AmbientLight.js","../src/lights/ambientLight/AmbientLightShader.js","../src/lights/pointLight/PointLight.js","../src/lights/pointLight/point.frag.js","../src/lights/pointLight/PointLightShader.js","../src/lights/directionalLight/DirectionalLight.js","../src/lights/directionalLight/directional.frag.js","../src/lights/directionalLight/DirectionalLightShader.js","../src/renderers/LightRenderer.js","../src/lights/wireframe/WireframeShader.js"],"sourcesContent":["/**\n * Contains mixins for the `PIXI.Circle` class.\n * @class Circle\n * @memberof PIXI\n * @see http://pixijs.download/release/docs/PIXI.Circle.html\n */\n/**\n * Creates vertices and indices arrays to describe this circle.\n * @method PIXI.Circle#getMesh\n * @param [totalSegments=40] {number} Total segments to build for the circle mesh.\n * @param [verticesOutput] {Float32Array} An array to output the vertices into. Length must be\n * `((totalSegments + 2) * 2)` or more. If not passed it is created for you.\n * @param [indicesOutput] {Uint16Array} An array to output the indices into, in gl.TRIANGLE_FAN format. Length must\n * be `(totalSegments + 3)` or more. If not passed it is created for you.\n * @return {PIXI.Circle~MeshData} Object with verticies and indices arrays\n */\nPIXI.Circle.prototype.getMesh = function getMesh(totalSegments = 40, vertices, indices) {\n vertices = vertices || new Float32Array((totalSegments + 1) * 2);\n indices = indices || new Uint16Array(totalSegments + 1);\n\n let seg = (Math.PI * 2) / totalSegments,\n indicesIndex = -1;\n\n indices[++indicesIndex] = indicesIndex;\n\n for (let i = 0; i <= totalSegments; ++i) {\n let index = i*2;\n let angle = seg * i;\n\n vertices[index] = Math.cos(angle) * this.radius;\n vertices[index+1] = Math.sin(angle) * this.radius;\n\n indices[++indicesIndex] = indicesIndex;\n }\n\n indices[indicesIndex] = 1;\n\n return { vertices, indices };\n};\n\n/**\n * @typedef PIXI.Circle~MeshData\n * @property {Float32Array} vertices - Vertices data\n * @property {Uint16Array} indices - Indices data\n */\n","/**\n * @namespace PIXI.lights\n */\n\n/**\n * @static\n * @memberof PIXI.lights\n * @member {Object}\n */\nconst plugins = {};\n\n/**\n * @static\n * @memberof PIXI.lights\n * @member {PIXI.display.Group}\n */\nconst diffuseGroup = new PIXI.display.Group();\n\n/**\n * @static\n * @memberof PIXI.lights\n * @member {PIXI.display.Group}\n */\nconst normalGroup = new PIXI.display.Group();\n\n/**\n * @static\n * @memberof PIXI.lights\n * @member {PIXI.display.Group}\n */\nconst lightGroup = new PIXI.display.Group();\n\ndiffuseGroup.useRenderTexture = true;\nnormalGroup.useRenderTexture = true;\n\n/**\n * @static\n * @memberof PIXI.lights\n * @param {string} name - Name of the plugin\n * @param {class} classRef - Class references\n */\nfunction registerPlugin(name, classRef) {\n plugins[name] = classRef;\n}\n\nexport {\n plugins,\n diffuseGroup,\n normalGroup,\n lightGroup,\n registerPlugin\n};\n","import {lightGroup} from '../../main';\n\n/**\n * @class\n * @extends PIXI.DisplayObject\n * @memberof PIXI.lights\n *\n * @param [color=0xFFFFFF] {number} The color of the light.\n * @param [brightness=1] {number} The brightness of the light, in range [0, 1].\n */\nexport default class Light extends PIXI.Container {\n constructor(color, brightness, vertices, indices) {\n super();\n\n /**\n * An array of vertices\n *\n * @member {Float32Array}\n */\n this.vertices = vertices || new Float32Array(8);\n\n /**\n * An array containing the indices of the vertices\n *\n * @member {Uint16Array}\n */\n this.indices = indices || new Uint16Array([0,1,2, 0,2,3]);\n\n /**\n * The blend mode to be applied to the light.\n *\n * @member {number}\n * @default PIXI.BLEND_MODES.ADD\n * @see http://pixijs.download/release/docs/PIXI.html#.BLEND_MODES\n */\n this.blendMode = PIXI.BLEND_MODES.ADD;\n\n /**\n * The draw mode to be applied to the light geometry.\n *\n * @member {number}\n * @default PIXI.DRAW_MODES.TRIANGLES\n * @see http://pixijs.download/release/docs/PIXI.html#.DRAW_MODES\n */\n this.drawMode = PIXI.DRAW_MODES.TRIANGLES;\n\n /**\n * When incremented the renderer will re-upload indices\n *\n * @member {number}\n */\n this.dirty = 0;\n\n /**\n * The height of the light from the viewport.\n *\n * @member {number}\n * @default 0.075\n */\n this.lightHeight = 0.075;\n\n /**\n * The falloff attenuation coeficients.\n *\n * @member {number[]}\n * @default [0.75, 3, 20]\n */\n this.falloff = [0.75, 3, 20];\n\n /**\n * The name of the shader plugin to use.\n *\n * @member {string}\n */\n this.shaderName = null;\n\n /**\n * By default the light uses a viewport sized quad as the mesh.\n */\n this.useViewportQuad = true;\n\n // color and brightness are exposed through setters\n this._color = 0x4d4d59;\n this._colorRgba = [0.3, 0.3, 0.35, 0.8];\n\n // run the color setter\n if (color || color === 0) {\n this.color = color;\n }\n\n // run the brightness setter\n if (brightness || brightness === 0) {\n this.brightness = brightness;\n }\n\n this.parentGroup = lightGroup;\n\n\n /**\n * WebGL data for this light\n * @member {Object}\n * @private\n */\n this._glDatas = {};\n\n this.shaderName = 'lights';\n }\n\n /**\n * The color of the lighting.\n *\n * @member {number}\n * @memberof Light#\n */\n get color() {\n return this._color;\n }\n set color(val) {\n this._color = val;\n PIXI.utils.hex2rgb(val, this._colorRgba);\n }\n\n /**\n * The brightness of this lighting. Normalized in the range [0, 1].\n *\n * @member {number}\n * @memberof Light#\n */\n get brightness() {\n return this._colorRgba[3];\n }\n set brightness(val) {\n this._colorRgba[3] = val;\n }\n\n syncShader(shader) {\n shader.uniforms.uUseViewportQuad = this.useViewportQuad;\n\n let uLightColor = shader.uniforms.uLightColor;\n if (uLightColor) {\n uLightColor[0] = this._colorRgba[0];\n uLightColor[1] = this._colorRgba[1];\n uLightColor[2] = this._colorRgba[2];\n uLightColor[3] = this._colorRgba[3];\n shader.uniforms.uLightColor = uLightColor;\n }\n\n shader.uniforms.uLightHeight = this.lightHeight;\n\n let uLightFalloff = shader.uniforms.uLightFalloff;\n if (uLightFalloff) {\n uLightFalloff[0] = this.falloff[0];\n uLightFalloff[1] = this.falloff[1];\n uLightFalloff[2] = this.falloff[2];\n shader.uniforms.uLightFalloff = uLightFalloff;\n }\n }\n\n _renderWebGL(renderer) {\n renderer.setObjectRenderer(renderer.plugins.lights);\n renderer.plugins.lights.render(this);\n }\n}\n","import vertex from './light.vert';\n\n/**\n * @class\n * @extends PIXI.Shader\n * @memberof PIXI.lights\n * @param shaderManager {ShaderManager} The WebGL shader manager this shader works for.\n */\nexport default class LightShader extends PIXI.Shader {\n constructor(gl, vertexSrc, fragmentSrc, customUniforms, customAttributes) {\n const uniforms = {\n translationMatrix: { type: 'mat3', value: new Float32Array(9) },\n projectionMatrix: { type: 'mat3', value: new Float32Array(9) },\n\n // textures from the previously rendered FBOs\n uSampler: { type: 'sampler2D', value: null },\n uNormalSampler: { type: 'sampler2D', value: null },\n\n // should we apply the translation matrix or not.\n uUseViewportQuad: { type: 'bool', value: true },\n\n // size of the renderer viewport\n uViewSize: { type: '2f', value: new Float32Array(2) },\n\n // light color, alpha channel used for intensity.\n uLightColor: { type: '4f', value: new Float32Array([1, 1, 1, 1]) },\n\n // light falloff attenuation coefficients\n uLightFalloff: { type: '3f', value: new Float32Array([0, 0, 0]) },\n\n // height of the light above the viewport\n uLightHeight: { type: '1f', value: 0.075 }\n };\n\n if (customUniforms) {\n for (const u in customUniforms) {\n uniforms[u] = customUniforms[u];\n }\n }\n\n const attributes = {\n aVertexPosition: 0\n };\n\n if (customAttributes) {\n for (const a in customAttributes) {\n attributes[a] = customAttributes[a];\n }\n }\n\n super(gl, vertexSrc || LightShader.defaultVertexSrc, fragmentSrc, attributes);\n }\n}\n\n/**\n * @static\n * @member {string}\n */\nLightShader.defaultVertexSrc = vertex;\n","import Light from '../light/Light';\n\n/**\n * Ambient light is drawn using a full-screen quad\n * @class\n * @extends PIXI.lights.Light\n * @memberof PIXI.lights\n *\n * @param [color=0xFFFFFF] {number} The color of the light.\n * @param [brightness=0.5] {number} The brightness of the light.\n */\nexport default class AmbientLight extends Light {\n constructor(color=0xFFFFFF, brightness=0.5) {\n super(color, brightness);\n this.shaderName = 'ambientLightShader';\n }\n}\n","import {registerPlugin} from '../../main';\nimport LightShader from '../light/LightShader';\nimport fragment from './ambient.frag';\n\n/**\n * @class\n * @extends PIXI.lights.LightShader\n * @memberof PIXI.lights\n * @param gl {ShaderManager} The WebGL shader manager this shader works for.\n */\nexport default class AmbientLightShader extends LightShader {\n constructor(gl) {\n super(gl, null, fragment);\n }\n}\n\nregisterPlugin('ambientLightShader', AmbientLightShader);\n","import Light from '../light/Light';\n\n/**\n * @class\n * @extends PIXI.lights.Light\n * @memberof PIXI.lights\n *\n * @param [color=0xFFFFFF] {number} The color of the light.\n * @param [brightness=1] {number} The intensity of the light.\n * @param [radius=Infinity] {number} The distance the light reaches. You will likely need\n * to change the falloff of the light as well if you change this value. Infinity will\n * use the entire viewport as the drawing surface.\n */\nexport default class PointLight extends Light {\n constructor(color=0xFFFFFF, brightness=1, radius=Infinity) {\n if (radius !== Infinity) {\n const shape = new PIXI.Circle(0, 0, radius);\n const {vertices, indices} = shape.getMesh();\n\n super(color, brightness, vertices, indices);\n\n this.useViewportQuad = false;\n this.drawMode = PIXI.DRAW_MODES.TRIANGLE_FAN;\n }\n else {\n super(color, brightness);\n }\n this.radius = radius;\n this.shaderName = 'pointLightShader';\n }\n\n syncShader(shader) {\n super.syncShader(shader);\n shader.uniforms.uLightRadius = this.radius;\n }\n}\n","import commonUniforms from '../shared/commonUniforms.glsl';\nimport computeVertexPosition from '../shared/computeVertexPosition.glsl';\nimport loadNormals from '../shared/loadNormals.glsl';\nimport computeDiffuse from '../shared/computeDiffuse.glsl';\nimport combine from '../shared/combine.glsl';\n\nexport default `precision highp float;\n\n// imports the common uniforms like samplers, and ambient color\n${commonUniforms}\n\nuniform float uLightRadius;\n\nvoid main()\n{\n${computeVertexPosition}\n${loadNormals}\n\n vec2 lightPosition = translationMatrix[2].xy / uViewSize;\n\n // the directional vector of the light\n vec3 lightVector = vec3(lightPosition - texCoord, uLightHeight);\n\n // correct for aspect ratio\n lightVector.x *= uViewSize.x / uViewSize.y;\n\n // compute Distance\n float D = length(lightVector);\n\n // bail out early when pixel outside of light sphere\n if (D > uLightRadius) discard;\n\n${computeDiffuse}\n\n // calculate attenuation\n float attenuation = 1.0 / (uLightFalloff.x + (uLightFalloff.y * D) + (uLightFalloff.z * D * D));\n\n${combine}\n}\n`;\n","import {registerPlugin} from '../../main';\nimport LightShader from '../light/LightShader';\nimport fragment from './point.frag';\n\n/**\n * @class\n * @extends PIXI.lights.LightShader\n * @memberof PIXI.lights\n * @param gl {ShaderManager} The WebGL shader manager this shader works for.\n */\nexport default class PointLightShader extends LightShader {\n constructor(gl) {\n super(gl, null, fragment, {\n // height of the light above the viewport\n uLightRadius: {\n type: '1f',\n value: 1\n }\n });\n }\n}\n\nregisterPlugin('pointLightShader', PointLightShader);\n","import Light from '../light/Light';\n\n/**\n * @class\n * @extends PIXI.lights.Light\n * @memberof PIXI.lights\n *\n * @param [color=0xFFFFFF] {number} The color of the light.\n * @param [brightness=1] {number} The intensity of the light.\n * @param [target] {PIXI.DisplayObject|PIXI.Point} The object in the scene to target.\n */\nexport default class DirectionalLight extends Light {\n constructor(color=0xFFFFFF, brightness=1, target) {\n super(color, brightness);\n\n this.target = target;\n this._directionVector = new PIXI.Point();\n this.shaderName = 'directionalLightShader';\n }\n\n updateTransform() {\n this.containerUpdateTransform();\n\n let vec = this._directionVector,\n wt = this.worldTransform,\n tx = this.target.worldTransform ? this.target.worldTransform.tx : this.target.x,\n ty = this.target.worldTransform ? this.target.worldTransform.ty : this.target.y;\n\n // calculate direction from this light to the target\n vec.x = wt.tx - tx;\n vec.y = wt.ty - ty;\n\n // normalize\n const len = Math.sqrt(vec.x * vec.x + vec.y * vec.y);\n vec.x /= len;\n vec.y /= len;\n }\n\n syncShader(shader) {\n super.syncShader(shader);\n\n const uLightDirection = shader.uniforms.uLightDirection;\n uLightDirection[0] = this._directionVector.x;\n uLightDirection[1] = this._directionVector.y;\n shader.uniforms.uLightDirection = uLightDirection;\n }\n}\n","import commonUniforms from '../shared/commonUniforms.glsl';\nimport computeVertexPosition from '../shared/computeVertexPosition.glsl';\nimport loadNormals from '../shared/loadNormals.glsl';\nimport computeDiffuse from '../shared/computeDiffuse.glsl';\nimport combine from '../shared/combine.glsl';\n\nexport default `precision highp float;\n\n// imports the common uniforms like samplers, and ambient/light color\n${commonUniforms}\n\nuniform vec2 uLightDirection;\n\nvoid main()\n{\n${computeVertexPosition}\n${loadNormals}\n\n // the directional vector of the light\n vec3 lightVector = vec3(uLightDirection, uLightHeight);\n\n // compute Distance\n float D = length(lightVector);\n\n${computeDiffuse}\n\n // calculate attenuation\n float attenuation = 1.0;\n\n${combine}\n}\n`;","import {registerPlugin} from '../../main';\nimport LightShader from '../light/LightShader';\nimport fragment from './directional.frag';\n\n/**\n * @class\n * @extends PIXI.Shader\n * @memberof PIXI.lights\n * @param shaderManager {ShaderManager} The WebGL shader manager this shader works for.\n */\nexport default class DirectionalLightShader extends LightShader {\n constructor(gl) {\n super(gl, null, fragment, {\n // the directional vector of the light\n uLightDirection: {\n type: '2f',\n value: new Float32Array(2)\n }\n });\n }\n}\n\nregisterPlugin('directionalLightShader', DirectionalLightShader);\n","import {plugins, normalGroup, diffuseGroup} from '../main';\n\n/**\n * @class\n * @private\n * @memberof PIXI.lights\n * @extends PIXI.ObjectRenderer\n * @param renderer {PIXI.WebGLRenderer} The renderer this sprite batch works for.\n */\nexport default class LightRenderer extends PIXI.ObjectRenderer {\n constructor(renderer) {\n super(renderer);\n\n // the total number of indices in our batch, there are 6 points per quad.\n const numIndices = LightRenderer.MAX_LIGHTS * 6;\n\n /**\n * Holds the indices\n *\n * @member {Uint16Array}\n */\n this.indices = new Uint16Array(numIndices);\n\n //TODO this could be a single buffer shared amongst all renderers as we reuse this set up in most renderers\n for (let i = 0, j = 0; i < numIndices; i += 6, j += 4) {\n this.indices[i + 0] = j + 0;\n this.indices[i + 1] = j + 1;\n this.indices[i + 2] = j + 2;\n this.indices[i + 3] = j + 0;\n this.indices[i + 4] = j + 2;\n this.indices[i + 5] = j + 3;\n }\n\n this.shaders = {};\n\n /**\n * The current lights in the batch.\n *\n * @member {Light[]}\n */\n this.lights = [];\n }\n\n onContextChange() {\n this.gl = this.renderer.gl;\n for (let key in plugins) {\n this.shaders[key] = new (plugins[key])(this.gl);\n }\n }\n\n /**\n * Renders the light object.\n * @private\n * @param light {Light} the light to render\n */\n render(mesh) {\n let renderer = this.renderer;\n let gl = renderer.gl;\n\n this.lights.push(mesh);\n /**\n * Prepares all the buffers to render this light.\n */\n let glData = mesh._glDatas[renderer.CONTEXT_UID];\n\n if (!glData) {\n renderer.bindVao(null);\n\n glData = {\n shader: this.shaders[mesh.shaderName],\n vertexBuffer: PIXI.glCore.GLBuffer.createVertexBuffer(gl, mesh.vertices, gl.STREAM_DRAW),\n indexBuffer: PIXI.glCore.GLBuffer.createIndexBuffer(gl, mesh.indices, gl.STATIC_DRAW),\n // build the vao object that will render..\n vao: null,\n dirty: mesh.dirty\n };\n\n // build the vao object that will render..\n glData.vao = new PIXI.glCore.VertexArrayObject(gl)\n .addIndex(glData.indexBuffer)\n .addAttribute(glData.vertexBuffer, glData.shader.attributes.aVertexPosition, gl.FLOAT, false, 2 * 4, 0);\n\n mesh._glDatas[renderer.CONTEXT_UID] = glData;\n }\n\n renderer.bindVao(glData.vao);\n\n if (mesh.useViewportQuad) {\n mesh.vertices[2] = mesh.vertices[4] = renderer.screen.width;\n mesh.vertices[5] = mesh.vertices[7] = renderer.screen.height;\n }\n glData.vertexBuffer.upload(mesh.vertices);\n\n if (glData.dirty !== mesh.dirty) {\n glData.dirty = mesh.dirty;\n glData.indexBuffer.upload(mesh.indices);\n }\n }\n\n flush() {\n let diffuseTexture = null,\n normalTexture = null,\n lastLayer = null,\n lastShader = null,\n renderer = this.renderer;\n\n for (let i = 0; i < this.lights.length; ++i) {\n let light = this.lights[i],\n layer = this.lights[i]._activeParentLayer;\n\n if (!layer) {\n continue;\n }\n\n if (lastLayer !== layer) {\n lastLayer = layer;\n let stage = layer._activeStageParent;\n\n if (layer.diffuseTexture &&\n layer.normalTexture) {\n diffuseTexture = layer.diffuseTexture;\n normalTexture = layer.normalTexture;\n }\n else {\n for (let j = 0; j < stage._activeLayers.length; j++) {\n let texLayer = stage._activeLayers[j];\n if (texLayer.group === normalGroup) {\n normalTexture = texLayer.getRenderTexture();\n }\n if (texLayer.group === diffuseGroup) {\n diffuseTexture = texLayer.getRenderTexture();\n }\n }\n }\n\n renderer.bindTexture(diffuseTexture, 0, true);\n renderer.bindTexture(normalTexture, 1, true);\n }\n\n let glData = light._glDatas[renderer.CONTEXT_UID],\n shader = glData.shader;\n\n if (lastShader !== shader) {\n lastShader = shader;\n renderer.bindShader(shader);\n\n shader.uniforms.uSampler = 0;\n shader.uniforms.uNormalSampler = 1;\n\n let uViewSize = shader.uniforms.uViewSize;\n uViewSize[0] = renderer.screen.width;\n uViewSize[1] = renderer.screen.height;\n shader.uniforms.uViewSize = uViewSize;\n shader.uniforms.uFlipY = renderer._activeRenderTarget.root ? 1.0 : 0.0;\n }\n\n renderer.bindVao(glData.vao);\n\n light.syncShader(shader);\n renderer.state.setBlendMode(light.blendMode);\n shader.uniforms.translationMatrix = light.worldTransform.toArray(true);\n\n glData.vao.draw(light.drawMode, light.indices.length, 0);\n }\n\n this.lights.length = 0;\n }\n\n stop() {\n this.flush();\n }\n}\n\n/**\n * Maximum number of lights\n * @static\n * @member {number}\n */\nLightRenderer.MAX_LIGHTS = 500;\n\nPIXI.WebGLRenderer.registerPlugin('lights', LightRenderer);\n","import {registerPlugin} from '../../main';\nimport vertex from './wireframe.vert';\nimport fragment from './wireframe.frag';\n\n/**\n * @class\n * @extends PIXI.Shader\n * @memberof PIXI.lights\n * @param shaderManager {ShaderManager} The WebGL shader manager this shader works for.\n */\nexport default class WireframeShader extends PIXI.Shader {\n constructor(gl) {\n super(gl, vertex, fragment, {\n aVertexPosition: 0\n });\n }\n}\n\nregisterPlugin('wireframeShader', WireframeShader);\n"],"names":["PIXI","Circle","prototype","getMesh","totalSegments","vertices","indices","Float32Array","Uint16Array","let","seg","Math","PI","indicesIndex","i","index","angle","cos","radius","sin","plugins","diffuseGroup","display","Group","normalGroup","lightGroup","registerPlugin","name","classRef","useRenderTexture","Light","color","brightness","super","this","blendMode","BLEND_MODES","ADD","drawMode","DRAW_MODES","TRIANGLES","dirty","lightHeight","falloff","shaderName","useViewportQuad","_color","_colorRgba","parentGroup","_glDatas","prototypeAccessors","val","utils","hex2rgb","syncShader","shader","uniforms","uUseViewportQuad","uLightColor","uLightHeight","uLightFalloff","_renderWebGL","renderer","setObjectRenderer","lights","render","Container","LightShader","gl","vertexSrc","fragmentSrc","customUniforms","customAttributes","const","translationMatrix","type","value","projectionMatrix","uSampler","uNormalSampler","uViewSize","u","attributes","aVertexPosition","a","defaultVertexSrc","Shader","AmbientLight","AmbientLightShader","fragment","PointLight","Infinity","TRIANGLE_FAN","uLightRadius","computeDiffuse","combine","PointLightShader","DirectionalLight","target","_directionVector","Point","updateTransform","containerUpdateTransform","vec","wt","worldTransform","tx","x","ty","y","len","sqrt","uLightDirection","commonUniforms","computeVertexPosition","loadNormals","DirectionalLightShader","LightRenderer","numIndices","MAX_LIGHTS","j","shaders","onContextChange","key","mesh","push","glData","CONTEXT_UID","bindVao","vertexBuffer","glCore","GLBuffer","createVertexBuffer","STREAM_DRAW","indexBuffer","createIndexBuffer","STATIC_DRAW","vao","VertexArrayObject","addIndex","addAttribute","FLOAT","screen","width","height","upload","flush","diffuseTexture","normalTexture","lastLayer","lastShader","length","light","layer","_activeParentLayer","stage","_activeStageParent","_activeLayers","texLayer","group","getRenderTexture","bindTexture","bindShader","uFlipY","_activeRenderTarget","root","state","setBlendMode","toArray","draw","stop","ObjectRenderer","WebGLRenderer","WireframeShader","vertex"],"mappings":";;;;;;;kNAgBAA,KAAKC,OAAOC,UAAUC,QAAU,SAAiBC,EAAoBC,EAAUC,kBAAd,IAC7DD,EAAWA,GAAY,IAAIE,aAAmC,GAArBH,EAAgB,IACzDE,EAAUA,GAAW,IAAIE,YAAYJ,EAAgB,GAErDK,IAAIC,EAAiB,EAAVC,KAAKC,GAAUR,EACtBS,GAAgB,EAEpBP,IAAUO,GAAgBA,EAE1B,IAAKJ,IAAIK,EAAI,EAAGA,GAAKV,IAAiBU,EAAG,CACrCL,IAAIM,EAAU,EAAFD,EACRE,EAAQN,EAAMI,EAElBT,EAASU,GAASJ,KAAKM,IAAID,QAAcE,OACzCb,EAASU,EAAM,GAAKJ,KAAKQ,IAAIH,QAAcE,OAE3CZ,IAAUO,GAAgBA,EAK9B,OAFAP,EAAQO,GAAgB,YAEfR,UAAUC,QC5BjBc,KAOAC,EAAe,IAAIrB,KAAKsB,QAAQC,MAOhCC,EAAc,IAAIxB,KAAKsB,QAAQC,MAO/BE,EAAa,IAAIzB,KAAKsB,QAAQC,MAWpC,SAASG,EAAeC,EAAMC,GAC1BR,EAAQO,GAAQC,EAVpBP,EAAaQ,kBAAmB,EAChCL,EAAYK,kBAAmB,ECvB/B,IAAqBC,cACjB,WAAYC,EAAOC,EAAY3B,EAAUC,GACrC2B,aAOAC,KAAK7B,SAAWA,GAAY,IAAIE,aAAa,GAO7C2B,KAAK5B,QAAUA,G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jCxE,EAASuE,EAAOvE,OAEpB,GAAI+F,IAAe/F,EAAQ,CACvB+F,EAAa/F,EACbO,EAASoG,WAAW3G,GAEpBA,EAAOC,SAASsB,SAAW,EAC3BvB,EAAOC,SAASuB,eAAiB,EAEjCtE,IAAIuE,EAAYzB,EAAOC,SAASwB,UAChCA,EAAU,GAAKlB,EAASgF,OAAOC,MAC/B/D,EAAU,GAAKlB,EAASgF,OAAOE,OAC/BzF,EAAOC,SAASwB,UAAYA,EAC5BzB,EAAOC,SAAS2G,OAASrG,EAASsG,oBAAoBC,KAAO,EAAM,EAGvEvG,EAASkE,QAAQF,EAAOW,KAExBe,EAAMlG,WAAWC,GACjBO,EAASwG,MAAMC,aAAaf,EAAMrH,WAClCoB,EAAOC,SAASkB,kBAAoB8E,EAAM/C,eAAe+D,SAAQ,GAEjE1C,EAAOW,IAAIgC,KAAKjB,EAAMlH,SAAUkH,EAAMlJ,QAAQiJ,OAAQ,IAG1DrH,KAAK8B,OAAOuF,OAAS,eAGzBmB,gBACIxI,KAAKgH,YAhK8BlJ,KAAK2K,gBAyKhDtD,EAAcE,WAAa,IAE3BvH,KAAK4K,cAAclJ,eAAe,SAAU2F,qPC1KvBwD,cACjB,WAAYzG,GACRnC,YAAMmC,EAAI0G,EAAQrF,GACdN,gBAAiB,qGAHgBnF,KAAKsF,QAQlD5D,EAAe,kBAAmBmJ"}
File without changes
metadata ADDED
@@ -0,0 +1,105 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: pixi_lights
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Chris Scalf
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2019-02-01 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.17'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.17'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.0'
55
+ description:
56
+ email:
57
+ - shrewdpixeldesign@gmail.com
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - ".DS_Store"
63
+ - ".gitignore"
64
+ - ".rspec"
65
+ - ".travis.yml"
66
+ - Gemfile
67
+ - LICENSE.txt
68
+ - README.md
69
+ - Rakefile
70
+ - bin/console
71
+ - bin/setup
72
+ - lib/pixi_lights.rb
73
+ - lib/pixi_lights/version.rb
74
+ - pixi_lights.gemspec
75
+ - vendor/.DS_Store
76
+ - vendor/assets/.DS_Store
77
+ - vendor/assets/javascripts/.DS_Store
78
+ - vendor/assets/javascripts/.keep
79
+ - vendor/assets/javascripts/pixi-lights.js
80
+ - vendor/assets/javascripts/pixi-lights.js.map
81
+ - vendor/assets/stylesheets/.keep
82
+ homepage: https://github.com/Palmweaver/pixi_lights
83
+ licenses:
84
+ - MIT
85
+ metadata: {}
86
+ post_install_message:
87
+ rdoc_options: []
88
+ require_paths:
89
+ - lib
90
+ required_ruby_version: !ruby/object:Gem::Requirement
91
+ requirements:
92
+ - - ">="
93
+ - !ruby/object:Gem::Version
94
+ version: '0'
95
+ required_rubygems_version: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - ">="
98
+ - !ruby/object:Gem::Version
99
+ version: '0'
100
+ requirements: []
101
+ rubygems_version: 3.0.1
102
+ signing_key:
103
+ specification_version: 4
104
+ summary: A gem for importing the pixi_lights.js canvas library into Rails projects.
105
+ test_files: []