Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
a09b0bd8
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,发现更多精彩内容 >>
提交
a09b0bd8
编写于
10月 14, 2014
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated builds.
上级
6c038a83
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
329 addition
and
383 deletion
+329
-383
build/three.js
build/three.js
+71
-126
build/three.min.js
build/three.min.js
+258
-257
未找到文件。
build/three.js
浏览文件 @
a09b0bd8
...
...
@@ -1062,12 +1062,14 @@ THREE.Quaternion.prototype = {
},
fromArray: function ( array ) {
fromArray: function ( array
, offset
) {
this._x = array[ 0 ];
this._y = array[ 1 ];
this._z = array[ 2 ];
this._w = array[ 3 ];
if ( offset === undefined ) offset = 0;
this._x = array[ offset ];
this._y = array[ offset + 1 ];
this._z = array[ offset + 2 ];
this._w = array[ offset + 3 ];
this.onChangeCallback();
...
...
@@ -1484,10 +1486,12 @@ THREE.Vector2.prototype = {
},
fromArray: function ( array ) {
fromArray: function ( array
, offset
) {
this.x = array[ 0 ];
this.y = array[ 1 ];
if ( offset === undefined ) offset = 0;
this.x = array[ offset ];
this.y = array[ offset + 1 ];
return this;
...
...
@@ -2295,11 +2299,13 @@ THREE.Vector3.prototype = {
},
fromArray: function ( array ) {
fromArray: function ( array, offset ) {
if ( offset === undefined ) offset = 0;
this.x = array[
0
];
this.y = array[ 1 ];
this.z = array[ 2 ];
this.x = array[
offset
];
this.y = array[
offset +
1 ];
this.z = array[
offset +
2 ];
return this;
...
...
@@ -2944,12 +2950,14 @@ THREE.Vector4.prototype = {
},
fromArray: function ( array ) {
fromArray: function ( array, offset ) {
if ( offset === undefined ) offset = 0;
this.x = array[
0
];
this.y = array[ 1 ];
this.z = array[ 2 ];
this.w = array[ 3 ];
this.x = array[
offset
];
this.y = array[
offset +
1 ];
this.z = array[
offset +
2 ];
this.w = array[
offset +
3 ];
return this;
...
...
@@ -8630,7 +8638,7 @@ THREE.BufferGeometry.prototype = {
var normals = attributes.normal.array;
var vA, vB, vC,
x, y, z,
var vA, vB, vC,
pA = new THREE.Vector3(),
pB = new THREE.Vector3(),
...
...
@@ -8659,20 +8667,9 @@ THREE.BufferGeometry.prototype = {
vB = ( index + indices[ i + 1 ] ) * 3;
vC = ( index + indices[ i + 2 ] ) * 3;
x = positions[ vA ];
y = positions[ vA + 1 ];
z = positions[ vA + 2 ];
pA.set( x, y, z );
x = positions[ vB ];
y = positions[ vB + 1 ];
z = positions[ vB + 2 ];
pB.set( x, y, z );
x = positions[ vC ];
y = positions[ vC + 1 ];
z = positions[ vC + 2 ];
pC.set( x, y, z );
pA.fromArray( positions, vA );
pB.fromArray( positions, vB );
pC.fromArray( positions, vC );
cb.subVectors( pC, pB );
ab.subVectors( pA, pB );
...
...
@@ -8700,20 +8697,9 @@ THREE.BufferGeometry.prototype = {
for ( var i = 0, il = positions.length; i < il; i += 9 ) {
x = positions[ i ];
y = positions[ i + 1 ];
z = positions[ i + 2 ];
pA.set( x, y, z );
x = positions[ i + 3 ];
y = positions[ i + 4 ];
z = positions[ i + 5 ];
pB.set( x, y, z );
x = positions[ i + 6 ];
y = positions[ i + 7 ];
z = positions[ i + 8 ];
pC.set( x, y, z );
pA.fromArray( positions, i );
pB.fromArray( positions, i + 3 );
pC.fromArray( positions, i + 6 );
cb.subVectors( pC, pB );
ab.subVectors( pA, pB );
...
...
@@ -8782,13 +8768,13 @@ THREE.BufferGeometry.prototype = {
}
var
xA, yA, zA
,
xB, yB, zB
,
xC, yC, zC
,
var
vA = new THREE.Vector3()
,
vB = new THREE.Vector3()
,
vC = new THREE.Vector3()
,
u
A, vA
,
u
B, vB
,
u
C, vC
,
u
vA = new THREE.Vector2()
,
u
vB = new THREE.Vector2()
,
u
vC = new THREE.Vector2()
,
x1, x2, y1, y2, z1, z2,
s1, s2, t1, t2, r;
...
...
@@ -8797,41 +8783,28 @@ THREE.BufferGeometry.prototype = {
function handleTriangle( a, b, c ) {
xA = positions[ a * 3 ];
yA = positions[ a * 3 + 1 ];
zA = positions[ a * 3 + 2 ];
xB = positions[ b * 3 ];
yB = positions[ b * 3 + 1 ];
zB = positions[ b * 3 + 2 ];
xC = positions[ c * 3 ];
yC = positions[ c * 3 + 1 ];
zC = positions[ c * 3 + 2 ];
uA = uvs[ a * 2 ];
vA = uvs[ a * 2 + 1 ];
vA.fromArray( positions, a * 3 );
vB.fromArray( positions, b * 3 );
vC.fromArray( positions, c * 3 );
uB = uvs[ b * 2 ];
vB = uvs[ b * 2 + 1 ];
uvA.fromArray( uvs, a * 2 );
uvB.fromArray( uvs, b * 2 );
uvC.fromArray( uvs, c * 2 );
uC = uvs[ c * 2 ];
vC = uvs[ c * 2 + 1 ];
x1 = xB - xA;
x2 = xC - xA;
x1 = vB.x - vA.x;
x2 = vC.x - vA.x;
y1 =
yB - yA
;
y2 =
yC - yA
;
y1 =
vB.y - vA.y
;
y2 =
vC.y - vA.y
;
z1 =
zB - zA
;
z2 =
zC - zA
;
z1 =
vB.z - vA.z
;
z2 =
vC.z - vA.z
;
s1 = u
B - uA
;
s2 = u
C - uA
;
s1 = u
vB.x - uvA.x
;
s2 = u
vC.x - uvA.x
;
t1 =
vB - vA
;
t2 =
vC - vA
;
t1 =
uvB.y - uvA.y
;
t2 =
uvC.y - uvA.y
;
r = 1.0 / ( s1 * t2 - s2 * t1 );
...
...
@@ -8893,10 +8866,7 @@ THREE.BufferGeometry.prototype = {
function handleVertex( v ) {
n.x = normals[ v * 3 ];
n.y = normals[ v * 3 + 1 ];
n.z = normals[ v * 3 + 2 ];
n.fromArray( normals, v * 3 );
n2.copy( n );
t = tan1[ v ];
...
...
@@ -12281,10 +12251,15 @@ THREE.BufferGeometryLoader.prototype = {
if ( boundingSphere !== undefined ) {
geometry.boundingSphere = new THREE.Sphere(
new THREE.Vector3().fromArray( boundingSphere.center !== undefined ? boundingSphere.center : [ 0, 0, 0 ] ),
boundingSphere.radius
);
var center = new THREE.Vector3();
if ( boundingSphere.center !== undefined ) {
center.fromArray( boundingSphere.center );
}
geometry.boundingSphere = new THREE.Sphere( center, boundingSphere.radius );
}
...
...
@@ -14459,11 +14434,7 @@ THREE.PointCloud.prototype.raycast = ( function () {
var a = index + indices[ i ];
position.set(
positions[ a * 3 ],
positions[ a * 3 + 1 ],
positions[ a * 3 + 2 ]
);
position.fromArray( positions, a * 3 );
testPoint( position, a );
...
...
@@ -14765,22 +14736,9 @@ THREE.Mesh.prototype.raycast = ( function () {
b = index + indices[ i + 1 ];
c = index + indices[ i + 2 ];
vA.set(
positions[ a * 3 ],
positions[ a * 3 + 1 ],
positions[ a * 3 + 2 ]
);
vB.set(
positions[ b * 3 ],
positions[ b * 3 + 1 ],
positions[ b * 3 + 2 ]
);
vC.set(
positions[ c * 3 ],
positions[ c * 3 + 1 ],
positions[ c * 3 + 2 ]
);
vA.fromArray( positions, a * 3 );
vB.fromArray( positions, b * 3 );
vC.fromArray( positions, c * 3 );
if ( material.side === THREE.BackSide ) {
...
...
@@ -14824,22 +14782,9 @@ THREE.Mesh.prototype.raycast = ( function () {
b = i + 1;
c = i + 2;
vA.set(
positions[ j ],
positions[ j + 1 ],
positions[ j + 2 ]
);
vB.set(
positions[ j + 3 ],
positions[ j + 4 ],
positions[ j + 5 ]
);
vC.set(
positions[ j + 6 ],
positions[ j + 7 ],
positions[ j + 8 ]
);
vA.fromArray( positions, j );
vB.fromArray( positions, j + 3 );
vC.fromArray( positions, j + 6 );
if ( material.side === THREE.BackSide ) {
...
...
build/three.min.js
浏览文件 @
a09b0bd8
因为 它太大了无法显示 source diff 。你可以改为
查看blob
。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录