Skip to content

Instantly share code, notes, and snippets.

@hugeen
hugeen / gist:4662065
Created Jan 29, 2013
Convert XML to JSON with JavaScript
View gist:4662065
// Source From http://davidwalsh.name/convert-xml-json
// Changes XML to JSON
function xmlToJson(xml) {
// Create the return object
var obj = {};
if (xml.nodeType == 1) { // element
// do attributes
@hugeen
hugeen / CGLM.example.js
Created Sep 1, 2011 — forked from kirbysayshi/CGLM.example.js
My attempt at two methods of a constant game-loop in JavaScript
View CGLM.example.js
// Example CGLM usage:
ZAP.CGLM
.setMode('custom')
.mode
.setFPS(30)
.setTimeStep(10)
.setSpeedX(1);
function priorityOne(dt, stats){
You can’t perform that action at this time.