Permalink
Browse files

Replace xstats by stats

  • Loading branch information...
yurydelendik committed Aug 26, 2013
1 parent 89a368e commit 1b51fb9151e7ea979994cbb4b652b3ec75286d7e
Showing with 15 additions and 9 deletions.
  1. +3 −3 .gitmodules
  2. +3 −3 examples/inspector/inspector.html
  3. +5 −0 examples/inspector/inspector.js
  4. +1 −0 lib/stats
  5. +0 −1 lib/xstats
  6. +3 −2 web/Makefile
View
@@ -4,6 +4,6 @@
[submodule "lib/DataView.js"]
path = lib/DataView.js
url = https://github.com/davidflanagan/DataView.js.git
-[submodule "lib/xstats"]
- path = lib/xstats
- url = https://github.com/bestiejs/xstats.js.git
+[submodule "lib/stats"]
+ path = lib/stats
+ url = https://github.com/mrdoob/stats.js.git
@@ -43,7 +43,7 @@
window.performance = { now: Date.now };
}
</script>
- <script src="../../lib/xstats/xstats.js"></script>
+ <script src="../../lib/stats/build/stats.min.js"></script>
<script>
console.time("Load");
@@ -310,8 +310,8 @@
</script>
<script>
- var stats = new xStats;
- document.getElementById('xstats').appendChild(stats.element);
+ var stats = new Stats();
+ document.getElementById('xstats').appendChild(stats.domElement);
</script>
</body>
@@ -254,6 +254,7 @@ function executeFile(file, buffer, movieParams) {
SWF.embed(buffer || file, document, document.getElementById('stage'), {
onComplete: terminate,
onBeforeFrame: frame,
+ onAfterFrame: afterFrame,
url: swfURL,
loaderURL: loaderURL,
movieParams: movieParams || {},
@@ -323,6 +324,10 @@ function frame(e) {
if (pauseExecution) {
e.cancel = true;
}
+ stats.begin();
+}
+function afterFrame() {
+ stats.end();
}
(function setStageSize() {
Submodule stats added at 923ab6
Submodule xstats deleted from a2d619
View
@@ -74,8 +74,9 @@ build: ensureoutputdir \
cp $(SHUMWAY_ROOT)/lib/DataView.js/* $(BUILD_DIR)/lib/DataView.js/
mkdir $(BUILD_DIR)/lib/mp3
cp $(SHUMWAY_ROOT)/lib/mp3/* $(BUILD_DIR)/lib/mp3/
- mkdir $(BUILD_DIR)/lib/xstats
- cp -R $(SHUMWAY_ROOT)/lib/xstats/* $(BUILD_DIR)/lib/xstats/
+ mkdir $(BUILD_DIR)/lib/stats
+ cp -R $(SHUMWAY_ROOT)/lib/stats/LICENSE $(BUILD_DIR)/lib/stats/
+ cp -R $(SHUMWAY_ROOT)/lib/stats/build $(BUILD_DIR)/lib/stats/
# Copy examples
cp -R $(SHUMWAY_ROOT)/examples $(BUILD_DIR)
# Copy extensions

0 comments on commit 1b51fb9

Please sign in to comment.