Some examples to demonstrate using the threejs framework from JSweet.
Switch branches/tags
Nothing to show
Clone or download
Latest commit 50fbc75 Nov 1, 2017

JSweet Examples (threejs framework)

Some examples to demonstrate using the awesome framework (WebGL powered 3D) from Java thanks to the JSweet tranpiler.

  • [webgl_interactive_cubes.html] An example showing cubes, which you can highlight by clicking. [browse]
  • [webgl_materials_normalmap.html] An example showing Lee Perry-Smith (Infinite-Realities). [browse]

These examples are direct translations to JSweet of some of the JavaScript examples taken from the threejs web site. Of course, copyrights fully remain to the original authors.

Check out more JSweet examples.


> git clone
> cd jsweet-examples-threejs
> mvn generate-sources
> firefox webapp/${example}.html


The node and npm executables must be in the path ( Install Maven (

Note on strict mode

These examples compile with JSweet in strict mode: jsweet-core-strict must be placed first (before the JDK) in the classpath. In strict mode, JavaScript APIs replace Java APIs even on java.lang objects. In strict mode, it is not possible to compile regular Java code (using regular Java APIs) at all.