提交 51368ca6 编写于 作者: M Mr.doob

REVISION ++

上级 b5dfd828
......@@ -136,6 +136,21 @@ This code creates a camera, then creates a scene, adds a cube on it, creates a &
### Change Log ###
2011 09 04 - **r44** (330.356 KB, gzip: 84.039 KB)
* Added `ColladaLoader`. ([timknip2](https://github.com/timknip2))
* Improved `ExtrudeGeometry`. ([zz85](http://github.com/zz85))
* Fixed `CylinderGeometry` normals. ([alteredq](http://github.com/alteredq))
* Fixed issue with `WebGLRenderer.setTexture` ([rectalogic](https://github.com/rectalogic))
* Fixed `TorusGeometry` normals. ([mrdoob](http://github.com/mrdoob))
* Fixed `Ray` behind-ray intersects. ([mrdoob](http://github.com/mrdoob))
* Added `OrthoCamera`. ([alteredq](http://github.com/alteredq))
* Refactored postprocessing effects used in some examples. ([alteredq](http://github.com/alteredq))
* Added `.deallocateObject()` and `.deallocateTexture()` methods to `WebGLRenderer`. ([mrdoob](http://github.com/mrdoob))
* Fixed a glitch in normal and phong shader. ([evanw](http://github.com/evanw) and [alteredq](http://github.com/alteredq))
* Added `.frustumCulled` property to `Object3D`. ([alteredq](http://github.com/alteredq) and [mrdoob](http://github.com/mrdoob))
2011 08 14 - **r43** (298.199 KB, gzip: 74.805 KB)
* Improved Blender exporter - 2.58 (and 2.59) support, normals maps, specular, ao maps... ([alteredq](http://github.com/alteredq))
......@@ -155,6 +170,7 @@ This code creates a camera, then creates a scene, adds a cube on it, creates a &
* `CanvasRenderer` now supports `RepeatWrapping`, `texture.offset` and `texture.repeat`. ([mrdoob](http://github.com/mrdoob))
* Removed Stencil Shadows and Lensflare code. ([mrdoob](http://github.com/mrdoob))
2011 07 06 - **r42** (277.852 KB, gzip: 69.469 KB)
* Added `AnaglypWebGLRenderer` and `CrosseyedWebGLRenderer`. ([mrdoob](http://github.com/mrdoob), [alteredq](http://github.com/alteredq) and [marklundin](http://github.com/marklundin))
......
因为 它太大了无法显示 source diff 。你可以改为 查看blob
// ThreeCanvas.js r44dev - http://github.com/mrdoob/three.js
// ThreeCanvas.js r44 - http://github.com/mrdoob/three.js
var THREE=THREE||{};if(!window.Int32Array)window.Int32Array=Array,window.Float32Array=Array;THREE.Color=function(a){a!==void 0&&this.setHex(a);return this};
THREE.Color.prototype={constructor:THREE.Color,r:1,g:1,b:1,copy:function(a){this.r=a.r;this.g=a.g;this.b=a.b;return this},setRGB:function(a,b,c){this.r=a;this.g=b;this.b=c;return this},setHSV:function(a,b,c){var d,f,g;if(c==0)this.r=this.g=this.b=0;else switch(d=Math.floor(a*6),f=a*6-d,a=c*(1-b),g=c*(1-b*f),b=c*(1-b*(1-f)),d){case 1:this.r=g;this.g=c;this.b=a;break;case 2:this.r=a;this.g=c;this.b=b;break;case 3:this.r=a;this.g=g;this.b=c;break;case 4:this.r=b;this.g=a;this.b=c;break;case 5:this.r=
c;this.g=a;this.b=g;break;case 6:case 0:this.r=c,this.g=b,this.b=a}return this},setHex:function(a){a=Math.floor(a);this.r=(a>>16&255)/255;this.g=(a>>8&255)/255;this.b=(a&255)/255;return this},getHex:function(){return~~(this.r*255)<<16^~~(this.g*255)<<8^~~(this.b*255)},getContextStyle:function(){return"rgb("+Math.floor(this.r*255)+","+Math.floor(this.g*255)+","+Math.floor(this.b*255)+")"},clone:function(){return(new THREE.Color).setRGB(this.r,this.g,this.b)}};
......
// ThreeDOM.js r44dev - http://github.com/mrdoob/three.js
// ThreeDOM.js r44 - http://github.com/mrdoob/three.js
var THREE=THREE||{};if(!window.Int32Array)window.Int32Array=Array,window.Float32Array=Array;THREE.Color=function(a){a!==void 0&&this.setHex(a);return this};
THREE.Color.prototype={constructor:THREE.Color,r:1,g:1,b:1,copy:function(a){this.r=a.r;this.g=a.g;this.b=a.b;return this},setRGB:function(a,b,c){this.r=a;this.g=b;this.b=c;return this},setHSV:function(a,b,c){var d,e,g;if(c==0)this.r=this.g=this.b=0;else switch(d=Math.floor(a*6),e=a*6-d,a=c*(1-b),g=c*(1-b*e),b=c*(1-b*(1-e)),d){case 1:this.r=g;this.g=c;this.b=a;break;case 2:this.r=a;this.g=c;this.b=b;break;case 3:this.r=a;this.g=g;this.b=c;break;case 4:this.r=b;this.g=a;this.b=c;break;case 5:this.r=
c;this.g=a;this.b=g;break;case 6:case 0:this.r=c,this.g=b,this.b=a}return this},setHex:function(a){a=Math.floor(a);this.r=(a>>16&255)/255;this.g=(a>>8&255)/255;this.b=(a&255)/255;return this},getHex:function(){return~~(this.r*255)<<16^~~(this.g*255)<<8^~~(this.b*255)},getContextStyle:function(){return"rgb("+Math.floor(this.r*255)+","+Math.floor(this.g*255)+","+Math.floor(this.b*255)+")"},clone:function(){return(new THREE.Color).setRGB(this.r,this.g,this.b)}};
......
因为 它太大了无法显示 source diff 。你可以改为 查看blob
// ThreeSVG.js r44dev - http://github.com/mrdoob/three.js
// ThreeSVG.js r44 - http://github.com/mrdoob/three.js
var THREE=THREE||{};if(!window.Int32Array)window.Int32Array=Array,window.Float32Array=Array;THREE.Color=function(a){a!==void 0&&this.setHex(a);return this};
THREE.Color.prototype={constructor:THREE.Color,r:1,g:1,b:1,copy:function(a){this.r=a.r;this.g=a.g;this.b=a.b;return this},setRGB:function(a,b,c){this.r=a;this.g=b;this.b=c;return this},setHSV:function(a,b,c){var d,e,g;if(c==0)this.r=this.g=this.b=0;else switch(d=Math.floor(a*6),e=a*6-d,a=c*(1-b),g=c*(1-b*e),b=c*(1-b*(1-e)),d){case 1:this.r=g;this.g=c;this.b=a;break;case 2:this.r=a;this.g=c;this.b=b;break;case 3:this.r=a;this.g=g;this.b=c;break;case 4:this.r=b;this.g=a;this.b=c;break;case 5:this.r=
c;this.g=a;this.b=g;break;case 6:case 0:this.r=c,this.g=b,this.b=a}return this},setHex:function(a){a=Math.floor(a);this.r=(a>>16&255)/255;this.g=(a>>8&255)/255;this.b=(a&255)/255;return this},getHex:function(){return~~(this.r*255)<<16^~~(this.g*255)<<8^~~(this.b*255)},getContextStyle:function(){return"rgb("+Math.floor(this.r*255)+","+Math.floor(this.g*255)+","+Math.floor(this.b*255)+")"},clone:function(){return(new THREE.Color).setRGB(this.r,this.g,this.b)}};
......
// ThreeWebGL.js r44dev - http://github.com/mrdoob/three.js
// ThreeWebGL.js r44 - http://github.com/mrdoob/three.js
var THREE=THREE||{};if(!window.Int32Array)window.Int32Array=Array,window.Float32Array=Array;THREE.Color=function(b){b!==void 0&&this.setHex(b);return this};
THREE.Color.prototype={constructor:THREE.Color,r:1,g:1,b:1,copy:function(b){this.r=b.r;this.g=b.g;this.b=b.b;return this},setRGB:function(b,c,d){this.r=b;this.g=c;this.b=d;return this},setHSV:function(b,c,d){var e,j,h;if(d==0)this.r=this.g=this.b=0;else switch(e=Math.floor(b*6),j=b*6-e,b=d*(1-c),h=d*(1-c*j),c=d*(1-c*(1-j)),e){case 1:this.r=h;this.g=d;this.b=b;break;case 2:this.r=b;this.g=d;this.b=c;break;case 3:this.r=b;this.g=h;this.b=d;break;case 4:this.r=c;this.g=b;this.b=d;break;case 5:this.r=
d;this.g=b;this.b=h;break;case 6:case 0:this.r=d,this.g=c,this.b=b}return this},setHex:function(b){b=Math.floor(b);this.r=(b>>16&255)/255;this.g=(b>>8&255)/255;this.b=(b&255)/255;return this},getHex:function(){return~~(this.r*255)<<16^~~(this.g*255)<<8^~~(this.b*255)},getContextStyle:function(){return"rgb("+Math.floor(this.r*255)+","+Math.floor(this.g*255)+","+Math.floor(this.b*255)+")"},clone:function(){return(new THREE.Color).setRGB(this.r,this.g,this.b)}};
......
......@@ -21,7 +21,6 @@
<script type="text/javascript" src="js/Detector.js"></script>
<script type="text/javascript" src="js/RequestAnimationFrame.js"></script>
<script type="text/javascript" src="js/Stats.js"></script>
<script type="text/javascript" src="../src/extras/loaders/ColladaLoader.js"></script>
<script type="text/javascript">
......
......@@ -21,7 +21,7 @@
<script type="text/javascript">
var container, stats;
var container, data, stats;
var camera, scene, projector, renderer;
var objects = [], plane;
......@@ -91,9 +91,16 @@
renderer = new THREE.WebGLRenderer();
renderer.sortObjects = false;
renderer.setSize( window.innerWidth, window.innerHeight );
container.appendChild(renderer.domElement);
data = document.createElement( 'div' );
data.style.position = 'absolute';
data.style.whiteSpace = 'nowrap';
data.style.color = '#404040';
data.style.padding = '8px';
data.style.backgroundColor = '#ffffff';
container.appendChild( data );
stats = new Stats();
stats.domElement.style.position = 'absolute';
stats.domElement.style.top = '0px';
......@@ -109,6 +116,9 @@
event.preventDefault();
data.style.left = ( - 20 + event.clientX) + 'px';
data.style.top = ( 10 + event.clientY ) + 'px';
mouse.x = ( event.clientX / window.innerWidth ) * 2 - 1;
mouse.y = - ( event.clientY / window.innerHeight ) * 2 + 1;
......@@ -202,6 +212,17 @@
renderer.render( scene, camera );
if ( INTERSECTED ) {
data.style.visibility = 'visible';
data.innerHTML = 'x: ' + INTERSECTED.position.x + '<br>y: ' + INTERSECTED.position.y + '<br>z: ' + INTERSECTED.position.z;
} else {
data.style.visibility = 'hidden';
}
}
</script>
......
......@@ -923,10 +923,10 @@ var ColladaLoader = function () {
function Morph() {
this.method;
this.source;
this.targets;
this.weights;
this.method = null;
this.source = null;
this.targets = null;
this.weights = null;
};
......@@ -1731,7 +1731,7 @@ var ColladaLoader = function () {
this.geometry = geometry.id;
this.primitives = [];
this.vertices = null;
this.geometry3js;
this.geometry3js = null;
};
......@@ -1944,7 +1944,7 @@ var ColladaLoader = function () {
this.material = "";
this.count = 0;
this.inputs = [];
this.vcount;
this.vcount = null;
this.p = [];
this.geometry = new THREE.Geometry();
......@@ -2290,7 +2290,7 @@ var ColladaLoader = function () {
this.type = type;
this.effect = effect;
this.material;
this.material = null;
};
......@@ -2428,11 +2428,13 @@ var ColladaLoader = function () {
default:
/*
if ( !transparent ) {
// this.material = new THREE.MeshPhongMaterial(props);
}
*/
break;
......@@ -2445,8 +2447,8 @@ var ColladaLoader = function () {
function Surface ( effect ) {
this.effect = effect;
this.init_from;
this.format;
this.init_from = null;
this.format = null;
};
......@@ -2485,12 +2487,12 @@ var ColladaLoader = function () {
function Sampler2D ( effect ) {
this.effect = effect;
this.source;
this.wrap_s;
this.wrap_t;
this.minfilter;
this.magfilter;
this.mipfilter;
this.source = null;
this.wrap_s = null;
this.wrap_t = null;
this.minfilter = null;
this.magfilter = null;
this.mipfilter = null;
};
......@@ -2551,8 +2553,8 @@ var ColladaLoader = function () {
this.id = "";
this.name = "";
this.shader = null;
this.surface;
this.sampler;
this.surface = null;
this.sampler = null;
};
......@@ -2770,11 +2772,11 @@ var ColladaLoader = function () {
this.animation = animation;
this.source = "";
this.target = "";
this.sid;
this.dotSyntax;
this.arrSyntax;
this.arrIndices;
this.member;
this.sid = null;
this.dotSyntax = null;
this.arrSyntax = null;
this.arrIndices = null;
this.member = null;
};
......@@ -2828,11 +2830,11 @@ var ColladaLoader = function () {
this.id = "";
this.animation = animation;
this.inputs = [];
this.input;
this.output;
this.interpolation;
this.startTime;
this.endTime;
this.input = null;
this.output = null;
this.interpolation = null;
this.startTime = null;
this.endTime = null;
this.duration = 0;
};
......
......@@ -109,8 +109,9 @@ EXTRAS_FILES = [
'extras/geometries/TorusGeometry.js',
'extras/geometries/TorusKnotGeometry.js',
'extras/loaders/Loader.js',
'extras/loaders/JSONLoader.js',
'extras/loaders/BinaryLoader.js',
'extras/loaders/ColladaLoader.js',
'extras/loaders/JSONLoader.js',
'extras/loaders/SceneLoader.js',
'extras/loaders/UTF8Loader.js',
'extras/objects/MarchingCubes.js',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册