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

引入onevent报错 #9

Open
KNJON opened this issue Sep 28, 2021 · 0 comments
Open

引入onevent报错 #9

KNJON opened this issue Sep 28, 2021 · 0 comments

Comments

@KNJON
Copy link

KNJON commented Sep 28, 2021

threejs如果也是包引入的方式,再用包引入onevent直接报错,

控制台报错
Uncaught ReferenceError: THREE is not defined

oneventjs里面报错
(function (definition) { "use strict"; if (!THREE) { // 触发了这个 throw new Error("This module is dependent from 'three.js,add this file first."); }

如果两个都是script引入就没有问题,但是项目都是npm引入的

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