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

After v0.137 Some module export has conflict on examples/jsm #26660

Closed
dellwatson opened this issue Aug 28, 2023 · 2 comments
Closed

After v0.137 Some module export has conflict on examples/jsm #26660

dellwatson opened this issue Aug 28, 2023 · 2 comments

Comments

@dellwatson
Copy link

dellwatson commented Aug 28, 2023

Description

After version 0.137 has problem.
I tried to import one of the example/jsm module which is Curve and it is result in undefined since v0.138 - latest
even though the file is exist there.

https://codesandbox.io/s/restless-platform-7p9nrs?file=/src/store.js
I cannot import three/examples/jsm/curves might affect the whole some of jsm

on migration 137-138 
https://github.com/mrdoob/three.js/wiki/Migration-Guide#137--138
has  update The node material in examples/jsm/nodes has been replaced with a new implementation. 

seems that upgrade is the culprit, so i will try to check commit there soon.

Reproduction steps

  1. install three on version above 0.137+
  2. import { Curves } from "three/examples/jsm/curves/CurveExtras"
  3. it will show undefined

Code

import { Curves } from "three/examples/jsm/curves/CurveExtras";

  // version 138 -> latest will shows undefined
  console.log(Curves, "curves x");

Live example

Screenshots

No response

Version

0.138 -> 0.155

Device

No response

Browser

No response

OS

No response

@ycw
Copy link
Contributor

ycw commented Aug 28, 2023

- import { Curves } from "three/examples/jsm/curves/CurveExtras";
+ import * as Curves from "three/examples/jsm/curves/CurveExtras";

export {
GrannyKnot,
HeartCurve,
VivianiCurve,
KnotCurve,
HelixCurve,
TrefoilKnot,
TorusKnot,
CinquefoilKnot,
TrefoilPolynomialKnot,
FigureEightPolynomialKnot,
DecoratedTorusKnot4a,
DecoratedTorusKnot4b,
DecoratedTorusKnot5a,
DecoratedTorusKnot5c
};

r155 🫴🏻

@Mugen87
Copy link
Collaborator

Mugen87 commented Aug 28, 2023

#23402 changed the import syntax.

I'll updated the migration guide to avoid similar confusion in the future.

@Mugen87 Mugen87 closed this as completed Aug 28, 2023
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

3 participants