1.2.3 • Published 5 years ago
@drecom/scene-graph-mediator-rt v1.2.3
scene-graph-mediator-rt
This module converts both scene graph schema and runtime object each other. Each of converters should know runtime object schema, this module provides pixi.js importer/exporter by default.
The schema definition of scene graph is based on @drecom/scene-graph-schema .
Usage
For most simple example;
const importer = new SceneGraph.Importers.Pixi();
importer.import(scenegraphJson, (root) => stage.addChild(root));
Building custom import pipeline;
const importer = new SceneGraph.Importers.Pixi();
// create asset list to download
const assets = importer.createAssetMap(scenegraphJson);
// load if any asset is required
if (assets.size > 0) {
assets.forEach((asset) => PIXI.loader.add(asset));
PIXI.loader.load(() => importer.restoreScene(app.stage, schema));
} else {
importer.restoreScene(app.stage, schema);
}
See example directory for working example.
Remarks
To shrink runtime code volume, importer/exporter for each runtime may separated from this repository in the future.
1.2.3
5 years ago
1.2.2
5 years ago
1.2.1
5 years ago
1.2.0
5 years ago
1.1.8
5 years ago
1.1.6
5 years ago
1.1.5
5 years ago
1.1.4
5 years ago
1.1.3
6 years ago
1.1.2
6 years ago
1.1.1
6 years ago
1.1.0
6 years ago
1.0.6
6 years ago
1.0.5
6 years ago
1.0.4
6 years ago
1.0.3
6 years ago
1.0.2
6 years ago
1.0.1
6 years ago
1.0.0
6 years ago