Installation
Wilderness is free and open-source.
It can be used as an ES2015 module, required with commonjs or loaded with a script element.
To get Wilderness we can install the npm distribution:
yarn add wilderness
or
npm install --save wilderness
Alternatively we can link to (or download) the distribution from the unpkg CDN.
ES2015 module
import { shape, timeline, render, play } from 'wilderness'
commonjs
const { shape, timeline, render, play } = require('wilderness')
UMD
It's also possible to just drop a javascript file onto our page.
We can select either the development or production file from the dist
directory of the distribution. To understand the difference between the two files see the lesson development v production.
We then link to this file with a script
tag in our HTML layout.
<script src="https://unpkg.com/wilderness/dist/wilderness.production.js"></script>
We will then have access to the global Wilderness
object.
const shape = Wilderness.shape const timeline = Wilderness.timeline const render = Wilderness.render const play = Wilderness.play
Now that we have Wilderness all ready to go, it's about time we learned how to use it!