A simple watter shader based on the "water noise" example from @oosmoxiecode
Initiated by Makis Tracend
_.mixin({ | |
inArray: function(value, array){ | |
return array.indexOf(value) > -1; | |
} | |
}); |
A simple watter shader based on the "water noise" example from @oosmoxiecode
Initiated by Makis Tracend
// isEmail underscore helper | |
// source: https://gist.github.com/tracend/7763827 | |
_.mixin({ | |
isEmail: function( email ){ | |
var format = /^[a-zA-Z0-9\-_]+(\.[a-zA-Z0-9\-_]+)*@[a-z0-9]+(\-[a-z0-9]+)*(\.[a-z0-9]+(\-[a-z0-9]+)*)*\.[a-z]{2,4}$/; | |
return (email.match(format)); | |
} | |
}); |
This is a series of MATLAB style relational operators for Handlebars.
Object.size = function(obj) { | |
var size = 0, key; | |
for (key in obj) { | |
if (obj.hasOwnProperty(key)) size++; | |
} | |
return size; | |
}; |
_.mixin({ | |
// a number between two values (default: 0 to 1000), optionally as an integer | |
random: function(min, max, int) { | |
// fallback(s) | |
min = min || 0; | |
max = max || 1000; | |
int = int || false; | |
// calculate the number | |
var num = Math.random()*(max-min) + min; |
Three.prototype.fn.webgl.asset = function( options, callback ){ | |
// define the group (once) | |
if( !this.groups['asset'] ) this.groups['asset'] = "objects"; | |
// model | |
var self = this; | |
var asset = new THREE.Asset( true ); | |
asset.load( options.src, function ( geometry, materials ) { |
define(["jquery", "underscore", "backbone"], | |
function( $, _, Backbone ){ | |
// APP contructor | |
// based on backbone-app: https://github.com/makesites/backbone-app/blob/master/lib/app._construct.js | |
var APP = function(){ | |
// get config | |
this.options = arguments[0] || {}; | |
// check URIs |
Game development is becoming increasingly integrated with online services and real-time communication. Traditional game developers may need to step into the mindset of web developers to make sure their games survive in this new ecosystem.
Historically game developers didn't have to worry about the "real" world. Instead a video game was a contained environment and the focus was to try to make it as interactive and believable as possible. Fast forward to today and many games seem to be using the Internet in various ways. To change the state of these virtual worlds from contained to dynamic there needs to be a re-calibration in some of the basic development practices that have been established in previous decades. Web developers can assist in this area with their experience, as they have spent a lot of time and effort as a community to make their tools automated, network-based and dynamic. Among other benefits that's what allows them to be so efficient, and a web app made by
<!doctype html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Alert</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0"> | |
<meta name="apple-mobile-web-app-capable" content="yes"> | |
<meta name="apple-mobile-web-app-status-bar-style" content="black"> | |
<script type="text/javascript" src="//rawgithub.com/commons/common.js/master/build/common-min.js"></script> | |
<link rel="stylesheet" href="//rawgithub.com/commons/common.css/master/build/common-min.css" type="text/css" media="screen"> |