Skip to content

Instantly share code, notes, and snippets.

View hoorayimhelping's full-sized avatar

Bucky Schwarz hoorayimhelping

View GitHub Profile
diff --git a/gulpfile.js b/gulpfile.js
index 8dcc89b..282eb4b 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -32,7 +32,7 @@ gulp.task('lint', function() {
paths.js_test + '*.js',
'gulpfile.js'
])
- .pipe(jshint())
+ .pipe(jshint({ esnext: true }))
diff --git a/gulpfile.js b/gulpfile.js
index 8dcc89b..6e14dc3 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -32,7 +32,7 @@ gulp.task('lint', function() {
paths.js_test + '*.js',
'gulpfile.js'
])
- .pipe(jshint())
+ .pipe(jshint({ esnext: true }))
diff --git a/_includes/2015-09-20/hello_world.html b/_includes/2015-09-20/hello_world.html
new file mode 100644
index 0000000..991edd0
--- /dev/null
+++ b/_includes/2015-09-20/hello_world.html
@@ -0,0 +1,34 @@
+<div id="container" style="border: 1px dodgerblue solid; max-height: 200px;">
+ <canvas id="canvas">Sorry, this little bit of content requires a modern browser</canvas>
+</div>
+<script type="text/javascript">
diff --git a/_includes/2015-09-20/hello_world.html b/_includes/2015-09-20/hello_world.html
new file mode 100644
index 0000000..991edd0
--- /dev/null
+++ b/_includes/2015-09-20/hello_world.html
@@ -0,0 +1,34 @@
+<div id="container" style="border: 1px dodgerblue solid; max-height: 200px;">
+ <canvas id="canvas">Sorry, this little bit of content requires a modern browser</canvas>
+</div>
+<script type="text/javascript">
diff --git a/js/app.js b/js/app.js
index d7c58ef..2b40830 100644
--- a/js/app.js
+++ b/js/app.js
@@ -45,17 +45,18 @@ Renderer.prototype = {
this.context.closePath();
},
- scaleCanvas: function($container) {
+ scaleCanvas: function($container, width, height) {
diff --git a/js/app.js b/js/app.js
index d7c58ef..2b40830 100644
--- a/js/app.js
+++ b/js/app.js
@@ -45,17 +45,18 @@ Renderer.prototype = {
this.context.closePath();
},
- scaleCanvas: function($container) {
+ scaleCanvas: function($container, width, height) {
diff --git a/js/app.js b/js/app.js
index d7c58ef..c69c7ce 100644
--- a/js/app.js
+++ b/js/app.js
@@ -45,16 +45,16 @@ Renderer.prototype = {
this.context.closePath();
},
- scaleCanvas: function($container) {
+ scaleCanvas: function($container, width, height) {
@hoorayimhelping
hoorayimhelping / app.js
Created September 22, 2015 11:45 — forked from tomaskikutis/app.tsx
react typescript browserify
// npm install browserify -g
// npm install tsd -g
// npm install react tsify
// tsd install react
// browserify app.tsx -p [tsify --jsx=react] -o bundle.js
/// <reference path="typings/react/react.d.ts" />
import React = require("react");
interface HelloWorldComponentProps extends React.Props<any> {
@hoorayimhelping
hoorayimhelping / Game1.js
Last active September 23, 2015 13:15 — forked from anonymous/Game1
PS.keyDown = function (key, shift, ctrl, options) {
"use strict";
// p was pressed - pause the game
if (key === 112) {
GAME.paused = !GAME.paused // flip the state, if it was paused, it's unpaused after this
PS.debug("Game is now paused: " + GAME.paused);
// not sure how PS works. I suspect you don't want to stop the timer here, but instead want to do that in code that is higher up
// i would iamgine the game controller would have access to the timer properties
}
PS.keyDown = function (key, shift, ctrl, options) {
"use strict";
if(GAME.running && !GAME.paused){
movePlayer(key);
if(key == 112){
PS.timerStop(sTimerID);
PS.debug("Game is paused.\n");
GAME.paused = true;
}