-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
67 lines (67 loc) · 2.54 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
{
"name": "aabb-3d",
"version": "0.0.0",
"description": "3d axis aligned bounding boxes",
"main": "index.js",
"scripts": {
"test": "node test.js"
},
"repository": {
"type": "git",
"url": "https://github.com/chrisdickinson/aabb-3d"
},
"keywords": [
"aabb",
"axis",
"aligned",
"bounding",
"boxes",
"3d"
],
"author": {
"name": "Chris Dickinson",
"email": "chris@neversaw.us"
},
"license": "MIT",
"dependencies": {
"gl-matrix": "2.X.X"
},
"devDependencies": {
"tape": "~0.1.5"
},
"testling": {
"files": "test.js",
"browsers": {
"ie": [
10
],
"firefox": [
13,
14,
15,
16,
17,
"nightly"
],
"chrome": [
20,
23,
"canary"
],
"safari": [
6
],
"opera": [
12,
"next"
]
}
},
"readme": "# aabb-3d\n\nAxis aligned bounding boxes for fun and profit.\n\n[![browser support](http://ci.testling.com/chrisdickinson/aabb-3d.png)](http://ci.testling.com/chrisdickinson/aabb-3d)\n\n```javascript\nvar aabb = require('aabb-3d')\n\nvar bounding_box = aabb([0, 0, 0], [12, 12, 12]) // x, y, z == 0; width, height, depth == 12\n , other = aabb([10, 10, 10], [2, 2, 2])\n\nbounding_box.intersects(other) // true\nbounding_box.translate([2, 2, 2]) // moves the bounding box\nbounding_box.expand(other) // returns a new aabb that surrounds both bboxes\n\n```\n\n# API\n\n### aabb = [new ]aabb([x, y, z], [w, h, d])\n\nreturns a new aabb.\n\n### aabb.width() -> Number\n### aabb.height() -> Number\n### aabb.depth() -> Number\n### aabb.x0()\n### aabb.y0()\n### aabb.x1()\n### aabb.y1()\n### aabb.z0()\n### aabb.z1()\n\nreturns:\n\n```\n \n x0/y1/z1---x1/y1/z1\ndepth-> / /|\n / / |\n x0/y1/z0 -- x1/y1/z0\n | | |\n | | <-- height\n | | /\n | | /\n x0/y0/z0 ----- x1/y0/z0\n ^\n |\n width\n```\n\n### aabb.translate([x, y, z])\n\nmoves the box. returns itself.\n\n### aabb.intersects(aabb) -> Boolean\n\nreturns true if the two bounding boxes intersect (or touch at all.)\n\n### aabb.union(aabb) -> new aabb or null\n\nreturns a new `aabb` representing the shared area of the\ntwo aabb's. returns `null` if the boxes don't intersect.\n\n# License\n\nMIT\n\n",
"readmeFilename": "README.md",
"bugs": {
"url": "https://github.com/chrisdickinson/aabb-3d/issues"
},
"_id": "aabb-3d@0.0.0",
"_from": "aabb-3d@0.0.0"
}