Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fractal-noise

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fractal-noise - npm Package Compare versions

Comparing version 1.2.0 to 2.0.0-pre1

17

lib/mod.js

@@ -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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc