Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
ea619a19
T
three.js
项目概览
车家大少爷
/
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,发现更多精彩内容 >>
提交
ea619a19
编写于
3月 17, 2016
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated builds.
上级
9d4b774d
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
235 addition
and
230 deletion
+235
-230
build/three.js
build/three.js
+73
-69
build/three.min.js
build/three.min.js
+162
-161
未找到文件。
build/three.js
浏览文件 @
ea619a19
...
...
@@ -21384,7 +21384,7 @@ THREE.PointsMaterial.prototype.copy = function ( source ) {
*
* parameters = {
* defines: { "label" : "value" },
* uniforms: { "parameter1": { type: "
f", value: 1.0 }, "parameter2": { type: "
i" value2: 2 } },
* uniforms: { "parameter1": { type: "
1f", value: 1.0 }, "parameter2": { type: "1
i" value2: 2 } },
*
* fragmentShader: <string>,
* vertexShader: <string>,
...
...
@@ -23917,7 +23917,7 @@ THREE.UniformsLib = {
common: {
"diffuse": { type: "c", value: new THREE.Color( 0xeeeeee ) },
"opacity": { type: "f", value: 1.0 },
"opacity": { type: "
1
f", value: 1.0 },
"map": { type: "t", value: null },
"offsetRepeat": { type: "v4", value: new THREE.Vector4( 0, 0, 1, 1 ) },
...
...
@@ -23926,23 +23926,23 @@ THREE.UniformsLib = {
"alphaMap": { type: "t", value: null },
"envMap": { type: "t", value: null },
"flipEnvMap": { type: "f", value: - 1 },
"reflectivity": { type: "f", value: 1.0 },
"refractionRatio": { type: "f", value: 0.98 }
"flipEnvMap": { type: "
1
f", value: - 1 },
"reflectivity": { type: "
1
f", value: 1.0 },
"refractionRatio": { type: "
1
f", value: 0.98 }
},
aomap: {
"aoMap": { type: "t", value: null },
"aoMapIntensity": { type: "f", value: 1 }
"aoMapIntensity": { type: "
1
f", value: 1 }
},
lightmap: {
"lightMap": { type: "t", value: null },
"lightMapIntensity": { type: "f", value: 1 }
"lightMapIntensity": { type: "
1
f", value: 1 }
},
...
...
@@ -23955,7 +23955,7 @@ THREE.UniformsLib = {
bumpmap: {
"bumpMap": { type: "t", value: null },
"bumpScale": { type: "f", value: 1 }
"bumpScale": { type: "
1
f", value: 1 }
},
...
...
@@ -23969,8 +23969,8 @@ THREE.UniformsLib = {
displacementmap: {
"displacementMap": { type: "t", value: null },
"displacementScale": { type: "f", value: 1 },
"displacementBias": { type: "f", value: 0 }
"displacementScale": { type: "
1
f", value: 1 },
"displacementBias": { type: "
1
f", value: 0 }
},
...
...
@@ -23988,24 +23988,24 @@ THREE.UniformsLib = {
fog: {
"fogDensity": { type: "f", value: 0.00025 },
"fogNear": { type: "f", value: 1 },
"fogFar": { type: "f", value: 2000 },
"fogDensity": { type: "
1
f", value: 0.00025 },
"fogNear": { type: "
1
f", value: 1 },
"fogFar": { type: "
1
f", value: 2000 },
"fogColor": { type: "c", value: new THREE.Color( 0xffffff ) }
},
lights: {
"ambientLightColor": { type: "fv", value: [] },
"ambientLightColor": { type: "
3
fv", value: [] },
"directionalLights": { type: "sa", value: [], properties: {
"direction": { type: "v3" },
"color": { type: "c" },
"shadow": { type: "i" },
"shadowBias": { type: "f" },
"shadowRadius": { type: "f" },
"shadow": { type: "
1
i" },
"shadowBias": { type: "
1
f" },
"shadowRadius": { type: "
1
f" },
"shadowMapSize": { type: "v2" }
} },
...
...
@@ -24016,14 +24016,14 @@ THREE.UniformsLib = {
"color": { type: "c" },
"position": { type: "v3" },
"direction": { type: "v3" },
"distance": { type: "f" },
"coneCos": { type: "f" },
"penumbraCos": { type: "f" },
"decay": { type: "f" },
"shadow": { type: "i" },
"shadowBias": { type: "f" },
"shadowRadius": { type: "f" },
"distance": { type: "
1
f" },
"coneCos": { type: "
1
f" },
"penumbraCos": { type: "
1
f" },
"decay": { type: "
1
f" },
"shadow": { type: "
1
i" },
"shadowBias": { type: "
1
f" },
"shadowRadius": { type: "
1
f" },
"shadowMapSize": { type: "v2" }
} },
...
...
@@ -24033,12 +24033,12 @@ THREE.UniformsLib = {
"pointLights": { type: "sa", value: [], properties: {
"color": { type: "c" },
"position": { type: "v3" },
"decay": { type: "f" },
"distance": { type: "f" },
"decay": { type: "
1
f" },
"distance": { type: "
1
f" },
"shadow": { type: "i" },
"shadowBias": { type: "f" },
"shadowRadius": { type: "f" },
"shadow": { type: "
1
i" },
"shadowBias": { type: "
1
f" },
"shadowRadius": { type: "
1
f" },
"shadowMapSize": { type: "v2" }
} },
...
...
@@ -24056,9 +24056,9 @@ THREE.UniformsLib = {
points: {
"diffuse": { type: "c", value: new THREE.Color( 0xeeeeee ) },
"opacity": { type: "f", value: 1.0 },
"size": { type: "f", value: 1.0 },
"scale": { type: "f", value: 1.0 },
"opacity": { type: "
1
f", value: 1.0 },
"size": { type: "
1
f", value: 1.0 },
"scale": { type: "
1
f", value: 1.0 },
"map": { type: "t", value: null },
"offsetRepeat": { type: "v4", value: new THREE.Vector4( 0, 0, 1, 1 ) }
...
...
@@ -24229,7 +24229,7 @@ THREE.ShaderLib = {
{
"emissive" : { type: "c", value: new THREE.Color( 0x000000 ) },
"specular" : { type: "c", value: new THREE.Color( 0x111111 ) },
"shininess": { type: "f", value: 30 }
"shininess": { type: "
1
f", value: 30 }
}
] ),
...
...
@@ -24257,9 +24257,9 @@ THREE.ShaderLib = {
{
"emissive" : { type: "c", value: new THREE.Color( 0x000000 ) },
"roughness": { type: "f", value: 0.5 },
"metalness": { type: "f", value: 0 },
"envMapIntensity" : { type: "f", value: 1 } // temporary
"roughness": { type: "
1
f", value: 0.5 },
"metalness": { type: "
1
f", value: 0 },
"envMapIntensity" : { type: "
1
f", value: 1 } // temporary
}
] ),
...
...
@@ -24291,9 +24291,9 @@ THREE.ShaderLib = {
THREE.UniformsLib[ "fog" ],
{
"scale" : { type: "f", value: 1 },
"dashSize" : { type: "f", value: 1 },
"totalSize": { type: "f", value: 2 }
"scale" : { type: "
1
f", value: 1 },
"dashSize" : { type: "
1
f", value: 1 },
"totalSize": { type: "
1
f", value: 2 }
}
] ),
...
...
@@ -24307,9 +24307,9 @@ THREE.ShaderLib = {
uniforms: {
"mNear": { type: "f", value: 1.0 },
"mFar" : { type: "f", value: 2000.0 },
"opacity" : { type: "f", value: 1.0 }
"mNear": { type: "
1
f", value: 1.0 },
"mFar" : { type: "
1
f", value: 2000.0 },
"opacity" : { type: "
1
f", value: 1.0 }
},
...
...
@@ -24322,7 +24322,7 @@ THREE.ShaderLib = {
uniforms: {
"opacity" : { type: "f", value: 1.0 }
"opacity" : { type: "
1
f", value: 1.0 }
},
...
...
@@ -24339,7 +24339,7 @@ THREE.ShaderLib = {
uniforms: {
"tCube": { type: "t", value: null },
"tFlip": { type: "f", value: - 1 }
"tFlip": { type: "
1
f", value: - 1 }
},
vertexShader: THREE.ShaderChunk['cube_vert'],
...
...
@@ -24355,7 +24355,7 @@ THREE.ShaderLib = {
uniforms: {
"tEquirect": { type: "t", value: null },
"tFlip": { type: "f", value: - 1 }
"tFlip": { type: "
1
f", value: - 1 }
},
vertexShader: THREE.ShaderChunk['equirect_vert'],
...
...
@@ -26692,12 +26692,12 @@ THREE.WebGLRenderer = function ( parameters ) {
} else if ( type === 'i' ) {
// single integer
console.warn( 'THREE.WebGLRenderer: Uniform "i" is now "1i".' );
_gl.uniform1i( location, value );
} else if ( type === 'f' ) {
// single float
console.warn( 'THREE.WebGLRenderer: Uniform "f" is now "1f".' );
_gl.uniform1f( location, value );
} else if ( type === 'v2' ) {
...
...
@@ -26758,22 +26758,22 @@ THREE.WebGLRenderer = function ( parameters ) {
} else if ( type === 'iv1' ) {
// flat array of integers (JS or typed array)
console.warn( 'THREE.WebGLRenderer: Uniform "iv1" is now "1iv".' );
_gl.uniform1iv( location, value );
} else if ( type === 'iv' ) {
// flat array of integers with 3 x N size (JS or typed array)
console.warn( 'THREE.WebGLRenderer: Uniform "iv" is now "3iv".' );
_gl.uniform3iv( location, value );
} else if ( type === 'fv1' ) {
// flat array of floats (JS or typed array)
console.warn( 'THREE.WebGLRenderer: Uniform "fv1" is now "1fv".' );
_gl.uniform1fv( location, value );
} else if ( type === 'fv' ) {
// flat array of floats with 3 x N size (JS or typed array)
console.warn( 'THREE.WebGLRenderer: Uniform "fv" is now "3fv".' );
_gl.uniform3fv( location, value );
} else if ( type === 'v2v' ) {
...
...
@@ -29760,16 +29760,16 @@ THREE.WebGLPrograms = function ( renderer, capabilities ) {
this.getProgramCode = function ( material, parameters ) {
var
chunks
= [];
var
array
= [];
if ( parameters.shaderID ) {
chunks
.push( parameters.shaderID );
array
.push( parameters.shaderID );
} else {
chunks
.push( material.fragmentShader );
chunks
.push( material.vertexShader );
array
.push( material.fragmentShader );
array
.push( material.vertexShader );
}
...
...
@@ -29777,8 +29777,8 @@ THREE.WebGLPrograms = function ( renderer, capabilities ) {
for ( var name in material.defines ) {
chunks
.push( name );
chunks
.push( material.defines[ name ] );
array
.push( name );
array
.push( material.defines[ name ] );
}
...
...
@@ -29786,11 +29786,11 @@ THREE.WebGLPrograms = function ( renderer, capabilities ) {
for ( var i = 0; i < parameterNames.length; i ++ ) {
chunks
.push( parameters[ parameterNames[ i ] ] );
array
.push( parameters[ parameterNames[ i ] ] );
}
return
chunks
.join();
return
array
.join();
};
...
...
@@ -31092,14 +31092,14 @@ THREE.LensFlarePlugin = function ( renderer, flares ) {
occlusionTexture = gl.createTexture();
state.bindTexture( gl.TEXTURE_2D, tempTexture );
gl.texImage2D( gl.TEXTURE_2D, 0, gl.RGB, 16, 16, 0, gl.RGB, gl.UNSIGNED_BYTE, n
ew Uint8Array( 16 * 16 * 3 )
);
gl.texImage2D( gl.TEXTURE_2D, 0, gl.RGB, 16, 16, 0, gl.RGB, gl.UNSIGNED_BYTE, n
ull
);
gl.texParameteri( gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE );
gl.texParameteri( gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE );
gl.texParameteri( gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST );
gl.texParameteri( gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST );
state.bindTexture( gl.TEXTURE_2D, occlusionTexture );
gl.texImage2D( gl.TEXTURE_2D, 0, gl.RGBA, 16, 16, 0, gl.RGBA, gl.UNSIGNED_BYTE, n
ew Uint8Array( 16 * 16 * 4 )
);
gl.texImage2D( gl.TEXTURE_2D, 0, gl.RGBA, 16, 16, 0, gl.RGBA, gl.UNSIGNED_BYTE, n
ull
);
gl.texParameteri( gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE );
gl.texParameteri( gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE );
gl.texParameteri( gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST );
...
...
@@ -31335,6 +31335,8 @@ THREE.LensFlarePlugin = function ( renderer, flares ) {
var screenPosition = new THREE.Vector3( 1, 1, 0 ),
screenPositionPixels = new THREE.Vector2( 1, 1 );
var areaToCopy = new THREE.Vector2();
if ( program === undefined ) {
init();
...
...
@@ -31384,13 +31386,15 @@ THREE.LensFlarePlugin = function ( renderer, flares ) {
screenPositionPixels.x = screenPosition.x * halfViewportWidth + halfViewportWidth;
screenPositionPixels.y = screenPosition.y * halfViewportHeight + halfViewportHeight;
areaToCopy.x = viewport.x + screenPositionPixels.x - 8; // horizontal coordinate of the lower left corner of the pixels to copy
areaToCopy.y = viewport.y + screenPositionPixels.y - 8; // vertical coordinate of the lower left corner of the pixels to copy
// screen cull
if ( hasVertexTexture || (
screenPositionPixels.x > 0 &&
screenPositionPixels.x < viewport.z &&
screenPositionPixels.y > 0 &&
screenPositionPixels.y < viewport.w ) ) {
if ( areaToCopy.x > 0 &&
areaToCopy.x < ( viewport.z - 16 ) &&
areaToCopy.y > 0 &&
areaToCopy.y < ( viewport.w - 16 ) ) {
// save current RGB to temp texture
...
...
@@ -31398,7 +31402,7 @@ THREE.LensFlarePlugin = function ( renderer, flares ) {
state.bindTexture( gl.TEXTURE_2D, null );
state.activeTexture( gl.TEXTURE1 );
state.bindTexture( gl.TEXTURE_2D, tempTexture );
gl.copyTexImage2D( gl.TEXTURE_2D, 0, gl.RGB,
viewport.x + screenPositionPixels.x - 8, viewport.y + screenPositionPixels.y - 8
, 16, 16, 0 );
gl.copyTexImage2D( gl.TEXTURE_2D, 0, gl.RGB,
areaToCopy.x, areaToCopy.y
, 16, 16, 0 );
// render pink quad
...
...
@@ -31417,7 +31421,7 @@ THREE.LensFlarePlugin = function ( renderer, flares ) {
state.activeTexture( gl.TEXTURE0 );
state.bindTexture( gl.TEXTURE_2D, occlusionTexture );
gl.copyTexImage2D( gl.TEXTURE_2D, 0, gl.RGBA,
viewport.x + screenPositionPixels.x - 8, viewport.y + screenPositionPixels.y - 8
, 16, 16, 0 );
gl.copyTexImage2D( gl.TEXTURE_2D, 0, gl.RGBA,
areaToCopy.x, areaToCopy.y
, 16, 16, 0 );
// restore graphics
...
...
build/three.min.js
浏览文件 @
ea619a19
因为 它太大了无法显示 source diff 。你可以改为
查看blob
。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录