Three.js autocomplete with VS Code

Hi,
I’m trying to re-start with three.js after a long break before I even got accustomed with it.
Last time I had managed to have autocomplete in VS Code which I consider the best choice, but I was using npm and some other things that most likely I don’t need.

So, I don’t need or want to:

  1. share the code,
  2. collaborate,
  3. have access to others’ code snippets and let them have access to mine,
  4. work with a remote server or via a home network (I prefer to work locally, at least for now),
  5. have node, git, mocha, chai, coffee beans or brownies.
    (I don’t even know what such stuff actually does, no one explains the pros and cons clearly up to a point that will make sense -not even those who make them(!), so I don’t want things that I don’t actually need to mess with my system and files …in public (with access to the web).
    I also don’t get the idea of frameworks for “testing js” (no one explains it). If I have to make the tests myself, then I don’t need anything else.

I just need autocomplete with VS Code locally (I know how to work locally) on a specific folder, and a way to easily update three.js manually (why not?) that’s all. So, is there a simple, straightforward way for that? (I also can’t believe that the word autocomplete has not been mentioned on this forum…)

Am I asking too …little? :slight_smile:

1 Like

I used this tutorial to add intellisense with Typings to VS Code.

You do need node.js installed so that you can use npm.

The final step:

Now with 1.x.x VSCode, we need to generate a jsconfig.json file in the root of the project folder by clicking the light bulb button at the bottom right.

doesn’t work, you’ll have to create jsconfig.json manually. Mine looks like:

{
  "typeAcquisition": {
    "include": [
      "three"
    ]
  },
  "compilerOptions": {
    "target": "ES6",
    "module": "es6"
  },
  "exclude": [
    "assets/js/build",
    "assets/js/build-min",
    "assets/js/vendor",
    "node_modules"
  ]
}

Auotocomplete can work properly just with the “All Autocomplete” VS Code extension, by opening just once in the editor the three.js file and whatever other file you want autocomplete to work with, BUT intellisense is allso required which cannot be provided by that extension…

I follow all the steps mentioned in the url, and also added the final step as you mentioned.
I couldn’t see the property pop like you.

I also tried with the all autocomplete extension, but the documentations are not popping up like you mentioned in the image.

Can you please provide some more insight how you did it?

Just replying myself back. It worked.

you can find out @type

Excuse me, my native language is Spanish, I would really appreciate it if you make a video showing the procedure so that intellicence works in VScode with Three.Js

I use this tutorial is very good :innocent: