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.

24 lines (22 loc) 964 B
function forMesh(ignore, mesh) { if (Array.isArray(ignore)) { return ignore.find((entry) => entry.mesh === mesh) ?? null; } return ignore.mesh === mesh ? ignore : null; } function prepareIgnoredCandidates(meshes, ignore, filter, advanced) { const candidates = []; let deformed = false; for (const mesh of meshes) { const entry = forMesh(ignore, mesh); if (mesh.pickable === false || entry && entry.thinInstanceIndex === void 0 && entry.thinInstanceRange === void 0 || filter && !filter(mesh)) { continue; } candidates.push({ mesh, ignore: entry }); deformed ||= !!(mesh.morphTargets || mesh.skeleton) && !!mesh._cpuPositions; advanced ||= !!mesh.vat || !!mesh.thinInstances || !!mesh._gpu._vbLayout?._p || entry?.thinInstanceIndex !== void 0 || !!entry?.thinInstanceRange; } return { candidates, deformed, advanced }; } export { prepareIgnoredCandidates }; //# sourceMappingURL=picking-ignore-C4vl7eP4.esm.js.map