Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
fktz008
three.js
提交
c495edd3
T
three.js
项目概览
fktz008
/
three.js
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
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,发现更多精彩内容 >>
提交
c495edd3
编写于
2月 23, 2022
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated builds.
上级
1db78b84
变更
4
展开全部
隐藏空白更改
内联
并排
Showing
4 changed file
with
65 addition
and
66 deletion
+65
-66
build/three.cjs
build/three.cjs
+19
-21
build/three.js
build/three.js
+19
-21
build/three.min.js
build/three.min.js
+1
-1
build/three.module.js
build/three.module.js
+26
-23
未找到文件。
build/three.cjs
浏览文件 @
c495edd3
...
...
@@ -11637,8 +11637,8 @@ class PMREMGenerator {
this._sizeLods = [];
this._sigmas = [];
this._blurMaterial = null;
this._
equirectShader
= null;
this._
cubemapShader
= null;
this._
cubemapMaterial
= null;
this._
equirectMaterial
= null;
this._compileMaterial(this._blurMaterial);
}
...
...
@@ -11699,10 +11699,10 @@ class PMREMGenerator {
compileCubemapShader() {
if (this._cubemap
Shader
=== null) {
this._cubemap
Shader = _getCubemapShader
();
if (this._cubemap
Material
=== null) {
this._cubemap
Material = _getCubemapMaterial
();
this._compileMaterial(this._cubemap
Shader
);
this._compileMaterial(this._cubemap
Material
);
}
}
/**
...
...
@@ -11712,10 +11712,10 @@ class PMREMGenerator {
compileEquirectangularShader() {
if (this._equirect
Shader
=== null) {
this._equirect
Shader
= _getEquirectMaterial();
if (this._equirect
Material
=== null) {
this._equirect
Material
= _getEquirectMaterial();
this._compileMaterial(this._equirect
Shader
);
this._compileMaterial(this._equirect
Material
);
}
}
/**
...
...
@@ -11728,8 +11728,8 @@ class PMREMGenerator {
dispose() {
this._dispose();
if (this._cubemap
Shader !== null) this._cubemapShader
.dispose();
if (this._equirect
Shader !== null) this._equirectShader
.dispose();
if (this._cubemap
Material !== null) this._cubemapMaterial
.dispose();
if (this._equirect
Material !== null) this._equirectMaterial
.dispose();
} // private interface
...
...
@@ -11890,18 +11890,18 @@ class PMREMGenerator {
const isCubeTexture = texture.mapping === CubeReflectionMapping || texture.mapping === CubeRefractionMapping;
if (isCubeTexture) {
if (this._cubemap
Shader
=== null) {
this._cubemap
Shader = _getCubemapShader
();
if (this._cubemap
Material
=== null) {
this._cubemap
Material = _getCubemapMaterial
();
}
this._cubemap
Shader
.uniforms.flipEnvMap.value = texture.isRenderTargetTexture === false ? -1 : 1;
this._cubemap
Material
.uniforms.flipEnvMap.value = texture.isRenderTargetTexture === false ? -1 : 1;
} else {
if (this._equirect
Shader
=== null) {
this._equirect
Shader
= _getEquirectMaterial();
if (this._equirect
Material
=== null) {
this._equirect
Material
= _getEquirectMaterial();
}
}
const material = isCubeTexture ? this._cubemap
Shader : this._equirectShader
;
const material = isCubeTexture ? this._cubemap
Material : this._equirectMaterial
;
const mesh = new Mesh(this._lodPlanes[0], material);
const uniforms = material.uniforms;
uniforms['envMap'].value = texture;
...
...
@@ -12189,7 +12189,7 @@ function _getBlurShader(lodMax, width, height) {
}
function _getEquirectMaterial() {
const shaderMaterial =
new ShaderMaterial({
return
new ShaderMaterial({
name: 'EquirectangularToCubeUV',
uniforms: {
'envMap': {
...
...
@@ -12223,11 +12223,10 @@ function _getEquirectMaterial() {
depthTest: false,
depthWrite: false
});
return shaderMaterial;
}
function _getCubemap
Shader
() {
const shaderMaterial =
new ShaderMaterial({
function _getCubemap
Material
() {
return
new ShaderMaterial({
name: 'CubemapToCubeUV',
uniforms: {
'envMap': {
...
...
@@ -12261,7 +12260,6 @@ function _getCubemapShader() {
depthTest: false,
depthWrite: false
});
return shaderMaterial;
}
function _getCommonVertexShader() {
build/three.js
浏览文件 @
c495edd3
...
...
@@ -11639,8 +11639,8 @@
this._sizeLods = [];
this._sigmas = [];
this._blurMaterial = null;
this._
equirectShader
= null;
this._
cubemapShader
= null;
this._
cubemapMaterial
= null;
this._
equirectMaterial
= null;
this._compileMaterial(this._blurMaterial);
}
...
...
@@ -11701,10 +11701,10 @@
compileCubemapShader() {
if (this._cubemap
Shader
=== null) {
this._cubemap
Shader = _getCubemapShader
();
if (this._cubemap
Material
=== null) {
this._cubemap
Material = _getCubemapMaterial
();
this._compileMaterial(this._cubemap
Shader
);
this._compileMaterial(this._cubemap
Material
);
}
}
/**
...
...
@@ -11714,10 +11714,10 @@
compileEquirectangularShader() {
if (this._equirect
Shader
=== null) {
this._equirect
Shader
= _getEquirectMaterial();
if (this._equirect
Material
=== null) {
this._equirect
Material
= _getEquirectMaterial();
this._compileMaterial(this._equirect
Shader
);
this._compileMaterial(this._equirect
Material
);
}
}
/**
...
...
@@ -11730,8 +11730,8 @@
dispose() {
this._dispose();
if (this._cubemap
Shader !== null) this._cubemapShader
.dispose();
if (this._equirect
Shader !== null) this._equirectShader
.dispose();
if (this._cubemap
Material !== null) this._cubemapMaterial
.dispose();
if (this._equirect
Material !== null) this._equirectMaterial
.dispose();
} // private interface
...
...
@@ -11892,18 +11892,18 @@
const isCubeTexture = texture.mapping === CubeReflectionMapping || texture.mapping === CubeRefractionMapping;
if (isCubeTexture) {
if (this._cubemap
Shader
=== null) {
this._cubemap
Shader = _getCubemapShader
();
if (this._cubemap
Material
=== null) {
this._cubemap
Material = _getCubemapMaterial
();
}
this._cubemap
Shader
.uniforms.flipEnvMap.value = texture.isRenderTargetTexture === false ? -1 : 1;
this._cubemap
Material
.uniforms.flipEnvMap.value = texture.isRenderTargetTexture === false ? -1 : 1;
} else {
if (this._equirect
Shader
=== null) {
this._equirect
Shader
= _getEquirectMaterial();
if (this._equirect
Material
=== null) {
this._equirect
Material
= _getEquirectMaterial();
}
}
const material = isCubeTexture ? this._cubemap
Shader : this._equirectShader
;
const material = isCubeTexture ? this._cubemap
Material : this._equirectMaterial
;
const mesh = new Mesh(this._lodPlanes[0], material);
const uniforms = material.uniforms;
uniforms['envMap'].value = texture;
...
...
@@ -12191,7 +12191,7 @@
}
function _getEquirectMaterial() {
const shaderMaterial =
new ShaderMaterial({
return
new ShaderMaterial({
name: 'EquirectangularToCubeUV',
uniforms: {
'envMap': {
...
...
@@ -12225,11 +12225,10 @@
depthTest: false,
depthWrite: false
});
return shaderMaterial;
}
function _getCubemap
Shader
() {
const shaderMaterial =
new ShaderMaterial({
function _getCubemap
Material
() {
return
new ShaderMaterial({
name: 'CubemapToCubeUV',
uniforms: {
'envMap': {
...
...
@@ -12263,7 +12262,6 @@
depthTest: false,
depthWrite: false
});
return shaderMaterial;
}
function _getCommonVertexShader() {
build/three.min.js
浏览文件 @
c495edd3
此差异已折叠。
点击以展开。
build/three.module.js
浏览文件 @
c495edd3
...
...
@@ -15216,8 +15216,8 @@ class PMREMGenerator {
this._sigmas = [];
this._blurMaterial = null;
this._
equirectShader
= null;
this._
cubemapShader
= null;
this._
cubemapMaterial
= null;
this._
equirectMaterial
= null;
this._compileMaterial( this._blurMaterial );
...
...
@@ -15235,10 +15235,12 @@ class PMREMGenerator {
_oldTarget = this._renderer.getRenderTarget();
this._setSize( 256 );
const cubeUVRenderTarget = this._allocateTargets();
cubeUVRenderTarget.depthBuffer = true;
this._sceneToCubeUV( scene, near, far, cubeUVRenderTarget );
if ( sigma > 0 ) {
this._blur( cubeUVRenderTarget, 0, 0, sigma );
...
...
@@ -15280,10 +15282,10 @@ class PMREMGenerator {
*/
compileCubemapShader() {
if ( this._cubemap
Shader
=== null ) {
if ( this._cubemap
Material
=== null ) {
this._cubemap
Shader = _getCubemapShader
();
this._compileMaterial( this._cubemap
Shader
);
this._cubemap
Material = _getCubemapMaterial
();
this._compileMaterial( this._cubemap
Material
);
}
...
...
@@ -15295,10 +15297,10 @@ class PMREMGenerator {
*/
compileEquirectangularShader() {
if ( this._equirect
Shader
=== null ) {
if ( this._equirect
Material
=== null ) {
this._equirect
Shader
= _getEquirectMaterial();
this._compileMaterial( this._equirect
Shader
);
this._equirect
Material
= _getEquirectMaterial();
this._compileMaterial( this._equirect
Material
);
}
...
...
@@ -15313,8 +15315,8 @@ class PMREMGenerator {
this._dispose();
if ( this._cubemap
Shader !== null ) this._cubemapShader
.dispose();
if ( this._equirect
Shader !== null ) this._equirectShader
.dispose();
if ( this._cubemap
Material !== null ) this._cubemapMaterial
.dispose();
if ( this._equirect
Material !== null ) this._equirectMaterial
.dispose();
}
...
...
@@ -15362,6 +15364,7 @@ class PMREMGenerator {
}
_oldTarget = this._renderer.getRenderTarget();
const cubeUVRenderTarget = renderTarget || this._allocateTargets();
this._textureToCubeUV( texture, cubeUVRenderTarget );
this._applyPMREM( cubeUVRenderTarget );
...
...
@@ -15464,6 +15467,7 @@ class PMREMGenerator {
for ( let i = 0; i < 6; i ++ ) {
const col = i % 3;
if ( col === 0 ) {
cubeCamera.up.set( 0, upSign[ i ], 0 );
...
...
@@ -15482,7 +15486,9 @@ class PMREMGenerator {
}
const size = this._cubeSize;
_setViewport( cubeUVRenderTarget, col * size, i > 2 ? size : 0, size, size );
renderer.setRenderTarget( cubeUVRenderTarget );
if ( useSolidColor ) {
...
...
@@ -15512,25 +15518,25 @@ class PMREMGenerator {
if ( isCubeTexture ) {
if ( this._cubemap
Shader
=== null ) {
if ( this._cubemap
Material
=== null ) {
this._cubemap
Shader = _getCubemapShader
();
this._cubemap
Material = _getCubemapMaterial
();
}
this._cubemap
Shader
.uniforms.flipEnvMap.value = ( texture.isRenderTargetTexture === false ) ? - 1 : 1;
this._cubemap
Material
.uniforms.flipEnvMap.value = ( texture.isRenderTargetTexture === false ) ? - 1 : 1;
} else {
if ( this._equirect
Shader
=== null ) {
if ( this._equirect
Material
=== null ) {
this._equirect
Shader
= _getEquirectMaterial();
this._equirect
Material
= _getEquirectMaterial();
}
}
const material = isCubeTexture ? this._cubemap
Shader : this._equirectShader
;
const material = isCubeTexture ? this._cubemap
Material : this._equirectMaterial
;
const mesh = new Mesh( this._lodPlanes[ 0 ], material );
const uniforms = material.uniforms;
...
...
@@ -15538,6 +15544,7 @@ class PMREMGenerator {
uniforms[ 'envMap' ].value = texture;
const size = this._cubeSize;
_setViewport( cubeUVRenderTarget, 0, 0, 3 * size, 2 * size );
renderer.setRenderTarget( cubeUVRenderTarget );
...
...
@@ -15881,7 +15888,7 @@ function _getBlurShader( lodMax, width, height ) {
function _getEquirectMaterial() {
const shaderMaterial =
new ShaderMaterial( {
return
new ShaderMaterial( {
name: 'EquirectangularToCubeUV',
...
...
@@ -15918,13 +15925,11 @@ function _getEquirectMaterial() {
} );
return shaderMaterial;
}
function _getCubemap
Shader
() {
function _getCubemap
Material
() {
const shaderMaterial =
new ShaderMaterial( {
return
new ShaderMaterial( {
name: 'CubemapToCubeUV',
...
...
@@ -15959,8 +15964,6 @@ function _getCubemapShader() {
} );
return shaderMaterial;
}
function _getCommonVertexShader() {
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录