0.0.0-rc-2 • Published 2 years ago

@gami/dia v0.0.0-rc-2

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

Dia

Note: Still under development. Building the editor.

An event-based dialogue engine. See demo at https://dia.joeylene.com/

Installation

Install Dia using yarn or npm:

npm install --save @gami/dia

# or
yarn add @gami/dia

Usage

// Initialize Dia and pass your dialogue definitions
const dia = new Dia(DEFS);

// Listen for changes in the dialogue
dia.on("change", (dialogue) => {
  console.log(dialogue);
});

// Get a character you want to start a dialogue with
const character = dia.characters.get(CHARACTER.abby.id);

// Start a dialogue with the character
<button onClick={() => character.start()}>
  Start Dialogue
<button>

License

ISC © Joeylene Rivera

0.0.0-rc-2

2 years ago

0.0.0-rc-1.2

2 years ago

0.0.0-rc-1.1

2 years ago

0.0.0-rc-1

2 years ago