molstar / molstar

A comprehensive macromolecular library
https://molstar.org
MIT License
599 stars 140 forks source link

does tests/browser/render_spheres work? #1100

Closed toloudis closed 1 month ago

toloudis commented 1 month ago

When I try to run tests/browser/render_spheres it doesn't show anything. The other tests (like render_lines for example) seem to work. I'm trying to use Canvas3D to draw a group of spheres and thought this seemed like a good minimal example.

dsehnal commented 1 month ago

These are not mesh, but rather impostor spheres that cannot be combined with other geometry easily. Something is indeed broken in this examples and I am sure @arose will likely know what faster than me. The impostors seem to work fine for rendering ball and stick representation in the normal viewer, so this might just be some missing setting/wrong default value during some changes for 4.0 release.

In the meantime, I think using the mesh examples will achieve the same goal, e.g. with MeshBuilder.addPrimitive(builderState, Mat4.fromScaling(Mat4(), Vec3.create(0.1, 0.1, 0.1)), Sphere(2));

arose commented 1 month ago

it's a bug related to the LOD system, will fix

arose commented 1 month ago

fixed with ebe727ba2469f86dc414ee8a68373cdb71019bdf