@0b5vr/automaton 中文文档教程
用于创意编码的动画引擎
最初是为 Shift 制作的,我的 WebGL 演示
你可能想要检查带有 GUI 的变体,automaton-with-gui
Examples
Install
Include directly
.min 构建被缩小。 否则它不会缩小并带有源映射。
.module
构建是 ESM。 否则就是 UMD。
如果你想使用 iife 来使用 UMD,那么一切都以 AUTOMATON
的名称公开到全局。
像这样的代码:
const { Automaton } = AUTOMATON;
const data = await ( await fetch( 'automaton.json' ) ).json();
const automaton = new Automaton( data );
// ...
npm
https://www.npmjs.com/package/@0b5vr/automaton
# npm install @0b5vr/automaton
yarn add @0b5vr/automaton
然后像这样的代码这个:
// const { Automaton } = require( '@0b5vr/automaton' );
import { Automaton } from '@0b5vr/automaton';
const data = await ( await fetch( 'automaton.json' ) ).json();
const automaton = new Automaton( data );
// ...
Docs
https://0b5vr.github.io/automaton/automaton/docs/
License
Animation engine for creative coding
Originally made for Shift, my WebGL demo
You might want to check the variant w/ GUI instead, automaton-with-gui
Examples
Install
Include directly
.min
builds are minified. otherwise it isn't minified and comes with source maps..module
builds are ESM. otherwise it's UMD.
If you want to use the UMD one using iife, everything is exposed onto global under the name AUTOMATON
.
Code like this:
const { Automaton } = AUTOMATON;
const data = await ( await fetch( 'automaton.json' ) ).json();
const automaton = new Automaton( data );
// ...
npm
https://www.npmjs.com/package/@0b5vr/automaton
# npm install @0b5vr/automaton
yarn add @0b5vr/automaton
then code like this:
// const { Automaton } = require( '@0b5vr/automaton' );
import { Automaton } from '@0b5vr/automaton';
const data = await ( await fetch( 'automaton.json' ) ).json();
const automaton = new Automaton( data );
// ...
Docs
https://0b5vr.github.io/automaton/automaton/docs/