简体   繁体   中英

ReferenceError in mounted hook in threejs

Ive tried to import a js file with three.js code in it and it works fine in a "normal" html file. Now I tried to export/import the code from the extern js file and call it from mounted, but it just says [Vue warn]: Error in mounted hook: "ReferenceError: THREE is not defined".

Thats my code:

在此处输入图片说明

This looks like a reference error to me, similar to a missing package in Java, but why is it happening if the 'package' is used in the extern js file and how do I fix this?

外部 js 文件中的导入丢失

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM