The following shows what to watch out for when making Angular Dart applications. For more information about Angular Dart, see angulardart.org.
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
| export const animateEqual = (properties, ...values) => { | |
| const percentIncrease = 100 / (values.length - 1); | |
| let result = {}; | |
| let percent = 0; | |
| _.each(values, value => { | |
| let styles = {}; | |
| _.each(value, (n, i) => { | |
| const prop = properties[i]; | |
| styles = _.extend(styles, _.isFunction(prop) ? prop.apply(this, [n]) : {[prop]: n}) |
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 counterA(state = 0, action) { | |
| switch (action.type) { | |
| case 'increment': | |
| return state + 1 | |
| case 'decrement': | |
| return state - 1 | |
| default: | |
| return state | |
| } | |
| } |
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
| "use strict"; | |
| import React, {Component} from 'react'; | |
| import calcContentHeight from './dom-textarea-measure'; | |
| class AutogrowingTextarea extends Component { | |
| constructor(props) { | |
| this.props = props; | |
| this.state = {}; | |
| this.textareaProps = sanitizeChildProps(props); |
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
| <!-- Raven.js Config --> | |
| <script src="{{ JS_PATH }}/lib/raven.js" type="text/javascript"></script> | |
| <script type="text/javascript"> | |
| // Ignore list based off: https://gist.github.com/1878283 | |
| var ravenOptions = { | |
| // Will cause a deprecation warning, but the demise of `ignoreErrors` is still under discussion. | |
| // See: https://github.com/getsentry/raven-js/issues/73 | |
| ignoreErrors: [ | |
| // Random plugins/extensions | |
| 'top.GLOBALS', |
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
| /* | |
| * dart document.cookie lib | |
| * | |
| * ported from | |
| * http://www.quirksmode.org/js/cookies.html | |
| * | |
| */ | |
| void createCookie(String name, String value, int days) { | |
| String expires; |
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://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
| // http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | |
| // requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel | |
| // MIT license | |
| (function() { | |
| var lastTime = 0; | |
| var vendors = ['ms', 'moz', 'webkit', 'o']; |
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
| require.extensions[".json"] = function (module, filename) { | |
| module.exports = JSON.parse(require("fs").readFileSync(filename, "utf8")) | |
| } |
IMPORTANT! Remember to check out the wiki page at https://github.com/bebraw/jswiki/wiki/Game-Engines for the most up to date version. There's also a "notes" column in the table but it simply does not fit there... Check out the raw version to see it.
This table contains primarily HTML5 based game engines and frameworks. You might also want to check out the [[Feature Matrix|Game-Engine-Feature-Matrix]], [[Game Resources]] and [[Scene Graphs]].
| Name | Size (KB) | License | Type | Unit Tests | Docs | Repository | Notes |
|---|---|---|---|---|---|---|---|
| Akihabara | 453 | GPL2, MIT | Classic Repro | no | API | github | Intended for making classic arcade-style games in JS+HTML5 |
| AllBinary Platform | Platform Dependent | AllBinary | 2D/2.5D/3D | n |
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 dom = require("jsdom/jsdom/level2/core").dom.level2.core; | |
| var browser = require("jsdom/jsdom/browser"); | |
| exports.createWindow = function() { | |
| var bom = browser.browserAugmentation(dom); | |
| var window = browser.windowAugmentation(dom); | |
| for (var key in bom) window[key] = bom[key]; | |
| return window; | |
| } |