pyscript / examples

4 stars 1 forks source link

icosahedron example - newer versions will not run. #15

Open Neon22 opened 3 months ago

Neon22 commented 3 months ago

Tried updating to three.js version 162 using cdjns published url:

However get error message:

ImportError: cannot import name 'THREE' from 'js' (unknown location)

I am not sure if this is happening because of order of imports (and three is not loaded but the older 147 is loaded), or of a change made between builds 147 and 162 in three.js itself. Also unsure if doing it like this is preferred now or should it be in toml file ?

Hoping you can help and update the examples.

Neon22 commented 3 months ago

more info: Apparently this is the official response: https://github.com/googlemaps/js-three/issues/261

However I don't know enough to fix in pyscript.

Neon22 commented 3 months ago

We probably also want to be able to import the addons/ e.g. for orbit controls. I am hoping the example could also include one of these ?

Neon22 commented 3 months ago

Looks like it was announced in 2024.1.1

Alas adding this to the toml file does work:

[js_modules.main]
    "https://cdnjs.cloudflare.com/ajax/libs/three.js/0.162.0/three.module.min.js" = "THREE"

as does this: "https://cdn.jsdelivr.net/npm/three@0.162.0/+esm"

Neon22 commented 1 month ago

As of new examples release. Still using "three.js/0.147.0" Latest as of today is 164.

17 releases behind and cannot use.

This example needs to be updated:

OK. looks like this entire repo is no longer being used anymore (still linked to src="https://pyscript.net/releases/2024.1.1/core.js" in html file).

SO - going to try to find where you're pulling the examples from and repost this issue there. Will also suggest you delete this repo.

Neon22 commented 1 week ago

Three.js now at version 165. The icosahedron example is "27" releases behind :(