Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
5f4c46b8
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,体验更适合开发者的 AI 搜索 >>
提交
5f4c46b8
编写于
8月 24, 2017
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated builds.
上级
e62a722e
变更
3
展开全部
隐藏空白更改
内联
并排
Showing
3 changed file
with
637 addition
and
639 deletion
+637
-639
build/three.js
build/three.js
+23
-24
build/three.min.js
build/three.min.js
+591
-591
build/three.module.js
build/three.module.js
+23
-24
未找到文件。
build/three.js
浏览文件 @
5f4c46b8
...
...
@@ -6869,6 +6869,7 @@
fogNear: gl.getUniformLocation( program, 'fogNear' ),
fogFar: gl.getUniformLocation( program, 'fogFar' ),
fogColor: gl.getUniformLocation( program, 'fogColor' ),
fogDepth: gl.getUniformLocation( program, 'fogDepth' ),
alphaTest: gl.getUniformLocation( program, 'alphaTest' )
};
...
...
@@ -7065,6 +7066,7 @@
'attribute vec2 uv;',
'varying vec2 vUV;',
'varying float fogDepth;',
'void main() {',
...
...
@@ -7076,13 +7078,14 @@
'rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;',
'rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;',
'vec4
final
Position;',
'vec4
mv
Position;',
'finalPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );',
'finalPosition.xy += rotatedPosition;',
'finalPosition = projectionMatrix * finalPosition;',
'mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );',
'mvPosition.xy += rotatedPosition;',
'gl_Position = finalPosition;',
'gl_Position = projectionMatrix * mvPosition;',
'fogDepth = - mvPosition.z;',
'}'
...
...
@@ -7106,33 +7109,33 @@
'uniform float alphaTest;',
'varying vec2 vUV;',
'varying float fogDepth;',
'void main() {',
'vec4 texture = texture2D( map, vUV );',
'if ( texture.a < alphaTest ) discard;',
'gl_FragColor = vec4( color * texture.xyz, texture.a * opacity );',
'if ( gl_FragColor.a < alphaTest ) discard;',
'if ( fogType > 0 ) {',
'float depth = gl_FragCoord.z / gl_FragCoord.w;',
'float fogFactor = 0.0;',
'if ( fogType == 1 ) {',
'fogFactor = smoothstep( fogNear, fogFar,
d
epth );',
'fogFactor = smoothstep( fogNear, fogFar,
fogD
epth );',
'} else {',
'const float LOG2 = 1.442695;',
'fogFactor = exp2( - fogDensity * fogDensity *
depth * d
epth * LOG2 );',
'fogFactor = exp2( - fogDensity * fogDensity *
fogDepth * fogD
epth * LOG2 );',
'fogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );',
'}',
'gl_FragColor
= mix( gl_FragColor, vec4( fogColor, gl_FragColor.w )
, fogFactor );',
'gl_FragColor
.rgb = mix( gl_FragColor.rgb, fogColor
, fogFactor );',
'}',
...
...
@@ -40890,21 +40893,19 @@
this.matrix = object.matrixWorld;
this.matrixAutoUpdate = false;
this.onBeforeRender();
}
SkeletonHelper.prototype = Object.create( LineSegments.prototype );
SkeletonHelper.prototype.constructor = SkeletonHelper;
SkeletonHelper.prototype.
onBeforeRender
= function () {
SkeletonHelper.prototype.
updateMatrixWorld
= function () {
var vector = new Vector3();
var boneMatrix = new Matrix4();
var matrixWorldInv = new Matrix4();
return function
onBeforeRender(
) {
return function
updateMatrixWorld( force
) {
var bones = this.bones;
...
...
@@ -40935,6 +40936,8 @@
geometry.getAttribute( 'position' ).needsUpdate = true;
Object3D.prototype.updateMatrixWorld.call( this, force );
};
}();
...
...
@@ -41835,14 +41838,12 @@
this.geometry.computeBoundingSphere();
this.onBeforeRender();
}
Box3Helper.prototype = Object.create( LineSegments.prototype );
Box3Helper.prototype.constructor = Box3Helper;
Box3Helper.prototype.
onBeforeRender = function (
) {
Box3Helper.prototype.
updateMatrixWorld = function ( force
) {
var box = this.box;
...
...
@@ -41854,6 +41855,8 @@
this.scale.multiplyScalar( 0.5 );
Object3D.prototype.updateMatrixWorld.call( this, force );
};
/**
...
...
@@ -41888,16 +41891,12 @@
this.add( new Mesh( geometry2, new MeshBasicMaterial( { color: color, opacity: 0.2, transparent: true, depthWrite: false } ) ) );
//
this.onBeforeRender();
}
PlaneHelper.prototype = Object.create( Line.prototype );
PlaneHelper.prototype.constructor = PlaneHelper;
PlaneHelper.prototype.
onBeforeRender = function (
) {
PlaneHelper.prototype.
updateMatrixWorld = function ( force
) {
var scale = - this.plane.constant;
...
...
@@ -41907,7 +41906,7 @@
this.lookAt( this.plane.normal );
this.updateMatrixWorld(
);
Object3D.prototype.updateMatrixWorld.call( this, force
);
};
...
...
build/three.min.js
浏览文件 @
5f4c46b8
此差异已折叠。
点击以展开。
build/three.module.js
浏览文件 @
5f4c46b8
...
...
@@ -6863,6 +6863,7 @@ function WebGLSpriteRenderer( renderer, gl, state, textures, capabilities ) {
fogNear: gl.getUniformLocation( program, 'fogNear' ),
fogFar: gl.getUniformLocation( program, 'fogFar' ),
fogColor: gl.getUniformLocation( program, 'fogColor' ),
fogDepth: gl.getUniformLocation( program, 'fogDepth' ),
alphaTest: gl.getUniformLocation( program, 'alphaTest' )
};
...
...
@@ -7059,6 +7060,7 @@ function WebGLSpriteRenderer( renderer, gl, state, textures, capabilities ) {
'attribute vec2 uv;',
'varying vec2 vUV;',
'varying float fogDepth;',
'void main() {',
...
...
@@ -7070,13 +7072,14 @@ function WebGLSpriteRenderer( renderer, gl, state, textures, capabilities ) {
'rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;',
'rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;',
'vec4
final
Position;',
'vec4
mv
Position;',
'finalPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );',
'finalPosition.xy += rotatedPosition;',
'finalPosition = projectionMatrix * finalPosition;',
'mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );',
'mvPosition.xy += rotatedPosition;',
'gl_Position = finalPosition;',
'gl_Position = projectionMatrix * mvPosition;',
'fogDepth = - mvPosition.z;',
'}'
...
...
@@ -7100,33 +7103,33 @@ function WebGLSpriteRenderer( renderer, gl, state, textures, capabilities ) {
'uniform float alphaTest;',
'varying vec2 vUV;',
'varying float fogDepth;',
'void main() {',
'vec4 texture = texture2D( map, vUV );',
'if ( texture.a < alphaTest ) discard;',
'gl_FragColor = vec4( color * texture.xyz, texture.a * opacity );',
'if ( gl_FragColor.a < alphaTest ) discard;',
'if ( fogType > 0 ) {',
'float depth = gl_FragCoord.z / gl_FragCoord.w;',
'float fogFactor = 0.0;',
'if ( fogType == 1 ) {',
'fogFactor = smoothstep( fogNear, fogFar,
d
epth );',
'fogFactor = smoothstep( fogNear, fogFar,
fogD
epth );',
'} else {',
'const float LOG2 = 1.442695;',
'fogFactor = exp2( - fogDensity * fogDensity *
depth * d
epth * LOG2 );',
'fogFactor = exp2( - fogDensity * fogDensity *
fogDepth * fogD
epth * LOG2 );',
'fogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );',
'}',
'gl_FragColor
= mix( gl_FragColor, vec4( fogColor, gl_FragColor.w )
, fogFactor );',
'gl_FragColor
.rgb = mix( gl_FragColor.rgb, fogColor
, fogFactor );',
'}',
...
...
@@ -40884,21 +40887,19 @@ function SkeletonHelper( object ) {
this.matrix = object.matrixWorld;
this.matrixAutoUpdate = false;
this.onBeforeRender();
}
SkeletonHelper.prototype = Object.create( LineSegments.prototype );
SkeletonHelper.prototype.constructor = SkeletonHelper;
SkeletonHelper.prototype.
onBeforeRender
= function () {
SkeletonHelper.prototype.
updateMatrixWorld
= function () {
var vector = new Vector3();
var boneMatrix = new Matrix4();
var matrixWorldInv = new Matrix4();
return function
onBeforeRender(
) {
return function
updateMatrixWorld( force
) {
var bones = this.bones;
...
...
@@ -40929,6 +40930,8 @@ SkeletonHelper.prototype.onBeforeRender = function () {
geometry.getAttribute( 'position' ).needsUpdate = true;
Object3D.prototype.updateMatrixWorld.call( this, force );
};
}();
...
...
@@ -41829,14 +41832,12 @@ function Box3Helper( box, hex ) {
this.geometry.computeBoundingSphere();
this.onBeforeRender();
}
Box3Helper.prototype = Object.create( LineSegments.prototype );
Box3Helper.prototype.constructor = Box3Helper;
Box3Helper.prototype.
onBeforeRender = function (
) {
Box3Helper.prototype.
updateMatrixWorld = function ( force
) {
var box = this.box;
...
...
@@ -41848,6 +41849,8 @@ Box3Helper.prototype.onBeforeRender = function () {
this.scale.multiplyScalar( 0.5 );
Object3D.prototype.updateMatrixWorld.call( this, force );
};
/**
...
...
@@ -41882,16 +41885,12 @@ function PlaneHelper( plane, size, hex ) {
this.add( new Mesh( geometry2, new MeshBasicMaterial( { color: color, opacity: 0.2, transparent: true, depthWrite: false } ) ) );
//
this.onBeforeRender();
}
PlaneHelper.prototype = Object.create( Line.prototype );
PlaneHelper.prototype.constructor = PlaneHelper;
PlaneHelper.prototype.
onBeforeRender = function (
) {
PlaneHelper.prototype.
updateMatrixWorld = function ( force
) {
var scale = - this.plane.constant;
...
...
@@ -41901,7 +41900,7 @@ PlaneHelper.prototype.onBeforeRender = function () {
this.lookAt( this.plane.normal );
this.updateMatrixWorld(
);
Object3D.prototype.updateMatrixWorld.call( this, force
);
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录