2.1.1 • Published 7 months ago

@atrament/web v2.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

Atrament

atrament-web is a browser build of atrament-core, a framework for choice-based games, built around inkjs.

If you want to make customized Atrament build, check out atrament-core.

If you are looking for example of a web application based on Atrament, check out atrament-web-ui.

Installation

npm install @atrament/web

or

<script src="https://unpkg.com/@atrament/web@2.1.1/umd/atrament.js"></script>

Usage

Initialization and game start:

import atrament from '@atrament/web';

atrament.init({
    applicationID: 'your-application-id',
    settings: {}
});

await atrament.game.init('/path/to', 'inkfile.ink.json');
await atrament.game.start();
atrament.game.continueStory();

State in components:

import { useStore } from '@nanostores/preact';

const gameState = useStore(atrament.store);

API Documentation

See Atrament core documentation.

Components

LICENSE

Atrament is distributed under MIT license.

Copyright (c) 2023 Serhii "techniX" Mozhaiskyi

Made with the support of the Interactive Fiction Technology Foundation

2.1.1

7 months ago

2.1.0

7 months ago

1.2.0

1 year ago

1.2.3

1 year ago

1.2.2

1 year ago

2.0.0

1 year ago

1.3.0

1 year ago

1.2.1

1 year ago

1.1.0

1 year ago

1.0.0

2 years ago

0.9.0

2 years ago