###Icons
Name | Size |
---|---|
iphone_2x | 120x120 |
iphone_3x | 180x180 |
ipad | 76x76 |
ipad_2x | 152x152 |
android_ldpi | 36x36 |
android_mdpi | 48x48 |
var impose = function(object, func, args){ | |
return func.apply(object, args); | |
} | |
var LoopSomething = (function(){ | |
/** | |
* Define class | |
* | |
* @author Steve Hoang <particles4dev> | |
* @version |
/** | |
* How to implement protected properties in javascript [ES5] | |
* | |
* @author Steve Hoang <particles4dev> | |
* @version | |
* @since 0.1 | |
* @inspiration WebReflection <link> | |
* | |
**/ |
if [ -f ~/.bashrc ]; then | |
. ~/.bashrc | |
fi | |
# --------------------------------------------------------------------------- | |
# | |
# Description: This file holds all my BASH configurations and aliases | |
# | |
# Sections: | |
# 1. Environment Configuration |
###Icons
Name | Size |
---|---|
iphone_2x | 120x120 |
iphone_3x | 180x180 |
ipad | 76x76 |
ipad_2x | 152x152 |
android_ldpi | 36x36 |
android_mdpi | 48x48 |
"use strict"; | |
var Cloud = function(_level, _spritesheet) { | |
Phaser.Sprite.call(this, _level.game, 0, 0, _spritesheet), _level.game.add.existing(this), this.level = _level, this.anchor.setTo(.5, .5), this.anglePos = 0, this.angleRad = 0, this.ySky = 0, this.planet = _level.planet, this.direction = 1, this.speed = .001 | |
}; | |
Cloud.prototype = Object.create(Phaser.Sprite.prototype), Cloud.prototype.constructor = Cloud, Cloud.prototype.update = function() { | |
var planetScale = this.planet.scale.x; | |
this.scale.setTo(planetScale, planetScale), this.anglePos += this.direction * this.speed * this.level.game.time.elapsed, this.angleRad = this.anglePos * (3.14159 / 180); | |
var realRadius = .5 * this.planet.width + .5 * this.height - 15 * planetScale; | |
realRadius += this.ySky * planetScale, this.x = this.planet.x + realRadius * Math.cos(this.angleRad), this.y = this.planet.y + realRadius * Math.sin(this.angleRad), this.angle = this.anglePos + 90 | |
}; |
"use strict"; | |
/** | |
* Class PlayerSave. Load and Manages the save data for the player. | |
* | |
* @class PlayerSave | |
* @namespace Phaser.Plugin | |
* @constructor | |
* @param {Phaser.Game} game | |
* @param {Phaser.Group} parent |
After publishing my article on ECMAScript 6, some have reached out to ask how I exactly I make it all work.
I refrained from including these details on the original post because they're subject to immiment obsoletion. These tools are changing and evolving quickly, and some of these instructions are likely to become outdated in the coming months or even weeks.
When evaluating the available transpilers, I decided to use 6to5, which has recently been renamed to Babel. I chose it based on:
#!/bin/bash | |
# <author mail="[email protected]" /> | |
quotes=( | |
[0]="Talk is cheap. Show me the code." | |
[1]="Software is like sex: it's better when it's free." | |
[2]="I’d like to be a nice person and curse less and encourage people to grow rather than telling them they are idiots. I’m sorry - I tried, it’s just not in me," | |
) | |
length=${#quotes[@]} |
# Feel free to change this path of course (and keys_zone value as well, but also change the usage of it below). | |
proxy_cache_path /var/www/cache/resized levels=1:2 keys_zone=resizedimages:10m max_size=1G; | |
# Gzip was on in another conf file of mine...You may need to uncomment the next line. | |
#gzip on; | |
gzip_disable msie6; | |
gzip_static on; | |
gzip_comp_level 4; | |
gzip_proxied any; | |
# Again, be careful that you aren't overwriting some other setting from another config's http {} section. |