Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
483c76d5
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,体验更适合开发者的 AI 搜索 >>
提交
483c76d5
编写于
7月 26, 2016
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated builds.
上级
63f412e5
变更
2
展开全部
隐藏空白更改
内联
并排
Showing
2 changed file
with
131 addition
and
39 deletion
+131
-39
build/three.js
build/three.js
+117
-25
build/three.min.js
build/three.min.js
+14
-14
未找到文件。
build/three.js
浏览文件 @
483c76d5
...
...
@@ -267,17 +267,19 @@
var IntType = 1013;
var UnsignedIntType = 1014;
var FloatType = 1015;
var HalfFloatType = 1025;
var UnsignedShort4444Type = 1016;
var UnsignedShort5551Type = 1017;
var UnsignedShort565Type = 1018;
var AlphaFormat = 1019;
var RGBFormat = 1020;
var RGBAFormat = 1021;
var LuminanceFormat = 1022;
var LuminanceAlphaFormat = 1023;
var HalfFloatType = 1016;
var UnsignedShort4444Type = 1017;
var UnsignedShort5551Type = 1018;
var UnsignedShort565Type = 1019;
var UnsignedInt248Type = 1020;
var AlphaFormat = 1021;
var RGBFormat = 1022;
var RGBAFormat = 1023;
var LuminanceFormat = 1024;
var LuminanceAlphaFormat = 1025;
var RGBEFormat = RGBAFormat;
var DepthFormat = 1026;
var DepthStencilFormat = 1027;
var RGB_S3TC_DXT1_Format = 2001;
var RGBA_S3TC_DXT1_Format = 2002;
var RGBA_S3TC_DXT3_Format = 2003;
...
...
@@ -5632,6 +5634,14 @@
}
// Depth stencil textures need the DEPTH_STENCIL internal format
// (https://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture/)
if ( texture.format === DepthStencilFormat ) {
internalFormat = _gl.DEPTH_STENCIL;
}
state.texImage2D( _gl.TEXTURE_2D, 0, internalFormat, image.width, image.height, 0, glFormat, glType, null );
} else if ( (texture && texture.isDataTexture) ) {
...
...
@@ -5784,7 +5794,20 @@
setTexture2D( renderTarget.depthTexture, 0 );
var webglDepthTexture = properties.get( renderTarget.depthTexture ).__webglTexture;
_gl.framebufferTexture2D( _gl.FRAMEBUFFER, _gl.DEPTH_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0 );
if ( renderTarget.depthTexture.format === DepthFormat ) {
_gl.framebufferTexture2D( _gl.FRAMEBUFFER, _gl.DEPTH_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0 );
} else if ( renderTarget.depthTexture.format === DepthStencilFormat ) {
_gl.framebufferTexture2D( _gl.FRAMEBUFFER, _gl.DEPTH_STENCIL_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0 );
} else {
throw new Error('Unknown depthTexture format')
}
}
...
...
@@ -7505,7 +7528,7 @@
this.depthBuffer = options.depthBuffer !== undefined ? options.depthBuffer : true;
this.stencilBuffer = options.stencilBuffer !== undefined ? options.stencilBuffer : true;
this.depthTexture = null;
this.depthTexture =
options.depthTexture !== undefined ? options.depthTexture :
null;
};
...
...
@@ -21986,6 +22009,7 @@
if ( p === LuminanceFormat ) return _gl.LUMINANCE;
if ( p === LuminanceAlphaFormat ) return _gl.LUMINANCE_ALPHA;
if ( p === DepthFormat ) return _gl.DEPTH_COMPONENT;
if ( p === DepthStencilFormat ) return _gl.DEPTH_STENCIL;
if ( p === AddEquation ) return _gl.FUNC_ADD;
if ( p === SubtractEquation ) return _gl.FUNC_SUBTRACT;
...
...
@@ -22043,6 +22067,14 @@
}
extension = extensions.get( 'WEBGL_depth_texture' );
if ( extension !== null ){
if ( p === THREE.UnsignedInt248Type ) return extension.UNSIGNED_INT_24_8_WEBGL;
}
return 0;
}
...
...
@@ -22054,14 +22086,14 @@
* @author alteredq / http://alteredqualia.com/
*/
function FogExp2( color, density ) {
function FogExp2
( color, density ) {
this.name = '';
this.color = new Color( color );
this.density = ( density !== undefined ) ? density : 0.00025;
}
;
}
FogExp2.prototype.isFogExp2 = true;
...
...
@@ -22071,12 +22103,22 @@
};
FogExp2.prototype.toJSON = function ( meta ) {
return {
type: 'FogExp2',
color: this.color.getHex(),
density: this.density
};
};
/**
* @author mrdoob / http://mrdoob.com/
* @author alteredq / http://alteredqualia.com/
*/
function Fog( color, near, far ) {
function Fog
( color, near, far ) {
this.name = '';
...
...
@@ -22085,7 +22127,7 @@
this.near = ( near !== undefined ) ? near : 1;
this.far = ( far !== undefined ) ? far : 1000;
}
;
}
Fog.prototype.isFog = true;
...
...
@@ -22095,12 +22137,23 @@
};
Fog.prototype.toJSON = function ( meta ) {
return {
type: 'Fog',
color: this.color.getHex(),
near: this.near,
far: this.far
};
};
/**
* @author mrdoob / http://mrdoob.com/
*/
function Scene() {
function Scene
() {
Object3D.call( this );
this.type = 'Scene';
...
...
@@ -22111,9 +22164,10 @@
this.autoUpdate = true; // checked by the renderer
}
;
}
Scene.prototype = Object.create( Object3D.prototype );
Scene.prototype.constructor = Scene;
Scene.prototype.copy = function ( source, recursive ) {
...
...
@@ -22131,6 +22185,20 @@
};
Scene.prototype.toJSON = function ( meta ) {
var data = Object3D.prototype.toJSON.call( this, meta );
if ( this.fog != null ) {
data.object.fog = this.fog.toJSON();
}
return data;
};
/**
* @author mikael emtinger / http://gomo.se/
* @author alteredq / http://alteredqualia.com/
...
...
@@ -23465,11 +23533,20 @@
/**
* @author Matt DesLauriers / @mattdesl
* @author atix / arthursilber.de
*/
function DepthTexture( width, height, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy ) {
function DepthTexture( width, height, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy, format ) {
format = format !== undefined ? format : DepthFormat;
if ( format !== DepthFormat && format !== DepthStencilFormat ) {
throw new Error( 'DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat' )
}
Texture.call( this, null, mapping, wrapS, wrapT, magFilter, minFilter,
DepthF
ormat, type, anisotropy );
Texture.call( this, null, mapping, wrapS, wrapT, magFilter, minFilter,
f
ormat, type, anisotropy );
this.image = { width: width, height: height };
...
...
@@ -23485,7 +23562,6 @@
DepthTexture.prototype = Object.create( Texture.prototype );
DepthTexture.prototype.constructor = DepthTexture;
DepthTexture.prototype.isDepthTexture = true;
/**
...
...
@@ -28107,12 +28183,12 @@
* @author mrdoob / http://mrdoob.com/
*/
function ObjectLoader( manager ) {
function ObjectLoader
( manager ) {
this.manager = ( manager !== undefined ) ? manager : exports.DefaultLoadingManager;
this.texturePath = '';
}
;
}
Object.assign( ObjectLoader.prototype, {
...
...
@@ -28561,6 +28637,20 @@
object = new Scene();
if ( data.fog !== undefined ) {
if ( data.fog.type === 'FogExp2' ) {
object.fog = new FogExp2(data.fog.color, data.fog.density);
} else if ( data.fog.type === 'Fog' ) {
object.fog = new Fog(data.fog.color, data.fog.near, data.fog.far);
}
}
break;
case 'PerspectiveCamera':
...
...
@@ -28642,7 +28732,7 @@
case 'LineSegments':
object = new
THREE.
LineSegments( getGeometry( data.geometry ), getMaterial( data.material ) );
object = new LineSegments( getGeometry( data.geometry ), getMaterial( data.material ) );
break;
...
...
@@ -29503,7 +29593,7 @@
*
* Some common of Curve methods
* .getPoint(t), getTangent(t)
* .getPointAt(u), getTagentAt(u)
* .getPointAt(u), getTa
n
gentAt(u)
* .getPoints(), .getSpacedPoints()
* .getLength()
* .updateArcLengths()
...
...
@@ -40741,6 +40831,7 @@
exports.UnsignedShort4444Type = UnsignedShort4444Type;
exports.UnsignedShort5551Type = UnsignedShort5551Type;
exports.UnsignedShort565Type = UnsignedShort565Type;
exports.UnsignedInt248Type = UnsignedInt248Type;
exports.AlphaFormat = AlphaFormat;
exports.RGBFormat = RGBFormat;
exports.RGBAFormat = RGBAFormat;
...
...
@@ -40748,6 +40839,7 @@
exports.LuminanceAlphaFormat = LuminanceAlphaFormat;
exports.RGBEFormat = RGBEFormat;
exports.DepthFormat = DepthFormat;
exports.DepthStencilFormat = DepthStencilFormat;
exports.RGB_S3TC_DXT1_Format = RGB_S3TC_DXT1_Format;
exports.RGBA_S3TC_DXT1_Format = RGBA_S3TC_DXT1_Format;
exports.RGBA_S3TC_DXT3_Format = RGBA_S3TC_DXT3_Format;
...
...
build/three.min.js
浏览文件 @
483c76d5
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录