Skip to content

Instantly share code, notes, and snippets.

@xiaohan2013
xiaohan2013 / ajax.js
Created July 5, 2016 10:28 — forked from skhatri/ajax.js
simple ajax - cors request, jsonp, xmlhttprequest
function Ajax() {
}
Ajax.prototype.jsonpHandler = function (url, callback) {
var scripturl = url + ((url.indexOf("?") !== -1) ? "&" : "?") + "callback=" + callback;
document.write('<script src="' + scripturl + '"></script>');
return scripturl;
};
Ajax.prototype.request = function (method, url, fallback, options) {
@xiaohan2013
xiaohan2013 / gameengines.md
Created July 3, 2016 14:23 — forked from bebraw/gameengines.md
List of JS game engines. You can find a wikified version at https://github.com/bebraw/jswiki/wiki/Game-Engines. Feel free to modify that. I sync it here every once in a while.

IMPORTANT! Remember to check out the wiki page at https://github.com/bebraw/jswiki/wiki/Game-Engines for the most up to date version. There's also a "notes" column in the table but it simply does not fit there... Check out the raw version to see it.

This table contains primarily HTML5 based game engines and frameworks. You might also want to check out the [[Feature Matrix|Game-Engine-Feature-Matrix]], [[Game Resources]] and [[Scene Graphs]].

Name Size (KB) License Type Unit Tests Docs Repository Notes
Akihabara 453 GPL2, MIT Classic Repro no API github Intended for making classic arcade-style games in JS+HTML5
AllBinary Platform Platform Dependent AllBinary 2D/2.5D/3D n
@xiaohan2013
xiaohan2013 / blog-webpack-2.md
Created May 24, 2016 02:15 — forked from xjamundx/blog-webpack-2.md
From Require.js to Webpack - Part 2 (the how)

This is the follow up to a post I wrote recently called From Require.js to Webpack - Party 1 (the why) which was published in my personal blog.

In that post I talked about 3 main reasons for moving from require.js to webpack:

  1. Common JS support
  2. NPM support
  3. a healthy loader/plugin ecosystem.

Here I'll instead talk about some of the technical challenges that we faced during the migration. Despite the clear benefits in developer experience (DX) the setup was fairly difficult and I'd like to cover some of the challanges we faced to make the transition a bit easier.