Internet Explorer InternetExplorer

View tick.example.js
1 2 3 4 5 6 7 8 9 10
// Create the Easel Stage
this.stage = new Stage(this.canvas);
 
// Set the stage to not autoClear
// This keeps EaselJS from erasing all of what Impact has already drawn to canvas.
this.stage.autoClear = false;
 
// Update Easel in sync with Impact
tick: function() {
// Call Easel's update function to draw all of its queued changes
View draw.example.js
1 2 3 4 5 6 7 8 9 10
// Impact's main draw function in the main game file
draw: function() {
 
// Clear out the main canvas since Easel will have drawn things that Impact doesn’t know about
var ctx = ig.system.context;
ctx.setTransform(1, 0, 0, 1, 0, 0);
ctx.clearRect(0, 0, ig.system.width, ig.system.height);
 
// Call draw on the parent object to make sure that all draws to the canvas are finalized
// before telling Easel to update
View otterDestruction.example.js
1 2 3 4 5 6 7 8 9 10
// Otter destruction
// An example of how Underscore.js and Impact make it easy to destroy
// all the enemies on-screen with a giant otter
destroyEverthing: function() {
 
// Grab all active enemies
_.each(ig.game.getAllEnemies(), function(e){
 
// Check if an enemy is on screen
if(e.isOnScreen) {
View currentFrameFromTimecode.example.js
1 2 3 4 5 6 7 8 9 10
function getCurrentFrameFromTimecode() {
frame_canvas_ctx.drawImage(video, 961, 0, 1, 16, 0, 0, 1, 16);
var timeBitmap = frame_canvas_ctx.getImageData(0, 0, 1, 16);
var timeData = timeBitmap.data;
var frame = 0;
var value;
for (var i = timeData.length - 1; i >= 0; i -= 4) {
value = (timeData[i - 3] + timeData[i - 2]
+ timeData[i - 1]) > 125 ? 1 : 0;
if (Math.floor(i / 4) == 15) {
View scoreboardProjection.example.js
1 2 3 4 5 6 7 8 9 10
function scoreboardProjection(frame_offset) {
 
if (frame_offset == null) frame_offset = 0;
var canvas, proj;
var score_img_1,
score_img_2,
overlay,
board_canvas,
score_canvas_1,
score_canvas_2;
Something went wrong with that request. Please try again.