Skip to content

Commit

Permalink
build: update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
dmnsgn committed Aug 14, 2024
1 parent ff8d9e8 commit 79e497d
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 21 deletions.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down Expand Up @@ -139,7 +139,7 @@ <h2>vec2InRect/vec3InAABB</h2>
drawCircle(Vec2InRectCtx, ...random.vec2InRect(r), 1, `#000`);
}

// vec2InRect
// vec3InAABB
random.seed(0);
const Vec3InAABBCtx = document
.querySelector(".Vec3InAABB")
Expand Down
20 changes: 11 additions & 9 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
},
"dependencies": {
"seedrandom": "^3.0.5",
"simplex-noise": "4.0.1"
"simplex-noise": "^4.0.3"
},
"devDependencies": {
"es-module-shims": "^1.10.0",
Expand Down
3 changes: 1 addition & 2 deletions web_modules/pex-geom.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ import { s as set3, t as toString$4, a as set$2, b as sub, n as normalize, d as
* @param {import("./types.js").vec3[] | import("./types.js").TypedArray} points
* @returns {import("./types.js").aabb}
*/ function fromPoints$1(a, points) {
var _points_;
const isFlatArray = !((_points_ = points[0]) == null ? void 0 : _points_.length);
const isFlatArray = !points[0]?.length;
const l = points.length / (isFlatArray ? 3 : 1);
for(let i = 0; i < l; i++){
if (isFlatArray) {
Expand Down
16 changes: 9 additions & 7 deletions web_modules/simplex-noise.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Which is based on example code by Stefan Gustavson ([email protected]).
With Optimisations by Peter Eastman ([email protected]).
Better rank ordering method by Stefan Gustavson in 2012.
Copyright (c) 2022 Jonas Wagner
Copyright (c) 2024 Jonas Wagner
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -25,14 +25,16 @@ Better rank ordering method by Stefan Gustavson in 2012.
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
//
const F2 = 0.5 * (Math.sqrt(3.0) - 1.0);
const G2 = (3.0 - Math.sqrt(3.0)) / 6.0;
*/ // these __PURE__ comments help uglifyjs with dead code removal
//
const SQRT3 = /*#__PURE__*/ Math.sqrt(3.0);
const SQRT5 = /*#__PURE__*/ Math.sqrt(5.0);
const F2 = 0.5 * (SQRT3 - 1.0);
const G2 = (3.0 - SQRT3) / 6.0;
const F3 = 1.0 / 3.0;
const G3 = 1.0 / 6.0;
const F4 = (Math.sqrt(5.0) - 1.0) / 4.0;
const G4 = (5.0 - Math.sqrt(5.0)) / 20.0;
const F4 = (SQRT5 - 1.0) / 4.0;
const G4 = (5.0 - SQRT5) / 20.0;
// I'm really not sure why this | 0 (basically a coercion to int)
// is making this faster but I get ~5 million ops/sec more on the
// benchmarks across the board or a ~10% speedup.
Expand Down

0 comments on commit 79e497d

Please sign in to comment.