This file contains hidden or 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
| looker.plugins.visualizations.add({ | |
| // Id and Label are legacy properties that no longer have any function besides documenting | |
| // what the visualization used to have. The properties are now set via the manifest | |
| // form within the admin/visualizations page of Looker | |
| id: "hello_world", | |
| label: "Hello World", | |
| options: { | |
| font_size: { | |
| type: "string", | |
| label: "Font Size", |
This file contains hidden or 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
| # http://jsfiddle.net/YwqsV/ | |
| fromAngleAxis = (angle, axis, dest) -> | |
| axis = normalize axis | |
| halfAngle = angle / 2 | |
| s = Math.sin halfAngle | |
| dest[0] = axis[0] * s | |
| dest[1] = axis[1] * s | |
| dest[2] = axis[2] * s | |
| dest[3] = Math.cos halfAngle |
This file contains hidden or 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
| var makeSimulatedGameLoop = function(n) { | |
| /* Pre-initialize an array with distinct simple objects */ | |
| var g = new Array(1000*n); | |
| var count = 0; | |
| for (i=0; i< g.length; i++) { | |
| g[i] = {count: count++}; | |
| } | |
| var _work = function() { |
This file contains hidden or 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
| function() { | |
| var lastHeapSize = null; | |
| var lastFrameTime = null; | |
| var runGame = function() { | |
| requestAnimationFrame(runGame); | |
| var frameTime = window.performance.now(); | |
| var heapSize = window.performance.memory.usedJSHeapSize; |