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

Merge remote-tracking branch 'timknip/master' into dev

......@@ -86,16 +86,17 @@
// Lights
scene.addLight( new THREE.AmbientLight( 0xaaaaaa) );
scene.addLight( new THREE.AmbientLight( 0xcccccc) );
var directionalLight = new THREE.DirectionalLight(/*Math.random() * 0xffffff*/0xbbbbbb);
var directionalLight = new THREE.DirectionalLight(/*Math.random() * 0xffffff*/0xeeeeee);
directionalLight.position.x = Math.random() - 0.5;
directionalLight.position.y = Math.random() - 0.5;
directionalLight.position.z = Math.random() - 0.5;
directionalLight.position.normalize();
scene.addLight( directionalLight );
pointLight = new THREE.PointLight( 0xdddddd, 0.6 );
pointLight = new THREE.PointLight( 0xffffff , 4);
pointLight.position.x = 10000;
scene.addLight( pointLight );
renderer = new THREE.WebGLRenderer();
......@@ -140,9 +141,9 @@
camera.position.y = 2;
camera.position.z = Math.sin( timer ) * 10;
particleLight.position.x = Math.sin( timer * 4 ) * 300;
particleLight.position.y = Math.cos( timer * 5 ) * 400;
particleLight.position.z = Math.cos( timer * 4 ) * 300;
particleLight.position.x = Math.sin( timer * 4 ) * 3009;
particleLight.position.y = Math.cos( timer * 5 ) * 4000;
particleLight.position.z = Math.cos( timer * 4 ) * 3009;
pointLight.position.x = particleLight.position.x;
pointLight.position.y = particleLight.position.y;
......
......@@ -267,7 +267,7 @@ var DAE = (function() {
var inv = skin.invBindMatrices[found];
bone.invBindMatrix = inv;
bone.skinningMatrix = new THREE.Matrix4();
bone.skinningMatrix.multiply(bone.world, inv);
bone.skinningMatrix.multiply(bone.world, inv); // (IBMi * JMi)
bone.weights = [];
for (var j = 0; j < skin.weights.length; j++) {
for (var k = 0; k < skin.weights[j].length; k++) {
......@@ -1225,7 +1225,7 @@ var DAE = (function() {
ns.push(new THREE.Vector3(source.data[idx32+0], source.data[idx32+1], source.data[idx32+2]));
break;
case 'TEXCOORD':
if (ts[input.set] == undefined) ts[input.set] = [];
if (ts[input.set] === undefined) ts[input.set] = [];
ts[input.set].push(new THREE.UV(source.data[idx32+0], source.data[idx32+1]));
break;
default:
......@@ -1568,7 +1568,7 @@ var DAE = (function() {
case 'blinn':
default:
if (!transparent) {
this.material = new THREE.MeshPhongMaterial(props);
// this.material = new THREE.MeshPhongMaterial(props);
}
break;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册