Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

icosahedron example - newer versions will not run. #15

Open
Neon22 opened this issue Mar 23, 2024 · 4 comments
Open

icosahedron example - newer versions will not run. #15

Neon22 opened this issue Mar 23, 2024 · 4 comments

Comments

@Neon22
Copy link

Neon22 commented Mar 23, 2024

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

<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/0.162.0/three.module.min.js"></script>

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
Copy link
Author

Neon22 commented Mar 23, 2024

more info:
Apparently this is the official response:
googlemaps/js-three#261

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

@Neon22
Copy link
Author

Neon22 commented Mar 23, 2024

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
Copy link
Author

Neon22 commented Mar 24, 2024

Looks like it was announced in 2024.1.1

<py-config>
    [js_modules.main]
    "https://cdn.jsdelivr.net/npm/fireworks-js@2.10.7/+esm" = "Fireworks_Module"
</py-config>
<script type="py">
    from pyscript.js_modules import Fireworks_Module
...

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
Copy link
Author

Neon22 commented May 7, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant