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

Adding event to primitive test/nuxt lagging model #797

Open
5 tasks done
Adham2023 opened this issue Aug 12, 2024 · 4 comments
Open
5 tasks done

Adding event to primitive test/nuxt lagging model #797

Adham2023 opened this issue Aug 12, 2024 · 4 comments
Labels
pending-triage Ticket is pending to be prioritised waiting for author

Comments

@Adham2023
Copy link

Describe the bug

I have added event, for example: @double-click="onDoubleClick" it make model lagging:

Recording.2024-08-12.144048.mp4

Reproduction

https://pre-release.3d-orthoplan.com/6698f67471af3db950bcd1a6

Steps to reproduce

No response

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (32) x64 Intel(R) Core(TM) i9-14900K
    Memory: 31.75 GB / 63.75 GB
  Binaries:
    Node: 20.15.1 - C:\Program Files\nodejs\node.EXE
    npm: 10.7.0 - C:\Program Files\nodejs\npm.CMD
    pnpm: 9.5.0 - ~\AppData\Roaming\npm\pnpm.CMD
  Browsers:
    Edge: Chromium (127.0.2651.74)
    Internet Explorer: 11.0.22621.3527

Used Package Manager

pnpm

Code of Conduct

@Adham2023
Copy link
Author

It is a bit not noticable when you not open dev-panel of browser, why it becomes much more laggy when you open dev-panel of the browser ?

@alvarosabu
Copy link
Member

Hi @Adham2023 could you please provide me which versions of are you using.

  • Core
  • Nuxt
  • Cientos

Also, how many polygons the model has?

Thanks

@alvarosabu alvarosabu added waiting for author pending-triage Ticket is pending to be prioritised labels Aug 21, 2024
@alvarosabu
Copy link
Member

Hi, @Adham2023. I am just checking in to see if you can give me more info about the model you are using and the versions, we have other reports of pointer events lagging when using models with several nodes

@andretchen0
Copy link
Contributor

@Adham2023

Currently, you should be able to work around the slowdown by removing the events from the high-poly model. Instead attach the events to a hitbox – a placeholder Mesh with a simpler geometry that occupies approximately the same space as the high-poly model.

The hitbox can't be an ancestor of the high-poly model or the high-poly model will still also be hittest against. The hitbox can be a sibling or a descendant of the high-poly model.

There's an issue with Tres v4 events, where any events attached to an object (or its ancestors) leads to the object being hittest for all incoming events (e.g. 'pointermove'), even it it doesn't respond to that particular event, e.g. here, only @double-click is attached.

There is a PR (#844) underway that will address the issue. Scheduled for Tres v5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending-triage Ticket is pending to be prioritised waiting for author
Projects
Status: No status
Development

No branches or pull requests

3 participants