Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
9c197530
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,发现更多精彩内容 >>
提交
9c197530
编写于
10月 21, 2014
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated builds.
上级
be75f8a5
变更
2
展开全部
隐藏空白更改
内联
并排
Showing
2 changed file
with
102 addition
and
108 deletion
+102
-108
build/three.js
build/three.js
+21
-26
build/three.min.js
build/three.min.js
+81
-82
未找到文件。
build/three.js
浏览文件 @
9c197530
...
@@ -29772,7 +29772,7 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) {
...
@@ -29772,7 +29772,7 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) {
for ( i = 0; i < flen; i ++ ) {
for ( i = 0; i < flen; i ++ ) {
face = faces[ i ];
face = faces[ i ];
f3( face[ 2 ]+ offset, face[ 1 ]+ offset, face[ 0 ] + offset
, true
);
f3( face[ 2 ]+ offset, face[ 1 ]+ offset, face[ 0 ] + offset );
}
}
...
@@ -29784,7 +29784,7 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) {
...
@@ -29784,7 +29784,7 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) {
for ( i = 0; i < flen; i ++ ) {
for ( i = 0; i < flen; i ++ ) {
face = faces[ i ];
face = faces[ i ];
f3( face[ 0 ] + offset, face[ 1 ] + offset, face[ 2 ] + offset
, false
);
f3( face[ 0 ] + offset, face[ 1 ] + offset, face[ 2 ] + offset );
}
}
...
@@ -29795,7 +29795,7 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) {
...
@@ -29795,7 +29795,7 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) {
for ( i = 0; i < flen; i ++ ) {
for ( i = 0; i < flen; i ++ ) {
face = faces[ i ];
face = faces[ i ];
f3( face[ 2 ], face[ 1 ], face[ 0 ]
, true
);
f3( face[ 2 ], face[ 1 ], face[ 0 ] );
}
}
...
@@ -29804,7 +29804,7 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) {
...
@@ -29804,7 +29804,7 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) {
for ( i = 0; i < flen; i ++ ) {
for ( i = 0; i < flen; i ++ ) {
face = faces[ i ];
face = faces[ i ];
f3( face[ 0 ] + vlen * steps, face[ 1 ] + vlen * steps, face[ 2 ] + vlen * steps
, false
);
f3( face[ 0 ] + vlen * steps, face[ 1 ] + vlen * steps, face[ 2 ] + vlen * steps );
}
}
}
}
...
@@ -29870,7 +29870,7 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) {
...
@@ -29870,7 +29870,7 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) {
}
}
function f3( a, b, c
, isBottom
) {
function f3( a, b, c ) {
a += shapesOffset;
a += shapesOffset;
b += shapesOffset;
b += shapesOffset;
...
@@ -29879,7 +29879,7 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) {
...
@@ -29879,7 +29879,7 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) {
// normal, color, material
// normal, color, material
scope.faces.push( new THREE.Face3( a, b, c, null, null, material ) );
scope.faces.push( new THREE.Face3( a, b, c, null, null, material ) );
var uvs =
isBottom ? uvgen.generateBottomUV( scope, shape, options, a, b, c ) : uvgen.generateTopUV( scope, shape, options
, a, b, c );
var uvs =
uvgen.generateTopUV( scope
, a, b, c );
scope.faceVertexUvs[ 0 ].push( uvs );
scope.faceVertexUvs[ 0 ].push( uvs );
...
@@ -29895,8 +29895,7 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) {
...
@@ -29895,8 +29895,7 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) {
scope.faces.push( new THREE.Face3( a, b, d, null, null, extrudeMaterial ) );
scope.faces.push( new THREE.Face3( a, b, d, null, null, extrudeMaterial ) );
scope.faces.push( new THREE.Face3( b, c, d, null, null, extrudeMaterial ) );
scope.faces.push( new THREE.Face3( b, c, d, null, null, extrudeMaterial ) );
var uvs = uvgen.generateSideWallUV( scope, shape, wallContour, options, a, b, c, d,
var uvs = uvgen.generateSideWallUV( scope, a, b, c, d );
stepIndex, stepsLength, contourIndex1, contourIndex2 );
scope.faceVertexUvs[ 0 ].push( [ uvs[ 0 ], uvs[ 1 ], uvs[ 3 ] ] );
scope.faceVertexUvs[ 0 ].push( [ uvs[ 0 ], uvs[ 1 ], uvs[ 3 ] ] );
scope.faceVertexUvs[ 0 ].push( [ uvs[ 1 ], uvs[ 2 ], uvs[ 3 ] ] );
scope.faceVertexUvs[ 0 ].push( [ uvs[ 1 ], uvs[ 2 ], uvs[ 3 ] ] );
...
@@ -29907,11 +29906,13 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) {
...
@@ -29907,11 +29906,13 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) {
THREE.ExtrudeGeometry.WorldUVGenerator = {
THREE.ExtrudeGeometry.WorldUVGenerator = {
generateTopUV: function( geometry, extrudedShape, extrudeOptions, indexA, indexB, indexC ) {
generateTopUV: function ( geometry, indexA, indexB, indexC ) {
var a = geometry.vertices[ indexA ];
var vertices = geometry.vertices;
var b = geometry.vertices[ indexB ];
var c = geometry.vertices[ indexC ];
var a = vertices[ indexA ];
var b = vertices[ indexB ];
var c = vertices[ indexC ];
return [
return [
new THREE.Vector2( a.x, a.y ),
new THREE.Vector2( a.x, a.y ),
...
@@ -29921,20 +29922,14 @@ THREE.ExtrudeGeometry.WorldUVGenerator = {
...
@@ -29921,20 +29922,14 @@ THREE.ExtrudeGeometry.WorldUVGenerator = {
},
},
generate
BottomUV: function( geometry, extrudedShape, extrudeOptions, indexA, indexB, indexC
) {
generate
SideWallUV: function ( geometry, indexA, indexB, indexC, indexD
) {
return this.generateTopUV( geometry, extrudedShape, extrudeOptions, indexA, indexB, indexC );
var vertices = geometry.vertices;
},
generateSideWallUV: function( geometry, extrudedShape, wallContour, extrudeOptions,
indexA, indexB, indexC, indexD, stepIndex, stepsLength,
contourIndex1, contourIndex2 ) {
var a =
geometry.
vertices[ indexA ];
var a = vertices[ indexA ];
var b =
geometry.
vertices[ indexB ];
var b = vertices[ indexB ];
var c =
geometry.
vertices[ indexC ];
var c = vertices[ indexC ];
var d =
geometry.
vertices[ indexD ];
var d = vertices[ indexD ];
if ( Math.abs( a.y - b.y ) < 0.01 ) {
if ( Math.abs( a.y - b.y ) < 0.01 ) {
return [
return [
...
@@ -30084,7 +30079,7 @@ THREE.ShapeGeometry.prototype.addShape = function ( shape, options ) {
...
@@ -30084,7 +30079,7 @@ THREE.ShapeGeometry.prototype.addShape = function ( shape, options ) {
var c = face[ 2 ] + shapesOffset;
var c = face[ 2 ] + shapesOffset;
this.faces.push( new THREE.Face3( a, b, c, null, null, material ) );
this.faces.push( new THREE.Face3( a, b, c, null, null, material ) );
this.faceVertexUvs[ 0 ].push( uvgen.generate
BottomUV( this, shape, option
s, a, b, c ) );
this.faceVertexUvs[ 0 ].push( uvgen.generate
TopUV( thi
s, a, b, c ) );
}
}
...
...
build/three.min.js
浏览文件 @
9c197530
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录