fractal-noise
Advanced tools
Comparing version 1.2.0 to 2.0.0-pre1
@@ -102,13 +102,14 @@ "use strict"; | ||
for (var x = 0; x < circumference; x++) { | ||
field[x] = new Array(circumference); | ||
for (var y = 0; y < circumference; y++) { | ||
var circumferenceSemi = circumference / 2; | ||
field[x] = new Array(circumferenceSemi); | ||
for (var y = 0; y < circumferenceSemi; y++) { | ||
var _b = [x / circumference, y / circumferenceSemi], nx = _b[0], ny = _b[1]; | ||
var _c = [nx * TWO_PI, ny * Math.PI], rdx = _c[0], rdy = _c[1]; | ||
var sinY = Math.sin(rdy + Math.PI); | ||
var a = TWO_PI * Math.sin(rdx) * sinY; | ||
var b = TWO_PI * Math.cos(rdx) * sinY; | ||
var d = TWO_PI * Math.cos(rdy); | ||
var value = 0.0; | ||
for (var octave = 0; octave < octaves; octave++) { | ||
var freq = frequency * Math.pow(2, octave); | ||
var _b = [x / circumference, y / circumference], nx = _b[0], ny = _b[1]; | ||
var _c = [nx * TWO_PI, ny * Math.PI], rdx = _c[0], rdy = _c[1]; | ||
var sinY = Math.sin(rdy + Math.PI); | ||
var a = TWO_PI * Math.sin(rdx) * sinY; | ||
var b = TWO_PI * Math.cos(rdx) * sinY; | ||
var d = TWO_PI * Math.cos(rdy); | ||
value += noise3(a * freq, b * freq, d * freq) * | ||
@@ -115,0 +116,0 @@ (amplitude * Math.pow(persistence, octave)); |
{ | ||
"name": "fractal-noise", | ||
"version": "1.2.0", | ||
"version": "2.0.0-pre1", | ||
"description": "Fractal noise library", | ||
@@ -30,5 +30,5 @@ "keywords": [ | ||
"devDependencies": { | ||
"denoify": "^0.6.5", | ||
"typescript": "^4.2.4" | ||
"denoify": "1.4.2", | ||
"typescript": "4.8.4" | ||
} | ||
} |
@@ -5,3 +5,3 @@ # Fractal Noise | ||
* Deno module: [https://deno.land/x/fractal_noise](https://deno.land.x/fractal_noise) | ||
* Deno module: [https://deno.land/x/fractal_noise](https://deno.land/x/fractal_noise) | ||
* NPM package: [fractal-noise](https://www.npmjs.com/package/fractal-noise) | ||
@@ -8,0 +8,0 @@ |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
11931
137
0
11
2