Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
30c966b5
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,发现更多精彩内容 >>
提交
30c966b5
编写于
7月 18, 2017
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated builds.
上级
a35f15f8
变更
3
展开全部
隐藏空白更改
内联
并排
Showing
3 changed file
with
654 addition
and
656 deletion
+654
-656
build/three.js
build/three.js
+55
-56
build/three.min.js
build/three.min.js
+544
-544
build/three.module.js
build/three.module.js
+55
-56
未找到文件。
build/three.js
浏览文件 @
30c966b5
...
...
@@ -6375,7 +6375,7 @@
* @author alteredq / http://alteredqualia.com/
*/
function
LensFlarePlugin
( renderer, flares ) {
function
WebGLFlareRenderer
( renderer, flares ) {
var gl = renderer.context;
var state = renderer.state;
...
...
@@ -6773,7 +6773,7 @@
* @author alteredq / http://alteredqualia.com/
*/
function
SpritePlugin
( renderer, sprites ) {
function
WebGLSpriteRenderer
( renderer, sprites ) {
var gl = renderer.context;
var state = renderer.state;
...
...
@@ -17456,11 +17456,10 @@
}
function WebGLProgram( renderer, code, material, shader, parameters ) {
function WebGLProgram( renderer,
extensions,
code, material, shader, parameters ) {
var gl = renderer.context;
var extensions = material.extensions;
var defines = material.defines;
var vertexShader = shader.vertexShader;
...
...
@@ -17540,7 +17539,7 @@
//
var customExtensions = generateExtensions(
extensions, parameters, renderer.
extensions );
var customExtensions = generateExtensions(
material.extensions, parameters,
extensions );
var customDefines = generateDefines( defines );
...
...
@@ -17621,7 +17620,7 @@
parameters.sizeAttenuation ? '#define USE_SIZEATTENUATION' : '',
parameters.logarithmicDepthBuffer ? '#define USE_LOGDEPTHBUF' : '',
parameters.logarithmicDepthBuffer &&
renderer.
extensions.get( 'EXT_frag_depth' ) ? '#define USE_LOGDEPTHBUF_EXT' : '',
parameters.logarithmicDepthBuffer && extensions.get( 'EXT_frag_depth' ) ? '#define USE_LOGDEPTHBUF_EXT' : '',
'uniform mat4 modelMatrix;',
'uniform mat4 modelViewMatrix;',
...
...
@@ -17728,9 +17727,9 @@
parameters.physicallyCorrectLights ? "#define PHYSICALLY_CORRECT_LIGHTS" : '',
parameters.logarithmicDepthBuffer ? '#define USE_LOGDEPTHBUF' : '',
parameters.logarithmicDepthBuffer &&
renderer.
extensions.get( 'EXT_frag_depth' ) ? '#define USE_LOGDEPTHBUF_EXT' : '',
parameters.logarithmicDepthBuffer && extensions.get( 'EXT_frag_depth' ) ? '#define USE_LOGDEPTHBUF_EXT' : '',
parameters.envMap &&
renderer.
extensions.get( 'EXT_shader_texture_lod' ) ? '#define TEXTURE_LOD_EXT' : '',
parameters.envMap && extensions.get( 'EXT_shader_texture_lod' ) ? '#define TEXTURE_LOD_EXT' : '',
'uniform mat4 viewMatrix;',
'uniform vec3 cameraPosition;',
...
...
@@ -17857,12 +17856,11 @@
var cachedUniforms;
this.getUniforms = function() {
this.getUniforms = function
() {
if ( cachedUniforms === undefined ) {
cachedUniforms =
new WebGLUniforms( gl, program, renderer );
cachedUniforms = new WebGLUniforms( gl, program, renderer );
}
...
...
@@ -17874,7 +17872,7 @@
var cachedAttributes;
this.getAttributes = function() {
this.getAttributes = function
() {
if ( cachedAttributes === undefined ) {
...
...
@@ -17937,7 +17935,7 @@
* @author mrdoob / http://mrdoob.com/
*/
function WebGLPrograms( renderer, capabilities ) {
function WebGLPrograms( renderer,
extensions,
capabilities ) {
var programs = [];
...
...
@@ -18043,7 +18041,7 @@
// (not to blow over maxLights budget)
var maxBones = object.isSkinnedMesh ? allocateBones( object ) : 0;
var precision =
renderer.getPrecision()
;
var precision =
capabilities.precision
;
if ( material.precision !== null ) {
...
...
@@ -18201,7 +18199,7 @@
if ( program === undefined ) {
program = new WebGLProgram( renderer, code, material, shader, parameters );
program = new WebGLProgram( renderer,
extensions,
code, material, shader, parameters );
programs.push( program );
}
...
...
@@ -20608,8 +20606,8 @@
var morphInfluences = new Float32Array( 8 );
var sprites = [];
var
lensFlares
= [];
var sprites
Array
= [];
var
flaresArray
= [];
// public properties
...
...
@@ -20729,6 +20727,11 @@
};
function getTargetPixelRatio() {
return _currentRenderTarget === null ? _pixelRatio : 1;
}
// initialize
...
...
@@ -20816,7 +20819,7 @@
attributes = new WebGLAttributes( _gl );
geometries = new WebGLGeometries( _gl, attributes, _infoMemory );
objects = new WebGLObjects( _gl, geometries, _infoRender );
programCache = new WebGLPrograms( _this, capabilities );
programCache = new WebGLPrograms( _this,
extensions,
capabilities );
lights = new WebGLLights();
renderLists = new WebGLRenderLists();
...
...
@@ -20827,26 +20830,21 @@
_this.info.programs = programCache.programs;
_this.context = _gl;
_this.capabilities = capabilities;
_this.extensions = extensions;
_this.properties = properties;
_this.renderLists = renderLists;
_this.state = state;
}
initGLContext();
var vr = new WebVRManager( _this );
//
// vr
function getTargetPixelRatio() {
return _currentRenderTarget === null ? _pixelRatio : 1;
}
var vr = new WebVRManager( _this );
this.context = _gl;
this.capabilities = capabilities;
this.extensions = extensions;
this.properties = properties;
this.renderLists = renderLists;
this.state = state;
this.vr = vr;
// shadow map
...
...
@@ -20855,11 +20853,10 @@
this.shadowMap = shadowMap;
//
// Plugins
var spritePlugin = new SpritePlugin( this, sprites );
var lensFlarePlugin = new LensFlarePlugin( this, lensFlares );
var spriteRenderer = new WebGLSpriteRenderer( this, spritesArray );
var flareRenderer = new WebGLFlareRenderer( this, flaresArray );
// API
...
...
@@ -20889,18 +20886,6 @@
};
this.getMaxAnisotropy = function () {
return capabilities.getMaxAnisotropy();
};
this.getPrecision = function () {
return capabilities.precision;
};
this.getPixelRatio = function () {
return _pixelRatio;
...
...
@@ -21668,8 +21653,8 @@
lightsArray.length = 0;
shadowsArray.length = 0;
sprites.length = 0;
lensFlares
.length = 0;
sprites
Array
.length = 0;
flaresArray
.length = 0;
_localClippingEnabled = this.localClippingEnabled;
_clippingEnabled = _clipping.init( this.clippingPlanes, _localClippingEnabled, camera );
...
...
@@ -21741,10 +21726,10 @@
}
// custom render
plugins (post pass)
// custom render
ers
sprite
Plugin
.render( scene, camera );
lensFlarePlugin
.render( scene, camera, _currentViewport );
sprite
Renderer
.render( scene, camera );
flareRenderer
.render( scene, camera, _currentViewport );
// Generate mipmap if we're using any kind of mipmap filtering
...
...
@@ -21847,13 +21832,13 @@
if ( ! object.frustumCulled || _frustum.intersectsSprite( object ) ) {
sprites.push( object );
sprites
Array
.push( object );
}
} else if ( object.isLensFlare ) {
lensFlares
.push( object );
flaresArray
.push( object );
} else if ( object.isImmediateRenderObject ) {
...
...
@@ -42720,7 +42705,7 @@
SkeletonHelper.prototype.update = function () {
console.error( 'THREE.SkeletonHelper: update() no longer needs to be called.' );
};
function WireframeHelper( object, hex ) {
...
...
@@ -43499,6 +43484,20 @@
},
getMaxAnisotropy: function () {
console.warn( 'THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy().' );
return this.capabilities.getMaxAnisotropy();
},
getPrecision: function () {
console.warn( 'THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision.' );
return this.capabilities.precision;
},
supportsFloatTextures: function () {
console.warn( 'THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( \'OES_texture_float\' ).' );
...
...
build/three.min.js
浏览文件 @
30c966b5
此差异已折叠。
点击以展开。
build/three.module.js
浏览文件 @
30c966b5
...
...
@@ -6369,7 +6369,7 @@ Object.assign( Box2.prototype, {
* @author alteredq / http://alteredqualia.com/
*/
function
LensFlarePlugin
( renderer, flares ) {
function
WebGLFlareRenderer
( renderer, flares ) {
var gl = renderer.context;
var state = renderer.state;
...
...
@@ -6767,7 +6767,7 @@ CanvasTexture.prototype.constructor = CanvasTexture;
* @author alteredq / http://alteredqualia.com/
*/
function
SpritePlugin
( renderer, sprites ) {
function
WebGLSpriteRenderer
( renderer, sprites ) {
var gl = renderer.context;
var state = renderer.state;
...
...
@@ -17450,11 +17450,10 @@ function unrollLoops( string ) {
}
function WebGLProgram( renderer, code, material, shader, parameters ) {
function WebGLProgram( renderer,
extensions,
code, material, shader, parameters ) {
var gl = renderer.context;
var extensions = material.extensions;
var defines = material.defines;
var vertexShader = shader.vertexShader;
...
...
@@ -17534,7 +17533,7 @@ function WebGLProgram( renderer, code, material, shader, parameters ) {
//
var customExtensions = generateExtensions(
extensions, parameters, renderer.
extensions );
var customExtensions = generateExtensions(
material.extensions, parameters,
extensions );
var customDefines = generateDefines( defines );
...
...
@@ -17615,7 +17614,7 @@ function WebGLProgram( renderer, code, material, shader, parameters ) {
parameters.sizeAttenuation ? '#define USE_SIZEATTENUATION' : '',
parameters.logarithmicDepthBuffer ? '#define USE_LOGDEPTHBUF' : '',
parameters.logarithmicDepthBuffer &&
renderer.
extensions.get( 'EXT_frag_depth' ) ? '#define USE_LOGDEPTHBUF_EXT' : '',
parameters.logarithmicDepthBuffer && extensions.get( 'EXT_frag_depth' ) ? '#define USE_LOGDEPTHBUF_EXT' : '',
'uniform mat4 modelMatrix;',
'uniform mat4 modelViewMatrix;',
...
...
@@ -17722,9 +17721,9 @@ function WebGLProgram( renderer, code, material, shader, parameters ) {
parameters.physicallyCorrectLights ? "#define PHYSICALLY_CORRECT_LIGHTS" : '',
parameters.logarithmicDepthBuffer ? '#define USE_LOGDEPTHBUF' : '',
parameters.logarithmicDepthBuffer &&
renderer.
extensions.get( 'EXT_frag_depth' ) ? '#define USE_LOGDEPTHBUF_EXT' : '',
parameters.logarithmicDepthBuffer && extensions.get( 'EXT_frag_depth' ) ? '#define USE_LOGDEPTHBUF_EXT' : '',
parameters.envMap &&
renderer.
extensions.get( 'EXT_shader_texture_lod' ) ? '#define TEXTURE_LOD_EXT' : '',
parameters.envMap && extensions.get( 'EXT_shader_texture_lod' ) ? '#define TEXTURE_LOD_EXT' : '',
'uniform mat4 viewMatrix;',
'uniform vec3 cameraPosition;',
...
...
@@ -17851,12 +17850,11 @@ function WebGLProgram( renderer, code, material, shader, parameters ) {
var cachedUniforms;
this.getUniforms = function() {
this.getUniforms = function
() {
if ( cachedUniforms === undefined ) {
cachedUniforms =
new WebGLUniforms( gl, program, renderer );
cachedUniforms = new WebGLUniforms( gl, program, renderer );
}
...
...
@@ -17868,7 +17866,7 @@ function WebGLProgram( renderer, code, material, shader, parameters ) {
var cachedAttributes;
this.getAttributes = function() {
this.getAttributes = function
() {
if ( cachedAttributes === undefined ) {
...
...
@@ -17931,7 +17929,7 @@ function WebGLProgram( renderer, code, material, shader, parameters ) {
* @author mrdoob / http://mrdoob.com/
*/
function WebGLPrograms( renderer, capabilities ) {
function WebGLPrograms( renderer,
extensions,
capabilities ) {
var programs = [];
...
...
@@ -18037,7 +18035,7 @@ function WebGLPrograms( renderer, capabilities ) {
// (not to blow over maxLights budget)
var maxBones = object.isSkinnedMesh ? allocateBones( object ) : 0;
var precision =
renderer.getPrecision()
;
var precision =
capabilities.precision
;
if ( material.precision !== null ) {
...
...
@@ -18195,7 +18193,7 @@ function WebGLPrograms( renderer, capabilities ) {
if ( program === undefined ) {
program = new WebGLProgram( renderer, code, material, shader, parameters );
program = new WebGLProgram( renderer,
extensions,
code, material, shader, parameters );
programs.push( program );
}
...
...
@@ -20602,8 +20600,8 @@ function WebGLRenderer( parameters ) {
var morphInfluences = new Float32Array( 8 );
var sprites = [];
var
lensFlares
= [];
var sprites
Array
= [];
var
flaresArray
= [];
// public properties
...
...
@@ -20723,6 +20721,11 @@ function WebGLRenderer( parameters ) {
};
function getTargetPixelRatio() {
return _currentRenderTarget === null ? _pixelRatio : 1;
}
// initialize
...
...
@@ -20810,7 +20813,7 @@ function WebGLRenderer( parameters ) {
attributes = new WebGLAttributes( _gl );
geometries = new WebGLGeometries( _gl, attributes, _infoMemory );
objects = new WebGLObjects( _gl, geometries, _infoRender );
programCache = new WebGLPrograms( _this, capabilities );
programCache = new WebGLPrograms( _this,
extensions,
capabilities );
lights = new WebGLLights();
renderLists = new WebGLRenderLists();
...
...
@@ -20821,26 +20824,21 @@ function WebGLRenderer( parameters ) {
_this.info.programs = programCache.programs;
_this.context = _gl;
_this.capabilities = capabilities;
_this.extensions = extensions;
_this.properties = properties;
_this.renderLists = renderLists;
_this.state = state;
}
initGLContext();
var vr = new WebVRManager( _this );
//
// vr
function getTargetPixelRatio() {
return _currentRenderTarget === null ? _pixelRatio : 1;
}
var vr = new WebVRManager( _this );
this.context = _gl;
this.capabilities = capabilities;
this.extensions = extensions;
this.properties = properties;
this.renderLists = renderLists;
this.state = state;
this.vr = vr;
// shadow map
...
...
@@ -20849,11 +20847,10 @@ function WebGLRenderer( parameters ) {
this.shadowMap = shadowMap;
//
// Plugins
var spritePlugin = new SpritePlugin( this, sprites );
var lensFlarePlugin = new LensFlarePlugin( this, lensFlares );
var spriteRenderer = new WebGLSpriteRenderer( this, spritesArray );
var flareRenderer = new WebGLFlareRenderer( this, flaresArray );
// API
...
...
@@ -20883,18 +20880,6 @@ function WebGLRenderer( parameters ) {
};
this.getMaxAnisotropy = function () {
return capabilities.getMaxAnisotropy();
};
this.getPrecision = function () {
return capabilities.precision;
};
this.getPixelRatio = function () {
return _pixelRatio;
...
...
@@ -21662,8 +21647,8 @@ function WebGLRenderer( parameters ) {
lightsArray.length = 0;
shadowsArray.length = 0;
sprites.length = 0;
lensFlares
.length = 0;
sprites
Array
.length = 0;
flaresArray
.length = 0;
_localClippingEnabled = this.localClippingEnabled;
_clippingEnabled = _clipping.init( this.clippingPlanes, _localClippingEnabled, camera );
...
...
@@ -21735,10 +21720,10 @@ function WebGLRenderer( parameters ) {
}
// custom render
plugins (post pass)
// custom render
ers
sprite
Plugin
.render( scene, camera );
lensFlarePlugin
.render( scene, camera, _currentViewport );
sprite
Renderer
.render( scene, camera );
flareRenderer
.render( scene, camera, _currentViewport );
// Generate mipmap if we're using any kind of mipmap filtering
...
...
@@ -21841,13 +21826,13 @@ function WebGLRenderer( parameters ) {
if ( ! object.frustumCulled || _frustum.intersectsSprite( object ) ) {
sprites.push( object );
sprites
Array
.push( object );
}
} else if ( object.isLensFlare ) {
lensFlares
.push( object );
flaresArray
.push( object );
} else if ( object.isImmediateRenderObject ) {
...
...
@@ -42714,7 +42699,7 @@ GridHelper.prototype.setColors = function () {
SkeletonHelper.prototype.update = function () {
console.error( 'THREE.SkeletonHelper: update() no longer needs to be called.' );
};
function WireframeHelper( object, hex ) {
...
...
@@ -43493,6 +43478,20 @@ Object.assign( WebGLRenderer.prototype, {
},
getMaxAnisotropy: function () {
console.warn( 'THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy().' );
return this.capabilities.getMaxAnisotropy();
},
getPrecision: function () {
console.warn( 'THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision.' );
return this.capabilities.precision;
},
supportsFloatTextures: function () {
console.warn( 'THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( \'OES_texture_float\' ).' );
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录