-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
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
SVGLoader: Make createShapes() usable for other modules. #24293
Conversation
Thanks! |
Hello, for some reason this change is breaking my typescript build.
|
Is it because of optional chaining? We use I'm not a TS user so I can't tell you how to fix this issue in your build. |
Yes, when removing the |
yes it's because of optional chaining, I had no issue till |
I resolved the issue by importing the SVGLoader from https://github.com/pmndrs/three-stdlib The three jsm modules are not part of the three.js package and are ment to be copied into your own project. |
Sorry, that is not true. import { SVGLoader } from 'three/examples/jsm/loaders/SVGLoader.js'; |
You are right, they are part of the package, but importing from three-stdlib solved the issue for me. |
Related issue: #24291 (comment)
Description
SVGLoader.createShapes()
assumesuserData.style
is defined at a certain place. This breaks the usage of the method outside of the loader (e.g. in context ofFont
).