Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
aa360af4
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,发现更多精彩内容 >>
提交
aa360af4
编写于
5月 21, 2014
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated builds.
上级
bdd6db3c
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
274 addition
and
258 deletion
+274
-258
build/three.js
build/three.js
+79
-64
build/three.min.js
build/three.min.js
+195
-194
未找到文件。
build/three.js
浏览文件 @
aa360af4
...
...
@@ -8252,7 +8252,9 @@ THREE.Projector = function () {
} else {
for ( var i = 0, l = ( positions.length / 3 ) - 1; i < l; i ++ ) {
var step = object.type === THREE.LinePieces ? 2 : 1;
for ( var i = 0, l = ( positions.length / 3 ) - 1; i < l; i += step ) {
renderList.pushLine( i, i + 1 );
...
...
@@ -11511,7 +11513,7 @@ THREE.XHRLoader.prototype = {
if ( cached !== undefined ) {
onLoad( cached );
if ( onLoad )
onLoad( cached );
return;
}
...
...
@@ -11519,18 +11521,15 @@ THREE.XHRLoader.prototype = {
var request = new XMLHttpRequest();
request.open( 'GET', url, true );
if ( onLoad !== undefined ) {
request.addEventListener( 'load', function ( event ) {
request.addEventListener( 'load', function ( event ) {
scope.cache.add( url, this.response );
scope.cache.add( url, this.response );
onLoad( this.response );
scope.manager.itemEnd( url );
if ( onLoad ) onLoad( this.response );
}, false
);
scope.manager.itemEnd( url
);
}
}
, false );
if ( onProgress !== undefined ) {
...
...
@@ -12267,7 +12266,7 @@ THREE.BufferGeometryLoader.prototype = {
onLoad( scope.parse( JSON.parse( text ) ) );
} );
}
, onProgress, onError
);
},
...
...
@@ -12282,8 +12281,6 @@ THREE.BufferGeometryLoader.prototype = {
var geometry = new THREE.BufferGeometry();
var attributes = json.attributes;
var offsets = json.offsets;
var boundingSphere = json.boundingSphere;
for ( var key in attributes ) {
...
...
@@ -12296,12 +12293,16 @@ THREE.BufferGeometryLoader.prototype = {
}
var offsets = json.offsets;
if ( offsets !== undefined ) {
geometry.offsets = JSON.parse( JSON.stringify( offsets ) );
}
var boundingSphere = json.boundingSphere;
if ( boundingSphere !== undefined ) {
geometry.boundingSphere = new THREE.Sphere(
...
...
@@ -12341,7 +12342,7 @@ THREE.MaterialLoader.prototype = {
onLoad( scope.parse( JSON.parse( text ) ) );
} );
}
, onProgress, onError
);
},
...
...
@@ -12407,7 +12408,7 @@ THREE.ObjectLoader.prototype = {
onLoad( scope.parse( JSON.parse( text ) ) );
} );
}
, onProgress, onError
);
},
...
...
@@ -12761,7 +12762,7 @@ THREE.TextureLoader.prototype = {
}
} );
}
, onProgress, onError
);
},
...
...
@@ -33557,44 +33558,8 @@ THREE.ArrowHelper.prototype.setColor = function ( color ) {
THREE.BoxHelper = function ( object ) {
// 5____4
// 1/___0/|
// | 6__|_7
// 2/___3/
var vertices = [
new THREE.Vector3( 1, 1, 1 ),
new THREE.Vector3( - 1, 1, 1 ),
new THREE.Vector3( - 1, - 1, 1 ),
new THREE.Vector3( 1, - 1, 1 ),
new THREE.Vector3( 1, 1, - 1 ),
new THREE.Vector3( - 1, 1, - 1 ),
new THREE.Vector3( - 1, - 1, - 1 ),
new THREE.Vector3( 1, - 1, - 1 )
];
this.vertices = vertices;
// TODO: Wouldn't be nice if Line had .segments?
var geometry = new THREE.Geometry();
geometry.vertices.push(
vertices[ 0 ], vertices[ 1 ],
vertices[ 1 ], vertices[ 2 ],
vertices[ 2 ], vertices[ 3 ],
vertices[ 3 ], vertices[ 0 ],
vertices[ 4 ], vertices[ 5 ],
vertices[ 5 ], vertices[ 6 ],
vertices[ 6 ], vertices[ 7 ],
vertices[ 7 ], vertices[ 4 ],
vertices[ 0 ], vertices[ 4 ],
vertices[ 1 ], vertices[ 5 ],
vertices[ 2 ], vertices[ 6 ],
vertices[ 3 ], vertices[ 7 ]
);
var geometry = new THREE.BufferGeometry();
geometry.addAttribute( 'position', new THREE.BufferAttribute( new Float32Array( 72 ), 3 ) );
THREE.Line.call( this, geometry, new THREE.LineBasicMaterial( { color: 0xffff00 } ), THREE.LinePieces );
...
...
@@ -33620,19 +33585,69 @@ THREE.BoxHelper.prototype.update = function ( object ) {
var min = geometry.boundingBox.min;
var max = geometry.boundingBox.max;
var vertices = this.vertices;
vertices[ 0 ].set( max.x, max.y, max.z );
vertices[ 1 ].set( min.x, max.y, max.z );
vertices[ 2 ].set( min.x, min.y, max.z );
vertices[ 3 ].set( max.x, min.y, max.z );
vertices[ 4 ].set( max.x, max.y, min.z );
vertices[ 5 ].set( min.x, max.y, min.z );
vertices[ 6 ].set( min.x, min.y, min.z );
vertices[ 7 ].set( max.x, min.y, min.z );
/*
5____4
1/___0/|
| 6__|_7
2/___3/
0: max.x, max.y, max.z
1: min.x, max.y, max.z
2: min.x, min.y, max.z
3: max.x, min.y, max.z
4: max.x, max.y, min.z
5: min.x, max.y, min.z
6: min.x, min.y, min.z
7: max.x, min.y, min.z
*/
var vertices = this.geometry.attributes.position.array;
vertices[ 0 ] = max.x; vertices[ 1 ] = max.y; vertices[ 2 ] = max.z;
vertices[ 3 ] = min.x; vertices[ 4 ] = max.y; vertices[ 5 ] = max.z;
vertices[ 6 ] = min.x; vertices[ 7 ] = max.y; vertices[ 8 ] = max.z;
vertices[ 9 ] = min.x; vertices[ 10 ] = min.y; vertices[ 11 ] = max.z;
vertices[ 12 ] = min.x; vertices[ 13 ] = min.y; vertices[ 14 ] = max.z;
vertices[ 15 ] = max.x; vertices[ 16 ] = min.y; vertices[ 17 ] = max.z;
vertices[ 18 ] = max.x; vertices[ 19 ] = min.y; vertices[ 20 ] = max.z;
vertices[ 21 ] = max.x; vertices[ 22 ] = max.y; vertices[ 23 ] = max.z;
//
vertices[ 24 ] = max.x; vertices[ 25 ] = max.y; vertices[ 26 ] = min.z;
vertices[ 27 ] = min.x; vertices[ 28 ] = max.y; vertices[ 29 ] = min.z;
vertices[ 30 ] = min.x; vertices[ 31 ] = max.y; vertices[ 32 ] = min.z;
vertices[ 33 ] = min.x; vertices[ 34 ] = min.y; vertices[ 35 ] = min.z;
vertices[ 36 ] = min.x; vertices[ 37 ] = min.y; vertices[ 38 ] = min.z;
vertices[ 39 ] = max.x; vertices[ 40 ] = min.y; vertices[ 41 ] = min.z;
vertices[ 42 ] = max.x; vertices[ 43 ] = min.y; vertices[ 44 ] = min.z;
vertices[ 45 ] = max.x; vertices[ 46 ] = max.y; vertices[ 47 ] = min.z;
//
vertices[ 48 ] = max.x; vertices[ 49 ] = max.y; vertices[ 50 ] = max.z;
vertices[ 51 ] = max.x; vertices[ 52 ] = max.y; vertices[ 53 ] = min.z;
vertices[ 54 ] = min.x; vertices[ 55 ] = max.y; vertices[ 56 ] = max.z;
vertices[ 57 ] = min.x; vertices[ 58 ] = max.y; vertices[ 59 ] = min.z;
vertices[ 60 ] = min.x; vertices[ 61 ] = min.y; vertices[ 62 ] = max.z;
vertices[ 63 ] = min.x; vertices[ 64 ] = min.y; vertices[ 65 ] = min.z;
vertices[ 66 ] = max.x; vertices[ 67 ] = min.y; vertices[ 68 ] = max.z;
vertices[ 69 ] = max.x; vertices[ 70 ] = min.y; vertices[ 71 ] = min.z;
this.geometry.attributes.position.needsUpdate = true;
this.geometry.computeBoundingSphere();
this.geometry.verticesNeedUpdate = true;
this.matrixAutoUpdate = false;
this.matrixWorld = object.matrixWorld;
...
...
build/three.min.js
浏览文件 @
aa360af4
因为 它太大了无法显示 source diff 。你可以改为
查看blob
。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录