You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to call three.js in the browser using Kotlin.
In my first attempt, I used the original three.js wrapper from Lars Ivar Hatledal, which this project also includes. I started from the examples in https://laptrinhx.com/kotlin-wrappers-for-three-js-2366010328/, but I quickly found out the newest version of Kotlin (1.4.32) does not work out of the box with it (problems with kotlin.browser.* vs kotlinx.browser.*) so I used the version distributed by visionforge instead.
I managed to render a simple cube successfully (based on the first example in the linked page).
However, I cannot get the Loaders to work, I failed to load an .stl model and an Object3D model. The code compiles correctly but I get the following errors in the browser:
To me it looks like there are some problems with the three.js wrapper, please correct me if I am wrong. I would appreciate an example on how to correctly call this methods. Also I couldn't get the dat.gui or stats to work following the example.
Here you can find an example project which reproduces this issues.
Thank you.
Luis.
The text was updated successfully, but these errors were encountered:
I am trying to call three.js in the browser using Kotlin.
In my first attempt, I used the original three.js wrapper from Lars Ivar Hatledal, which this project also includes. I started from the examples in https://laptrinhx.com/kotlin-wrappers-for-three-js-2366010328/, but I quickly found out the newest version of Kotlin (
1.4.32
) does not work out of the box with it (problems withkotlin.browser.*
vskotlinx.browser.*
) so I used the version distributed by visionforge instead.I managed to render a simple cube successfully (based on the first example in the linked page).
However, I cannot get the
Loaders
to work, I failed to load an.stl
model and anObject3D
model. The code compiles correctly but I get the following errors in the browser:For Object3D loader:
For JSON loader (Object3D):
This seems to be related to the fact that JSONLoader was removed in the
r99
release of three.js (https://discourse.threejs.org/t/objectloader-not-loading-json-file/5213)For the STL something similar happens.
To me it looks like there are some problems with the three.js wrapper, please correct me if I am wrong. I would appreciate an example on how to correctly call this methods. Also I couldn't get the
dat.gui
orstats
to work following the example.Here you can find an example project which reproduces this issues.
Thank you.
Luis.
The text was updated successfully, but these errors were encountered: