UNPKG

@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.

25 lines (22 loc) 764 B
import { c as createSkeletonFragment } from './skeleton-fragment-Dc_gcLMX.esm.js'; import { aP as MSH_HAS_SKELETON, aQ as MSH_HAS_SKELETON_8 } from './index-DMbDahsc.esm.js'; const pbrExt = { id: "skeleton", phase: "vertex", frag(ctx) { if (!(ctx._meshFeatures & MSH_HAS_SKELETON)) { return null; } return createSkeletonFragment((ctx._meshFeatures & MSH_HAS_SKELETON_8) !== 0); }, bind(ctx, entries, b) { const mesh = ctx._mesh; if (!(ctx._meshFeatures & MSH_HAS_SKELETON) || !mesh?.skeleton) { return b; } entries.push({ binding: b++, resource: mesh.skeleton.boneTexture.createView() }); return b; } }; export { createSkeletonFragment, pbrExt }; //# sourceMappingURL=skeleton-fragment-CT1ee-GR.esm.js.map