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

Wireframe spheres not selectable? #966

Closed
spadavec opened this issue Jan 30, 2023 · 0 comments
Closed

Wireframe spheres not selectable? #966

spadavec opened this issue Jan 30, 2023 · 0 comments

Comments

@spadavec
Copy link

I have a number of testSpheres in a stage that have different colors:

testSpheres.forEach((sphere: any) => {
      const { X, Y, Z, sphereId} = sphere;
      if (p4type === 'A') {
        shapes.addSphere([X, Y, Z], [0.87, 0.16, 0.2], 1, sphereId);
      } else if (p4type === 'B') {
        shapes.addSphere([X, Y, Z], [0.003, 0.59, 0.96], 1, sphereId);
      } else {
        shapes.addSphere([X, Y, Z], [0.97, 0.97, 0.99], 1, sphereId);
      }
    });

    const shapeComp: any = stage.addComponentFromObject(shapes);
    shapeComp.addRepresentation('buffer', { wireframe: true });

However, whenever I try to click on them in the stage, I can't seem to select the object itself:

    stage.signals.clicked.add((pp: any) => {
      const pid = _.get(pp, 'pid');
      console.log('this is the pid');
      console.log(pid);
      const sphereName = _.get(
        pp,
        'picker.shape._primitiveData.sphereName',
        []
      );

This will always return undefined. However, if I make them solid (e.g. wireframe : false) then I can select them. Is there a way around this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant