Need to use Three.js to create a large number of graphics (can not be destroyed) resulting in insufficient memory, is there a way to solve the problem

scene: several engineering paving vehicles need to draw the path trace in real time, because the trace needs to be used in the back roller, so the trace cannot be destroyed, but the page disappears and crashes out of memory in a short time. Is there any way to solve this performance problem?


path trace should be a large number of repetitive obj bars, defining a cache class. Calculate the list,O (n) complexity of the trace coordinates that the scene needs to render mark the obj that does not need to be rendered in the cache and pop the rendered coordinates in the cache from the trace coordinates list. If the trace coordinates list and de-cache class apply for marking as unrendered obj and give the coordinates, if the cache is insufficient, if the memory is still not enough, save memory by increasing the length of a single path trace obj, or reducing the complexity of the texture.

Menu