Commit graph

12 commits

Author SHA1 Message Date
Karishma Chadha
c3ede9c3d5
Merge pull request #495 from LLK/revert-494-revert-467-rect-init-matrix
Revert "Revert "Initialialize AABB Rectangle ""
2019-08-30 15:35:32 -04:00
Karishma Chadha
a340b8a04b
Revert "Revert "Initialialize AABB Rectangle "" 2019-08-13 11:41:11 -04:00
Karishma Chadha
c8f7496fba
Revert "Initialialize AABB Rectangle " 2019-08-13 11:26:07 -04:00
Michael "Z" Goddard
994e9be00b
move the initFromModelMatrix process docs into a jsdoc tutorial 2019-06-19 18:53:05 -04:00
Michael "Z" Goddard
5d7957ff9b
document out how initFromModelMatrix works 2019-06-11 14:32:33 -04:00
Michael "Z" Goddard
bf47f69b04
use a destination parameter for bounds; add initFromMatrixRadius
- pass bounds as a destination parameter
- add initFromMatrixRadius
- use initFromMatrixRadius in getAABB
2019-06-06 14:39:56 -04:00
adroitwhiz
6646041ba4 Fix Rectangle.Clamp() 2019-04-22 08:49:20 -04:00
Mx Corey Frang
2b8371e5af
Rewrite isTouchingDrawables on CPU (#263)
* avoid gl.readPixels at all costs
2018-04-27 16:19:25 -04:00
Ray Schamp
3c6511d94e Generate docs from src, publish to gh-pages
Fix any broken JSDoc syntax. Unfortunately there is no way to document tuples like `{[int, int]}` for a `[width, height]` array. We could possibly fix this and make the code more readable with `{width: number, height: number}` instead of tuples.

Remove single `@fileoverview` from Rectangle.js, since it was the only file with one and was weird to have that one module show up on the docs home page.

Add a `docs` script to `package.json`, run it from `npm test`, so invalid docs will cause tests to fail (eventually we may want to start using eslint-plugin-jsdoc to catch these errors with the linter alone).
2017-02-21 14:46:24 -05:00
Christopher Willis-Ford
3c80ed73a7 Fix lint warnings 2016-12-12 12:06:19 -08:00
Christopher Willis-Ford
5db860efed Use eslint-config-scratch, fix linting errors 2016-12-12 12:06:19 -08:00
Tim Mickel
be6d2dc4e4 Bounding-box optimizations for touching color, touching drawables (#55)
* Add Rectangle utility and use it in Drawable.getBounds

* Add `getAABB`, `getFastBounds`.

* Add width and height getters to Rectangle

* Add rectangle clamp

* Optimized isTouchingColor

* Optimized isTouchingDrawables

* Rectangle.ceil -> Rectangle.snapToInt

* Refactor to common _touchingQueryCandidates

* Split helper into two
2016-10-24 13:19:20 -04:00