0.6.12 • Published 2 years ago

vroum v0.6.12

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

The initial goal of this library was to provide a way to define reusable components that could be painted on a canvas at 60fps.

It then evolved into something less specific and now tries to provide the following features:

  • Abstract specific behaviors by encapsulating them in reusable node classes.
  • Connect these nodes as a tree to compose them into more complex behaviors.
  • Schedule actions precisely by defining tasks that run on a timed loop.

Example

The following program will run a loop and log the elapsed time at regular intervals.

import { Loop, Task } from "vroum";

class App extends Loop {
  build() {
    return [LogTask.new()]
  }
}

class LogTask extends Task {
  delay = 500; // wait 500ms before writing the first log
  duration = 1000; // then log on every frame for 1s
  repeat = 3; // repeat the log cycles only 3 times
  interval = 2000; // but wait 2s inbetween cycles

  tick() {
    console.log(`${this.Loop.elapsedTime}ms have passed.`)
  }
}

App.start();

Installation

Run npm install vroum to install the library in your project.

You can them import its contents the regular way: import { Node, Task, Loop } from "vroum"

Documentation

The typedoc is accessible at the following address: https://jfalxa.gitlab.io/vroum

0.6.12

2 years ago

0.5.10

2 years ago

0.5.11

2 years ago

0.6.6

2 years ago

0.6.9

2 years ago

0.6.8

2 years ago

0.6.10

2 years ago

0.6.11

2 years ago

0.5.4

2 years ago

0.5.3

2 years ago

0.3.5

2 years ago

0.5.6

2 years ago

0.3.8

2 years ago

0.5.5

2 years ago

0.3.7

2 years ago

0.5.0

2 years ago

0.3.2

2 years ago

0.3.1

2 years ago

0.5.2

2 years ago

0.5.1

2 years ago

0.3.3

2 years ago

0.5.7

2 years ago

0.5.9

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.6.3

2 years ago

0.6.2

2 years ago

0.6.5

2 years ago

0.6.4

2 years ago

0.4.0

2 years ago

0.6.1

2 years ago

0.6.0

2 years ago

0.4.2

2 years ago

0.1.10

2 years ago

0.1.9

2 years ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago

0.0.23

2 years ago

0.0.22

2 years ago

0.0.21

2 years ago

0.0.20

2 years ago

0.0.19

2 years ago

0.0.18

2 years ago

0.0.17

2 years ago

0.0.11

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago