@tasamo23/rusty_life
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

Usage guide

To use this package, the recommended setup looks like this:

const tickSpeed = 100;

const universe = Universe.new(64, 64);
universe.render()

const renderLoop = () => {
    universe.tick()
    universe.render()
    setTimeout(renderLoop, tickSpeed)
}

setTimeout(renderLoop, tickSpeed)

Alternatively, the setTimeout calls can be replaced by requestAnimationFrame(renderLoop); if you want the maximum tick speed and performance.

Don't forget to import Universe from the package!

For a detailed description of the project, check out my GitHub Repo on https://github.com/tasamo23/rusty_life👍

Package Sidebar

Install

npm i @tasamo23/rusty_life

Weekly Downloads

1

Version

1.1.0

License

MIT

Unpacked Size

65.2 kB

Total Files

7

Last publish

Collaborators

  • tasamo23