Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
79bb1971
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,发现更多精彩内容 >>
提交
79bb1971
编写于
7月 28, 2015
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated builds.
上级
20b77b27
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
200 addition
and
185 deletion
+200
-185
build/three.js
build/three.js
+28
-13
build/three.min.js
build/three.min.js
+172
-172
未找到文件。
build/three.js
浏览文件 @
79bb1971
...
...
@@ -8481,7 +8481,7 @@ THREE.Object3DIdCount = 0;
* @author alteredq / http://alteredqualia.com/
*/
THREE.Face3 = function ( a, b, c, normal, color ) {
THREE.Face3 = function ( a, b, c, normal, color
, materialIndex
) {
this.a = a;
this.b = b;
...
...
@@ -8495,6 +8495,8 @@ THREE.Face3 = function ( a, b, c, normal, color ) {
this.vertexTangents = [];
this.materialIndex = materialIndex !== undefined ? materialIndex : 0;
};
THREE.Face3.prototype = {
...
...
@@ -8510,6 +8512,8 @@ THREE.Face3.prototype = {
this.normal.copy( source.normal );
this.color.copy( source.color );
this.materialIndex = source.materialIndex;
for ( var i = 0, il = source.vertexNormals.length; i < il; i ++ ) {
this.vertexNormals[ i ] = source.vertexNormals[ i ].clone();
...
...
@@ -9823,7 +9827,7 @@ THREE.Geometry.prototype = {
},
merge: function ( geometry, matrix ) {
merge: function ( geometry, matrix
, materialIndexOffset
) {
if ( geometry instanceof THREE.Geometry === false ) {
...
...
@@ -9841,6 +9845,8 @@ THREE.Geometry.prototype = {
uvs1 = this.faceVertexUvs[ 0 ],
uvs2 = geometry.faceVertexUvs[ 0 ];
if ( materialIndexOffset === undefined ) materialIndexOffset = 0;
if ( matrix !== undefined ) {
normalMatrix = new THREE.Matrix3().getNormalMatrix( matrix );
...
...
@@ -9901,6 +9907,8 @@ THREE.Geometry.prototype = {
}
faceCopy.materialIndex = face.materialIndex + materialIndexOffset;
faces1.push( faceCopy );
}
...
...
@@ -13381,7 +13389,7 @@ THREE.JSONLoader.prototype = {
offset, zLength,
colorIndex, normalIndex, uvIndex,
colorIndex, normalIndex, uvIndex,
materialIndex,
type,
isQuad,
...
...
@@ -13468,7 +13476,9 @@ THREE.JSONLoader.prototype = {
if ( hasMaterial ) {
offset ++;
materialIndex = faces[ offset ++ ];
faceA.materialIndex = materialIndex;
faceB.materialIndex = materialIndex;
}
...
...
@@ -13575,7 +13585,8 @@ THREE.JSONLoader.prototype = {
if ( hasMaterial ) {
offset ++;
materialIndex = faces[ offset ++ ];
face.materialIndex = materialIndex;
}
...
...
@@ -17629,7 +17640,7 @@ THREE.SkinnedMesh = function ( geometry, material, useVertexTexture ) {
this.normalizeSkinWeights();
this.updateMatrixWorld( true );
this.bind( new THREE.Skeleton( bones, undefined, useVertexTexture ) );
this.bind( new THREE.Skeleton( bones, undefined, useVertexTexture )
, this.matrixWorld
);
};
...
...
@@ -17644,6 +17655,8 @@ THREE.SkinnedMesh.prototype.bind = function( skeleton, bindMatrix ) {
if ( bindMatrix === undefined ) {
this.updateMatrixWorld( true );
this.skeleton.calculateInverses();
bindMatrix = this.matrixWorld;
...
...
@@ -31475,14 +31488,14 @@ THREE.BoxGeometry = function ( width, height, depth, widthSegments, heightSegmen
var height_half = height / 2;
var depth_half = depth / 2;
buildPlane( 'z', 'y', - 1, - 1, depth, height, width_half ); // px
buildPlane( 'z', 'y', 1, - 1, depth, height, - width_half ); // nx
buildPlane( 'x', 'z', 1, 1, width, depth, height_half ); // py
buildPlane( 'x', 'z', 1, - 1, width, depth, - height_half ); // ny
buildPlane( 'x', 'y', 1, - 1, width, height, depth_half ); // pz
buildPlane( 'x', 'y', - 1, - 1, width, height, - depth_half ); // nz
buildPlane( 'z', 'y', - 1, - 1, depth, height, width_half
, 0
); // px
buildPlane( 'z', 'y', 1, - 1, depth, height, - width_half
, 1
); // nx
buildPlane( 'x', 'z', 1, 1, width, depth, height_half
, 2
); // py
buildPlane( 'x', 'z', 1, - 1, width, depth, - height_half
, 3
); // ny
buildPlane( 'x', 'y', 1, - 1, width, height, depth_half
, 4
); // pz
buildPlane( 'x', 'y', - 1, - 1, width, height, - depth_half
, 5
); // nz
function buildPlane( u, v, udir, vdir, width, height, depth ) {
function buildPlane( u, v, udir, vdir, width, height, depth
, materialIndex
) {
var w, ix, iy,
gridX = scope.widthSegments,
...
...
@@ -31547,6 +31560,7 @@ THREE.BoxGeometry = function ( width, height, depth, widthSegments, heightSegmen
var face = new THREE.Face3( a + offset, b + offset, d + offset );
face.normal.copy( normal );
face.vertexNormals.push( normal.clone(), normal.clone(), normal.clone() );
face.materialIndex = materialIndex;
scope.faces.push( face );
scope.faceVertexUvs[ 0 ].push( [ uva, uvb, uvd ] );
...
...
@@ -31554,6 +31568,7 @@ THREE.BoxGeometry = function ( width, height, depth, widthSegments, heightSegmen
face = new THREE.Face3( b + offset, c + offset, d + offset );
face.normal.copy( normal );
face.vertexNormals.push( normal.clone(), normal.clone(), normal.clone() );
face.materialIndex = materialIndex;
scope.faces.push( face );
scope.faceVertexUvs[ 0 ].push( [ uvb.clone(), uvc, uvd.clone() ] );
...
...
build/three.min.js
浏览文件 @
79bb1971
因为 它太大了无法显示 source diff 。你可以改为
查看blob
。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录