DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
FREEDOM251

Freedom251 › Blog › DRACO

Cutting a Three.js Product Configurator from 16.7 MB to 2.4 MB: What the Case Study Teaches

By Freedom251 Team · · 5 min read

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Md. Raju Ahmed, a freelance real-time 3D developer, reports shrinking a sneaker configurator’s GLB from 16.7 MB to 2.4 MB, an 86% reduction. He also reports 60 fps on a mid-range Android phone, with colorway and material changes handled client-side and no page reloads. These are the author’s figures for his own project. We haven’t reproduced them, and they aren’t a Three.js guarantee. The reusable part is his method: find out which data dominates the file, shrink that, load only the decoders the file needs, and test on weak hardware.

What the case study describes

Ahmed’s configurator lets users orbit a sneaker, switch colorways and materials, and watch the price update. The starting GLB was 16.7 MB. An inspection showed that textures were the large majority of the file. Geometry was a meaningful but smaller share, and everything else was negligible. The publication date of his DEV Community article could not be confirmed.

As an Amazon Associate I earn from qualifying purchases.

“Measure the split before optimising.” — Md. Raju Ahmed

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

That sentence is the thesis. A texture-heavy file will not be fixed by a geometry compressor, so the right first step depends on what the file contains.

#1 Best Overall
Bambu Lab P1S Combo, P1S 3D Printer and AMS, Multi-Color 3D Printing | MakerWorld Model Library, Multi-Color 3D Printing,High Speed & Precision CoreXY 3D Printer,Auto Bed Leveling, Ready-to-Use
  • Up to 16 Colors: Bring your designs to life with vibrant multi-color/multi-material printing capabilities, perfect for showcasing your creativity. Note: Connecting Bambu Lab AMS is required.
  • 500mm/s and 20000 mm/s² Acceleration True High Speed: Don't wait around for your masterpieces. Lightning-fast printing speed lets you focus on creating, not waiting.
  • Enclosed Design: Fully enclosed body improves print performance for advanced filaments. Automatic Bed Leveling: Say hello to high-quality, successful prints. Auto bed leveling makes 3D printing such an easy thing.
  • Set Up in 15 Minutes: Spend more time printing and less time setting up. User-friendly design ensures a hassle-free assembly experience for all skill levels.
  • Supported Filament: Ideal: PLA, PETG, TPU, PVA, PET ABS, ASA; Capable : PA, PC; Not Recommended: Carbon/Glass Fiber Reinforced Polymer.

Step 1: Inspect the GLB before touching it

Ahmed uses glTF-Transform’s inspector to list meshes, materials and textures with their sizes:

npx gltf-transform inspect model.glb

Read the output as a budget. If textures dominate, as they did in his file, work on image dimensions and encoding. If geometry dominates, work on mesh compression. Don’t apply a technique because it is popular. Apply it to the component that actually carries the bytes.

Step 2: Compress geometry with Draco, carefully

Draco acts on geometry only. Three.js documents it as mesh and point-cloud compression. Standalone Draco data carries no materials, textures, animation or node hierarchy. In a glTF it is one extension inside a larger file.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Sale
FLASHFORGE Adventurer 5M 3D Printer with Fully Auto Leveling, Max 600mm/s High Speed Printing, 280°C Direct Extruder with 3S Detachable Nozzle, CoreXY All Metal Structure, Print Size 220x220x220mm
  • One-Click Automatic Printing: Experience hassle-free 3D printing with the Adventurer 5M Series. Enjoy automatic bed leveling for flawless first layers, ensuring consistent adhesion and saving time with no manual adjustments required.
  • 12X Ultra Fast Printing: Featuring a CoreXY structure with 600mm/s travel speed and 20000mm/s² acceleration, the AD5M maximizes efficiency, reduces production cycles, and ensures high precision, making it ideal for rapid prototyping and mass production.
  • Smart and Efficient Design: Quick 3-second nozzle changes, a high-flow 32mm³/s nozzle, and fast 35-second warm-up to 200°C deliver stable high-speed printing. Its dual-sided PEI platform and versatile options provide easy removal and adaptability for various creative projects.
  • Superior Print Quality & Adaptability: Combines a 280°C direct drive extruder with dual-fan cooling and vibration compensation. Includes a standard 0.4mm nozzle and accepts optional sizes from 0.25mm to 0.8mm to fit various printing needs.
  • Real-Time App Monitoring: Monitor print progress, adjust settings, and receive instant status alerts remotely with the Flash Studio. Smart mobile control ensures a seamless, effortless printing experience anytime, anywhere.

Quantization settings

Ahmed’s example quantizes attributes separately: 14 bits for positions, 10 for normals, 12 for texture coordinates and 8 for color. These are his example values, not universal recommendations. He says the right tolerance depends on the asset’s scale and on how close the camera can get. His advice is to step the values down gradually and check for visible damage, such as faceting on curved surfaces or shifting UVs, at maximum zoom.

Loader setup

Three.js’s GLTFLoader needs a DRACOLoader attached through setDRACOLoader to read Draco-compressed glTF. Reuse one loader instance rather than creating several. Three.js chooses a JavaScript or WebAssembly decoder depending on what the browser supports.

const draco = new DRACOLoader();
draco.setDecoderPath('/decoders/draco/');
const loader = new GLTFLoader();
loader.setDRACOLoader(draco);

Host the decoder yourself

The decoder files are a separate runtime dependency. Ahmed recommends serving and caching them yourself instead of relying on a third-party CDN you don’t control. The threejsassets setup guide gives the same advice: copy the decoder files from your installed Three.js version and serve them from your app. Keeping them in step with that version avoids mismatches.

Rank #3
Bambu Lab P1S 3D Printer, Ready-to-Use FDM 3D Printer | Beginner-Friendly Ecosystem with MakerWorld Model Library, Enclosed CoreXY, High Speed & Precision Printing
  • Up to 16 Colors: Bring your designs to life with vibrant multi-color/multi-material printing capabilities, perfect for showcasing your creativity. Note: Connecting Bambu Lab AMS is required.
  • 500mm/s and 20000 mm/s² Acceleration True High Speed: Don't wait around for your masterpieces. Lightning-fast printing speed lets you focus on creating, not waiting.
  • Enclosed Design: Fully enclosed body improves print performance for advanced filaments. Automatic Bed Leveling: Say hello to high-quality, successful prints. Auto bed leveling makes 3D printing such an easy thing.
  • Set Up in 15 Minutes: Spend more time printing and less time setting up. User-friendly design ensures a hassle-free assembly experience for all skill levels.
  • Supported Filament: Ideal: PLA, PETG, TPU, PVA, PET ABS, ASA; Capable : PA, PC; Not Recommended: Carbon/Glass Fiber Reinforced Polymer.

Step 3: Right-size and compress textures

For this file, Ahmed says texture work separated the partial saving from Draco from the final 2.4 MB. His approach depends on the configurator’s constraints: the orbit is bounded and zoom has a maximum, so maps only need the detail that can actually reach the screen.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Base color: keep the most resolution here, since it is the most visible map.
  • Normal maps: compress with care, because compression artifacts show up in lighting.
  • Roughness, metalness and ambient occlusion: consider smaller maps where your scene allows.

KTX2 and Basis Universal

Ahmed encodes textures as KTX2 with Basis Universal. His main caution is that download size is not GPU memory. By his example, a 2048×2048 texture decoded as raw RGBA occupies 16 MB of GPU memory, however small the JPEG was on the wire. This figure is his explanatory example, not a benchmark we gathered. The point stands: put GPU memory in the budget and test on lower-powered phones.

Three.js needs a KTX2Loader for these textures. The threejsassets decoder guide says to call detectSupport(renderer) before loading.

Rank #4
Bambu Lab P2S Combo, P2S 3D Printer & AMS 2 Pro, Multi-Color 3D Printing | MakerWorld Model Library, Multi-Color 3D Printing, High-Speed CoreXY 3D Printer,AI Error Detection
  • High-Speed Precision: The Bambu Lab P2S 3D printer prints up to 600 mm/s while maintaining exceptional accuracy. With the PMSM Servo Extruder and Active Flowrate Compensation, every layer of your printed object stays sharp and smooth, delivering flawless corners and consistent results.
  • Ready to Print in 15 Minutes: Set up your P2S FDM 3D printer and start printing in just 15 minutes. With AI failure detection, quick-swap nozzles, and automatic calibration, this 3D printer makes professional-grade 3D printing effortless, even for beginners.
  • Effortless Multi-Color Printing: The AMS 2 Pro enables seamless multi-color/multi-material 3D printing. It features built-in filament drying at up to 65 °C, keeping every spool ready for flawless prints. (Note: The P2S 3D printer does not support multi-color printing; Combo version required.)
  • Smart Airflow for Any Filament: The Adaptive Airflow System automatically balances cooling and heat retention—keeping overhangs crisp with cool air, or maintaining a 50 °C chamber for engineering-grade materials. A carbon filter ensures clean, safe air while you print.
  • Limitless Creativity, Seamless Workflow: Explore over one million 3D models on MakerWorld and bring them to life with a smooth, unified workflow using Bambu Studio, Bambu Handy, and your FDM 3D printer, from design to finished print.
const ktx2 = new KTX2Loader();
ktx2.setTranscoderPath('/decoders/basis/');
ktx2.detectSupport(renderer);
loader.setKTX2Loader(ktx2);

Which decoders does your file actually need?

Configure only the extensions the asset uses. Extra decoders add files to host and maintain for no benefit.

Asset contains What it changes Loader wiring
Draco geometry Mesh data size DRACOLoader via setDRACOLoader; self-hosted decoder files
KTX2/Basis textures Texture encoding and GPU footprint Configured KTX2Loader; call detectSupport(renderer) before loading
Meshopt geometry (EXT_meshopt_compression) Mesh data size, as an alternative to Draco setMeshoptDecoder
Resized textures, no special extension Pixel dimensions None

Draco and KTX2 touch different parts of the file and can be combined when the GLB uses both. Meshopt is a separate geometry option, not an add-on to Draco.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Compare options on five axes

  1. Which data the approach changes: geometry, texture dimensions or texture encoding.
  2. Transfer size versus decoded GPU memory.
  3. Visual quality at the configurator’s maximum zoom.
  4. Runtime decoder requirements and their cost.
  5. Behavior on the weakest device you support.

Compression trades file size for decode work and possible artifacts, so treat the case study’s numbers as an outcome, not a preset.

Best Value
FLASHFORGE Adventurer 5M Pro 3D Printer with 1 Click Auto Printing System | 600mm/s High-Speed, Quick Detachable 280°C Nozzle, Core XY All-Metal Structure, Multi-Functional 220x220x220mm 3D Printer
  • 600mm/s Speed & CoreXY Structure — Powered by an all-metal CoreXY frame and 20,000mm/s² acceleration, Adventurer 5M Pro reaches speeds up to 600mm/s. Integrated vibration compensation algorithms eliminate ghosting and ringing for smooth, high-precision surface finishes.
  • 3-Second Quick-Swap Nozzle & Auto Leveling — Features a tool-free, quick-release nozzle mechanism for effortless 3-second replacements across multiple sizes (0.25/0.4/0.6/0.8mm). One-click full auto-leveling ensures precise bed calibration and a perfect first layer every time.
  • Dual Filtration System & Quiet Enclosure — Built with an integrated dual filtration system and a fully enclosed chamber to ensure a clean printing environment and thermal stability. Powered by low-noise motion control, it operates quietly under 50dB for seamless home, office, or classroom use.
  • 280°C High-Temp Extruder & Broad Material Compatibility — With a 280°C max nozzle temperature and a 110°C heated bed, it reliably prints engineering materials like ABS, ASA, and PETG-CF, as well as standard PLA and PETG.
  • Smart Camera & Mobile Control — Features a built-in camera for real-time monitoring and time-lapse video creation. Monitor progress, adjust settings, and receive instant status alerts via Flash Studio. Integrated with filament detection, power loss recovery, and a 4.3-inch touchscreen for effortless operation.

Keeping detail when the color changes

Ahmed found that multiplying a tint over the base-color map dulled the fabric weave and baked shadows. His fix separates luminance from chroma. It reapplies the chosen color while keeping each texel’s brightness, and it blends near-neutral texels back toward their original values. That keeps white midsoles and metal eyelets neutral. This is one configurator’s solution, not a universal shader recipe, so check each material and colorway by eye.

Optional: optimizing in the browser

If you’d rather not use the command line, threejsassets documents a Studio tool that prunes, deduplicates, welds, quantizes, optionally applies Draco, shows before/after reports and exports a GLB. Its documentation says the GLB is processed in the browser without uploading the model to a server. That’s a vendor claim we haven’t independently tested. The free glTF-Transform route above does the same kind of work.

Verification checklist

  • Re-run the inspection on the optimized file and confirm the dominant component actually shrank.
  • Compare original and compressed models at maximum zoom, in every colorway.
  • Confirm each loader you attached matches an extension the file uses.
  • Serve decoder files from your own stable path and cache them.
  • Test frame rate and memory on a mid-range or older phone, as Ahmed did with his 60 fps result, not just a desktop.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

DRACOGLB optimizationglTF-TransformKTX2Three.jsWebGL performance

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.