Comments (5)
the source file "vendor/three/build/three.module.js" is wrong.
from discoverthreejs-site.
I agree that the source file "vendor/three/build/three.module.js" looks wrong. It looks like html. But I cannot find where it is referenced in the source code anywhere. In fact, after finding a fix for the cdn.skypack.dev version problem, I removed the vendor/ directory entirely and suffered no ill effects. Code appeared to work the same.
from discoverthreejs-site.
I found that if I replaced 0.136.2 with 0.149.0, I could run MOST of the code examples. However, I also found a compatibility problem with the import in the controls.js file of those code examples that have controls.js (not all do).
import { OrbitControls} from 'https://cdn.skypack.dev/[email protected]/examples/jsm/controls/OrbitControls.js';
causes a Chrome/Chromium 118.0.5993.88 browser instance to complain in its console (and no scene is displayed) thus:
Uncaught TypeError: Failed to resolve module specifier "three". Relative references must start with either "/", "./", or "../".
Seems that the problem is somewhat unique to cdn.skypack.dev as replacing it with esm.sh or jspm.dev in the offending import
results in the scene being correctly displayed.
e.g.
import { OrbitControls} from 'https://esm.sh/[email protected]/examples/jsm/controls/OrbitControls.js';
from discoverthreejs-site.
I guess I will work on replacing cdn.skypack.dev and changing the version number to 0.149.0 in my fork.
It would probably be wise to make it clear in the text of the site and/or the code examples themselves that we are using 0.149.0 which is not the most recent version.
from discoverthreejs-site.
Also begs the question "How about examples which use the npm import style for running locally?"
from discoverthreejs-site.
Related Issues (20)
- BUG
- BoxGeometry instead of BoxBufferGeometry HOT 1
- Driving example for Three.js HOT 2
- Welcome to the Discover Three.js Discussion Forum HOT 1
- Imports broken since three.js update HOT 7
- [BUG, ERROR] Add "precision: 'lowp/mediump/highp'" to renderer HOT 2
- VectorKeyframeTrack references ".material.opacity" instead of ".position" HOT 1
- [ENHANCEMENT]Do we have a chinese version translation of this book? HOT 10
- [BUG, ERROR]Get error when do npm start. HOT 11
- [QUESTION] Better alternatives for implementing the Cube tick method HOT 1
- [BUG, ERROR] Mirror example in Camera Controls is not found
- [BUG, ERROR] iFrames don't load on Firefox HOT 5
- [ENHANCEMENT] three.js/examples/js has been removed
- BoxBufferGeometry replacement for BoxGeometry
- Tiny error - Chessboard image
- [ENHANCEMENT] French translation
- .physicallyCorrectLights has been removed
- [TYPO/BUG] Backslash added before * of namespace imports
- BUG Broken "How to Run Things Locally" link.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from discoverthreejs-site.