GWT:Three Examples

Three.js JsInterop based library for GWT

License

License

Categories

Categories

GWT (Google Web Toolkit) User Interface Web Frameworks
GroupId

GroupId

org.treblereel.gwt
ArtifactId

ArtifactId

three4g-examples
Last Version

Last Version

0.96-beta3
Release Date

Release Date

Type

Type

jar
Description

Description

GWT:Three Examples
Three.js JsInterop based library for GWT
Project URL

Project URL

https://github.com/treblereel
Project Organization

Project Organization

Treblereel
Source Code Management

Source Code Management

https://github.com/treblereel/three4g-examples

Download three4g-examples

How to add to project

<!-- https://jarcasting.com/artifacts/org.treblereel.gwt/three4g-examples/ -->
<dependency>
    <groupId>org.treblereel.gwt</groupId>
    <artifactId>three4g-examples</artifactId>
    <version>0.96-beta3</version>
</dependency>
// https://jarcasting.com/artifacts/org.treblereel.gwt/three4g-examples/
implementation 'org.treblereel.gwt:three4g-examples:0.96-beta3'
// https://jarcasting.com/artifacts/org.treblereel.gwt/three4g-examples/
implementation ("org.treblereel.gwt:three4g-examples:0.96-beta3")
'org.treblereel.gwt:three4g-examples:jar:0.96-beta3'
<dependency org="org.treblereel.gwt" name="three4g-examples" rev="0.96-beta3">
  <artifact name="three4g-examples" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.treblereel.gwt', module='three4g-examples', version='0.96-beta3')
)
libraryDependencies += "org.treblereel.gwt" % "three4g-examples" % "0.96-beta3"
[org.treblereel.gwt/three4g-examples "0.96-beta3"]

Dependencies

compile (2)

Group / Artifact Type Version
org.treblereel.gwt : three4g jar 0.96-beta3
org.treblereel.gwt : elemental2-gamepad jar 0.1-beta1

provided (1)

Group / Artifact Type Version
com.google.gwt : gwt-user jar

test (1)

Group / Artifact Type Version
junit : junit jar 4.11

Project Modules

There are no modules declared in this project.

Thee4g

A Three.js-examples classes wrapper for GWT

Maven

Current Version 0.96-beta2, implements 0.96 version of three.js

org.treblereel.gwt three4g-examples 0.96-beta2

Setup

all you need to do is add

  <inherits name="org.treblereel.gwt.three4g.Examples"/>

to your gwt project module, or

   <inherits name="org.treblereel.gwt.three4g.ExamplesMin"/>

for min version.

Code example

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.

License

GNU General Public License v2.0

Contributing

Pull Requests are welcome by all.

feel free to contact me anytime

Versions

Version
0.96-beta3
0.96-beta2
0.96-beta1
0.95-beta2