Skip to content

Commit

Permalink
Version 5.1.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
vanruesc committed Feb 6, 2019
1 parent 9171c76 commit 64c9a6f
Show file tree
Hide file tree
Showing 19 changed files with 14,916 additions and 14,677 deletions.
10 changes: 5 additions & 5 deletions build/sparse-octree.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* sparse-octree v5.0.2 build Tue Jan 01 2019
* sparse-octree v5.1.0 build Wed Feb 06 2019
* https://github.com/vanruesc/sparse-octree
* Copyright 2019 Raoul van Rüschen, Zlib
*/
Expand Down Expand Up @@ -4980,8 +4980,6 @@
this.object = object;
};

var THRESHOLD = 1e-6;

function _countPoints(octant) {
var children = octant.children;
var result = 0;
Expand Down Expand Up @@ -5099,7 +5097,7 @@
points = octant.points;

for (i = 0, l = points.length; result === null && i < l; ++i) {
if (point.distanceToSquared(points[i]) <= THRESHOLD) {
if (point.distanceToSquared(points[i]) <= octree.threshold) {
result = octant.data[i];
}
}
Expand Down Expand Up @@ -5127,7 +5125,7 @@
points = octant.points;

for (i = 0, l = points.length; i < l; ++i) {
if (point.distanceToSquared(points[i]) <= THRESHOLD) {
if (point.distanceToSquared(points[i]) <= octree.threshold) {
points[i].copy(position);
result = octant.data[i];
break;
Expand Down Expand Up @@ -5238,6 +5236,7 @@
var bias = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0.0;
var maxPoints = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 8;
var maxDepth = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 8;
var threshold = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1e-6;

_classCallCheck(this, PointOctree);

Expand All @@ -5246,6 +5245,7 @@
_this.bias = Math.max(0.0, bias);
_this.maxPoints = Math.max(1, Math.round(maxPoints));
_this.maxDepth = Math.max(0, Math.round(maxDepth));
_this.threshold = threshold;
_this.pointCount = 0;
return _this;
}
Expand Down
4 changes: 2 additions & 2 deletions build/sparse-octree.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sparse-octree",
"version": "5.0.2",
"version": "5.1.0",
"description": "A sparse octree data structure.",
"homepage": "https://github.com/vanruesc/sparse-octree",
"main": "build/sparse-octree.js",
Expand Down
12 changes: 6 additions & 6 deletions public/demo/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion public/demo/index.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit 64c9a6f

Please sign in to comment.