xeokit / xeokit-sdk

Open source JavaScript SDK for viewing high-detail, full-precision 3D BIM and AEC models in the Web browser.
https://xeokit.io
Other
694 stars 279 forks source link

Viewer param pickSurfacePrecisionEnabled #1530

Open g-rodigy opened 2 weeks ago

g-rodigy commented 2 weeks ago

According the docs https://xeokit.github.io/xeokit-sdk/docs/class/src/viewer/Viewer.js~Viewer.html Viewer param pickSurfacePrecisionEnabled set to true and do pick like this:

const viewer = new Viewer({
    canvasId: "myCanvas"
});

viewer.pickSurfacePrecisionEnabled = true;

viewer.scene.input.on('click', (coords) => {
    const hit = viewer.scene.pick({
    canvasPos: coords,
    pickSurfacePrecision: true,
    pickSurface: true,
    snapToEdge: true,
    }, new PickResult())

    // hit.pickSurfacePrecision is false
})

Setting param here https://github.com/xeokit/xeokit-sdk/blob/e842ad84488ae439ef9a987615eff504ff5b5636/src/viewer/Viewer.js#L118 but not used in Scene class or I not found.

Does this param works and/or why pickSurfacePrecision is false?