question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

JSM: Documentation for importable examples

See original GitHub issue

It’d be great to have ‘how to import this’ near the top of documentation for example files, as we add support for them. Like:

import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js';

We get enough questions here and in the forums where people are surprised something isn’t part of the core library, and this might help with some of that.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

4reactions
garyocommented, Apr 19, 2019

Not that my opinion necessarily carries any weight, but as a new three.js user, I’m writing 100% typescript and ES modules. I expect most new projects are at this point. Webpack and other tools can transpile back and add some polyfills for older browsers when needed (I think a lot of people care less & less – YMMV).

2reactions
mrdoobcommented, Apr 21, 2019

As far as I can tell, ‘polyfilling’ modules for IE11 is not so simple and would result in code that doesn’t demonstrate real-world use.

That being the case, do we still want to convert example HTML files to use ES modules?

I think so. Yes.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Import objects into Assets for Jira Service Management
Learn how to import multiple objects and object types into Assets for Jira Service Management.
Read more >
Importing examples jsm modules causes bundlers to bundle ...
Importing from three/examples/jsm/.../<module> causes bundlers (tested with rollup) to include the library twice (or multiple times).
Read more >
Loading Models - React Three Fiber Documentation
There are many types of 3D model extensions, in this page we will focus on loading the three most common ones: GLTF ,...
Read more >
Getting Started With Asset Management In Insight - YouTube
This video will take you through the steps needed to import your assets into Jira Service Management and create a custom field to...
Read more >
Insight Importers in Jira Service Management - YouTube
This video provides an overview on how to import objects in bulk from a file with Insight in Jira Service Management.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found