Commit Graph
1235 Commits
Author SHA1 Message Date
Mr.doob d34fe4e9b9 Removed some broken featured projects. 2011-04-08 07:05:06 +01:00
alteredq da0b612ce8 Synced with mrdoob's branch. 2011-04-07 04:01:36 +02:00
alteredq 5fa19e8460 Fixed delays when loading multiple models.
Problem was having too many concurrent workers opened at once. Garbage collection apparently works very slowly on workers. Solution was to close them manually, after model data is sent to main thread.

Also some progress with Blender scene exporter. Some scenes now export correctly, though monkey test scene got worse, even with less hacky code.
2011-04-07 02:59:49 +02:00
Mr.doob 94790f057e extras/geometries
- Fixed TorusKnot face orientation.
- Added UVs to Cylinder (Cylindrical Mapping) 
- Fixed Lathe UVs

There is something wrong with texture mapping, u needs to be inverted all the time. Something to researching on.
2011-04-06 20:10:25 +01:00
alteredq 9226142a00 Merge branch 'master' of https://github.com/empaempa/three.js 2011-04-06 16:16:14 +02:00
Mikael Emtinger 5ef9e04535 removed finish 2011-04-06 16:15:15 +02:00
alteredq 51bcda74d4 Merge remote branch 'remotes/empaempa/master' 2011-04-06 16:13:38 +02:00
Mikael Emtinger 2c8b6b35fe Fixed bug in lens flare 2011-04-06 16:11:06 +02:00
alteredq e0768d0605 Merged with empaempa's branch. 2011-04-06 15:26:19 +02:00
Mikael Emtinger f70aaed1d8 Merge branch 'master' of git://github.com/mrdoob/three.js 2011-04-06 12:18:11 +02:00
Mikael Emtinger c3ab2eb1e9 Rewrote lens flares to not use readPixels. There are different solutions based on availablity of vertex textures. If available, occlusion calculation is more exact and handles partial occlusion on screen edges. If not available, occlusion calculation is less exact (because it's made on each fragment so it has to be fast) and partial occlusion by screen edge is not possible (same reason).
It's not possible for the lens flare to update on visibility any more, only its screen position. Potentially, we could add offset+factor for opacity/scale/rotation that is dependent on visibility in shader. Or just custom shaders.

Anyway, it's way faster than readPixels :)
2011-04-06 12:17:42 +02:00
alteredq f221b853b7 Refactoring and optimizations in collision system and examples.
Mainly trying to avoid creation of new object per frame and also some variable names clarifications and whitespace cleanups.

Not finished yet.
2011-04-06 00:07:13 +02:00
alteredq 1fd801719f Added option to have flat shading for renderBufferImmediate. 2011-04-05 20:30:58 +02:00
alteredq 5c943cab3e Fixed broken MarchingCubes.
MarchingCubes.generateGeometry got forgotten when refactoring vertex normals.
2011-04-05 16:47:24 +02:00
alteredq 4470e0f619 Merged physics branch into master.
Also some whitespace and titles cleanup.
2011-04-05 16:10:23 +02:00
alteredq 07294ccfaf Merge remote branch 'remotes/drojdjou/master' into physics 2011-04-05 12:06:13 +02:00
alteredq 65e3f92d55 Merged latest master branch into physics branch. 2011-04-05 12:04:24 +02:00
Bartek Drozdz 0017fa4285 Removed comments from Collision classes 2011-04-05 11:44:37 +02:00
alteredq 0209928118 Fixed reaction and trigger collisions examples.
Terrain still needs to reexport Blender model in new JSON format.
2011-04-05 11:40:44 +02:00
alteredq 693a36f509 Moved scene loader from SceneUtils into SceneLoader. 2011-04-05 08:59:45 +02:00
alteredq 55a3d8290d Changed hardcoded uv scale to uniform in lava shader example. 2011-04-05 08:39:08 +02:00
alteredq f7e3a80d70 Added edges computation to OBJ converter.
If you want to get edges, run converter like with "-e" flag:

python convert_obj_three.py -i model.obj -o model.js -e

Output seems to match Blender exporter.
2011-04-05 03:37:13 +02:00
alteredq 7915999bdd Added edges to Blender exporter, JSONLoader and Geometry.
There is a new class Edge which stores vertices and faces for edge (I wasn't sure if indices or references would be better, so at least for the moment it contains both).

Geometry now contains a list of such edges, created in JSONLoader, based on edge data exported from Blender.

From Blender we get a list of vertex index pairs, from which in Geometry.computeEdgeFaces() we compute faces which share this particular edge and store them in the Edge object.

Not sure if edges work properly till we don't have something using them. For now I just checked cube data exported from Blender and it seems fine.

Also did some whitespace cleanup here and there.
2011-04-05 00:18:36 +02:00
Bartek Drozdz 9850695f38 Collisions system initial commit. 2011-04-04 18:13:54 +02:00
Mr.doob 5742cceefd Ray: Added support for object.flipSided and object.doubleSided properties. 2011-04-04 13:10:25 +01:00
Mr.doob b899391008 Updated buillds. 2011-04-04 05:13:04 +01:00
Mr.doob 51b56fe695 Merge remote branch 'alteredq/master' into experimental 2011-04-04 05:00:33 +01:00
Mr.doob abb4a774cd Merging with alteredq. 2011-04-04 05:00:21 +01:00
Mr.doob 3f20fee01a Merge remote branch 'empaempa/master' into experimental 2011-04-04 04:57:18 +01:00
Mr.doob 63ab3c2d80 Merge remote branch 'tarmour/master' 2011-04-04 04:55:27 +01:00
Theo ArmourandMr.doob 28869a95a7 Added the same onDocumentMouseWheel() function and event handlers as in canvas_geometry_panorama_fisheye.html so that mousewheel zooming works on Firefox 4 and other browsers. 2011-04-04 11:53:55 +08:00
alteredq 00b0f6df41 Fleshed out more face color pipeline (OBJ converter, Blender importer and loaders).
- OBJ converter now has "-b" option for baking materials' diffuse colors into face colors
  (if there are morph colormap OBJs/MTLs, first colormap will be used)
  (material will get "vertexColors" property set to "face")

- Blender importer now bakes JSON face colors into Blender vertex colors

- Loader now handles "material.vertexColors" with more options
    - nonexistant property or false will set material to THREE.NoColors
    - "face" will set material to THREE.FaceColors
    - anything else will get THREE.VertexColors

- fixed bug in JSONLoader where face colors were not properly initialized
2011-04-04 03:35:04 +02:00
alteredq db96a4a861 Added support for morph colors to JSONLoader and Geometry. 2011-04-04 01:09:13 +02:00
Mikael Emtinger 0acad374a1 Added .fog as parameter (to used for enabeling refreshing and setting of fog uniforms in MeshShaderMateiral) 2011-04-04 00:19:42 +02:00
alteredq df7216e7a6 Added handling of morph colors to OBJ converter.
To be used like this:

python convert_obj_three.py -i model.obj -o model.js -m "morphA_*.obj morphB_*.obj" -c "modelA_colors.obj modelB_colors.obj" -s flat -a none
2011-04-04 00:05:52 +02:00
Theo Armour c3f7b1b5de Added the same onDocumentMouseWheel() function and event handlers as in canvas_geometry_panorama_fisheye.html so that mousewheel zooming works on Firefox 4 and other browsers. 2011-04-03 14:10:21 -07:00
Mikael Emtinger e7b6f4ad3c Merged with mrdoob 2011-04-03 20:44:15 +02:00
Mikael Emtinger ea42310975 Added .boundTo in custom attributes. If not defined, it assumes that the custom attribute data has the length of vertices (boundTo="vertices"). If boundTo="faces", the custom attribute data has the length of faces.length. If boundTo="faceVertices" the cursom attribute data has the length of: numFace3*3 + numFace4*4.
This can be used for setting face colors or vertex colors per face (faces that share vertex can have separate colors).
2011-04-03 20:42:24 +02:00
Mr.doob 6992b8e455 Merge remote branch 'alteredq/master' r38 2011-04-03 07:56:58 +01:00
Mr.doob 70ff34b8a3 Updated Stats.js widget. 2011-04-03 07:56:41 +01:00
alteredq 477b0095a9 Added dumping of scale to Blender exporter / handling of scale to JSONLoader.
This is backwards compatible: for existing models that don't have scale nothing should change.
2011-04-03 08:48:08 +02:00
Mr.doob e6fd2d0516 Blender Exporter: Added option for truncating vertex values. Added scale parameter. 2011-04-03 05:17:48 +01:00
Mr.doob 09e976f299 Blender exporter: Scene export option False by default. 2011-04-03 04:04:36 +01:00
alteredq 7e6ba581de Removed some bottlenecks in shader building / sharing.
- for shader reuse materials from the standard library are now identified just by shader name (MeshShaderMaterials still use full code)
- unique shader id strings are constructed via array.join instead of string plus
- uniform and attribute locations are now cached in buildProgram (biggest one)

Also some smaller optimizations and cleanups in DOF example.
2011-04-03 04:19:00 +02:00
alteredq c2a401f2b8 Added option not to export materials to Blender exporter.
In such case faces will not get material index in JSON data and then no material reference in Face objects, so MeshFaceMaterial is not going to show anything and you have to add your own material for the whole mesh after loading.

Tested on few models and it seems to work, new JSON format allows to omit materials :)
2011-04-03 00:22:20 +02:00
alteredq 5a684c29ea Fixed broken video texture example.
Hope it's the last one. Also here performance is ok.
2011-04-02 21:06:37 +02:00
alteredq a719d289cc Fixed broken ribbons example.
Interestingly here performance doesn't seem to be affected.
2011-04-02 20:59:59 +02:00
alteredq 575deaadc5 Fixed broken depth-of-field example.
Still something is wrong with this new implicit way of sharing programs. DOF example is noticeably slower than it was before, especially in ANGLE :(.
2011-04-02 20:46:34 +02:00
Mikael Emtinger 08642c5239 Merged with mrdoob.
Added depthBuffer/stencilBuffer flags to WebGLRenderTarget and support for that in WebGLRenderer. Done to support stencil shadows in renderTarget. For some reason { depthBuffer:false, stencilBuffer:true } doesn't work so this is deafulted to both:false.
2011-04-02 11:40:03 +02:00
alteredq 9abbb97d4c Fixed Blender exporter not checking if material texture actually has some image. 2011-04-02 09:31:50 +02:00