threejs-errors-performance

Diagnose and optimize Three.js WebGL scene performance issues.

4|Updated Apr 14, 2026
One-click install
npx skills add https://github.com/Bailipa/EZTor_FULLBLOOD --skill threejs-errors-performance-bailipa
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: threejs-errors-performance
Source: https://github.com/Bailipa/EZTor_FULLBLOOD/tree/main/.opencode/skills/threejs/threejs-errors/threejs-errors-performance
Command: npx skills add https://github.com/Bailipa/EZTor_FULLBLOOD --skill threejs-errors-performance-bailipa

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Three.js scenes often suffer from performance bottlenecks such as low FPS, memory leaks, excessive draw calls, and high GPU memory usage. This Skill provides a structured approach to detect and prevent common pitfalls like disposing objects incorrectly, creating objects in render loops, and failing to use InstancedMesh where appropriate.

Core Features & Use Cases

  • Disposal patterns: ensures proper cleanup of geometries, materials, and textures to prevent GPU memory growth.
  • Draw call optimization: promotes InstancedMesh and geometry merging where safe to reduce GPU draw calls.
  • LODs and texture strategies: guides Level of Detail usage and texture compression to maintain visual fidelity with performance.
  • Profiling and tooling: leverages renderer.info and Stats.js for runtime monitoring and performance diagnosis.

Quick Start

Begin by auditing your Three.js scene to identify bottlenecks, then apply disposal patterns, InstancedMesh usage, LOD, and texture compression to achieve smoother performance.

Frequently Asked Questions about threejs-errors-performance

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix Three.js memory leaks and reduce GPU memory growth?

Fix Three.js memory leaks by enforcing proper disposal patterns for geometries, materials, and textures. This prevents GPU memory growth and ensures stable WebGL performance when objects are removed from the scene.

How do I reduce draw calls in a Three.js WebGL scene?

Reduce draw calls in Three.js by implementing InstancedMesh for repeated objects and merging geometries where safe. These techniques minimize GPU overhead and significantly improve runtime FPS.

What is the best way to profile Three.js performance bottlenecks?

Profile Three.js performance bottlenecks by monitoring runtime data with renderer.info and Stats.js. These tools provide structured diagnosis of draw calls, memory usage, and GPU limits.

When do I need to use LOD and texture compression in Three.js?

Use LOD and texture compression in Three.js when scenes require high visual fidelity without sacrificing speed. These strategies manage geometry complexity and memory to maintain optimal performance.

Why does my Three.js scene have low FPS after adding many objects?

Low FPS in Three.js often results from excessive draw calls and creating objects inside the render loop. Apply InstancedMesh usage and proper disposal patterns to optimize GPU usage.

Does this Three.js optimization approach work with older versions like r150?

This Three.js optimization approach targets projects using r160 and above. Applying disposal patterns, InstancedMesh usage, and LOD strategies to older versions may require manual adjustments.