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 MAX_SUB_DIVISIONS = 6, | |
| MAX_OBJECTS = 6, | |
| results = [], //results of multiple quads | |
| OBJECT = "object", | |
| NULL = null, | |
| mc = Math.ceil; | |
| function RTree() { | |
| this.root = new Box(0, 0, 1600, 800, null, 0); | |
| } |
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
| SAT: function(poly1, poly2) { | |
| var points1 = poly1.points, | |
| points2 = poly2.points, | |
| i = 0, l = points1.length, | |
| j, k = points2.length, | |
| normal = {x: 0, y: 0}, | |
| length, | |
| min1, min2, | |
| max1, max2, | |
| interval, |
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
| SAT: function(poly1, poly2) { | |
| var points1 = poly1.points, | |
| points2 = poly2.points, | |
| i = 0, l = points1.length, | |
| j, k = points2.length, | |
| normal = {x: 0, y: 0}, | |
| length, | |
| min1, min2, | |
| max1, max2, | |
| interval, |
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 privateVar = 5; | |
| Crafty.c('NewComponent', { | |
| publicPropertyA: null, | |
| publicPropertyB: 33, | |
| init: 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
| this.test = function() { | |
| var embeded = true; | |
| }; |
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
| #Performance Testing Framework | |
| Performance is a very important factor for JavaScript games. It becomes | |
| a cruciual factor when you bring mobile devices into the mix. | |
| Luckily we have some great tools for testing different methods of coding | |
| such as JSPerf.com. This lets developers see which browsers perform best | |
| doing what. | |
| On the same vein, JSGameBench stress tested rendering methods for browsers |
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(blog, limit) { | |
| limit = +limit || 10; | |
| var scriptTags = document.getElementsByTagName('script'); | |
| var scriptNode = scriptTags[scriptTags.length - 1]; | |
| var recent = document.createElement("div"); | |
| scriptNode.parentNode.appendChild(recent); | |
| recent.setAttribute("class", "widget"); | |
| recent.setAttribute("id", "TumblrRecentPosts"); |
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
| <h1 class="election-section">Electorate Results</h1> | |
| <p class="count"><span class="percentcounted">79.5</span>% Counted. Updated <span class="updatedtime">9 Oct 2015, 11:14pm</span></p> | |
| <div class="afterprefs placeholder"> | |
| <div class="election-well"> | |
| <h2>Count After Preferences</h2> | |
| </div> | |
| <div class="module afterprefs electable"> | |
| <table class="manual eg-table results-table"> | |
| <thead> |
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
| /** | |
| * @author Louis Stowasser <louisstow@gmail.com> | |
| * License: MIT | |
| */ | |
| function generateTOC (rootNode, startLevel) { | |
| var lastLevel = 0; | |
| startLevel = startLevel || 2; //which H# tag to start indexing. | |
| var html = "<ul>"; |
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 entityMap = { | |
| "&": "&", | |
| "<": "<", | |
| ">": ">", | |
| '"': '"', | |
| "'": ''', | |
| "/": '/' | |
| }; | |
| function escapeHtml (string) { |
OlderNewer