Skip to content

cincheo/jsweet-examples-threejs

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 

JSweet Examples (threejs framework)

Some examples to demonstrate using the awesome http://threejs.org 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.

Usage

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

Prerequisites

The node and npm executables must be in the path (https://nodejs.org). Install Maven (https://maven.apache.org/install.html).

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.

About

Some examples to demonstrate using the threejs framework from JSweet.

Resources

Stars

Watchers

Forks

Packages

No packages published