Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
8c6280bf
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,发现更多精彩内容 >>
提交
8c6280bf
编写于
4月 30, 2018
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated builds.
上级
7521d0e3
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
362 addition
and
343 deletion
+362
-343
build/three.js
build/three.js
+39
-29
build/three.min.js
build/three.min.js
+284
-285
build/three.module.js
build/three.module.js
+39
-29
未找到文件。
build/three.js
浏览文件 @
8c6280bf
...
...
@@ -14242,7 +14242,6 @@
Triangle.getNormal( vA, vB, vC, face.normal );
intersection.face = face;
intersection.faceIndex = a;
}
...
...
@@ -14304,7 +14303,7 @@
if ( intersection ) {
intersection.faceIndex = Math.floor( i / 3 ); // triangle number in ind
ices
buffer semantics
intersection.faceIndex = Math.floor( i / 3 ); // triangle number in ind
exed
buffer semantics
intersects.push( intersection );
}
...
...
@@ -14323,7 +14322,12 @@
intersection = checkBufferGeometryIntersection( this, raycaster, ray, position, uv, a, b, c );
if ( intersection ) intersects.push( intersection );
if ( intersection ) {
intersection.faceIndex = Math.floor( i / 3 ); // triangle number in non-indexed buffer semantics
intersects.push( intersection );
}
}
...
...
@@ -14426,7 +14430,7 @@
* @author mrdoob / http://mrdoob.com/
*/
function WebGLBackground( renderer, state,
geometrie
s, premultipliedAlpha ) {
function WebGLBackground( renderer, state,
object
s, premultipliedAlpha ) {
var clearColor = new Color( 0x000000 );
var clearAlpha = 0;
...
...
@@ -14481,7 +14485,7 @@
};
geometries.update( boxMesh.geometry
);
objects.update( boxMesh
);
}
...
...
@@ -14500,7 +14504,7 @@
new MeshBasicMaterial( { depthTest: false, depthWrite: false, fog: false } )
);
geometries.update( planeMesh.geometry
);
objects.update( planeMesh
);
}
...
...
@@ -14584,19 +14588,7 @@
}
var position = geometry.attributes.position;
if ( position.isInterleavedBufferAttribute ) {
count = position.data.count;
extension.drawArraysInstancedANGLE( mode, 0, count, geometry.maxInstancedCount );
} else {
extension.drawArraysInstancedANGLE( mode, start, count, geometry.maxInstancedCount );
}
extension.drawArraysInstancedANGLE( mode, start, count, geometry.maxInstancedCount );
info.update( count, mode, geometry.maxInstancedCount );
...
...
@@ -21387,7 +21379,7 @@
renderLists = new WebGLRenderLists();
renderStates = new WebGLRenderStates();
background = new WebGLBackground( _this, state,
geometrie
s, _premultipliedAlpha );
background = new WebGLBackground( _this, state,
object
s, _premultipliedAlpha );
bufferRenderer = new WebGLBufferRenderer( _gl, extensions, info );
indexedBufferRenderer = new WebGLIndexedBufferRenderer( _gl, extensions, info );
...
...
@@ -23699,11 +23691,18 @@
var height = srcTexture.image.height;
var glFormat = utils.convert( dstTexture.format );
var glType = utils.convert( dstTexture.type );
var pixels = srcTexture.isDataTexture ? srcTexture.image.data : srcTexture.image;
this.setTexture2D( dstTexture, 0 );
_gl.texSubImage2D( _gl.TEXTURE_2D, level || 0, position.x, position.y, width, height, glFormat, glType, pixels );
if ( srcTexture.isDataTexture ) {
_gl.texSubImage2D( _gl.TEXTURE_2D, level || 0, position.x, position.y, width, height, glFormat, glType, srcTexture.image.data );
} else {
_gl.texSubImage2D( _gl.TEXTURE_2D, level || 0, position.x, position.y, glFormat, glType, srcTexture.image );
}
};
...
...
@@ -27568,7 +27567,7 @@
*
* curveSegments: <int>, // number of points on the curves
* steps: <int>, // number of points for z-side extrusions / used for subdividing segments of extrude spline too
*
amount: <in
t>, // Depth to extrude the shape
*
depth: <floa
t>, // Depth to extrude the shape
*
* bevelEnabled: <bool>, // turn on bevel
* bevelThickness: <float>, // how deep into the original shape bevel goes
...
...
@@ -27626,7 +27625,7 @@
for ( var i = 0, l = shapes.length; i < l; i ++ ) {
var shape = shapes[ i ];
addShape( shape
, options
);
addShape( shape );
}
...
...
@@ -27647,7 +27646,7 @@
var curveSegments = options.curveSegments !== undefined ? options.curveSegments : 12;
var steps = options.steps !== undefined ? options.steps : 1;
var
amount = options.amount !== undefined ? options.amount
: 100;
var
depth = options.depth !== undefined ? options.depth
: 100;
var bevelEnabled = options.bevelEnabled !== undefined ? options.bevelEnabled : true;
var bevelThickness = options.bevelThickness !== undefined ? options.bevelThickness : 6;
...
...
@@ -27658,6 +27657,15 @@
var uvgen = options.UVGenerator !== undefined ? options.UVGenerator : WorldUVGenerator;
// deprecated options
if ( options.amount !== undefined ) {
console.warn( 'THREE.ExtrudeBufferGeometry: amount has been renamed to depth.' );
depth = options.amount;
}
//
var extrudePts, extrudeByPath = false;
...
...
@@ -27998,7 +28006,7 @@
if ( ! extrudeByPath ) {
v( vert.x, vert.y,
amount
/ steps * s );
v( vert.x, vert.y,
depth
/ steps * s );
} else {
...
...
@@ -28032,7 +28040,7 @@
for ( i = 0, il = contour.length; i < il; i ++ ) {
vert = scalePt2( contour[ i ], contourMovements[ i ], bs );
v( vert.x, vert.y,
amount
+ z );
v( vert.x, vert.y,
depth
+ z );
}
...
...
@@ -28049,7 +28057,7 @@
if ( ! extrudeByPath ) {
v( vert.x, vert.y,
amount
+ z );
v( vert.x, vert.y,
depth
+ z );
} else {
...
...
@@ -28378,7 +28386,7 @@
// translate parameters to ExtrudeGeometry API
parameters.
amount
= parameters.height !== undefined ? parameters.height : 50;
parameters.
depth
= parameters.height !== undefined ? parameters.height : 50;
// defaults
...
...
@@ -36751,12 +36759,14 @@
setTexturePath: function ( value ) {
this.texturePath = value;
return this;
},
setCrossOrigin: function ( value ) {
this.crossOrigin = value;
return this;
},
build/three.min.js
浏览文件 @
8c6280bf
因为 它太大了无法显示 source diff 。你可以改为
查看blob
。
build/three.module.js
浏览文件 @
8c6280bf
...
...
@@ -14236,7 +14236,6 @@ Mesh.prototype = Object.assign( Object.create( Object3D.prototype ), {
Triangle.getNormal( vA, vB, vC, face.normal );
intersection.face = face;
intersection.faceIndex = a;
}
...
...
@@ -14298,7 +14297,7 @@ Mesh.prototype = Object.assign( Object.create( Object3D.prototype ), {
if ( intersection ) {
intersection.faceIndex = Math.floor( i / 3 ); // triangle number in ind
ices
buffer semantics
intersection.faceIndex = Math.floor( i / 3 ); // triangle number in ind
exed
buffer semantics
intersects.push( intersection );
}
...
...
@@ -14317,7 +14316,12 @@ Mesh.prototype = Object.assign( Object.create( Object3D.prototype ), {
intersection = checkBufferGeometryIntersection( this, raycaster, ray, position, uv, a, b, c );
if ( intersection ) intersects.push( intersection );
if ( intersection ) {
intersection.faceIndex = Math.floor( i / 3 ); // triangle number in non-indexed buffer semantics
intersects.push( intersection );
}
}
...
...
@@ -14420,7 +14424,7 @@ Mesh.prototype = Object.assign( Object.create( Object3D.prototype ), {
* @author mrdoob / http://mrdoob.com/
*/
function WebGLBackground( renderer, state,
geometrie
s, premultipliedAlpha ) {
function WebGLBackground( renderer, state,
object
s, premultipliedAlpha ) {
var clearColor = new Color( 0x000000 );
var clearAlpha = 0;
...
...
@@ -14475,7 +14479,7 @@ function WebGLBackground( renderer, state, geometries, premultipliedAlpha ) {
};
geometries.update( boxMesh.geometry
);
objects.update( boxMesh
);
}
...
...
@@ -14494,7 +14498,7 @@ function WebGLBackground( renderer, state, geometries, premultipliedAlpha ) {
new MeshBasicMaterial( { depthTest: false, depthWrite: false, fog: false } )
);
geometries.update( planeMesh.geometry
);
objects.update( planeMesh
);
}
...
...
@@ -14578,19 +14582,7 @@ function WebGLBufferRenderer( gl, extensions, info ) {
}
var position = geometry.attributes.position;
if ( position.isInterleavedBufferAttribute ) {
count = position.data.count;
extension.drawArraysInstancedANGLE( mode, 0, count, geometry.maxInstancedCount );
} else {
extension.drawArraysInstancedANGLE( mode, start, count, geometry.maxInstancedCount );
}
extension.drawArraysInstancedANGLE( mode, start, count, geometry.maxInstancedCount );
info.update( count, mode, geometry.maxInstancedCount );
...
...
@@ -21381,7 +21373,7 @@ function WebGLRenderer( parameters ) {
renderLists = new WebGLRenderLists();
renderStates = new WebGLRenderStates();
background = new WebGLBackground( _this, state,
geometrie
s, _premultipliedAlpha );
background = new WebGLBackground( _this, state,
object
s, _premultipliedAlpha );
bufferRenderer = new WebGLBufferRenderer( _gl, extensions, info );
indexedBufferRenderer = new WebGLIndexedBufferRenderer( _gl, extensions, info );
...
...
@@ -23693,11 +23685,18 @@ function WebGLRenderer( parameters ) {
var height = srcTexture.image.height;
var glFormat = utils.convert( dstTexture.format );
var glType = utils.convert( dstTexture.type );
var pixels = srcTexture.isDataTexture ? srcTexture.image.data : srcTexture.image;
this.setTexture2D( dstTexture, 0 );
_gl.texSubImage2D( _gl.TEXTURE_2D, level || 0, position.x, position.y, width, height, glFormat, glType, pixels );
if ( srcTexture.isDataTexture ) {
_gl.texSubImage2D( _gl.TEXTURE_2D, level || 0, position.x, position.y, width, height, glFormat, glType, srcTexture.image.data );
} else {
_gl.texSubImage2D( _gl.TEXTURE_2D, level || 0, position.x, position.y, glFormat, glType, srcTexture.image );
}
};
...
...
@@ -27562,7 +27561,7 @@ function addContour( vertices, contour ) {
*
* curveSegments: <int>, // number of points on the curves
* steps: <int>, // number of points for z-side extrusions / used for subdividing segments of extrude spline too
*
amount: <in
t>, // Depth to extrude the shape
*
depth: <floa
t>, // Depth to extrude the shape
*
* bevelEnabled: <bool>, // turn on bevel
* bevelThickness: <float>, // how deep into the original shape bevel goes
...
...
@@ -27620,7 +27619,7 @@ function ExtrudeBufferGeometry( shapes, options ) {
for ( var i = 0, l = shapes.length; i < l; i ++ ) {
var shape = shapes[ i ];
addShape( shape
, options
);
addShape( shape );
}
...
...
@@ -27641,7 +27640,7 @@ function ExtrudeBufferGeometry( shapes, options ) {
var curveSegments = options.curveSegments !== undefined ? options.curveSegments : 12;
var steps = options.steps !== undefined ? options.steps : 1;
var
amount = options.amount !== undefined ? options.amount
: 100;
var
depth = options.depth !== undefined ? options.depth
: 100;
var bevelEnabled = options.bevelEnabled !== undefined ? options.bevelEnabled : true;
var bevelThickness = options.bevelThickness !== undefined ? options.bevelThickness : 6;
...
...
@@ -27652,6 +27651,15 @@ function ExtrudeBufferGeometry( shapes, options ) {
var uvgen = options.UVGenerator !== undefined ? options.UVGenerator : WorldUVGenerator;
// deprecated options
if ( options.amount !== undefined ) {
console.warn( 'THREE.ExtrudeBufferGeometry: amount has been renamed to depth.' );
depth = options.amount;
}
//
var extrudePts, extrudeByPath = false;
...
...
@@ -27992,7 +28000,7 @@ function ExtrudeBufferGeometry( shapes, options ) {
if ( ! extrudeByPath ) {
v( vert.x, vert.y,
amount
/ steps * s );
v( vert.x, vert.y,
depth
/ steps * s );
} else {
...
...
@@ -28026,7 +28034,7 @@ function ExtrudeBufferGeometry( shapes, options ) {
for ( i = 0, il = contour.length; i < il; i ++ ) {
vert = scalePt2( contour[ i ], contourMovements[ i ], bs );
v( vert.x, vert.y,
amount
+ z );
v( vert.x, vert.y,
depth
+ z );
}
...
...
@@ -28043,7 +28051,7 @@ function ExtrudeBufferGeometry( shapes, options ) {
if ( ! extrudeByPath ) {
v( vert.x, vert.y,
amount
+ z );
v( vert.x, vert.y,
depth
+ z );
} else {
...
...
@@ -28372,7 +28380,7 @@ function TextBufferGeometry( text, parameters ) {
// translate parameters to ExtrudeGeometry API
parameters.
amount
= parameters.height !== undefined ? parameters.height : 50;
parameters.
depth
= parameters.height !== undefined ? parameters.height : 50;
// defaults
...
...
@@ -36745,12 +36753,14 @@ Object.assign( ObjectLoader.prototype, {
setTexturePath: function ( value ) {
this.texturePath = value;
return this;
},
setCrossOrigin: function ( value ) {
this.crossOrigin = value;
return this;
},
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录