Create a gist now

Instantly share code, notes, and snippets.

@ikekou /CDN
Created Apr 14, 2015

What would you like to do?
[JavaScript][CoffeeScript] stats.js貼り付け用
https://cdnjs.cloudflare.com/ajax/libs/stats.js/r11/Stats.min.js
$ ->
stats = new Stats
stats.setMode 0
# 0: fps, 1: ms
stats.domElement.style.position = 'fixed'
#stats.domElement.style.left = '0px';
stats.domElement.style.right = '0px'
stats.domElement.style.top = '0px'
stats.domElement.style.zIndex = 2147483647
document.body.appendChild stats.domElement
createjs.Ticker.on 'tick', (event) ->
stats.begin()
# monitored code goes here
stats.end()
return
return
$(function() {
var stats = new Stats();
stats.setMode(0); // 0: fps, 1: ms
stats.domElement.style.position = 'fixed';
//stats.domElement.style.left = '0px';
stats.domElement.style.right = '0px';
stats.domElement.style.top = '0px';
stats.domElement.style.zIndex = 2147483647;
document.body.appendChild( stats.domElement );
createjs.Ticker.on('tick',function(event){
stats.begin();
// monitored code goes here
stats.end();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment