[英]How to include threejs (external lib) within SAPUI5 app view controller correctly?
The problem问题
How to include the library three.js
in SAPUI5 so that I can use it like I normally do, using THREE as root variable in my main view controller?如何在 SAPUI5 中包含库
three.js
以便我可以像往常一样使用它,在我的主视图 controller 中使用三个作为根变量?
I already tried to create a folder libs
in my project directory and include it in my controller header like shown here: SAPUI5: How to use external library in controller我已经尝试在我的项目目录中创建一个文件夹
libs
并将其包含在我的 controller header 中,如下所示: SAPUI5:如何在 Z594C103F2C6E04C3D8AB059F031E0C1 中使用外部库
Getting an error:收到错误:
THREE is undefined
三是未定义
Edit: It's the same for 'three' instead of 'THREE'.编辑:'三'而不是'三'是一样的。
There is also an experimental package within SAPUI5 sap.ui.vk.threejs
which is kind of messy and seems not to be well documented. SAPUI5
sap.ui.vk.threejs
中还有一个实验性的 package 有点混乱,似乎没有很好的记录。
JavaScript is case sensitive, you are importing the parameter as 'three'. JavaScript 区分大小写,您将参数导入为“三”。 THREE is treated as a different variable
三被视为不同的变量
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.