Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
fktz008
three.js
提交
766b95ba
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,发现更多精彩内容 >>
提交
766b95ba
编写于
2月 14, 2022
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated builds.
上级
6386db31
变更
4
展开全部
隐藏空白更改
内联
并排
Showing
4 changed file
with
22 addition
and
133 deletion
+22
-133
build/three.cjs
build/three.cjs
+7
-39
build/three.js
build/three.js
+7
-39
build/three.min.js
build/three.min.js
+1
-1
build/three.module.js
build/three.module.js
+7
-54
未找到文件。
build/three.cjs
浏览文件 @
766b95ba
...
...
@@ -11702,7 +11702,7 @@ class PMREMGenerator {
_fromTexture(texture, renderTarget) {
if (texture.mapping === CubeReflectionMapping || texture.mapping === CubeRefractionMapping) {
this._setSize(texture.image.length === 0 ? 16 : texture.image[0].width
??
texture.image[0].image.width);
this._setSize(texture.image.length === 0 ? 16 : texture.image[0].width
||
texture.image[0].image.width);
} else {
// Equirectangular
this._setSize(texture.image.width / 4);
...
...
@@ -11726,7 +11726,7 @@ class PMREMGenerator {
const height = 4 * this._cubeSize - 32;
const params = {
magFilter: LinearFilter,
minFilter:
Linear
Filter,
minFilter:
Nearest
Filter,
generateMipmaps: false,
type: HalfFloatType,
format: RGBAFormat,
...
...
@@ -13270,7 +13270,7 @@ function setValueT1(gl, v, textures) {
cache[0] = unit;
}
textures.s
afeS
etTexture2D(v || emptyTexture, unit);
textures.setTexture2D(v || emptyTexture, unit);
}
function setValueT3D1(gl, v, textures) {
...
...
@@ -13294,7 +13294,7 @@ function setValueT6(gl, v, textures) {
cache[0] = unit;
}
textures.s
afeS
etTextureCube(v || emptyCubeTexture, unit);
textures.setTextureCube(v || emptyCubeTexture, unit);
}
function setValueT2DArray1(gl, v, textures) {
...
...
@@ -13498,7 +13498,7 @@ function setValueT1Array(gl, v, textures) {
gl.uniform1iv(this.addr, units);
for (let i = 0; i !== n; ++i) {
textures.s
afeS
etTexture2D(v[i] || emptyTexture, units[i]);
textures.setTexture2D(v[i] || emptyTexture, units[i]);
}
}
...
...
@@ -13518,7 +13518,7 @@ function setValueT6Array(gl, v, textures) {
gl.uniform1iv(this.addr, units);
for (let i = 0; i !== n; ++i) {
textures.s
afeS
etTextureCube(v[i] || emptyCubeTexture, units[i]);
textures.setTextureCube(v[i] || emptyCubeTexture, units[i]);
}
}
...
...
@@ -17061,7 +17061,7 @@ function WebGLTextures(_gl, extensions, state, properties, capabilities, utils,
mipmap = mipmaps[i];
if (useTexStorage) {
state.texSubImage2D(_gl.TEXTURE_2D,
0
, 0, 0, mipmap.width, mipmap.height, glFormat, glType, mipmap.data);
state.texSubImage2D(_gl.TEXTURE_2D,
i
, 0, 0, mipmap.width, mipmap.height, glFormat, glType, mipmap.data);
} else {
state.texImage2D(_gl.TEXTURE_2D, i, glInternalFormat, mipmap.width, mipmap.height, 0, glFormat, glType, mipmap.data);
}
...
...
@@ -17718,36 +17718,6 @@ function WebGLTextures(_gl, extensions, state, properties, capabilities, utils,
}
return image;
} // backwards compatibility
let warnedTexture2D = false;
let warnedTextureCube = false;
function safeSetTexture2D(texture, slot) {
if (texture.isWebGLRenderTarget) {
if (warnedTexture2D === false) {
console.warn('THREE.WebGLTextures.safeSetTexture2D: don\'t use render targets as textures. Use their .texture property instead.');
warnedTexture2D = true;
}
texture = texture.texture;
}
setTexture2D(texture, slot);
}
function safeSetTextureCube(texture, slot) {
if (texture.isWebGLCubeRenderTarget) {
if (warnedTextureCube === false) {
console.warn('THREE.WebGLTextures.safeSetTextureCube: don\'t use cube render targets as textures. Use their .texture property instead.');
warnedTextureCube = true;
}
texture = texture.texture;
}
setTextureCube(texture, slot);
} //
...
...
@@ -17764,8 +17734,6 @@ function WebGLTextures(_gl, extensions, state, properties, capabilities, utils,
this.setupDepthRenderbuffer = setupDepthRenderbuffer;
this.setupFrameBufferTexture = setupFrameBufferTexture;
this.useMultisampledRTT = useMultisampledRTT;
this.safeSetTexture2D = safeSetTexture2D;
this.safeSetTextureCube = safeSetTextureCube;
}
function WebGLUtils(gl, extensions, capabilities) {
build/three.js
浏览文件 @
766b95ba
...
...
@@ -11704,7 +11704,7 @@
_fromTexture(texture, renderTarget) {
if (texture.mapping === CubeReflectionMapping || texture.mapping === CubeRefractionMapping) {
this._setSize(texture.image.length === 0 ? 16 : texture.image[0].width
??
texture.image[0].image.width);
this._setSize(texture.image.length === 0 ? 16 : texture.image[0].width
||
texture.image[0].image.width);
} else {
// Equirectangular
this._setSize(texture.image.width / 4);
...
...
@@ -11728,7 +11728,7 @@
const height = 4 * this._cubeSize - 32;
const params = {
magFilter: LinearFilter,
minFilter:
Linear
Filter,
minFilter:
Nearest
Filter,
generateMipmaps: false,
type: HalfFloatType,
format: RGBAFormat,
...
...
@@ -13272,7 +13272,7 @@
cache[0] = unit;
}
textures.s
afeS
etTexture2D(v || emptyTexture, unit);
textures.setTexture2D(v || emptyTexture, unit);
}
function setValueT3D1(gl, v, textures) {
...
...
@@ -13296,7 +13296,7 @@
cache[0] = unit;
}
textures.s
afeS
etTextureCube(v || emptyCubeTexture, unit);
textures.setTextureCube(v || emptyCubeTexture, unit);
}
function setValueT2DArray1(gl, v, textures) {
...
...
@@ -13500,7 +13500,7 @@
gl.uniform1iv(this.addr, units);
for (let i = 0; i !== n; ++i) {
textures.s
afeS
etTexture2D(v[i] || emptyTexture, units[i]);
textures.setTexture2D(v[i] || emptyTexture, units[i]);
}
}
...
...
@@ -13520,7 +13520,7 @@
gl.uniform1iv(this.addr, units);
for (let i = 0; i !== n; ++i) {
textures.s
afeS
etTextureCube(v[i] || emptyCubeTexture, units[i]);
textures.setTextureCube(v[i] || emptyCubeTexture, units[i]);
}
}
...
...
@@ -17063,7 +17063,7 @@
mipmap = mipmaps[i];
if (useTexStorage) {
state.texSubImage2D(_gl.TEXTURE_2D,
0
, 0, 0, mipmap.width, mipmap.height, glFormat, glType, mipmap.data);
state.texSubImage2D(_gl.TEXTURE_2D,
i
, 0, 0, mipmap.width, mipmap.height, glFormat, glType, mipmap.data);
} else {
state.texImage2D(_gl.TEXTURE_2D, i, glInternalFormat, mipmap.width, mipmap.height, 0, glFormat, glType, mipmap.data);
}
...
...
@@ -17720,36 +17720,6 @@
}
return image;
} // backwards compatibility
let warnedTexture2D = false;
let warnedTextureCube = false;
function safeSetTexture2D(texture, slot) {
if (texture.isWebGLRenderTarget) {
if (warnedTexture2D === false) {
console.warn('THREE.WebGLTextures.safeSetTexture2D: don\'t use render targets as textures. Use their .texture property instead.');
warnedTexture2D = true;
}
texture = texture.texture;
}
setTexture2D(texture, slot);
}
function safeSetTextureCube(texture, slot) {
if (texture.isWebGLCubeRenderTarget) {
if (warnedTextureCube === false) {
console.warn('THREE.WebGLTextures.safeSetTextureCube: don\'t use cube render targets as textures. Use their .texture property instead.');
warnedTextureCube = true;
}
texture = texture.texture;
}
setTextureCube(texture, slot);
} //
...
...
@@ -17766,8 +17736,6 @@
this.setupDepthRenderbuffer = setupDepthRenderbuffer;
this.setupFrameBufferTexture = setupFrameBufferTexture;
this.useMultisampledRTT = useMultisampledRTT;
this.safeSetTexture2D = safeSetTexture2D;
this.safeSetTextureCube = safeSetTextureCube;
}
function WebGLUtils(gl, extensions, capabilities) {
build/three.min.js
浏览文件 @
766b95ba
此差异已折叠。
点击以展开。
build/three.module.js
浏览文件 @
766b95ba
...
...
@@ -15290,7 +15290,7 @@ class PMREMGenerator {
if ( texture.mapping === CubeReflectionMapping || texture.mapping === CubeRefractionMapping ) {
this._setSize( texture.image.length === 0 ? 16 :
texture.image[ 0 ].width ?? texture.image[ 0 ].image.width
);
this._setSize( texture.image.length === 0 ? 16 :
( texture.image[ 0 ].width || texture.image[ 0 ].image.width )
);
} else { // Equirectangular
...
...
@@ -15315,7 +15315,7 @@ class PMREMGenerator {
const params = {
magFilter: LinearFilter,
minFilter:
Linear
Filter,
minFilter:
Nearest
Filter,
generateMipmaps: false,
type: HalfFloatType,
format: RGBAFormat,
...
...
@@ -17412,7 +17412,7 @@ function setValueT1( gl, v, textures ) {
}
textures.s
afeS
etTexture2D( v || emptyTexture, unit );
textures.setTexture2D( v || emptyTexture, unit );
}
...
...
@@ -17444,7 +17444,7 @@ function setValueT6( gl, v, textures ) {
}
textures.s
afeS
etTextureCube( v || emptyCubeTexture, unit );
textures.setTextureCube( v || emptyCubeTexture, unit );
}
...
...
@@ -17647,7 +17647,7 @@ function setValueT1Array( gl, v, textures ) {
for ( let i = 0; i !== n; ++ i ) {
textures.s
afeS
etTexture2D( v[ i ] || emptyTexture, units[ i ] );
textures.setTexture2D( v[ i ] || emptyTexture, units[ i ] );
}
...
...
@@ -17679,7 +17679,7 @@ function setValueT6Array( gl, v, textures ) {
for ( let i = 0; i !== n; ++ i ) {
textures.s
afeS
etTextureCube( v[ i ] || emptyCubeTexture, units[ i ] );
textures.setTextureCube( v[ i ] || emptyCubeTexture, units[ i ] );
}
...
...
@@ -22953,7 +22953,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
if ( useTexStorage ) {
state.texSubImage2D( 3553,
0
, 0, 0, mipmap.width, mipmap.height, glFormat, glType, mipmap.data );
state.texSubImage2D( 3553,
i
, 0, 0, mipmap.width, mipmap.height, glFormat, glType, mipmap.data );
} else {
...
...
@@ -23965,50 +23965,6 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
}
// backwards compatibility
let warnedTexture2D = false;
let warnedTextureCube = false;
function safeSetTexture2D( texture, slot ) {
if ( texture.isWebGLRenderTarget ) {
if ( warnedTexture2D === false ) {
console.warn( 'THREE.WebGLTextures.safeSetTexture2D: don\'t use render targets as textures. Use their .texture property instead.' );
warnedTexture2D = true;
}
texture = texture.texture;
}
setTexture2D( texture, slot );
}
function safeSetTextureCube( texture, slot ) {
if ( texture.isWebGLCubeRenderTarget ) {
if ( warnedTextureCube === false ) {
console.warn( 'THREE.WebGLTextures.safeSetTextureCube: don\'t use cube render targets as textures. Use their .texture property instead.' );
warnedTextureCube = true;
}
texture = texture.texture;
}
setTextureCube( texture, slot );
}
//
this.allocateTextureUnit = allocateTextureUnit;
...
...
@@ -24026,9 +23982,6 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
this.setupFrameBufferTexture = setupFrameBufferTexture;
this.useMultisampledRTT = useMultisampledRTT;
this.safeSetTexture2D = safeSetTexture2D;
this.safeSetTextureCube = safeSetTextureCube;
}
function WebGLUtils( gl, extensions, capabilities ) {
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录