Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
b9f7d2cd
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,发现更多精彩内容 >>
提交
b9f7d2cd
编写于
5月 10, 2014
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated builds.
上级
f4ce69bc
变更
2
展开全部
隐藏空白更改
内联
并排
Showing
2 changed file
with
52 addition
and
51 deletion
+52
-51
build/three.js
build/three.js
+43
-41
build/three.min.js
build/three.min.js
+9
-10
未找到文件。
build/three.js
浏览文件 @
b9f7d2cd
...
...
@@ -7646,7 +7646,7 @@ THREE.Object3D = function () {
return position;
},
set: function ( value ) {
console.
warn
( 'THREE.Object3D: .position = new THREE.Vector3() pattern no longer works. Use .position.copy() instead.' );
console.
error
( 'THREE.Object3D: .position = new THREE.Vector3() pattern no longer works. Use .position.copy() instead.' );
position.copy( value );
}
},
...
...
@@ -7656,7 +7656,7 @@ THREE.Object3D = function () {
return rotation;
},
set: function ( value ) {
console.
warn
( 'THREE.Object3D: .rotation = new THREE.Euler() pattern no longer works. Use .rotation.copy() instead.' );
console.
error
( 'THREE.Object3D: .rotation = new THREE.Euler() pattern no longer works. Use .rotation.copy() instead.' );
rotation.copy( value );
}
},
...
...
@@ -7666,7 +7666,7 @@ THREE.Object3D = function () {
return quaternion;
},
set: function ( value ) {
console.
warn
( 'THREE.Object3D: .quaternion = new THREE.Quaternion() pattern no longer works. Use .quaternion.copy() instead.' );
console.
error
( 'THREE.Object3D: .quaternion = new THREE.Quaternion() pattern no longer works. Use .quaternion.copy() instead.' );
quaternion.copy( value );
}
},
...
...
@@ -7676,7 +7676,7 @@ THREE.Object3D = function () {
return scale;
},
set: function ( value ) {
console.
warn
( 'THREE.Object3D: .scale = new THREE.Vector3() pattern no longer works. Use .scale.copy() instead.' );
console.
error
( 'THREE.Object3D: .scale = new THREE.Vector3() pattern no longer works. Use .scale.copy() instead.' );
scale.copy( value );
}
}
...
...
@@ -34097,42 +34097,45 @@ THREE.AxisHelper.prototype = Object.create( THREE.Line.prototype );
* headWidth - Number
*/
THREE.ArrowHelper =
function ( dir, origin, length, color, headLength, headWidth
) {
THREE.ArrowHelper =
( function (
) {
// dir is assumed to be normalized
var lineGeometry = new THREE.Geometry();
lineGeometry.vertices.push( new THREE.Vector3( 0, 0, 0 ), new THREE.Vector3( 0, 1, 0 ) );
THREE.Object3D.call( this );
var coneGeometry = new THREE.CylinderGeometry( 0, 0.5, 1, 5, 1 );
coneGeometry.applyMatrix( new THREE.Matrix4().makeTranslation( 0, - 0.5, 0 ) );
if ( color === undefined ) color = 0xffff00;
if ( length === undefined ) length = 1;
if ( headLength === undefined ) headLength = 0.2 * length;
if ( headWidth === undefined ) headWidth = 0.2 * headLength;
return function ( dir, origin, length, color, headLength, headWidth ) {
this.position = origin;
// dir is assumed to be normalized
var lineGeometry = new THREE.Geometry();
lineGeometry.vertices.push( new THREE.Vector3( 0, 0, 0 ) );
lineGeometry.vertices.push( new THREE.Vector3( 0, 1, 0 ) );
THREE.Object3D.call( this );
this.line = new THREE.Line( lineGeometry, new THREE.LineBasicMaterial( { color: color } ) );
this.line.matrixAutoUpdate = false;
this.add( this.line );
if ( color === undefined ) color = 0xffff00;
if ( length === undefined ) length = 1;
if ( headLength === undefined ) headLength = 0.2 * length;
if ( headWidth === undefined ) headWidth = 0.2 * headLength;
var coneGeometry = new THREE.CylinderGeometry( 0, 0.5, 1, 5, 1 );
coneGeometry.applyMatrix( new THREE.Matrix4().makeTranslation( 0, - 0.5, 0 ) );
this.position.copy( origin );
this.cone = new THREE.Mesh( coneGeometry, new THREE.Mesh
BasicMaterial( { color: color } ) );
this.co
ne.matrixAutoUpdate = false;
this.add( this.co
ne );
this.line = new THREE.Line( lineGeometry, new THREE.Line
BasicMaterial( { color: color } ) );
this.li
ne.matrixAutoUpdate = false;
this.add( this.li
ne );
this.setDirection( dir );
this.setLength( length, headLength, headWidth );
this.cone = new THREE.Mesh( coneGeometry, new THREE.MeshBasicMaterial( { color: color } ) );
this.cone.matrixAutoUpdate = false;
this.add( this.cone );
};
this.setDirection( dir );
this.setLength( length, headLength, headWidth );
}
}() );
THREE.ArrowHelper.prototype = Object.create( THREE.Object3D.prototype );
THREE.ArrowHelper.prototype.setDirection = function () {
THREE.ArrowHelper.prototype.setDirection =
(
function () {
var axis = new THREE.Vector3();
var radians;
...
...
@@ -34161,7 +34164,7 @@ THREE.ArrowHelper.prototype.setDirection = function () {
};
}();
}()
)
;
THREE.ArrowHelper.prototype.setLength = function ( length, headLength, headWidth ) {
...
...
@@ -35060,8 +35063,7 @@ THREE.VertexNormalsHelper = function ( object, size, hex, linewidth ) {
for ( var j = 0, jl = face.vertexNormals.length; j < jl; j ++ ) {
geometry.vertices.push( new THREE.Vector3() );
geometry.vertices.push( new THREE.Vector3() );
geometry.vertices.push( new THREE.Vector3(), new THREE.Vector3() );
}
...
...
@@ -35279,9 +35281,7 @@ THREE.WireframeHelper = function ( object, hex ) {
}
geometry.addAttribute( 'position', new THREE.Float32Attribute( numEdges * 2 * 3, 3 ) );
var coords = geometry.attributes.position.array;
var coords = new Float32Array( numEdges * 2 * 3 );
for ( var i = 0, l = numEdges; i < l; i ++ ) {
...
...
@@ -35298,7 +35298,9 @@ THREE.WireframeHelper = function ( object, hex ) {
}
} else if ( object.geometry instanceof THREE.BufferGeometry && object.geometry.attributes.index !== undefined ) { // indexed BufferGeometry
geometry.addAttribute( 'position', new THREE.BufferAttribute( coords, 3 ) );
} else if ( object.geometry instanceof THREE.BufferGeometry && object.geometry.attributes.index !== undefined ) { // Indexed BufferGeometry
var vertices = object.geometry.attributes.position.array;
var indices = object.geometry.attributes.index.array;
...
...
@@ -35339,9 +35341,7 @@ THREE.WireframeHelper = function ( object, hex ) {
}
geometry.addAttribute( 'position', new THREE.Float32Attribute( numEdges * 2 * 3, 3 ) );
var coords = geometry.attributes.position.array;
var coords = new Float32Array( numEdges * 2 * 3 );
for ( var i = 0, l = numEdges; i < l; i ++ ) {
...
...
@@ -35357,15 +35357,15 @@ THREE.WireframeHelper = function ( object, hex ) {
}
} else if ( object.geometry instanceof THREE.BufferGeometry ) { // non-indexed BufferGeometry
geometry.addAttribute( 'position', new THREE.BufferAttribute( coords, 3 ) );
} else if ( object.geometry instanceof THREE.BufferGeometry ) { // non-indexed BufferGeometry
var vertices = object.geometry.attributes.position.array;
var numEdges = vertices.length / 3;
var numTris = numEdges / 3;
geometry.addAttribute( 'position', new THREE.Float32Attribute( numEdges * 2 * 3, 3 ) );
var coords = geometry.attributes.position.array;
var coords = new Float32Array( numEdges * 2 * 3 );
for ( var i = 0, l = numTris; i < l; i ++ ) {
...
...
@@ -35387,6 +35387,8 @@ THREE.WireframeHelper = function ( object, hex ) {
}
geometry.addAttribute( 'position', new THREE.BufferAttribute( coords, 3 ) );
}
THREE.Line.call( this, geometry, new THREE.LineBasicMaterial( { color: color } ), THREE.LinePieces );
...
...
build/three.min.js
浏览文件 @
b9f7d2cd
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录