This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
groupsCalculated: (state) => { | |
var groups = state.all.reduce((acc, val) => { | |
if(!acc[val.name]) { | |
acc[val.name] = { | |
name: val.name, | |
id: val.id, | |
networks: [] | |
}; | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
actionFunctions = { | |
move: function(direction) { | |
state.location = getLocation(state.location); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
EventRouter = function() { | |
this.events = {}; | |
} | |
EventRouter.prototype.subscribe = function(eventName, callback, context) { | |
if(!this.events[eventName]) { | |
this.events[eventName] = []; | |
} | |
this.events[eventName].push({func: callback, ctx: context}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var path = require('path') | |
var webpack = require('webpack') | |
var combineLoaders = require('webpack-combine-loaders') | |
module.exports = { | |
entry: './src/vue/main.js', | |
output: { | |
path: path.resolve(__dirname, './web/dist'), | |
publicPath: '/web/dist/', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var electron = require('electron'); | |
var app = electron.app; // Module to control application life. | |
var BrowserWindow = electron.BrowserWindow; // Module to create native browser window. | |
// Report crashes to our server. | |
//require('crash-reporter').start(); | |
// Keep a global reference of the window object, if you don't, the window will | |
// be closed automatically when the JavaScript object is GCed. | |
var mainWindow = null; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Player.prototype.Jump = function(params) { | |
if( this.state === this.Hurting || | |
this.state === this.AttackDiveLand || | |
this.state === this.AttackFall || | |
this.state === this.Stunned || | |
this.state === this.Throwing) | |
return; | |
if(params.jump) { | |
//drop through cloud tiles |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>p2.js Canvas Box example</title> | |
<meta charset="utf-8"> | |
<script src="../../build/p2.js"></script> | |
</head> | |
<body> | |
<!-- The canvas, where we draw stuff --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma strict | |
public var fadeOutTexture : Texture2D; | |
var fadeOutRate : float = 0.3; | |
private var alpha = 0.0; | |
var delayTimer = 0.00; | |
static var gameOver = false; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for (var i = 1; i <= 100; i++) { | |
if (i % 3 === 0) { | |
document.write("Fizz"); | |
} | |
if (i % 5 === 0) { | |
document.write("Buzz"); | |
} | |
if (i % 3 !== 0 && i % 5 !== 0) { |