mirror of
https://github.com/wahyd4/three.js.git
synced 2026-08-21 10:56:01 +10:00
- Added Mesh.flipSided boolean
This commit is contained in:
@@ -129,7 +129,7 @@ Thanks to the power of the internets (and github <3) these people have kindly he
|
||||
|
||||
### Change Log ###
|
||||
|
||||
2010 07 17 - **r14** (32.093 kb)
|
||||
2010 07 17 - **r14** (32.144 kb)
|
||||
|
||||
* Refactored `CanvasRenderer` (more duplicated code, but easier to handle)
|
||||
* `Face4` now supports `MeshBitmapUVMappingMaterial`
|
||||
@@ -142,6 +142,7 @@ Thanks to the power of the internets (and github <3) these people have kindly he
|
||||
* `ColorStrokeMaterial` > `LineColorMaterial`
|
||||
* `Rectangle.instersects` returned false with rectangles with 0px witdh or height
|
||||
* Using new object `UV` instead of `Vector2` where it should be used
|
||||
* Added Mesh.flipSided boolean (false by default)
|
||||
|
||||
|
||||
2010 07 12 - **r13** (29.492 kb)
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -8,8 +8,11 @@ THREE.Mesh = function ( geometry, material ) {
|
||||
|
||||
this.geometry = geometry;
|
||||
|
||||
this.flipSided = false;
|
||||
this.doubleSided = false;
|
||||
|
||||
this.overdraw = false;
|
||||
|
||||
};
|
||||
|
||||
THREE.Mesh.prototype = new THREE.Object3D();
|
||||
|
||||
@@ -12,7 +12,6 @@ THREE.Object3D = function ( material ) {
|
||||
this.screen = new THREE.Vector3();
|
||||
|
||||
this.material = material instanceof Array ? material : [ material ];
|
||||
this.overdraw = false;
|
||||
|
||||
this.autoUpdateMatrix = true;
|
||||
|
||||
|
||||
@@ -74,9 +74,10 @@ THREE.Renderer = function() {
|
||||
v2 = object.geometry.vertices[ face.b ];
|
||||
v3 = object.geometry.vertices[ face.c ];
|
||||
|
||||
if ( v1.__visible && v2.__visible && v3.__visible && ( object.doubleSided ||
|
||||
if ( v1.__visible && v2.__visible && v3.__visible &&
|
||||
( object.doubleSided || ( object.flipSided !=
|
||||
( v3.screen.x - v1.screen.x ) * ( v2.screen.y - v1.screen.y ) -
|
||||
( v3.screen.y - v1.screen.y ) * ( v2.screen.x - v1.screen.x ) < 0 ) ) {
|
||||
( v3.screen.y - v1.screen.y ) * ( v2.screen.x - v1.screen.x ) < 0 ) ) ) {
|
||||
|
||||
if ( !face3Pool[ face3count ] ) {
|
||||
|
||||
@@ -106,11 +107,12 @@ THREE.Renderer = function() {
|
||||
v3 = object.geometry.vertices[ face.c ];
|
||||
v4 = object.geometry.vertices[ face.d ];
|
||||
|
||||
if ( v1.__visible && v2.__visible && v3.__visible && v4.__visible && (object.doubleSided ||
|
||||
if ( v1.__visible && v2.__visible && v3.__visible && v4.__visible &&
|
||||
( object.doubleSided || ( object.flipSided !=
|
||||
( ( v4.screen.x - v1.screen.x ) * ( v2.screen.y - v1.screen.y ) -
|
||||
( v4.screen.y - v1.screen.y ) * ( v2.screen.x - v1.screen.x ) < 0 ||
|
||||
( v2.screen.x - v3.screen.x ) * ( v4.screen.y - v3.screen.y ) -
|
||||
( v2.screen.y - v3.screen.y ) * ( v4.screen.x - v3.screen.x ) < 0 ) ) ) {
|
||||
( v2.screen.y - v3.screen.y ) * ( v4.screen.x - v3.screen.x ) < 0 ) ) ) ) {
|
||||
|
||||
if ( !face4Pool[ face4count ] ) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user