<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8500089255271808841</id><updated>2016-06-03T22:34:39.231+02:00</updated><category term="random"/><category term="Unity"/><category term="WebGL"/><category term="general"/><category term="Unity3D"/><category term="game asset organization"/><category term="google"/><category term="happy"/><title type='text'>ciciolog</title><subtitle type='html'>Yet another geek&#39;s blog. Gamedev, FOSS, ranting and beer tasting.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ciciolog.jagiello.it/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8500089255271808841/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://ciciolog.jagiello.it/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Maciej Kacper Jagiełło</name><uri>https://plus.google.com/104341140492573575799</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-6T0mFLFndcY/AAAAAAAAAAI/AAAAAAAABeg/7wmSCfp4Biw/s512-c/photo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>5</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8500089255271808841.post-8799158925530648491</id><published>2013-11-23T10:35:00.000+01:00</published><updated>2013-11-23T14:08:35.779+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="game asset organization"/><category scheme="http://www.blogger.com/atom/ns#" term="Unity"/><category scheme="http://www.blogger.com/atom/ns#" term="Unity3D"/><title type='text'>Unity3D: keeping asset sources in the tree</title><content type='html'>It&#39;s advisable to keep source files for the assets (ex.: .ps, .max, .blend) near the final ones you actually want Unity to import because it&#39;s a lot easier to keep things organized this way and work with Version Control Systems. Folks will tell you to keep a mirror structure outside of assets folder, which is the exact opposite.&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-DftZ2VgjLtE/UpB0sZM4rHI/AAAAAAAABsE/cU72rSdxjTA/s1600/33538-do-not-want-XqgM.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;253&quot; src=&quot;http://1.bp.blogspot.com/-DftZ2VgjLtE/UpB0sZM4rHI/AAAAAAAABsE/cU72rSdxjTA/s320/33538-do-not-want-XqgM.jpeg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;So here&#39;s the trick: Unity doesn&#39;t import files and folders that are hidden or have the name starting with a dot. Naming files with a starting dot is better in my opinion. Git for example doesn&#39;t store the hidden attribute, and other VCSes probably don&#39;t as well.&lt;br /&gt;&lt;br /&gt;You can do something like this:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #999999; font-family: Courier New, Courier, monospace;&quot;&gt;.monkey.max &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;- source file, not imported&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;monkey.fbx &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;- imported normally&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #999999; font-family: Courier New, Courier, monospace;&quot;&gt;.monkey_diffuse.psd &amp;lt;- source file, not imported&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;monkey_diffuse.png &amp;nbsp;&amp;lt;- imported normally&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;or&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;monkey.fbx &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;- imported normally&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;monkey_diffuse.png &amp;lt;- imported normally&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #999999; font-family: Courier New, Courier, monospace;&quot;&gt;.source &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;- entire folder not imported&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #999999; font-family: Courier New, Courier, monospace;&quot;&gt;.source/monkey.max&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #999999; font-family: Courier New, Courier, monospace;&quot;&gt;.source/monkey_diffuse.psd&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The second structure can be better with many files. Windows explorer won&#39;t let you name a directory this way though (THANK YOU MICROSOFT!).&lt;br /&gt;Create or rename it and write &quot;.source.&quot; (with final dot added), it will name it &quot;.source&quot; stripping the final dot. Tested on Windows 7, don&#39;t ask me why it&#39;s like this.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;Hopefully it will save you some headaches.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ciciolog.jagiello.it/feeds/8799158925530648491/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ciciolog.jagiello.it/2013/11/unity3d-keeping-asset-sources-in-tree.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8500089255271808841/posts/default/8799158925530648491'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8500089255271808841/posts/default/8799158925530648491'/><link rel='alternate' type='text/html' href='http://ciciolog.jagiello.it/2013/11/unity3d-keeping-asset-sources-in-tree.html' title='Unity3D: keeping asset sources in the tree'/><author><name>Maciej Kacper Jagiełło</name><uri>https://plus.google.com/104341140492573575799</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-6T0mFLFndcY/AAAAAAAAAAI/AAAAAAAABeg/7wmSCfp4Biw/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-DftZ2VgjLtE/UpB0sZM4rHI/AAAAAAAABsE/cU72rSdxjTA/s72-c/33538-do-not-want-XqgM.jpeg" height="72" width="72"/><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1"/><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD"/></entry><entry><id>tag:blogger.com,1999:blog-8500089255271808841.post-2863793187493273640</id><published>2013-11-07T21:11:00.001+01:00</published><updated>2013-11-08T20:34:19.994+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Unity"/><title type='text'>Quick post: Unity editor wrapper.</title><content type='html'>I&#39;ve seen people reverse engineer the transform editor or doing their own thing.&lt;br /&gt;In Unity 4 you can render the original editor inside yours as long as you have the original editors type.&lt;br /&gt;Here&#39;s an example for a transform editor wrapper, but you can wrap anything you want, like a MeshRenderer or a TextureImporter (haven&#39;t tried yet).&lt;br /&gt;You may want to wrap other Editor methods besides OnInspectorGUI as well.&lt;br /&gt;&lt;br /&gt;&lt;script src=&quot;https://gist.github.com/cician/7360936.js&quot;&gt;&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://ciciolog.jagiello.it/feeds/2863793187493273640/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ciciolog.jagiello.it/2013/11/quick-post-unity-editor-wrapper.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8500089255271808841/posts/default/2863793187493273640'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8500089255271808841/posts/default/2863793187493273640'/><link rel='alternate' type='text/html' href='http://ciciolog.jagiello.it/2013/11/quick-post-unity-editor-wrapper.html' title='Quick post: Unity editor wrapper.'/><author><name>Maciej Kacper Jagiełło</name><uri>https://plus.google.com/104341140492573575799</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-6T0mFLFndcY/AAAAAAAAAAI/AAAAAAAABeg/7wmSCfp4Biw/s512-c/photo.jpg'/></author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1"/><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD"/></entry><entry><id>tag:blogger.com,1999:blog-8500089255271808841.post-2401541269058137376</id><published>2012-02-16T23:04:00.001+01:00</published><updated>2012-02-16T23:10:42.657+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="random"/><category scheme="http://www.blogger.com/atom/ns#" term="WebGL"/><title type='text'>I&#39;m here on this little planet</title><content type='html'>Just playing around with &lt;a href=&quot;https://github.com/notlion/streetview-stereographic&quot;&gt;this thing&lt;/a&gt; I found. You can see my home. &lt;iframe src=&quot;http://notlion.github.com/streetview-stereographic/#o=0,0,0,1&amp;z=1.566&amp;mz=18&amp;p=44.89166,10.89942&amp;fw=1&amp;fs=5d00000100be0200000000000000381c88cdaf8125d4569ed1e6e6c09c2fe72b7d489ad9d27ce026c849f505dd720b984eab3d592296e140dc2a021bc5b085e627fbc1faba6074f6a6d9d6c2b534af6dda674f23d133df9d14f676de04079066268a41fcc7590e877adc0fceba04a292b29b1409ffe2ba663d571534ed343404e825ee37988983908f89aaab4233db299d080eafc74956751462c65a784934e371eff4fc890f52c700c4c4da6e2dcea264be601408f4254bf7cdaccd35f64c3ee8c00e0770e92c42d6a5df189227c6bed40ea39d5253a096ca79616511e578a52279460d71b8530578ea1cdceacceb1e0e191fcc21c4c50c1ca4767814023d13cf29a355260dd87f10625c05586615b38e8f19057b3f7587932691cb72df56e31f09be0fb23006c9177bf0be4dac5c9fc01d5fb2f6b937c5669a5f02fa5e26d178faad0616c0cf1a93e78f07cc4401197e90e8b643916d7e202117e74fc08fa220fbe90ad57579c2d9f7edceaf0d3f87f22308b78a2386a8ae73fad1c42166fad3677dc974fb646130f36fa3121ada358a87a3ce578a515380ffbc530b80&quot; width=&quot;600&quot; height=&quot;600&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;</content><link rel='replies' type='application/atom+xml' href='http://ciciolog.jagiello.it/feeds/2401541269058137376/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ciciolog.jagiello.it/2012/02/im-here-on-this-little-planet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8500089255271808841/posts/default/2401541269058137376'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8500089255271808841/posts/default/2401541269058137376'/><link rel='alternate' type='text/html' href='http://ciciolog.jagiello.it/2012/02/im-here-on-this-little-planet.html' title='I&#39;m here on this little planet'/><author><name>Maciej Kacper Jagiełło</name><uri>https://plus.google.com/104341140492573575799</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-6T0mFLFndcY/AAAAAAAAAAI/AAAAAAAABeg/7wmSCfp4Biw/s512-c/photo.jpg'/></author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1"/><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD"/></entry><entry><id>tag:blogger.com,1999:blog-8500089255271808841.post-4835477052519611047</id><published>2012-01-01T00:00:00.000+01:00</published><updated>2012-01-06T14:41:59.536+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="general"/><category scheme="http://www.blogger.com/atom/ns#" term="happy"/><category scheme="http://www.blogger.com/atom/ns#" term="random"/><category scheme="http://www.blogger.com/atom/ns#" term="WebGL"/><title type='text'>Happy 2012</title><content type='html'>&lt;style&gt;#library {   display: none; }  canvas {   -webkit-transform: translateZ(0); } &lt;/style&gt; &lt;br /&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: Verdana, sans-serif; font-size: x-large;&quot;&gt;It&#39;s 2012, happy new year!&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;aside id=&quot;library&quot;&gt;&lt;img id=&quot;nightsky&quot; src=&quot;http://2.bp.blogspot.com/-Kb5TRaGgNeg/Tv-HOhG6JrI/AAAAAAAAAbA/BtkQRA0hM40/s320/nightsky.png&quot; width=&quot;320&quot; /&gt;&lt;img id=&quot;big-glow&quot; src=&quot;http://1.bp.blogspot.com/-z16stzfHcfI/Tv-HGLtL7II/AAAAAAAAAao/wdK7cevxrTE/s320/big-glow.png&quot; width=&quot;12&quot; /&gt;&lt;img id=&quot;small-glow&quot; src=&quot;http://3.bp.blogspot.com/-087i-LvMu8M/Tv-HKvybUQI/AAAAAAAAAa0/rOcZt2bSubc/s320/small-glow.png&quot; width=&quot;6&quot; /&gt;&lt;/aside&gt; &lt;canvas height=&quot;600&quot; id=&quot;canvas&quot; style=&quot;background: white; border: none;&quot; width=&quot;600&quot;&gt;&lt;/canvas&gt; &lt;script&gt;/**  * Copyright (C) 2011 by Paul Lewis for CreativeJS. We love you all :)  *  * Permission is hereby granted, free of charge, to any person obtaining a copy  * of this software and associated documentation files (the &quot;Software&quot;), to deal  * in the Software without restriction, including without limitation the rights  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell  * copies of the Software, and to permit persons to whom the Software is  * furnished to do so, subject to the following conditions:  *  * The above copyright notice and this permission notice shall be included in  * all copies or substantial portions of the Software.  *  * THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN  * THE SOFTWARE.  */  var Fireworks = (function() {    // declare the variables we need   var particles = [],       mainCanvas = null,       mainContext = null,       fireworkCanvas = null,       fireworkContext = null,       viewportWidth = 600,       viewportHeight = 600;    /**    * Create DOM elements and get your game on    */   function initialize() {      // start by measuring the viewport //    onWindowResize();      // create a canvas for the fireworks //    mainCanvas = document.createElement(&#39;canvas&#39;); mainCanvas = document.getElementById( &quot;canvas&quot; );     mainContext = mainCanvas.getContext(&#39;2d&#39;);      // and another one for, like, an off screen buffer     // because that&#39;s rad n all     fireworkCanvas = document.createElement(&#39;canvas&#39;);     fireworkContext = fireworkCanvas.getContext(&#39;2d&#39;);      // set up the colours for the fireworks     createFireworkPalette(12);      // set the dimensions on the canvas //    setMainCanvasDimensions();      // add the canvas in //    document.body.appendChild(mainCanvas);     document.addEventListener(&#39;mouseup&#39;, createFirework, true);     document.addEventListener(&#39;touchend&#39;, createFirework, true);      // and now we set off     update();   }    /**    * Pass through function to create a    * new firework on touch / click    */   function createFirework() {     createParticle();   }    /**    * Creates a block of colours for the    * fireworks to use as their colouring    */   function createFireworkPalette(gridSize) {      var size = gridSize * 10; //    fireworkCanvas.width = size; //    fireworkCanvas.height = size;     fireworkContext.globalCompositeOperation = &#39;source-over&#39;;      // create 100 blocks which cycle through     // the rainbow... HSL is teh r0xx0rz     for(var c = 0; c &lt; 100; c++) {        var marker = (c * gridSize);       var gridX = marker % size;       var gridY = Math.floor(marker / size) * gridSize;        fireworkContext.fillStyle = &quot;hsl(&quot; + Math.round(c * 3.6) + &quot;,100%,60%)&quot;;       fireworkContext.fillRect(gridX, gridY, gridSize, gridSize);       fireworkContext.drawImage(         Library.bigGlow,         gridX,         gridY);     }   }    /**    * Update the canvas based on the    * detected viewport size    */   function setMainCanvasDimensions() { //    mainCanvas.width = viewportWidth; //    mainCanvas.height = viewportHeight;   }    /**    * The main loop where everything happens    */   function update() {     clearContext();     requestAnimFrame(update);     drawFireworks();   }    /**    * Clears out the canvas with semi transparent    * black. The bonus of this is the trails effect we get    */   function clearContext() {     mainContext.fillStyle = &quot;rgba(0,0,0,0.2)&quot;;     mainContext.fillRect(0, 0, viewportWidth, viewportHeight);   }    /**    * Passes over all particles particles    * and draws them    */   function drawFireworks() {     var a = particles.length;      while(a--) {       var firework = particles[a];        // if the update comes back as true       // then our firework should explode       if(firework.update()) {          // kill off the firework, replace it         // with the particles for the exploded version         particles.splice(a, 1);          // if the firework isn&#39;t using physics         // then we know we can safely(!) explode it... yeah.         if(!firework.usePhysics) {            if(Math.random() &lt; 0.8) {             FireworkExplosions.star(firework);           } else {             FireworkExplosions.circle(firework);           }         }       }        // pass the canvas context and the firework       // colours to the       firework.render(mainContext, fireworkCanvas);     }   }    /**    * Creates a new particle / firework    */   function createParticle(pos, target, vel, color, usePhysics) {      pos = pos || {};     target = target || {};     vel = vel || {};      particles.push(       new Particle(         // position         {           x: pos.x || viewportWidth * 0.5,           y: pos.y || viewportHeight + 10         },          // target         {           y: target.y || 150 + Math.random() * 100         },          // velocity         {           x: vel.x || Math.random() * 3 - 1.5,           y: vel.y || 0         },          color || Math.floor(Math.random() * 100) * 12,          usePhysics)     );   }    /**    * Callback for window resizing -    * sets the viewport dimensions    */   function onWindowResize() { //    viewportWidth = window.innerWidth; //    viewportHeight = window.innerHeight;   }    // declare an API   return {     initialize: initialize,     createParticle: createParticle   };  })();  /**  * Represents a single point, so the firework being fired up  * into the air, or a point in the exploded firework  */ var Particle = function(pos, target, vel, marker, usePhysics) {    // properties for animation   // and colouring   this.GRAVITY  = 0.06;   this.alpha    = 1;   this.easing   = Math.random() * 0.02;   this.fade     = Math.random() * 0.1;   this.gridX    = marker % 120;   this.gridY    = Math.floor(marker / 120) * 12;   this.color    = marker;    this.pos = {     x: pos.x || 0,     y: pos.y || 0   };    this.vel = {     x: vel.x || 0,     y: vel.y || 0   };    this.lastPos = {     x: this.pos.x,     y: this.pos.y   };    this.target = {     y: target.y || 0   };    this.usePhysics = usePhysics || false;  };  /**  * Functions that we&#39;d rather like to be  * available to all our particles, such  * as updating and rendering  */ Particle.prototype = {    update: function() {      this.lastPos.x = this.pos.x;     this.lastPos.y = this.pos.y;      if(this.usePhysics) {       this.vel.y += this.GRAVITY;       this.pos.y += this.vel.y;        // since this value will drop below       // zero we&#39;ll occasionally see flicker,       // ... just like in real life! Woo! xD       this.alpha -= this.fade;     } else {        var distance = (this.target.y - this.pos.y);        // ease the position       this.pos.y += distance * (0.03 + this.easing);        // cap to 1       this.alpha = Math.min(distance * distance * 0.00005, 1);     }      this.pos.x += this.vel.x;      return (this.alpha &lt; 0.005);   },    render: function(context, fireworkCanvas) {      var x = Math.round(this.pos.x),         y = Math.round(this.pos.y),         xVel = (x - this.lastPos.x) * -5,         yVel = (y - this.lastPos.y) * -5;      context.save();     context.globalCompositeOperation = &#39;lighter&#39;;     context.globalAlpha = Math.random() * this.alpha;      // draw the line from where we were to where     // we are now     context.fillStyle = &quot;rgba(255,255,255,0.3)&quot;;     context.beginPath();     context.moveTo(this.pos.x, this.pos.y);     context.lineTo(this.pos.x + 1.5, this.pos.y);     context.lineTo(this.pos.x + xVel, this.pos.y + yVel);     context.lineTo(this.pos.x - 1.5, this.pos.y);     context.closePath();     context.fill();      // draw in the images     context.drawImage(fireworkCanvas,       this.gridX, this.gridY, 12, 12,       x - 6, y - 6, 12, 12);     context.drawImage(Library.smallGlow, x - 3, y - 3);      context.restore();   }  };  /**  * Stores references to the images that  * we want to reference later on  */ var Library = {   bigGlow: document.getElementById(&#39;big-glow&#39;),   smallGlow: document.getElementById(&#39;small-glow&#39;) };  /**  * Stores a collection of functions that  * we can use for the firework explosions. Always  * takes a firework (Particle) as its parameter  */ var FireworkExplosions = {    /**    * Explodes in a roughly circular fashion    */   circle: function(firework) {      var count = 100;     var angle = (Math.PI * 2) / count;     while(count--) {        var randomVelocity = 4 + Math.random() * 4;       var particleAngle = count * angle;        Fireworks.createParticle(         firework.pos,         null,         {           x: Math.cos(particleAngle) * randomVelocity,           y: Math.sin(particleAngle) * randomVelocity         },         firework.color,         true);     }   },    /**    * Explodes in a star shape    */   star: function(firework) {      // set up how many points the firework     // should have as well as the velocity     // of the exploded particles etc     var points          = 6 + Math.round(Math.random() * 15);     var jump            = 3 + Math.round(Math.random() * 7);     var subdivisions    = 10;     var radius          = 80;     var randomVelocity  = -(Math.random() * 3 - 6);      var start           = 0;     var end             = 0;     var circle          = Math.PI * 2;     var adjustment      = Math.random() * circle;      do {        // work out the start, end       // and change values       start = end;       end = (end + jump) % points;        var sAngle = (start / points) * circle - adjustment;       var eAngle = ((start + jump) / points) * circle - adjustment;        var startPos = {         x: firework.pos.x + Math.cos(sAngle) * radius,         y: firework.pos.y + Math.sin(sAngle) * radius       };        var endPos = {         x: firework.pos.x + Math.cos(eAngle) * radius,         y: firework.pos.y + Math.sin(eAngle) * radius       };        var diffPos = {         x: endPos.x - startPos.x,         y: endPos.y - startPos.y,         a: eAngle - sAngle       };        // now linearly interpolate across       // the subdivisions to get to a final       // set of particles       for(var s = 0; s &lt; subdivisions; s++) {          var sub = s / subdivisions;         var subAngle = sAngle + (sub * diffPos.a);          Fireworks.createParticle(           {             x: startPos.x + (sub * diffPos.x),             y: startPos.y + (sub * diffPos.y)           },           null,           {             x: Math.cos(subAngle) * randomVelocity,             y: Math.sin(subAngle) * randomVelocity           },           firework.color,           true);       }      // loop until we&#39;re back at the start     } while(end !== 0);    }  };  window.requestAnimFrame = (function(){   return  window.requestAnimationFrame       ||           window.webkitRequestAnimationFrame ||           window.mozRequestAnimationFrame    ||           window.oRequestAnimationFrame      ||           window.msRequestAnimationFrame     ||           function( callback ){             window.setTimeout(callback, 1000 / 60);           }; })();    function doSomething ( ) {   Fireworks.createParticle(); }  // Go window.onload = function() {   Fireworks.initialize(); };  window.setInterval ( &quot;doSomething()&quot;, 1000 ); &lt;/script&gt;  &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;I&#39;ve put this thing together in last minutes. Credit goes to Paul Lewis, see&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;https://github.com/paullewis/Fireworks&quot;&gt;https://github.com/paullewis/Fireworks&lt;/a&gt;.</content><link rel='replies' type='application/atom+xml' href='http://ciciolog.jagiello.it/feeds/4835477052519611047/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ciciolog.jagiello.it/2012/01/happy-2012.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8500089255271808841/posts/default/4835477052519611047'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8500089255271808841/posts/default/4835477052519611047'/><link rel='alternate' type='text/html' href='http://ciciolog.jagiello.it/2012/01/happy-2012.html' title='Happy 2012'/><author><name>Maciej Kacper Jagiełło</name><uri>https://plus.google.com/104341140492573575799</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-6T0mFLFndcY/AAAAAAAAAAI/AAAAAAAABeg/7wmSCfp4Biw/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-Kb5TRaGgNeg/Tv-HOhG6JrI/AAAAAAAAAbA/BtkQRA0hM40/s72-c/nightsky.png" height="72" width="72"/><thr:total>0</thr:total><georss:featurename>Viale Medaglie d&#39;Oro, 1-7, 41016 Novi di Modena Modena, Italy</georss:featurename><georss:point>44.8916647 10.8994759</georss:point><georss:box>44.8902587 10.8970084 44.8930707 10.9019434</georss:box><gd:extendedProperty name="commentSource" value="1"/><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD"/></entry><entry><id>tag:blogger.com,1999:blog-8500089255271808841.post-6313191918348880076</id><published>2011-12-24T20:10:00.000+01:00</published><updated>2011-12-25T17:13:31.640+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="general"/><category scheme="http://www.blogger.com/atom/ns#" term="google"/><category scheme="http://www.blogger.com/atom/ns#" term="random"/><title type='text'>cat /dev/mind &gt; blogger</title><content type='html'>&lt;b&gt;&lt;span style=&quot;background-color: transparent; font-family: Arial; font-size: 15px; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;I&#39;ve recently finished setting up my domain, &lt;/span&gt;&lt;/b&gt;Google Apps&lt;b&gt;&lt;span style=&quot;background-color: transparent; font-family: Arial; font-size: 15px; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;, Blogger and all that stuff. &lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;background-color: transparent; font-family: Arial; font-size: 15px; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;It&#39;s my very first blog post ever and I&#39;m not quite sure what this blog will be about&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;background-color: transparent; font-family: Arial; font-size: 15px; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;yet&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;background-color: transparent; font-family: Arial; font-size: 15px; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;. &lt;/span&gt;&lt;/b&gt;&lt;b id=&quot;internal-source-marker_0.9215842972043902&quot;&gt;&lt;span style=&quot;background-color: transparent; font-family: Arial; font-size: 15px; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Hopefully it&#39;ll be more or less about &lt;a href=&quot;http://en.wikipedia.org/wiki/Free_and_open_source_software&quot;&gt;FLOSS&lt;/a&gt;, game development, Modern Japanese Visual Culture and world domination by penguins, but I&#39;ll see what springs out of my mind.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;I tried free wordpress.com blog first but it was too slow so I decided on Blogger.&amp;nbsp;A part some loopholes&amp;nbsp;I&#39;m generally satisfied in various Google products and googleized a lot of my stuff lately.&lt;br /&gt;I&#39;m not too afraid of lock in to Google, owning a domain I can easily switch from gmail to another service without losing the current address and my docs are mostly plain text so I can just download them and switch back to &lt;a href=&quot;http://kate-editor.org/&quot;&gt;kate&lt;/a&gt;/notepad.&lt;br /&gt;&lt;br /&gt;Where Google still lack is connecting the pieces together: it&#39;s gotten a lot better lately, but I can&#39;t integrate&amp;nbsp;blogger and sites&amp;nbsp;seamlessly. Also there&#39;s&amp;nbsp;still&amp;nbsp;a wall between Google Apps and standard accounts.&amp;nbsp;End of rant.&lt;br /&gt;&lt;br /&gt;Merry Christmas. Happy hacking and slacking.&lt;br /&gt;^D</content><link rel='replies' type='application/atom+xml' href='http://ciciolog.jagiello.it/feeds/6313191918348880076/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ciciolog.jagiello.it/2011/12/cat-devmind-blogger.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8500089255271808841/posts/default/6313191918348880076'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8500089255271808841/posts/default/6313191918348880076'/><link rel='alternate' type='text/html' href='http://ciciolog.jagiello.it/2011/12/cat-devmind-blogger.html' title='cat /dev/mind &gt; blogger'/><author><name>Maciej Kacper Jagiełło</name><uri>https://plus.google.com/104341140492573575799</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-6T0mFLFndcY/AAAAAAAAAAI/AAAAAAAABeg/7wmSCfp4Biw/s512-c/photo.jpg'/></author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1"/><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD"/></entry></feed>