Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting opacity for selected elements does not make them see through #1320

Open
hamza-hajji opened this issue Jan 6, 2024 · 1 comment
Open
Labels
duplicate This issue or pull request already exists

Comments

@hamza-hajji
Copy link
Contributor

hamza-hajji commented Jan 6, 2024

Describe the bug

If I set an element as selected and set its opactiy, it is not see through

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://xeokit.github.io/xeokit-sdk/examples/buildings/#xkt_vbo_Duplex
  2. Set an element as selected entity.selected = true
  3. Set is opacity to 0.5
  4. It's opaque

Expected behavior

In 2.4.x, it is see through, but that behavior changed in 2.5.x

image

Screenshots

viewer.scene.input.on("mousedown", (coords) => {
  const hit = viewer.scene.pick({
    pickSurface: true,
    canvasPos: coords,
  });

  if (hit) {
    hit.entity.selected = true;
    hit.entity.opacity = 0.5;
  }
});

image

@xeolabs
Copy link
Member

xeolabs commented Jan 18, 2024

This is a duplicate of #1335

It's only happening for batched triangle geometries using VBO scene representation.

A workaround for now is to enable data textures, for which this does not happen - see this example: https://xeokit.github.io/xeokit-sdk/examples/buildings/#xkt_dtx_RACHouse

@paireks paireks added the duplicate This issue or pull request already exists label Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants