Installing lil-gui

Low-skilled user needs help, again:

I’ve scanned the two main references for the new user interface lil-gui (GitHub - georgealways/lil-gui: Makes a floating panel for controllers on the web. Works as a drop-in replacement for dat.gui in most projects. and https://lil-gui.georgealways.com/). I’m avoiding schooling myself on NPM use so would prefer to have a local copy of lil-gui as declared here:
import {GUI} from ‘…/…/examples/jsm/libs/lil-gui.module.min.js’;

Please tutor me on getting from available references to this last form. I’ve been through this once with dat.gui but somehow didn’t learn a complete lesson. :sweat_smile:

TBH, I don’t recommend this workflow. Please do not copy around library files.

I suggest you import them via URLs from a CDN or you setup a small build (something like GitHub - Mugen87/three-jsm: Minimal three.js project setup using ES6 modules and rollup.).

1 Like

Thanks for response. I will follow your advice.
Keep up the great work you and others do at threejs.

1 Like

How do you install lil-gui. When I npm install threejs I get the files for threejs but there is no ‘libs’ folder like in the examples. Where do you download these from?

CODE: import { GUI } from ‘three/addons/libs/lil-gui.module.min.js’;
CONSOLE: GET http://localhost:3000/jsm/libs/lil-gui.module.min.js net::ERR_ABORTED 404 (Not Found)

Obviously I get 404 because there is no ‘libs/lil-gui.module.min.js’

Hi @Michael_Romeo,

Maybe you need to reinstall / redownload your local copy of three, as you can see here the libs directory contains lil-gui.module.min.js

EDIT: http://localhost:3000/jsm/libs/lil-gui.module.min.js would not be the correct directory in essence, it would be three/examples/jsm/libs so maybe there’s a mistake in your code somewhere?