Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
5a1fb62e
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,发现更多精彩内容 >>
提交
5a1fb62e
编写于
5月 22, 2018
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated builds.
上级
c2093472
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
300 addition
and
269 deletion
+300
-269
build/three.js
build/three.js
+64
-49
build/three.min.js
build/three.min.js
+172
-171
build/three.module.js
build/three.module.js
+64
-49
未找到文件。
build/three.js
浏览文件 @
5a1fb62e
...
...
@@ -1230,12 +1230,12 @@
}
//
last column
//
bottom row
te[ 3 ] = 0;
te[ 7 ] = 0;
te[ 11 ] = 0;
//
bottom row
//
last column
te[ 12 ] = 0;
te[ 13 ] = 0;
te[ 14 ] = 0;
...
...
@@ -1245,42 +1245,18 @@
},
makeRotationFromQuaternion: function ( q ) {
var te = this.elements;
var x = q._x, y = q._y, z = q._z, w = q._w;
var x2 = x + x, y2 = y + y, z2 = z + z;
var xx = x * x2, xy = x * y2, xz = x * z2;
var yy = y * y2, yz = y * z2, zz = z * z2;
var wx = w * x2, wy = w * y2, wz = w * z2;
makeRotationFromQuaternion: function () {
te[ 0 ] = 1 - ( yy + zz );
te[ 4 ] = xy - wz;
te[ 8 ] = xz + wy;
var zero = new Vector3( 0, 0, 0 );
var one = new Vector3( 1, 1, 1 );
te[ 1 ] = xy + wz;
te[ 5 ] = 1 - ( xx + zz );
te[ 9 ] = yz - wx;
return function makeRotationFromQuaternion( q ) {
te[ 2 ] = xz - wy;
te[ 6 ] = yz + wx;
te[ 10 ] = 1 - ( xx + yy );
return this.compose( zero, q, one );
// last column
te[ 3 ] = 0;
te[ 7 ] = 0;
te[ 11 ] = 0;
// bottom row
te[ 12 ] = 0;
te[ 13 ] = 0;
te[ 14 ] = 0;
te[ 15 ] = 1;
return this;
};
},
}
()
,
lookAt: function () {
...
...
@@ -1721,11 +1697,37 @@
compose: function ( position, quaternion, scale ) {
this.makeRotationFromQuaternion( quaternion );
this.scale( scale );
this.setPosition( position );
var te = this.elements;
return this;
var x = quaternion._x, y = quaternion._y, z = quaternion._z, w = quaternion._w;
var x2 = x + x, y2 = y + y, z2 = z + z;
var xx = x * x2, xy = x * y2, xz = x * z2;
var yy = y * y2, yz = y * z2, zz = z * z2;
var wx = w * x2, wy = w * y2, wz = w * z2;
var sx = scale.x, sy = scale.y, sz = scale.z;
te[ 0 ] = ( 1 - ( yy + zz ) ) * sx;
te[ 1 ] = ( xy + wz ) * sx;
te[ 2 ] = ( xz - wy ) * sx;
te[ 3 ] = 0;
te[ 4 ] = ( xy - wz ) * sy;
te[ 5 ] = ( 1 - ( xx + zz ) ) * sy;
te[ 6 ] = ( yz + wx ) * sy;
te[ 7 ] = 0;
te[ 8 ] = ( xz + wy ) * sz;
te[ 9 ] = ( yz - wx ) * sz;
te[ 10 ] = ( 1 - ( xx + yy ) ) * sz;
te[ 11 ] = 0;
te[ 12 ] = position.x;
te[ 13 ] = position.y;
te[ 14 ] = position.z;
te[ 15 ] = 1;
return this;
},
...
...
@@ -6115,7 +6117,7 @@
var points_frag = "uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n";
var points_vert = "uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <
logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\t#include <begin
_vertex>\n\t#include <project_vertex>\n\t#ifdef USE_SIZEATTENUATION\n\t\tgl_PointSize = size * ( scale / - mvPosition.z );\n\t#else\n\t\tgl_PointSize = size;\n\t#endif\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <fog_vertex>\n}\n";
var points_vert = "uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <
morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget
_vertex>\n\t#include <project_vertex>\n\t#ifdef USE_SIZEATTENUATION\n\t\tgl_PointSize = size * ( scale / - mvPosition.z );\n\t#else\n\t\tgl_PointSize = size;\n\t#endif\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <fog_vertex>\n}\n";
var shadow_frag = "uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include <fog_fragment>\n}\n";
...
...
@@ -10863,6 +10865,12 @@
//
if ( faces.length === 0 ) {
console.error( 'THREE.DirectGeometry: Faceless geometries are not supported.' );
}
for ( var i = 0; i < faces.length; i ++ ) {
var face = faces[ i ];
...
...
@@ -25298,6 +25306,8 @@
*
* size: <float>,
* sizeAttenuation: <bool>
*
* morphTargets: <bool>
* }
*/
...
...
@@ -25314,6 +25324,8 @@
this.size = 1;
this.sizeAttenuation = true;
this.morphTargets = false;
this.lights = false;
this.setValues( parameters );
...
...
@@ -25336,6 +25348,8 @@
this.size = source.size;
this.sizeAttenuation = source.sizeAttenuation;
this.morphTargets = source.morphTargets;
return this;
};
...
...
@@ -31531,7 +31545,10 @@
var image = document.createElementNS( 'http://www.w3.org/1999/xhtml', 'img' );
image.addEventListener( 'load', function () {
function onImageLoad() {
image.removeEventListener( 'load', onImageLoad, false );
image.removeEventListener( 'error', onImageError, false );
Cache.add( url, this );
...
...
@@ -31539,24 +31556,22 @@
scope.manager.itemEnd( url );
}, false );
/*
image.addEventListener( 'progress', function ( event ) {
if ( onProgress ) onProgress( event );
}
}, false );
*/
function onImageError( event ) {
image.addEventListener( 'error', function ( event ) {
image.removeEventListener( 'load', onImageLoad, false );
image.removeEventListener( 'error', onImageError, false );
if ( onError ) onError( event );
scope.manager.itemEnd( url );
scope.manager.itemError( url );
}, false );
}
image.addEventListener( 'load', onImageLoad, false );
image.addEventListener( 'error', onImageError, false );
if ( url.substr( 0, 5 ) !== 'data:' ) {
build/three.min.js
浏览文件 @
5a1fb62e
因为 它太大了无法显示 source diff 。你可以改为
查看blob
。
build/three.module.js
浏览文件 @
5a1fb62e
...
...
@@ -1224,12 +1224,12 @@ Object.assign( Matrix4.prototype, {
}
//
last column
//
bottom row
te[ 3 ] = 0;
te[ 7 ] = 0;
te[ 11 ] = 0;
//
bottom row
//
last column
te[ 12 ] = 0;
te[ 13 ] = 0;
te[ 14 ] = 0;
...
...
@@ -1239,42 +1239,18 @@ Object.assign( Matrix4.prototype, {
},
makeRotationFromQuaternion: function ( q ) {
var te = this.elements;
var x = q._x, y = q._y, z = q._z, w = q._w;
var x2 = x + x, y2 = y + y, z2 = z + z;
var xx = x * x2, xy = x * y2, xz = x * z2;
var yy = y * y2, yz = y * z2, zz = z * z2;
var wx = w * x2, wy = w * y2, wz = w * z2;
makeRotationFromQuaternion: function () {
te[ 0 ] = 1 - ( yy + zz );
te[ 4 ] = xy - wz;
te[ 8 ] = xz + wy;
var zero = new Vector3( 0, 0, 0 );
var one = new Vector3( 1, 1, 1 );
te[ 1 ] = xy + wz;
te[ 5 ] = 1 - ( xx + zz );
te[ 9 ] = yz - wx;
return function makeRotationFromQuaternion( q ) {
te[ 2 ] = xz - wy;
te[ 6 ] = yz + wx;
te[ 10 ] = 1 - ( xx + yy );
return this.compose( zero, q, one );
// last column
te[ 3 ] = 0;
te[ 7 ] = 0;
te[ 11 ] = 0;
// bottom row
te[ 12 ] = 0;
te[ 13 ] = 0;
te[ 14 ] = 0;
te[ 15 ] = 1;
return this;
};
},
}
()
,
lookAt: function () {
...
...
@@ -1715,11 +1691,37 @@ Object.assign( Matrix4.prototype, {
compose: function ( position, quaternion, scale ) {
this.makeRotationFromQuaternion( quaternion );
this.scale( scale );
this.setPosition( position );
var te = this.elements;
return this;
var x = quaternion._x, y = quaternion._y, z = quaternion._z, w = quaternion._w;
var x2 = x + x, y2 = y + y, z2 = z + z;
var xx = x * x2, xy = x * y2, xz = x * z2;
var yy = y * y2, yz = y * z2, zz = z * z2;
var wx = w * x2, wy = w * y2, wz = w * z2;
var sx = scale.x, sy = scale.y, sz = scale.z;
te[ 0 ] = ( 1 - ( yy + zz ) ) * sx;
te[ 1 ] = ( xy + wz ) * sx;
te[ 2 ] = ( xz - wy ) * sx;
te[ 3 ] = 0;
te[ 4 ] = ( xy - wz ) * sy;
te[ 5 ] = ( 1 - ( xx + zz ) ) * sy;
te[ 6 ] = ( yz + wx ) * sy;
te[ 7 ] = 0;
te[ 8 ] = ( xz + wy ) * sz;
te[ 9 ] = ( yz - wx ) * sz;
te[ 10 ] = ( 1 - ( xx + yy ) ) * sz;
te[ 11 ] = 0;
te[ 12 ] = position.x;
te[ 13 ] = position.y;
te[ 14 ] = position.z;
te[ 15 ] = 1;
return this;
},
...
...
@@ -6109,7 +6111,7 @@ var normal_vert = "#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BU
var points_frag = "uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n";
var points_vert = "uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <
logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\t#include <begin
_vertex>\n\t#include <project_vertex>\n\t#ifdef USE_SIZEATTENUATION\n\t\tgl_PointSize = size * ( scale / - mvPosition.z );\n\t#else\n\t\tgl_PointSize = size;\n\t#endif\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <fog_vertex>\n}\n";
var points_vert = "uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <
morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget
_vertex>\n\t#include <project_vertex>\n\t#ifdef USE_SIZEATTENUATION\n\t\tgl_PointSize = size * ( scale / - mvPosition.z );\n\t#else\n\t\tgl_PointSize = size;\n\t#endif\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <fog_vertex>\n}\n";
var shadow_frag = "uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include <fog_fragment>\n}\n";
...
...
@@ -10857,6 +10859,12 @@ Object.assign( DirectGeometry.prototype, {
//
if ( faces.length === 0 ) {
console.error( 'THREE.DirectGeometry: Faceless geometries are not supported.' );
}
for ( var i = 0; i < faces.length; i ++ ) {
var face = faces[ i ];
...
...
@@ -25292,6 +25300,8 @@ LineLoop.prototype = Object.assign( Object.create( Line.prototype ), {
*
* size: <float>,
* sizeAttenuation: <bool>
*
* morphTargets: <bool>
* }
*/
...
...
@@ -25308,6 +25318,8 @@ function PointsMaterial( parameters ) {
this.size = 1;
this.sizeAttenuation = true;
this.morphTargets = false;
this.lights = false;
this.setValues( parameters );
...
...
@@ -25330,6 +25342,8 @@ PointsMaterial.prototype.copy = function ( source ) {
this.size = source.size;
this.sizeAttenuation = source.sizeAttenuation;
this.morphTargets = source.morphTargets;
return this;
};
...
...
@@ -31525,7 +31539,10 @@ Object.assign( ImageLoader.prototype, {
var image = document.createElementNS( 'http://www.w3.org/1999/xhtml', 'img' );
image.addEventListener( 'load', function () {
function onImageLoad() {
image.removeEventListener( 'load', onImageLoad, false );
image.removeEventListener( 'error', onImageError, false );
Cache.add( url, this );
...
...
@@ -31533,24 +31550,22 @@ Object.assign( ImageLoader.prototype, {
scope.manager.itemEnd( url );
}, false );
/*
image.addEventListener( 'progress', function ( event ) {
if ( onProgress ) onProgress( event );
}
}, false );
*/
function onImageError( event ) {
image.addEventListener( 'error', function ( event ) {
image.removeEventListener( 'load', onImageLoad, false );
image.removeEventListener( 'error', onImageError, false );
if ( onError ) onError( event );
scope.manager.itemEnd( url );
scope.manager.itemError( url );
}, false );
}
image.addEventListener( 'load', onImageLoad, false );
image.addEventListener( 'error', onImageError, false );
if ( url.substr( 0, 5 ) !== 'data:' ) {
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录