Open pflagerd opened 1 year ago
the source file "vendor/three/build/three.module.js" is wrong.
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.
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/three@0.149.0/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/three@0.149.0/examples/jsm/controls/OrbitControls.js';
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.
Also begs the question "How about examples which use the npm import style for running locally?"
Please report bugs, rendering errors, CSS problems, cross-browser issues and so on here. If you have found a mistake in the text, you can also report it here, although there's no need to report OS/browser details in that case.
Describe the bug When performing "Download as Zip" from IDE, zipped site contains references to https://cdn.skynet.dev/three@0.132.2 which does not exist. As of this date, references to https://cdn.skynet.dev/three produce 0.148.0 as the only option:
// Browser-Optimized Imports (Don't directly import the URLs below in your application!) export * from '/-/three@v0.148.0-ZdnPTf2EskNtHkVhjjpp/dist=es2019,mode=imports/optimized/three.js'; export {default} from '/-/three@v0.148.0-ZdnPTf2EskNtHkVhjjpp/dist=es2019,mode=imports/optimized/three.js';
To Reproduce Steps to reproduce the behavior:
Package "three" exists, but could not match version "0.136.2".
Expected behavior (optional) Attempting to navigate to 'https://cdn.skypack.dev/three@0.136.2' should result in something like this in your browser:
Desktop (please complete the following information):
Additional context Add any other context about the problem here.