Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
4a67f90e
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,发现更多精彩内容 >>
未验证
提交
4a67f90e
编写于
7月 10, 2019
作者:
W
WestLangley
提交者:
GitHub
7月 10, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #16992 from WestLangley/dev_mipmap_constants2
MipMap -> Mipmap
上级
78b74d23
e375d3e5
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
31 addition
and
31 deletion
+31
-31
docs/api/en/constants/Textures.html
docs/api/en/constants/Textures.html
+8
-8
docs/api/en/textures/CanvasTexture.html
docs/api/en/textures/CanvasTexture.html
+1
-1
docs/api/en/textures/CompressedTexture.html
docs/api/en/textures/CompressedTexture.html
+1
-1
docs/api/en/textures/Texture.html
docs/api/en/textures/Texture.html
+1
-1
docs/api/en/textures/VideoTexture.html
docs/api/en/textures/VideoTexture.html
+1
-1
src/loaders/DataTextureLoader.js
src/loaders/DataTextureLoader.js
+2
-2
src/loaders/ObjectLoader.js
src/loaders/ObjectLoader.js
+8
-8
src/renderers/webgl/WebGLTextures.js
src/renderers/webgl/WebGLTextures.js
+2
-2
src/renderers/webgl/WebGLUtils.js
src/renderers/webgl/WebGLUtils.js
+5
-5
src/textures/Texture.js
src/textures/Texture.js
+2
-2
未找到文件。
docs/api/en/constants/Textures.html
浏览文件 @
4a67f90e
...
...
@@ -87,11 +87,11 @@
<h2>
Minification Filters
</h2>
<code>
THREE.NearestFilter
THREE.NearestMip
M
apNearestFilter
THREE.NearestMip
M
apLinearFilter
THREE.NearestMip
m
apNearestFilter
THREE.NearestMip
m
apLinearFilter
THREE.LinearFilter
THREE.LinearMip
M
apNearestFilter
THREE.LinearMip
M
apLinearFilter
THREE.LinearMip
m
apNearestFilter
THREE.LinearMip
m
apLinearFilter
</code>
<p>
...
...
@@ -102,21 +102,21 @@
In addition to [page:constant NearestFilter] and [page:constant LinearFilter],
the following four functions can be used for minification:
<br
/><br
/>
[page:constant NearestMip
M
apNearestFilter] chooses the mipmap that most closely
[page:constant NearestMip
m
apNearestFilter] chooses the mipmap that most closely
matches the size of the pixel being textured
and uses the [page:constant NearestFilter] criterion (the texel nearest to the
center of the pixel) to produce a texture value.
<br
/><br
/>
[page:constant NearestMip
M
apLinearFilter] chooses the two mipmaps that most closely
[page:constant NearestMip
m
apLinearFilter] chooses the two mipmaps that most closely
match the size of the pixel being textured and uses the [page:constant NearestFilter] criterion to produce
a texture value from each mipmap. The final texture value is a weighted average of those two values.
<br
/><br
/>
[page:constant LinearMip
M
apNearestFilter] chooses the mipmap that most closely matches
[page:constant LinearMip
m
apNearestFilter] chooses the mipmap that most closely matches
the size of the pixel being textured and uses the [page:constant LinearFilter] criterion
(a weighted average of the four texels that are closest to the center of the pixel)
to produce a texture value.
<br
/><br
/>
[page:constant LinearMip
M
apLinearFilter] is the default and chooses the two mipmaps
[page:constant LinearMip
m
apLinearFilter] is the default and chooses the two mipmaps
that most closely match the size of the pixel being textured and uses the [page:constant LinearFilter] criterion
to produce a texture value from each mipmap. The final texture value is a weighted average of those two values.
<br
/><br
/>
...
...
docs/api/en/textures/CanvasTexture.html
浏览文件 @
4a67f90e
...
...
@@ -37,7 +37,7 @@
The default is [page:Textures THREE.LinearFilter]. See [page:Textures magnification filter constants] for other choices.
<br
/>
[page:Constant minFilter] -- How the texture is sampled when a texel covers less than one pixel.
The default is [page:Textures THREE.LinearMip
M
apLinearFilter]. See [page:Textures minification filter constants] for other choices.
<br
/>
The default is [page:Textures THREE.LinearMip
m
apLinearFilter]. See [page:Textures minification filter constants] for other choices.
<br
/>
[page:Constant format] -- The format used in the texture.
See [page:Textures format constants] for other choices.
<br
/>
...
...
docs/api/en/textures/CompressedTexture.html
浏览文件 @
4a67f90e
...
...
@@ -52,7 +52,7 @@
The default is [page:Textures THREE.LinearFilter]. See [page:Textures magnification filter constants] for other choices.
<br
/>
[page:Constant minFilter] -- How the texture is sampled when a texel covers less than one pixel.
The default is [page:Textures THREE.LinearMip
M
apLinearFilter]. See [page:Textures minification filter constants] for other choices.
<br
/>
The default is [page:Textures THREE.LinearMip
m
apLinearFilter]. See [page:Textures minification filter constants] for other choices.
<br
/>
[page:Number anisotropy] -- The number of samples taken along the axis through the pixel that has the highest density of texels.
By default, this value is 1. A higher value gives a less blurry result than a basic mipmap, at the cost of more texture samples being used.
...
...
docs/api/en/textures/Texture.html
浏览文件 @
4a67f90e
...
...
@@ -105,7 +105,7 @@
<h3>
[property:number minFilter]
</h3>
<p>
How the texture is sampled when a texel covers less than one pixel. The default is
[page:Textures THREE.LinearMip
M
apLinearFilter], which uses mipmapping and a trilinear filter.
<br
/><br
/>
[page:Textures THREE.LinearMip
m
apLinearFilter], which uses mipmapping and a trilinear filter.
<br
/><br
/>
See the [page:Textures texture constants] page for all possible choices.
</p>
...
...
docs/api/en/textures/VideoTexture.html
浏览文件 @
4a67f90e
...
...
@@ -51,7 +51,7 @@ texture.format = THREE.RGBFormat;
The default is [page:Textures THREE.LinearFilter]. See [page:Textures magnification filter constants] for other choices.
<br
/>
[page:Constant minFilter] -- How the texture is sampled when a texel covers less than one pixel.
The default is [page:Textures THREE.LinearMip
M
apLinearFilter]. See [page:Textures minification filter constants] for other choices.
<br
/>
The default is [page:Textures THREE.LinearMip
m
apLinearFilter]. See [page:Textures minification filter constants] for other choices.
<br
/>
[page:Constant format] -- The format used in the texture.
See [page:Textures format constants] for other choices.
<br
/>
...
...
src/loaders/DataTextureLoader.js
浏览文件 @
4a67f90e
import
{
LinearFilter
,
LinearMip
M
apLinearFilter
,
ClampToEdgeWrapping
}
from
'
../constants.js
'
;
import
{
LinearFilter
,
LinearMip
m
apLinearFilter
,
ClampToEdgeWrapping
}
from
'
../constants.js
'
;
import
{
FileLoader
}
from
'
./FileLoader.js
'
;
import
{
DataTexture
}
from
'
../textures/DataTexture.js
'
;
import
{
DefaultLoadingManager
}
from
'
./LoadingManager.js
'
;
...
...
@@ -51,7 +51,7 @@ Object.assign( DataTextureLoader.prototype, {
texture
.
wrapT
=
texData
.
wrapT
!==
undefined
?
texData
.
wrapT
:
ClampToEdgeWrapping
;
texture
.
magFilter
=
texData
.
magFilter
!==
undefined
?
texData
.
magFilter
:
LinearFilter
;
texture
.
minFilter
=
texData
.
minFilter
!==
undefined
?
texData
.
minFilter
:
LinearMip
M
apLinearFilter
;
texture
.
minFilter
=
texData
.
minFilter
!==
undefined
?
texData
.
minFilter
:
LinearMip
m
apLinearFilter
;
texture
.
anisotropy
=
texData
.
anisotropy
!==
undefined
?
texData
.
anisotropy
:
1
;
...
...
src/loaders/ObjectLoader.js
浏览文件 @
4a67f90e
...
...
@@ -13,11 +13,11 @@ import {
MirroredRepeatWrapping
,
NearestFilter
,
NearestMip
M
apNearestFilter
,
NearestMip
M
apLinearFilter
,
NearestMip
m
apNearestFilter
,
NearestMip
m
apLinearFilter
,
LinearFilter
,
LinearMip
M
apNearestFilter
,
LinearMip
M
apLinearFilter
LinearMip
m
apNearestFilter
,
LinearMip
m
apLinearFilter
}
from
'
../constants.js
'
;
import
{
Color
}
from
'
../math/Color.js
'
;
import
{
Object3D
}
from
'
../core/Object3D.js
'
;
...
...
@@ -1013,11 +1013,11 @@ var TEXTURE_WRAPPING = {
var
TEXTURE_FILTER
=
{
NearestFilter
:
NearestFilter
,
NearestMip
MapNearestFilter
:
NearestMipM
apNearestFilter
,
NearestMip
MapLinearFilter
:
NearestMipM
apLinearFilter
,
NearestMip
mapNearestFilter
:
NearestMipm
apNearestFilter
,
NearestMip
mapLinearFilter
:
NearestMipm
apLinearFilter
,
LinearFilter
:
LinearFilter
,
LinearMip
MapNearestFilter
:
LinearMipM
apNearestFilter
,
LinearMip
MapLinearFilter
:
LinearMipM
apLinearFilter
LinearMip
mapNearestFilter
:
LinearMipm
apNearestFilter
,
LinearMip
mapLinearFilter
:
LinearMipm
apLinearFilter
};
...
...
src/renderers/webgl/WebGLTextures.js
浏览文件 @
4a67f90e
...
...
@@ -2,7 +2,7 @@
* @author mrdoob / http://mrdoob.com/
*/
import
{
LinearFilter
,
NearestFilter
,
RGBFormat
,
RGBAFormat
,
DepthFormat
,
DepthStencilFormat
,
UnsignedShortType
,
UnsignedIntType
,
UnsignedInt248Type
,
FloatType
,
HalfFloatType
,
ClampToEdgeWrapping
,
NearestMip
MapLinearFilter
,
NearestMipM
apNearestFilter
}
from
'
../../constants.js
'
;
import
{
LinearFilter
,
NearestFilter
,
RGBFormat
,
RGBAFormat
,
DepthFormat
,
DepthStencilFormat
,
UnsignedShortType
,
UnsignedIntType
,
UnsignedInt248Type
,
FloatType
,
HalfFloatType
,
ClampToEdgeWrapping
,
NearestMip
mapLinearFilter
,
NearestMipm
apNearestFilter
}
from
'
../../constants.js
'
;
import
{
_Math
}
from
'
../../math/Math.js
'
;
function
WebGLTextures
(
_gl
,
extensions
,
state
,
properties
,
capabilities
,
utils
,
info
)
{
...
...
@@ -167,7 +167,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
function
filterFallback
(
f
)
{
if
(
f
===
NearestFilter
||
f
===
NearestMip
MapNearestFilter
||
f
===
NearestMipM
apLinearFilter
)
{
if
(
f
===
NearestFilter
||
f
===
NearestMip
mapNearestFilter
||
f
===
NearestMipm
apLinearFilter
)
{
return
_gl
.
NEAREST
;
...
...
src/renderers/webgl/WebGLUtils.js
浏览文件 @
4a67f90e
...
...
@@ -2,7 +2,7 @@
* @author thespite / http://www.twitter.com/thespite
*/
import
{
MaxEquation
,
MinEquation
,
RGBA_ASTC_4x4_Format
,
RGBA_ASTC_5x4_Format
,
RGBA_ASTC_5x5_Format
,
RGBA_ASTC_6x5_Format
,
RGBA_ASTC_6x6_Format
,
RGBA_ASTC_8x5_Format
,
RGBA_ASTC_8x6_Format
,
RGBA_ASTC_8x8_Format
,
RGBA_ASTC_10x5_Format
,
RGBA_ASTC_10x6_Format
,
RGBA_ASTC_10x8_Format
,
RGBA_ASTC_10x10_Format
,
RGBA_ASTC_12x10_Format
,
RGBA_ASTC_12x12_Format
,
RGB_ETC1_Format
,
RGBA_PVRTC_2BPPV1_Format
,
RGBA_PVRTC_4BPPV1_Format
,
RGB_PVRTC_2BPPV1_Format
,
RGB_PVRTC_4BPPV1_Format
,
RGBA_S3TC_DXT5_Format
,
RGBA_S3TC_DXT3_Format
,
RGBA_S3TC_DXT1_Format
,
RGB_S3TC_DXT1_Format
,
SrcAlphaSaturateFactor
,
OneMinusDstColorFactor
,
DstColorFactor
,
OneMinusDstAlphaFactor
,
DstAlphaFactor
,
OneMinusSrcAlphaFactor
,
SrcAlphaFactor
,
OneMinusSrcColorFactor
,
SrcColorFactor
,
OneFactor
,
ZeroFactor
,
ReverseSubtractEquation
,
SubtractEquation
,
AddEquation
,
DepthFormat
,
DepthStencilFormat
,
LuminanceAlphaFormat
,
LuminanceFormat
,
RedFormat
,
RGBAFormat
,
RGBFormat
,
AlphaFormat
,
HalfFloatType
,
FloatType
,
UnsignedIntType
,
IntType
,
UnsignedShortType
,
ShortType
,
ByteType
,
UnsignedInt248Type
,
UnsignedShort565Type
,
UnsignedShort5551Type
,
UnsignedShort4444Type
,
UnsignedByteType
,
LinearMip
MapLinearFilter
,
LinearMipMapNearestFilter
,
LinearFilter
,
NearestMipMapLinearFilter
,
NearestMipM
apNearestFilter
,
NearestFilter
,
MirroredRepeatWrapping
,
ClampToEdgeWrapping
,
RepeatWrapping
}
from
'
../../constants.js
'
;
import
{
MaxEquation
,
MinEquation
,
RGBA_ASTC_4x4_Format
,
RGBA_ASTC_5x4_Format
,
RGBA_ASTC_5x5_Format
,
RGBA_ASTC_6x5_Format
,
RGBA_ASTC_6x6_Format
,
RGBA_ASTC_8x5_Format
,
RGBA_ASTC_8x6_Format
,
RGBA_ASTC_8x8_Format
,
RGBA_ASTC_10x5_Format
,
RGBA_ASTC_10x6_Format
,
RGBA_ASTC_10x8_Format
,
RGBA_ASTC_10x10_Format
,
RGBA_ASTC_12x10_Format
,
RGBA_ASTC_12x12_Format
,
RGB_ETC1_Format
,
RGBA_PVRTC_2BPPV1_Format
,
RGBA_PVRTC_4BPPV1_Format
,
RGB_PVRTC_2BPPV1_Format
,
RGB_PVRTC_4BPPV1_Format
,
RGBA_S3TC_DXT5_Format
,
RGBA_S3TC_DXT3_Format
,
RGBA_S3TC_DXT1_Format
,
RGB_S3TC_DXT1_Format
,
SrcAlphaSaturateFactor
,
OneMinusDstColorFactor
,
DstColorFactor
,
OneMinusDstAlphaFactor
,
DstAlphaFactor
,
OneMinusSrcAlphaFactor
,
SrcAlphaFactor
,
OneMinusSrcColorFactor
,
SrcColorFactor
,
OneFactor
,
ZeroFactor
,
ReverseSubtractEquation
,
SubtractEquation
,
AddEquation
,
DepthFormat
,
DepthStencilFormat
,
LuminanceAlphaFormat
,
LuminanceFormat
,
RedFormat
,
RGBAFormat
,
RGBFormat
,
AlphaFormat
,
HalfFloatType
,
FloatType
,
UnsignedIntType
,
IntType
,
UnsignedShortType
,
ShortType
,
ByteType
,
UnsignedInt248Type
,
UnsignedShort565Type
,
UnsignedShort5551Type
,
UnsignedShort4444Type
,
UnsignedByteType
,
LinearMip
mapLinearFilter
,
LinearMipmapNearestFilter
,
LinearFilter
,
NearestMipmapLinearFilter
,
NearestMipm
apNearestFilter
,
NearestFilter
,
MirroredRepeatWrapping
,
ClampToEdgeWrapping
,
RepeatWrapping
}
from
'
../../constants.js
'
;
function
WebGLUtils
(
gl
,
extensions
,
capabilities
)
{
...
...
@@ -15,12 +15,12 @@ function WebGLUtils( gl, extensions, capabilities ) {
if
(
p
===
MirroredRepeatWrapping
)
return
gl
.
MIRRORED_REPEAT
;
if
(
p
===
NearestFilter
)
return
gl
.
NEAREST
;
if
(
p
===
NearestMip
M
apNearestFilter
)
return
gl
.
NEAREST_MIPMAP_NEAREST
;
if
(
p
===
NearestMip
M
apLinearFilter
)
return
gl
.
NEAREST_MIPMAP_LINEAR
;
if
(
p
===
NearestMip
m
apNearestFilter
)
return
gl
.
NEAREST_MIPMAP_NEAREST
;
if
(
p
===
NearestMip
m
apLinearFilter
)
return
gl
.
NEAREST_MIPMAP_LINEAR
;
if
(
p
===
LinearFilter
)
return
gl
.
LINEAR
;
if
(
p
===
LinearMip
M
apNearestFilter
)
return
gl
.
LINEAR_MIPMAP_NEAREST
;
if
(
p
===
LinearMip
M
apLinearFilter
)
return
gl
.
LINEAR_MIPMAP_LINEAR
;
if
(
p
===
LinearMip
m
apNearestFilter
)
return
gl
.
LINEAR_MIPMAP_NEAREST
;
if
(
p
===
LinearMip
m
apLinearFilter
)
return
gl
.
LINEAR_MIPMAP_LINEAR
;
if
(
p
===
UnsignedByteType
)
return
gl
.
UNSIGNED_BYTE
;
if
(
p
===
UnsignedShort4444Type
)
return
gl
.
UNSIGNED_SHORT_4_4_4_4
;
...
...
src/textures/Texture.js
浏览文件 @
4a67f90e
...
...
@@ -12,7 +12,7 @@ import {
LinearEncoding
,
UnsignedByteType
,
RGBAFormat
,
LinearMip
M
apLinearFilter
,
LinearMip
m
apLinearFilter
,
LinearFilter
,
UVMapping
}
from
'
../constants.js
'
;
...
...
@@ -40,7 +40,7 @@ function Texture( image, mapping, wrapS, wrapT, magFilter, minFilter, format, ty
this
.
wrapT
=
wrapT
!==
undefined
?
wrapT
:
ClampToEdgeWrapping
;
this
.
magFilter
=
magFilter
!==
undefined
?
magFilter
:
LinearFilter
;
this
.
minFilter
=
minFilter
!==
undefined
?
minFilter
:
LinearMip
M
apLinearFilter
;
this
.
minFilter
=
minFilter
!==
undefined
?
minFilter
:
LinearMip
m
apLinearFilter
;
this
.
anisotropy
=
anisotropy
!==
undefined
?
anisotropy
:
1
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录