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

How to access THREE(three.js instance)? #64

Open
hxgqh opened this issue Mar 22, 2023 · 1 comment
Open

How to access THREE(three.js instance)? #64

hxgqh opened this issue Mar 22, 2023 · 1 comment
Assignees
Labels
❓ Question Asking question about @egjs/view3d

Comments

@hxgqh
Copy link

hxgqh commented Mar 22, 2023

Description

Is it possible to write three.js code with view3d?

@WoodNeck
Copy link
Member

Hello @hxgqh, we don't export internal three.js at the moment, as it can increase the bundle size.
You can import and use the three.js normally as it's a dependency of View3D, but in some environments, it can throw error when if you don't explicitly define it as a dependency of your project.

As we're using three@~0.134 as our dependency, you can try installing the exact same version and use it.

npm i --save three@~0.134
import * as THREE from "three";
@WoodNeck WoodNeck self-assigned this Mar 23, 2023
@WoodNeck WoodNeck added the ❓ Question Asking question about @egjs/view3d label Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
❓ Question Asking question about @egjs/view3d
2 participants