three4g-parent

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-parent
Last Version

Last Version

0.108
Release Date

Release Date

Type

Type

pom
Description

Description

three4g-parent
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

Download three4g-parent

Filename Size
three4g-parent-0.108.pom 9 KB
Browse

How to add to project

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

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

  • annotations
  • processor
  • core
  • extensions

Three4g

A Three.js wrapper for GWT

Maven

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>

Setup

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.

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.

For a complete "hello world" app, have a look at hello-three4g/.

DEMO

here is a demo page with lots of examples

License

Licensed under the Apache License, Version 2.0

Contributing

Pull Requests are welcome by all.

feel free to contact me anytime

Versions

Version
0.108
0.107
0.106
0.105
0.104
0.102
0.101
0.100
0.99
0.98-beta1
0.97-beta2
0.97-beta1