Created
April 3, 2012 14:55
-
-
Save InternetExplorer/2292656 to your computer and use it in GitHub Desktop.
Linking Impact and EaselJS "Tick" Functions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 | |
// Before the frame ends and Impact takes control again | |
this.stage.update(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment