npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-red-contrib-simplex-noise

v1.0.4

Published

A node-red node for generating simplex noise

Downloads

3

Readme

Simplex Noise Node

This package provides a Node-Red node for creating simplex noise.

What to use it for?

Simplex Noise has classically been used in computer graphics. However, it can be used everywhere where you want to generate random values that look 'natural'. For example, you can use 1D random noise to generate fake sensor data.

How to use

Simple example

Screenshot of simple example

The simplest way to use this is to wire up an inject-node to the input and a debug node to the output. Configure inject-node to set the message payload to the current timestamp and send it every second. Now you get a random number between -1 and +1 every second! You can import this example from examples/simple-example.json.

Generating natural looking random sequences

Screenshot of 1d chart example

Wire up any node that generates a linearly increasing number as an input. You will get a nice smooth curve if you increase the input value by 0.1 every time you send a message to the node. The output will be a number between -1 and +1 representing the noise value for the given value. Note that you will always get the same output for the same input. This will only change after your restart Node-Red. You can map the output to another value range using the 'range' node. Check out examples/1d-chart-example.json for a complete example. This example needs the dashboard package and generates a line chart from 1D simplex noise.

Using multiple input dimensions

You can also send arrays of numbers to the simplex node to generate multidimensional simplex. For example, if you send the array [1, 2] you will get the noise value at the position (1, 2) in the input space. The input space can have up to four dimensions which means your input array can be up to four elements long. All elements after the fourth are ignored. The output is always a single number between -1 and +1.

Generating multiple values at once

If you want to generate multiple values at once, you can send a payload containing an array of arrays of numbers (e.g. [[1, 2], [1.1, 2.1]]). The output will be an array of numbers. For each array in the input array there will be one number in the output array. Each of these values will be between -1 and 1.