1.0.0 • Published 2 years ago

pandemicjs v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

Pandemicjs

Pandemicjs is a simple pandemic simulation.

Image

Installation

npm i -D pandemicjs

or

yarn add -D pandemicjs

or

<script type="module">
  import { Pandemic } from 'https://cdn.jsdelivr.net/npm/pandemicjs@1.0.0/dist/index.esm.min.js'
</script>

Usage

<div class="world" style="height: 800px; width: 800px;"></div>
import { Pandemic } from 'pandemicjs'

new Pandemic(',world', {
  n: 800,
  fps: 30,
  play: false, // you can manipulate a virus source
  hospital: false,
  splashDistance: 30,
  infectionRate: 0.1,
  onsetPeriod: 100,
  antiBodyPeriod: 200
})