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

Updated builds.

上级 ed9412dc
......@@ -15472,7 +15472,7 @@ THREE.PropertyBinding.prototype = {
// resolve property
var nodeProperty = targetObject[ propertyName ];
if ( ! nodeProperty ) {
if ( nodeProperty === undefined ) {
var nodeName = parsedPath.nodeName;
......@@ -17094,6 +17094,7 @@ THREE.CubeCamera.prototype.constructor = THREE.CubeCamera;
/**
* @author alteredq / http://alteredqualia.com/
* @author arose / http://github.com/arose
*/
THREE.OrthographicCamera = function ( left, right, top, bottom, near, far ) {
......@@ -17103,6 +17104,7 @@ THREE.OrthographicCamera = function ( left, right, top, bottom, near, far ) {
this.type = 'OrthographicCamera';
this.zoom = 1;
this.view = null;
this.left = left;
this.right = right;
......@@ -17132,11 +17134,34 @@ THREE.OrthographicCamera.prototype = Object.assign( Object.create( THREE.Camera.
this.far = source.far;
this.zoom = source.zoom;
this.view = source.view === null ? null : Object.assign( {}, source.view );
return this;
},
setViewOffset: function( fullWidth, fullHeight, x, y, width, height ) {
this.view = {
fullWidth: fullWidth,
fullHeight: fullHeight,
offsetX: x,
offsetY: y,
width: width,
height: height
};
this.updateProjectionMatrix();
},
clearViewOffset: function() {
this.view = null;
this.updateProjectionMatrix();
},
updateProjectionMatrix: function () {
var dx = ( this.right - this.left ) / ( 2 * this.zoom );
......@@ -17144,7 +17169,26 @@ THREE.OrthographicCamera.prototype = Object.assign( Object.create( THREE.Camera.
var cx = ( this.right + this.left ) / 2;
var cy = ( this.top + this.bottom ) / 2;
this.projectionMatrix.makeOrthographic( cx - dx, cx + dx, cy + dy, cy - dy, this.near, this.far );
var left = cx - dx;
var right = cx + dx;
var top = cy + dy;
var bottom = cy - dy;
if ( this.view !== null ) {
var zoomW = this.zoom / ( this.view.width / this.view.fullWidth );
var zoomH = this.zoom / ( this.view.height / this.view.fullHeight );
var scaleW = ( this.right - this.left ) / this.view.width;
var scaleH = ( this.top - this.bottom ) / this.view.height;
left += scaleW * ( this.view.offsetX / zoomW );
right = left + scaleW * ( this.view.width / zoomW );
top -= scaleH * ( this.view.offsetY / zoomH );
bottom = top - scaleH * ( this.view.height / zoomH );
}
this.projectionMatrix.makeOrthographic( left, right, top, bottom, this.near, this.far );
},
......@@ -17160,6 +17204,8 @@ THREE.OrthographicCamera.prototype = Object.assign( Object.create( THREE.Camera.
data.object.near = this.near;
data.object.far = this.far;
if ( this.view !== null ) data.object.view = Object.assign( {}, this.view );
return data;
}
......@@ -18082,6 +18128,7 @@ THREE.Loader.prototype = {
case 'shading':
if ( value.toLowerCase() === 'basic' ) json.type = 'MeshBasicMaterial';
if ( value.toLowerCase() === 'phong' ) json.type = 'MeshPhongMaterial';
if ( value.toLowerCase() === 'standard' ) json.type = 'MeshStandardMaterial';
break;
case 'mapDiffuse':
json.map = loadTexture( value, m.mapDiffuseRepeat, m.mapDiffuseOffset, m.mapDiffuseWrap, m.mapDiffuseAnisotropy );
......@@ -18091,6 +18138,14 @@ THREE.Loader.prototype = {
case 'mapDiffuseWrap':
case 'mapDiffuseAnisotropy':
break;
case 'mapEmissive':
json.emissiveMap = loadTexture( value, m.mapEmissiveRepeat, m.mapEmissiveOffset, m.mapEmissiveWrap, m.mapEmissiveAnisotropy );
break;
case 'mapEmissiveRepeat':
case 'mapEmissiveOffset':
case 'mapEmissiveWrap':
case 'mapEmissiveAnisotropy':
break;
case 'mapLight':
json.lightMap = loadTexture( value, m.mapLightRepeat, m.mapLightOffset, m.mapLightWrap, m.mapLightAnisotropy );
break;
......@@ -18137,6 +18192,22 @@ THREE.Loader.prototype = {
case 'mapSpecularWrap':
case 'mapSpecularAnisotropy':
break;
case 'mapMetalness':
json.metalnessMap = loadTexture( value, m.mapMetalnessRepeat, m.mapMetalnessOffset, m.mapMetalnessWrap, m.mapMetalnessAnisotropy );
break;
case 'mapMetalnessRepeat':
case 'mapMetalnessOffset':
case 'mapMetalnessWrap':
case 'mapMetalnessAnisotropy':
break;
case 'mapRoughness':
json.roughnessMap = loadTexture( value, m.mapRoughnessRepeat, m.mapRoughnessOffset, m.mapRoughnessWrap, m.mapRoughnessAnisotropy );
break;
case 'mapRoughnessRepeat':
case 'mapRoughnessOffset':
case 'mapRoughnessWrap':
case 'mapRoughnessAnisotropy':
break;
case 'mapAlpha':
json.alphaMap = loadTexture( value, m.mapAlphaRepeat, m.mapAlphaOffset, m.mapAlphaWrap, m.mapAlphaAnisotropy );
break;
......
因为 它太大了无法显示 source diff 。你可以改为 查看blob
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册