Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
64976be3
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,发现更多精彩内容 >>
提交
64976be3
编写于
7月 09, 2014
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated builds.
上级
089bbcfb
变更
2
展开全部
隐藏空白更改
内联
并排
Showing
2 changed file
with
422 addition
and
378 deletion
+422
-378
build/three.js
build/three.js
+53
-11
build/three.min.js
build/three.min.js
+369
-367
未找到文件。
build/three.js
浏览文件 @
64976be3
...
...
@@ -15138,7 +15138,7 @@ THREE.Skeleton.prototype.addBone = function ( bone ) {
};
THREE.Skeleton.prototype.calculateInverses = function (
bone
) {
THREE.Skeleton.prototype.calculateInverses = function () {
this.boneInverses = [];
...
...
@@ -18115,6 +18115,8 @@ THREE.ShaderLib = {
" #endif",
" }",
THREE.ShaderChunk[ "alphatest_fragment" ],
" if( enableSpecular )",
" specularTex = texture2D( tSpecular, vUv ).xyz;",
...
...
@@ -22935,7 +22937,11 @@ THREE.WebGLRenderer = function ( parameters ) {
for ( u in material.__webglShader.uniforms ) {
material.uniformsList.push( [ material.__webglShader.uniforms[ u ], u ] );
var location = material.program.uniforms[ u ];
if ( location ) {
material.uniformsList.push( [ material.__webglShader.uniforms[ u ], location ] );
}
}
...
...
@@ -22966,6 +22972,7 @@ THREE.WebGLRenderer = function ( parameters ) {
var refreshProgram = false;
var refreshMaterial = false;
var refreshLights = false;
var program = material.program,
p_uniforms = program.uniforms,
...
...
@@ -22978,12 +22985,15 @@ THREE.WebGLRenderer = function ( parameters ) {
refreshProgram = true;
refreshMaterial = true;
refreshLights = true;
}
if ( material.id !== _currentMaterialId ) {
if ( _currentMaterialId === -1 ) refreshLights = true;
_currentMaterialId = material.id;
refreshMaterial = true;
}
...
...
@@ -23089,12 +23099,17 @@ THREE.WebGLRenderer = function ( parameters ) {
if ( _lightsNeedUpdate ) {
setupLights( program, lights );
refreshLights = true;
setupLights( lights );
_lightsNeedUpdate = false;
}
refreshUniformsLights( m_uniforms, _lights );
if ( refreshLights ) {
refreshUniformsLights( m_uniforms, _lights );
markUniformsLightsNeedsUpdate( m_uniforms, true );
} else {
markUniformsLightsNeedsUpdate( m_uniforms, false );
}
}
...
...
@@ -23149,7 +23164,7 @@ THREE.WebGLRenderer = function ( parameters ) {
// load common uniforms
loadUniformsGeneric(
program,
material.uniformsList );
loadUniformsGeneric( material.uniformsList );
}
...
...
@@ -23375,6 +23390,32 @@ THREE.WebGLRenderer = function ( parameters ) {
};
// If uniforms are marked as clean, they don't need to be loaded to the GPU.
function markUniformsLightsNeedsUpdate ( uniforms, boolean ) {
uniforms.ambientLightColor.needsUpdate = boolean;
uniforms.directionalLightColor.needsUpdate = boolean;
uniforms.directionalLightDirection.needsUpdate = boolean;
uniforms.pointLightColor.needsUpdate = boolean;
uniforms.pointLightPosition.needsUpdate = boolean;
uniforms.pointLightDistance.needsUpdate = boolean;
uniforms.spotLightColor.needsUpdate = boolean;
uniforms.spotLightPosition.needsUpdate = boolean;
uniforms.spotLightDistance.needsUpdate = boolean;
uniforms.spotLightDirection.needsUpdate = boolean;
uniforms.spotLightAngleCos.needsUpdate = boolean;
uniforms.spotLightExponent.needsUpdate = boolean;
uniforms.hemisphereLightSkyColor.needsUpdate = boolean;
uniforms.hemisphereLightGroundColor.needsUpdate = boolean;
uniforms.hemisphereLightDirection.needsUpdate = boolean;
};
function refreshUniformsShadow ( uniforms, lights ) {
if ( uniforms.shadowMatrix ) {
...
...
@@ -23437,18 +23478,19 @@ THREE.WebGLRenderer = function ( parameters ) {
};
function loadUniformsGeneric (
program,
uniforms ) {
function loadUniformsGeneric ( uniforms ) {
var texture, textureUnit, offset;
for ( var j = 0, jl = uniforms.length; j < jl; j ++ ) {
var location = program.uniforms[ uniforms[ j ][ 1 ] ];
if ( ! location ) continue;
var location = uniforms[ j ][ 1 ];
var uniform = uniforms[ j ][ 0 ];
// needsUpdate property is not added to all uniforms.
if ( uniform.needsUpdate === false ) continue;
var type = uniform.type;
var value = uniform.value;
...
...
@@ -23678,7 +23720,7 @@ THREE.WebGLRenderer = function ( parameters ) {
};
function setupLights (
program,
lights ) {
function setupLights ( lights ) {
var l, ll, light, n,
r = 0, g = 0, b = 0,
...
...
build/three.min.js
浏览文件 @
64976be3
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录