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

improve caching of resources (f.e. re-use textures from the same URL across elements instead of making one per element) #289

Open
trusktr opened this issue Nov 21, 2023 · 0 comments

Comments

@trusktr
Copy link
Member

trusktr commented Nov 21, 2023

Currently all resources are on a per-element basis. We should be smarter, and cache resources from the same URL when we can. For example,

  • for any textures, we only need one for a particular URL, and it can be shared with all elements that use the same URL.
  • for model loaders, we can load a model once, then perhaps clone it per element (because elements may want to modify the loaded model objects)
  • etc

What about an escape hatch? What if someone wants to modify a loaded texture by reaching into the underlying .three object, and manually change some texture pixels?

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

No branches or pull requests

1 participant