-
-
Notifications
You must be signed in to change notification settings - Fork 36.3k
Open
Description
Description
When using the GLTFLoader with a glTF that has textures, and with the three.js Cache enabled its possible to make the memory consumption grow until the client runs out of memory.
This seems to be because when the texture is loader the URL is randomly generated, therefore a Cache hit will never happen.
First load (5 image-bitmaps created):

Second load of the helmet (10 image-bitmaps created):

I first observed this on mobile as it only takes a few model changes for the memory limit to be reached and for the site to crash.
Reproduction steps
- Using webgl_loader_gltf.html add line
THREE.Cache.enabled = true; - Load the Damaged Helmet and take a heap snapshot
- Load a different model e.g. the Cube
- Go back to the Damaged Helmet and take another heap snapshot, and see that the Cache map has grown in size
Screenshots
No response
Version
r182
Device
all
Browser
all
OS
all
Reactions are currently unavailable

