|
@@ -5,29 +5,15 @@ three.js
|
|
|
|
|
|
[](http://flattr.com/thing/287/three-js)
|
|
|
|
|
|
-The aim of this project is to create a lightweight 3D engine with a very low level of abstraction (aka for dummies). Currently there is no documentation available but feel free to use the examples as a reference and/or read the source code. However, be aware that the API may change from revision to revision breaking compatibility.
|
|
|
+The aim of this project is to create a lightweight 3D engine with a very low level of abstraction (aka for dummies). Currently the examples are the documentation. Be aware that the API may change from revision to revision breaking backwards compatibility.
|
|
|
|
|
|
The engine can render using <canvas>, <svg> and WebGL.
|
|
|
|
|
|
-[More info...](http://mrdoob.com/blog/post/693)
|
|
|
-
|
|
|
-Other <canvas> based engines: [pre3d](http://deanm.github.com/pre3d/), [pvjs](http://code.google.com/p/pvjswebgl/), [jsgl](http://tulrich.com/geekstuff/canvas/perspective.html), [k3d](http://www.kevs3d.co.uk/dev/canvask3d/k3d_test.html), ...
|
|
|
-WebGL based: [WebGLU](https://github.com/OneGeek/WebGLU), [GLGE](http://www.glge.org/), [C3DL](http://www.c3dl.org/), [Copperlicht](http://www.ambiera.com/copperlicht/), [SpiderGL](http://spidergl.org/), [SceneJS](http://scenejs.org/), ...
|
|
|
-
|
|
|
### Examples ###
|
|
|
|
|
|
-[](http://mrdoob.github.com/three.js/examples/geometry_large_mesh.html)
|
|
|
-[](http://mrdoob.github.com/three.js/examples/interactive_cubes.html)
|
|
|
-[](http://mrdoob.github.com/three.js/examples/camera_orthographic.html)
|
|
|
-[](http://mrdoob.github.com/three.js/examples/lights_pointlights.html)
|
|
|
-[](http://mrdoob.github.com/three.js/examples/geometry_birds.html)
|
|
|
-[](http://mrdoob.github.com/three.js/examples/geometry_earth.html)
|
|
|
-[](http://mrdoob.github.com/three.js/examples/geometry_terrain.html)
|
|
|
-[](http://mrdoob.github.com/three.js/examples/geometry_vr.html)
|
|
|
-[](http://mrdoob.github.com/three.js/examples/geometry_cube.html)
|
|
|
-
|
|
|
Materials
|
|
|
|
|
|
+[](http://mrdoob.github.com/three.js/examples/materials_cars.html)
|
|
|
[](http://mrdoob.github.com/three.js/examples/materials.html)
|
|
|
[](http://mrdoob.github.com/three.js/examples/materials_cubemap.html)
|
|
|
[](http://mrdoob.github.com/three.js/examples/materials_cubemap_balls_reflection.html)
|
|
@@ -40,14 +26,25 @@ Materials
|
|
|
[](http://mrdoob.github.com/three.js/examples/materials_normal.html)
|
|
|
[](http://mrdoob.github.com/three.js/examples/materials_shaders.html)
|
|
|
[](http://mrdoob.github.com/three.js/examples/materials_video.html)
|
|
|
-[](http://mrdoob.github.com/three.js/examples/materials_cars.html)
|
|
|
+
|
|
|
+Geometry
|
|
|
+
|
|
|
+[](http://mrdoob.github.com/three.js/examples/geometry_large_mesh.html)
|
|
|
+[](http://mrdoob.github.com/three.js/examples/interactive_cubes.html)
|
|
|
+[](http://mrdoob.github.com/three.js/examples/camera_orthographic.html)
|
|
|
+[](http://mrdoob.github.com/three.js/examples/lights_pointlights.html)
|
|
|
+[](http://mrdoob.github.com/three.js/examples/geometry_birds.html)
|
|
|
+[](http://mrdoob.github.com/three.js/examples/geometry_earth.html)
|
|
|
+[](http://mrdoob.github.com/three.js/examples/geometry_terrain.html)
|
|
|
+[](http://mrdoob.github.com/three.js/examples/geometry_vr.html)
|
|
|
+[](http://mrdoob.github.com/three.js/examples/geometry_cube.html)
|
|
|
|
|
|
Particles
|
|
|
|
|
|
+[](http://mrdoob.github.com/three.js/examples/particles_sprites.html)
|
|
|
[](http://mrdoob.github.com/three.js/examples/particles_random.html)
|
|
|
[](http://mrdoob.github.com/three.js/examples/particles_waves.html)
|
|
|
[](http://mrdoob.github.com/three.js/examples/particles_floor.html)
|
|
|
-[](http://mrdoob.github.com/three.js/examples/particles_sprites.html)
|
|
|
|
|
|
### Featured projects ###
|
|
|
|
|
@@ -87,7 +84,7 @@ This code creates a camera, then creates a scene object, adds a bunch of random
|
|
|
|
|
|
for (var i = 0; i < 1000; i++) {
|
|
|
|
|
|
- var particle = new THREE.Particle( new THREE.ParticleCircleMaterial( { color: Math.random() * 0x808008 + 0x808080 } ) );
|
|
|
+ var particle = new THREE.Particle( new THREE.ParticleCircleMaterial( { color: Math.random() * 0x808080 + 0x808080 } ) );
|
|
|
particle.position.x = Math.random() * 2000 - 1000;
|
|
|
particle.position.y = Math.random() * 2000 - 1000;
|
|
|
particle.position.z = Math.random() * 2000 - 1000;
|
|
@@ -153,14 +150,18 @@ For creating a customised version of the library, including the source files in
|
|
|
<script type="text/javascript" src="../src/renderers/SVGRenderer.js"></script>
|
|
|
<script type="text/javascript" src="../src/renderers/WebGLRenderer.js"></script>
|
|
|
<script type="text/javascript" src="../src/renderers/renderables/RenderableFace3.js"></script>
|
|
|
- <script type="text/javascript" src="../src/renderers/renderables/RenderableFace4.js"></script>
|
|
|
<script type="text/javascript" src="../src/renderers/renderables/RenderableParticle.js"></script>
|
|
|
<script type="text/javascript" src="../src/renderers/renderables/RenderableLine.js"></script>
|
|
|
|
|
|
|
|
|
### Change Log ###
|
|
|
|
|
|
-2010 11 17 - **r29** (69.563 kb)
|
|
|
+2010 11 28 - **r30** (75.653 KB, gz: 17.812 KB)
|
|
|
+
|
|
|
+* `CanvasRenderer` SmoothShading support
|
|
|
+
|
|
|
+
|
|
|
+2010 11 17 - **r29** (69.563 KB)
|
|
|
|
|
|
* **New materials API** Still work in progress, but mostly there. ([alteredq](http://github.com/alteredq) & [mrdoob](http://github.com/mrdoob))
|
|
|
* Line clipping in `CanvasRenderer` ([julianwa](http://github.com/julianwa))
|
|
@@ -168,7 +169,7 @@ For creating a customised version of the library, including the source files in
|
|
|
* Switched to Closure compiler.
|
|
|
|
|
|
|
|
|
-2010 11 04 - **r28** (62.802 kb)
|
|
|
+2010 11 04 - **r28** (62.802 KB)
|
|
|
|
|
|
* `Loader` class allows load geometry asynchronously at runtime. ([alteredq](http://github.com/alteredq))
|
|
|
* `MeshPhongMaterial` working with `WebGLRenderer`. ([alteredq](http://github.com/alteredq))
|
|
@@ -179,7 +180,7 @@ For creating a customised version of the library, including the source files in
|
|
|
* Hmmm.. lib file size starting to get too big...
|
|
|
|
|
|
|
|
|
-2010 10 28 - **r25** (54.480 kb)
|
|
|
+2010 10 28 - **r25** (54.480 KB)
|
|
|
|
|
|
* `WebGLRenderer` now up to date with other renderers! ([alteredq](http://github.com/alteredq))
|
|
|
* .obj to .js python converter ([alteredq](http://github.com/alteredq))
|
|
@@ -188,7 +189,7 @@ For creating a customised version of the library, including the source files in
|
|
|
* Reworked `CanvasRenderer` and `SVGRenderer` material handling
|
|
|
|
|
|
|
|
|
-2010 10 06 - **r18** (44.420 kb)
|
|
|
+2010 10 06 - **r18** (44.420 KB)
|
|
|
|
|
|
* Added `PointLight`
|
|
|
* `CanvasRenderer` and `SVGRenderer` basic lighting support (ColorStroke/ColorFill only)
|
|
@@ -196,20 +197,20 @@ For creating a customised version of the library, including the source files in
|
|
|
* Added `computeCentroids` method to `Geometry`
|
|
|
|
|
|
|
|
|
-2010 09 17 - **r17** (39.487 kb)
|
|
|
+2010 09 17 - **r17** (39.487 KB)
|
|
|
|
|
|
* Added `Light`, `AmbientLight` and `DirectionalLight` ([philogb](http://github.com/philogb))
|
|
|
* `WebGLRenderer` basic lighting support ([philogb](http://github.com/philogb))
|
|
|
* Memory optimisations
|
|
|
|
|
|
|
|
|
-2010 08 21 - **r16** (35.592 kb)
|
|
|
+2010 08 21 - **r16** (35.592 KB)
|
|
|
|
|
|
* Workaround for Opera bug (clearRect not working with context with negative scale)
|
|
|
* Additional `Matrix4` and `Vector3` methods
|
|
|
|
|
|
|
|
|
-2010 07 23 - **r15** (32.440 kb)
|
|
|
+2010 07 23 - **r15** (32.440 KB)
|
|
|
|
|
|
* Using new object `UV` instead of `Vector2` where it should be used
|
|
|
* Added `Mesh.flipSided` boolean (false by default)
|
|
@@ -218,7 +219,7 @@ For creating a customised version of the library, including the source files in
|
|
|
* Fixed gap when rendering `Face4` with `MeshBitmapUVMappingMaterial`
|
|
|
|
|
|
|
|
|
-2010 07 17 - **r14** (32.144 kb)
|
|
|
+2010 07 17 - **r14** (32.144 KB)
|
|
|
|
|
|
* Refactored `CanvasRenderer` (more duplicated code, but easier to handle)
|
|
|
* `Face4` now supports `MeshBitmapUVMappingMaterial`
|
|
@@ -232,7 +233,7 @@ For creating a customised version of the library, including the source files in
|
|
|
* `Rectangle.instersects` returned false with rectangles with 0px witdh or height
|
|
|
|
|
|
|
|
|
-2010 07 12 - **r13** (29.492 kb)
|
|
|
+2010 07 12 - **r13** (29.492 KB)
|
|
|
|
|
|
* Added `ParticleCircleMaterial` and `ParticleBitmapMaterial`
|
|
|
* `Particle` now use `ParticleCircleMaterial` instead of `ColorFillMaterial`
|
|
@@ -241,27 +242,27 @@ For creating a customised version of the library, including the source files in
|
|
|
* `SVGRenderer` currently out of sync
|
|
|
|
|
|
|
|
|
-2010 07 07 - **r12** (28.494 kb)
|
|
|
+2010 07 07 - **r12** (28.494 KB)
|
|
|
|
|
|
* First version of the `WebGLRenderer` (`ColorFillMaterial` and `FaceColorFillMaterial` by now)
|
|
|
* `Matrix4.lookAt` fix (`CanvasRenderer` and `SVGRenderer` now handle the -Y)
|
|
|
* `Color` now using 0-1 floats instead of 0-255 integers
|
|
|
|
|
|
|
|
|
-2010 07 03 - **r11** (23.541 kb)
|
|
|
+2010 07 03 - **r11** (23.541 KB)
|
|
|
|
|
|
* Blender 2.5 exporter (utils/export_threejs.py) now exports UV and normals (Thx [kikko](http://github.com/kikko))
|
|
|
* `Scene.add` > `Scene.addObject`
|
|
|
* Enabled `Scene.removeObject`
|
|
|
|
|
|
|
|
|
-2010 06 22 - **r10** (23.959 kb)
|
|
|
+2010 06 22 - **r10** (23.959 KB)
|
|
|
|
|
|
* Changed Camera system. (Thx [Paul Brunt](http://github.com/supereggbert))
|
|
|
* `Object3D.overdraw = true` to enable CanvasRenderer screen space point expansion hack.
|
|
|
|
|
|
|
|
|
-2010 06 20 - **r9** (23.753 kb)
|
|
|
+2010 06 20 - **r9** (23.753 KB)
|
|
|
|
|
|
* JSLinted.
|
|
|
* `autoClear` property for renderers.
|
|
@@ -269,27 +270,27 @@ For creating a customised version of the library, including the source files in
|
|
|
* Fixed matrix bug. (transformed objects outside the x axis would get infinitely tall :S)
|
|
|
|
|
|
|
|
|
-2010 06 06 - **r8** (23.496 kb)
|
|
|
+2010 06 06 - **r8** (23.496 KB)
|
|
|
|
|
|
* Moved UVs to `Geometry`.
|
|
|
* `CanvasRenderer` expands screen space points (workaround for antialias gaps).
|
|
|
* `CanvasRenderer` supports `BitmapUVMappingMaterial`.
|
|
|
|
|
|
|
|
|
-2010 06 05 - **r7** (22.387 kb)
|
|
|
+2010 06 05 - **r7** (22.387 KB)
|
|
|
|
|
|
* Added Line Object.
|
|
|
* Workaround for WebKit not supporting rgba() in SVG yet.
|
|
|
* No need to call updateMatrix(). Use .autoUpdateMatrix = false if needed. (Thx [Gregory Athons](http://github.com/gregmax17)).
|
|
|
|
|
|
|
|
|
-2010 05 17 - **r6** (21.003 kb)
|
|
|
+2010 05 17 - **r6** (21.003 KB)
|
|
|
|
|
|
* 2d clipping on `CanvasRenderer` and `SVGRenderer`
|
|
|
* `clearRect` optimisations on `CanvasRenderer`
|
|
|
|
|
|
|
|
|
-2010 05 16 - **r5** (19.026 kb)
|
|
|
+2010 05 16 - **r5** (19.026 KB)
|
|
|
|
|
|
* Removed Class.js dependency
|
|
|
* Added `THREE` namespace
|
|
@@ -302,23 +303,23 @@ For creating a customised version of the library, including the source files in
|
|
|
* `geometry.faces.a` are now indexes instead of references
|
|
|
|
|
|
|
|
|
-2010 04 26 - **r4** (16.274 kb)
|
|
|
+2010 04 26 - **r4** (16.274 KB)
|
|
|
|
|
|
* `SVGRenderer` Particle rendering
|
|
|
* `CanvasRenderer` uses `context.setTransform` to avoid extra calculations
|
|
|
|
|
|
|
|
|
-2010 04 24 - **r3** (16.392 kb)
|
|
|
+2010 04 24 - **r3** (16.392 KB)
|
|
|
|
|
|
* Fixed incorrect rotation matrix transforms
|
|
|
* Added `Plane` and `Cube` primitives
|
|
|
|
|
|
|
|
|
-2010 04 24 - **r2** (15.724 kb)
|
|
|
+2010 04 24 - **r2** (15.724 KB)
|
|
|
|
|
|
* Improved `Color` handling
|
|
|
|
|
|
|
|
|
-2010 04 24 - **r1** (15.25 kb)
|
|
|
+2010 04 24 - **r1** (15.25 KB)
|
|
|
|
|
|
-* First alpha release
|
|
|
+* First alpha release
|