altavir
03/09/2019, 8:26 AMmin.js
module. For JS people recommend to do it like that: https://stackoverflow.com/questions/46362627/use-convexgeometry-in-npm-version-of-three. Is it possible to do it in kotlin-js?Svyatoslav Kuzmich [JB]
03/09/2019, 10:32 AM@JsModule
annotation [https://kotlinlang.org/docs/reference/js-modules.html#jsmodule-annotation]
I believe in your case it would look like:
@JsModule("three/examples/js/geometries")
external object ConvexGeometry
altavir
03/09/2019, 10:34 AMturansky
03/09/2019, 12:46 PMaltavir
03/09/2019, 6:06 PMturansky
03/09/2019, 6:29 PMaltavir
03/09/2019, 6:47 PM@JsModule
for module declarations. In some cases I use require
, but I still have a little understanding about how they interfere.turansky
03/09/2019, 8:35 PMSvyatoslav Kuzmich [JB]
03/09/2019, 9:19 PM@JsModule
does require
under the hood. It just helps you to use static types with declarations coming from JS modules.altavir
03/10/2019, 4:51 AM