3.0.4 • Published 19 days ago
yoga-layout v3.0.4
yoga-layout
This package provides prebuilt WebAssembly bindings for the Yoga layout engine.
See more at https://yogalayout.dev
Usage
import {Yoga, Align} from 'yoga-layout';
const node = Yoga.Node.create();
node.setAlignContent(Align.Center);
Objects created by Yoga.<>.create()
are not automatically garbage collected and should be freed once they are no longer in use.
// Free a config
config.free();
// Free a tree of Nodes
node.freeRecursive();
// Free a single Node
node.free();
Requirements
yoga-layout
requires a toolchain that supports ES Modules and top-level await.
If top-level-await is not supported, use the yoga-layout/load
entry point instead. This requires to load yoga manually:
import {loadYoga, Align} from 'yoga-layout/load';
const node = (await loadYoga).Node.create();
node.setAlignContent(Align.Center);
3.0.4
19 days ago
3.0.3
26 days ago
3.0.2
2 months ago
3.0.1
2 months ago
3.0.0
2 months ago
2.0.1
6 months ago
2.0.0-beta.2
10 months ago
2.0.0-beta.1
10 months ago
2.0.0
9 months ago
1.9.3
6 years ago
1.9.2
6 years ago
1.9.1
6 years ago
1.9.0
6 years ago
1.8.4
6 years ago
1.8.3
6 years ago
1.8.2
6 years ago
1.8.1
6 years ago
1.8.0
6 years ago
1.6.0
7 years ago
1.5.0
7 years ago
1.2.0
7 years ago
1.0.1
7 years ago