Skip to content

Instantly share code, notes, and snippets.

@HAKASHUN
Created October 7, 2013 01:54
Show Gist options
  • Save HAKASHUN/6861474 to your computer and use it in GitHub Desktop.
Save HAKASHUN/6861474 to your computer and use it in GitHub Desktop.
CreateJSのクラスを名前空間'createjs'を書かなくても実行できるようにする
<!-- createJSのライブラリを読み込む前に以下を実行する-->
<script>
var createjs = window;
</script>
<!-- createJSのライブラリを読み込む-->
<script src="http://code.createjs.com/createjs-2013.09.25.min.js"></script>
<!-- 実行ソース-->
<script>
var canvasEl = document.getElementById("myCanvas");
//Stageクラスをcreatejs.Stageで参照しなくてもよくなる
var stage = new Stage(canvasEl);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment