Box.round( Float v ) ⇢ Integer
Rounds the given float to a integer, this function is intended for rendering purposes and tries to reduce jitter.
- Float v
Box.World( Vec2 gravity = Vec2(0.0, 50.0), Integer steps = 10, Integer iterations = 10 )
| /** | |
| * Copyright (c) 2013 Ivo Wetzel. | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| * of this software and associated documentation files (the "Software"), to deal | |
| * in the Software without restriction, including without limitation the rights | |
| * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| * copies of the Software, and to permit persons to whom the Software is | |
| * furnished to do so, subject to the following conditions: | |
| * |
| { | |
| "name": "OrderedMap", | |
| "exports": {}, | |
| "related": {}, | |
| "internal": { | |
| "OrderedMap": { | |
| "type": "Class", | |
| "id": 81, | |
| "name": "OrderedMap", | |
| "comment": null, |
| { | |
| "name": "Module", | |
| "exports": { | |
| "Module.External": { | |
| "type": "Class", | |
| "id": 52, | |
| "name": "External", | |
| "comment": { | |
| "description": "The External Class", | |
| "params": [{ |
| (function(window) { | |
| var ios = { | |
| onload: function() { | |
| }, | |
| width: 0, | |
| height: 0, |
| /** | |
| * Copyright (c) 2013 Ivo Wetzel. | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| * of this software and associated documentation files (the "Software"), to deal | |
| * in the Software without restriction, including without limitation the rights | |
| * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| * copies of the Software, and to permit persons to whom the Software is | |
| * furnished to do so, subject to the following conditions: | |
| * |
| (function(exports) { | |
| // Vector Class ----------------------------------------------------------- | |
| // ------------------------------------------------------------------------ | |
| function Vector2(x, y) { | |
| this.x = x; | |
| this.y = y; | |
| } | |
| Vector2.prototype = { |
| /** | |
| * Copyright (c) 2013 Ivo Wetzel. | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| * of this software and associated documentation files (the "Software"), to deal | |
| * in the Software without restriction, including without limitation the rights | |
| * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| * copies of the Software, and to permit persons to whom the Software is | |
| * furnished to do so, subject to the following conditions: | |
| * |
| function NameGenerator(state) { | |
| // Syllables shamelessly stolen from elite | |
| var syllables = 'folexegezacebisousesarmaindirea.eratenberalavetiedorquanteisrion', | |
| vocals = 'aeiou'; | |
| // Some improvements | |
| var vocalMustFollow = 'tdbr', | |
| notFollowdBySelf = 'rstie', | |
| onlyAtStart = 'xyz', |
| var rules = require('./rules'); | |
| // Emblem Lexer --------------------------------------------------------------- | |
| // ---------------------------------------------------------------------------- | |
| var Lexer = function() { | |
| this.line = 0; | |
| this.col = 0; | |
| this.offset = 0; |