Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
918d322b
T
three.js
项目概览
Ablesons
/
three.js
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
three.js
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
918d322b
编写于
7月 12, 2015
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated builds.
上级
0cd76d80
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
284 addition
and
321 deletion
+284
-321
build/three.js
build/three.js
+43
-80
build/three.min.js
build/three.min.js
+241
-241
未找到文件。
build/three.js
浏览文件 @
918d322b
...
@@ -19312,6 +19312,9 @@ THREE.WebGLRenderer = function ( parameters ) {
...
@@ -19312,6 +19312,9 @@ THREE.WebGLRenderer = function ( parameters ) {
var opaqueObjects = [];
var opaqueObjects = [];
var transparentObjects = [];
var transparentObjects = [];
var opaqueImmediateObjects = [];
var transparentImmediateObjects = [];
var sprites = [];
var sprites = [];
var lensFlares = [];
var lensFlares = [];
...
@@ -20810,9 +20813,13 @@ THREE.WebGLRenderer = function ( parameters ) {
...
@@ -20810,9 +20813,13 @@ THREE.WebGLRenderer = function ( parameters ) {
_frustum.setFromMatrix( _projScreenMatrix );
_frustum.setFromMatrix( _projScreenMatrix );
lights.length = 0;
lights.length = 0;
opaqueObjects.length = 0;
opaqueObjects.length = 0;
transparentObjects.length = 0;
transparentObjects.length = 0;
opaqueImmediateObjects.length = 0;
transparentImmediateObjects.length = 0;
sprites.length = 0;
sprites.length = 0;
lensFlares.length = 0;
lensFlares.length = 0;
...
@@ -20847,34 +20854,7 @@ THREE.WebGLRenderer = function ( parameters ) {
...
@@ -20847,34 +20854,7 @@ THREE.WebGLRenderer = function ( parameters ) {
}
}
// set matrices for immediate objects
//
for ( var i = 0, il = objects.objectsImmediate.length; i < il; i ++ ) {
var webglObject = objects.objectsImmediate[ i ];
var object = webglObject.object;
if ( object.visible === true ) {
setupMatrices( object, camera );
var material = object.material;
if ( material.transparent ) {
webglObject.transparent = material;
webglObject.opaque = null;
} else {
webglObject.opaque = material;
webglObject.transparent = null;
}
}
}
if ( scene.overrideMaterial ) {
if ( scene.overrideMaterial ) {
...
@@ -20882,7 +20862,9 @@ THREE.WebGLRenderer = function ( parameters ) {
...
@@ -20882,7 +20862,9 @@ THREE.WebGLRenderer = function ( parameters ) {
renderObjects( opaqueObjects, camera, lights, fog, overrideMaterial );
renderObjects( opaqueObjects, camera, lights, fog, overrideMaterial );
renderObjects( transparentObjects, camera, lights, fog, overrideMaterial );
renderObjects( transparentObjects, camera, lights, fog, overrideMaterial );
renderObjectsImmediate( objects.objectsImmediate, '', camera, lights, fog, overrideMaterial );
renderObjectsImmediate( opaqueImmediateObjects, camera, lights, fog, overrideMaterial );
renderObjectsImmediate( transparentImmediateObjects, camera, lights, fog, overrideMaterial );
} else {
} else {
...
@@ -20891,12 +20873,12 @@ THREE.WebGLRenderer = function ( parameters ) {
...
@@ -20891,12 +20873,12 @@ THREE.WebGLRenderer = function ( parameters ) {
state.setBlending( THREE.NoBlending );
state.setBlending( THREE.NoBlending );
renderObjects( opaqueObjects, camera, lights, fog, null );
renderObjects( opaqueObjects, camera, lights, fog, null );
renderObjectsImmediate( o
bjects.objectsImmediate, 'opaque'
, camera, lights, fog, null );
renderObjectsImmediate( o
paqueImmediateObjects
, camera, lights, fog, null );
// transparent pass (back-to-front order)
// transparent pass (back-to-front order)
renderObjects( transparentObjects, camera, lights, fog, null );
renderObjects( transparentObjects, camera, lights, fog, null );
renderObjectsImmediate(
objects.objectsImmediate, 'transparent'
, camera, lights, fog, null );
renderObjectsImmediate(
transparentImmediateObjects
, camera, lights, fog, null );
}
}
...
@@ -20954,6 +20936,20 @@ THREE.WebGLRenderer = function ( parameters ) {
...
@@ -20954,6 +20936,20 @@ THREE.WebGLRenderer = function ( parameters ) {
lensFlares.push( object );
lensFlares.push( object );
} else if ( object instanceof THREE.ImmediateRenderObject ) {
var material = object.material;
if ( material.transparent ) {
transparentImmediateObjects.push( object );
} else {
opaqueImmediateObjects.push( object );
}
} else {
} else {
var webglObject = objects.objects[ object.id ];
var webglObject = objects.objects[ object.id ];
...
@@ -21010,7 +21006,6 @@ THREE.WebGLRenderer = function ( parameters ) {
...
@@ -21010,7 +21006,6 @@ THREE.WebGLRenderer = function ( parameters ) {
for ( var i = 0, l = renderList.length; i < l; i ++ ) {
for ( var i = 0, l = renderList.length; i < l; i ++ ) {
var webglObject = renderList[ i ];
var webglObject = renderList[ i ];
var object = webglObject.object;
var object = webglObject.object;
setupMatrices( object, camera );
setupMatrices( object, camera );
...
@@ -21037,20 +21032,19 @@ THREE.WebGLRenderer = function ( parameters ) {
...
@@ -21037,20 +21032,19 @@ THREE.WebGLRenderer = function ( parameters ) {
}
}
function renderObjectsImmediate
( renderList, materialType
, camera, lights, fog, overrideMaterial ) {
function renderObjectsImmediate
( renderList
, camera, lights, fog, overrideMaterial ) {
var material = overrideMaterial;
var material = overrideMaterial;
for ( var i = 0, l = renderList.length; i < l; i ++ ) {
for ( var i = 0, l = renderList.length; i < l; i ++ ) {
var webglObject = renderList[ i ];
var object = renderList[ i ];
var object = webglObject.object;
if ( object.visible === true ) {
setupMatrices( object, camera );
if ( overrideMaterial === null ) material = webglObject[ materialType ];
if ( object.visible === true ) {
if (
! material ) continue
;
if (
overrideMaterial === null ) material = object.material
;
_this.renderImmediateObject( camera, lights, fog, material, object );
_this.renderImmediateObject( camera, lights, fog, material, object );
...
@@ -21074,7 +21068,11 @@ THREE.WebGLRenderer = function ( parameters ) {
...
@@ -21074,7 +21068,11 @@ THREE.WebGLRenderer = function ( parameters ) {
} else {
} else {
object.render( function ( object ) { _this.renderBufferImmediate( object, program, material ); } );
object.render( function ( object ) {
_this.renderBufferImmediate( object, program, material );
} );
}
}
...
@@ -22209,7 +22207,7 @@ THREE.WebGLRenderer = function ( parameters ) {
...
@@ -22209,7 +22207,7 @@ THREE.WebGLRenderer = function ( parameters ) {
}
}
function setupMatrices
( object, camera ) {
function setupMatrices( object, camera ) {
object._modelViewMatrix.multiplyMatrices( camera.matrixWorldInverse, object.matrixWorld );
object._modelViewMatrix.multiplyMatrices( camera.matrixWorldInverse, object.matrixWorld );
object._normalMatrix.getNormalMatrix( object._modelViewMatrix );
object._normalMatrix.getNormalMatrix( object._modelViewMatrix );
...
@@ -23572,7 +23570,6 @@ THREE.WebGLGeometries = function ( gl, info ) {
...
@@ -23572,7 +23570,6 @@ THREE.WebGLGeometries = function ( gl, info ) {
THREE.WebGLObjects = function ( gl, properties, info ) {
THREE.WebGLObjects = function ( gl, properties, info ) {
var objects = {};
var objects = {};
var objectsImmediate = [];
var morphInfluences = new Float32Array( 8 );
var morphInfluences = new Float32Array( 8 );
...
@@ -23601,10 +23598,6 @@ THREE.WebGLObjects = function ( gl, properties, info ) {
...
@@ -23601,10 +23598,6 @@ THREE.WebGLObjects = function ( gl, properties, info ) {
delete objects[ object.id ];
delete objects[ object.id ];
} else if ( object instanceof THREE.ImmediateRenderObject || object.immediateRenderCallback ) {
removeInstances( objectsImmediate, object );
}
}
delete object._modelViewMatrix;
delete object._modelViewMatrix;
...
@@ -23631,7 +23624,6 @@ THREE.WebGLObjects = function ( gl, properties, info ) {
...
@@ -23631,7 +23624,6 @@ THREE.WebGLObjects = function ( gl, properties, info ) {
//
//
this.objects = objects;
this.objects = objects;
this.objectsImmediate = objectsImmediate;
this.geometries = geometries;
this.geometries = geometries;
...
@@ -23661,16 +23653,6 @@ THREE.WebGLObjects = function ( gl, properties, info ) {
...
@@ -23661,16 +23653,6 @@ THREE.WebGLObjects = function ( gl, properties, info ) {
z: 0
z: 0
};
};
} else if ( object instanceof THREE.ImmediateRenderObject || object.immediateRenderCallback ) {
objectsImmediate.push( {
id: null,
object: object,
opaque: null,
transparent: null,
z: 0
} );
}
}
}
}
...
@@ -23838,7 +23820,6 @@ THREE.WebGLObjects = function ( gl, properties, info ) {
...
@@ -23838,7 +23820,6 @@ THREE.WebGLObjects = function ( gl, properties, info ) {
this.clear = function () {
this.clear = function () {
objects = {};
objects = {};
objectsImmediate = [];
};
};
...
@@ -24457,7 +24438,6 @@ THREE.WebGLShadowMap = function ( _renderer, _lights, _objects ) {
...
@@ -24457,7 +24438,6 @@ THREE.WebGLShadowMap = function ( _renderer, _lights, _objects ) {
_max = new THREE.Vector3(),
_max = new THREE.Vector3(),
_webglObjects = _objects.objects,
_webglObjects = _objects.objects,
_webglObjectsImmediate = _objects.objectsImmediate,
_matrixPosition = new THREE.Vector3(),
_matrixPosition = new THREE.Vector3(),
...
@@ -24759,23 +24739,6 @@ THREE.WebGLShadowMap = function ( _renderer, _lights, _objects ) {
...
@@ -24759,23 +24739,6 @@ THREE.WebGLShadowMap = function ( _renderer, _lights, _objects ) {
}
}
// set matrices and render immediate objects
for ( j = 0, jl = _webglObjectsImmediate.length; j < jl; j ++ ) {
webglObject = _webglObjectsImmediate[ j ];
object = webglObject.object;
if ( object.visible && object.castShadow ) {
object._modelViewMatrix.multiplyMatrices( shadowCamera.matrixWorldInverse, object.matrixWorld );
_renderer.renderImmediateObject( shadowCamera, _lights, fog, _depthMaterial, object );
}
}
}
}
// restore GL state
// restore GL state
...
@@ -24798,7 +24761,7 @@ THREE.WebGLShadowMap = function ( _renderer, _lights, _objects ) {
...
@@ -24798,7 +24761,7 @@ THREE.WebGLShadowMap = function ( _renderer, _lights, _objects ) {
};
};
function projectObject( object,
shadowC
amera ) {
function projectObject( object,
c
amera ) {
if ( object.visible === true ) {
if ( object.visible === true ) {
...
@@ -24806,14 +24769,14 @@ THREE.WebGLShadowMap = function ( _renderer, _lights, _objects ) {
...
@@ -24806,14 +24769,14 @@ THREE.WebGLShadowMap = function ( _renderer, _lights, _objects ) {
if ( webglObject && object.castShadow && ( object.frustumCulled === false || _frustum.intersectsObject( object ) === true ) ) {
if ( webglObject && object.castShadow && ( object.frustumCulled === false || _frustum.intersectsObject( object ) === true ) ) {
object._modelViewMatrix.multiplyMatrices(
shadowC
amera.matrixWorldInverse, object.matrixWorld );
object._modelViewMatrix.multiplyMatrices(
c
amera.matrixWorldInverse, object.matrixWorld );
_renderList.push( webglObject );
_renderList.push( webglObject );
}
}
for ( var i = 0, l = object.children.length; i < l; i ++ ) {
for ( var i = 0, l = object.children.length; i < l; i ++ ) {
projectObject( object.children[ i ],
shadowC
amera );
projectObject( object.children[ i ],
c
amera );
}
}
...
@@ -25349,12 +25312,12 @@ THREE.WebGLState = function ( gl, paramThreeToGL ) {
...
@@ -25349,12 +25312,12 @@ THREE.WebGLState = function ( gl, paramThreeToGL ) {
}
}
var boundTexture = currentBoundTextures[
currentTextureSlot
];
var boundTexture = currentBoundTextures[
currentTextureSlot
];
if ( boundTexture === undefined ) {
if ( boundTexture === undefined ) {
boundTexture = { type: undefined, texture: undefined };
boundTexture = { type: undefined, texture: undefined };
currentBoundTextures[
currentTextureSlot
] = boundTexture;
currentBoundTextures[
currentTextureSlot
] = boundTexture;
}
}
...
...
build/three.min.js
浏览文件 @
918d322b
因为 它太大了无法显示 source diff 。你可以改为
查看blob
。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录