@babylonjs/viewer
Version:
The Babylon Viewer aims to simplify a specific but common Babylon.js use case: loading, viewing, and interacting with a 3D model.
26 lines (23 loc) • 1.08 kB
JavaScript
import { F as FlowGraphBlock } from './KHR_interactivity-Bmb38TjL.esm.js';
import { R as RichTypeAny } from './declarationMapper-rcGCdcDP.esm.js';
import './index-FzOfPXLV.esm.js';
import './objectModelMapping-CJnQ6at_.esm.js';
/**
* a glTF-based FlowGraph block that provides arrays with babylon object, based on the glTF tree
* Can be used, for example, to get animation index from a glTF animation
*/
class FlowGraphGLTFDataProvider extends FlowGraphBlock {
constructor(config) {
super();
const glTF = config.glTF;
const animationGroups = glTF.animations?.map((a) => a._babylonAnimationGroup) || [];
this.animationGroups = this.registerDataOutput("animationGroups", RichTypeAny, animationGroups);
const nodes = glTF.nodes?.map((n) => n._babylonTransformNode) || [];
this.nodes = this.registerDataOutput("nodes", RichTypeAny, nodes);
}
getClassName() {
return "FlowGraphGLTFDataProvider";
}
}
export { FlowGraphGLTFDataProvider };
//# sourceMappingURL=flowGraphGLTFDataProvider-C6mlDuM2.esm.js.map