Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
b0e4bc6a
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,发现更多精彩内容 >>
提交
b0e4bc6a
编写于
9月 12, 2016
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated builds.
上级
562ac3d4
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
220 addition
and
222 deletion
+220
-222
build/three.js
build/three.js
+19
-21
build/three.min.js
build/three.min.js
+201
-201
未找到文件。
build/three.js
浏览文件 @
b0e4bc6a
...
...
@@ -7939,7 +7939,7 @@
center: function ( optionalTarget ) {
var result = optionalTarget || new Vector3();
return result.addVectors( this.min, this.max ).multiplyScalar( 0.5 );
return
this.isEmpty() ? result.set( 0, 0, 0 ) :
result.addVectors( this.min, this.max ).multiplyScalar( 0.5 );
},
...
...
@@ -24915,6 +24915,8 @@
var image = document.createElementNS( 'http://www.w3.org/1999/xhtml', 'img' );
image.onload = function () {
image.onload = null;
URL.revokeObjectURL( image.src );
if ( onLoad ) onLoad( image );
...
...
@@ -26458,12 +26460,13 @@
// flush last keyframe (compaction looks ahead)
times[ writeIndex
++
] = times[ lastIndex ];
times[ writeIndex ] = times[ lastIndex ];
for ( var readOffset = lastIndex * stride, j = 0; j !== stride; ++ j )
for ( var readOffset = lastIndex * stride,
writeOffset = writeIndex * stride,
j = 0; j !== stride; ++ j )
values[ writeOffset + j ] = values[ readOffset + j ];
++ writeIndex;
if ( writeIndex !== times.length ) {
...
...
@@ -32023,7 +32026,7 @@
var groupCount = 0;
// this will be used to calculate the normal
var
tanTheta
= ( radiusBottom - radiusTop ) / height;
var
slope
= ( radiusBottom - radiusTop ) / height;
// generate vertices, normals and uvs
...
...
@@ -32040,25 +32043,19 @@
var u = x / radialSegments;
var theta = u * thetaLength + thetaStart;
var sinTheta = Math.sin( theta );
var cosTheta = Math.cos( theta );
// vertex
vertex.x = radius *
Math.sin( u * thetaLength + thetaStart )
;
vertex.x = radius *
sinTheta
;
vertex.y = - v * height + halfHeight;
vertex.z = radius *
Math.cos( u * thetaLength + thetaStart )
;
vertex.z = radius *
cosTheta
;
vertices.setXYZ( index, vertex.x, vertex.y, vertex.z );
// normal
normal.copy( vertex );
// handle special case if radiusTop/radiusBottom is zero
if ( ( radiusTop === 0 && y === 0 ) || ( radiusBottom === 0 && y === heightSegments ) ) {
normal.x = Math.sin( u * thetaLength + thetaStart );
normal.z = Math.cos( u * thetaLength + thetaStart );
}
normal.setY( Math.sqrt( normal.x * normal.x + normal.z * normal.z ) * tanTheta ).normalize();
normal.set( sinTheta, slope, cosTheta ).normalize();
normals.setXYZ( index, normal.x, normal.y, normal.z );
// uv
...
...
@@ -34709,7 +34706,7 @@
update: ( function () {
var focus, fov, aspect, near, far;
var focus, fov, aspect, near, far
, zoom
;
var eyeRight = new Matrix4();
var eyeLeft = new Matrix4();
...
...
@@ -34718,7 +34715,7 @@
var needsUpdate = focus !== camera.focus || fov !== camera.fov ||
aspect !== camera.aspect * this.aspect || near !== camera.near ||
far !== camera.far;
far !== camera.far
|| zoom !== camera.zoom
;
if ( needsUpdate ) {
...
...
@@ -34727,6 +34724,7 @@
aspect = camera.aspect * this.aspect;
near = camera.near;
far = camera.far;
zoom = camera.zoom;
// Off-axis stereoscopic effect based on
// http://paulbourke.net/stereographics/stereorender/
...
...
@@ -34734,7 +34732,7 @@
var projectionMatrix = camera.projectionMatrix.clone();
var eyeSep = this.eyeSep / 2;
var eyeSepOnProjection = eyeSep * near / focus;
var ymax =
near * Math.tan( exports.Math.DEG2RAD * fov * 0.5 )
;
var ymax =
( near * Math.tan( exports.Math.DEG2RAD * fov * 0.5 ) ) / zoom
;
var xmin, xmax;
// translate xOffset
build/three.min.js
浏览文件 @
b0e4bc6a
因为 它太大了无法显示 source diff 。你可以改为
查看blob
。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录