Current Version 0.108, implements 0.108 version of three.js
<dependency>
<groupId>org.treblereel.gwt</groupId>
<artifactId>three4g</artifactId>
<version>0.108-SNAPSHOT</version>
</dependency>
all you need to do is add
<inherits name="org.treblereel.gwt.Three4G"/>
to your gwt project module, or
<inherits name="org.treblereel.gwt.Three4GMin"/>
for min version.
PerspectiveCamera camera = new PerspectiveCamera( 70, aspect, 1, 1000 );
camera.position.z = 400;
Scene scene = new Scene();
Texture texture = new TextureLoader().load( "https://threejs.org/examples/textures/crate.gif");
BoxBufferGeometry geometry = new BoxBufferGeometry( 200, 200, 200 );
MeshBasicMaterialParameters meshBasicMaterialParameters = new MeshBasicMaterialParameters();
meshBasicMaterialParameters.map = texture;
MeshBasicMaterial material = new MeshBasicMaterial(meshBasicMaterialParameters);
Mesh mesh = new Mesh(geometry, material);
scene.add(mesh);
WebGLRenderer webGLRenderer = new WebGLRenderer();
Like we do in Java world and pretty close to javascript original.
For a complete "hello world" app, have a look at hello-three4g/.
here is a demo page with lots of examples
Licensed under the Apache License, Version 2.0
Pull Requests are welcome by all.