brown-ccv / react-volume-viewer

Volume Viewer package for react based websites
MIT License
0 stars 0 forks source link

Utilize THREE caching #104

Closed RobertGemmaJr closed 2 years ago

RobertGemmaJr commented 2 years ago

three.js has it's own caching system when it comes to loading files: https://threejs.org/docs/#api/en/loaders/Cache

github-actions[bot] commented 2 years ago

Visit the preview URL for this PR (updated for commit 6021797):

https://volume-viewer--pr104-three-cache-e9u03446.web.app

(expires Thu, 19 May 2022 14:28:02 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

kmilo9999 commented 2 years ago

What file needs the line THREE.Cache.enabled= true; ?

RobertGemmaJr commented 2 years ago

What file needs the line THREE.Cache.enabled= true; ?

It's enabled automatically when we use THREE.TextureLoader, THREE.DataTexture, etc

Nice find! do you notice any improvements with this caching?

Nothing that I could tell just by eye but it definitely decreases the amount of data we're passing around which may end up being our bigger issue