Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
33ebb86a
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 搜索 >>
未验证
提交
33ebb86a
编写于
10月 16, 2019
作者:
M
Mr.doob
提交者:
GitHub
10月 16, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #17747 from elalish/dev
fixed copyFramebufferToTexture
上级
a25f30a0
750744ec
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
27 addition
and
3 deletion
+27
-3
src/renderers/WebGLRenderer.d.ts
src/renderers/WebGLRenderer.d.ts
+21
-0
src/renderers/WebGLRenderer.js
src/renderers/WebGLRenderer.js
+6
-3
未找到文件。
src/renderers/WebGLRenderer.d.ts
浏览文件 @
33ebb86a
...
...
@@ -19,6 +19,7 @@ import { WebVRManager } from '../renderers/webvr/WebVRManager';
import
{
RenderTarget
}
from
'
./webgl/WebGLRenderLists
'
;
import
{
Geometry
}
from
'
./../core/Geometry
'
;
import
{
BufferGeometry
}
from
'
./../core/BufferGeometry
'
;
import
{
Texture
}
from
'
../textures/Texture
'
;
export
interface
Renderer
{
domElement
:
HTMLCanvasElement
;
...
...
@@ -396,6 +397,26 @@ export class WebGLRenderer implements Renderer {
activeCubeFaceIndex
?:
number
):
void
;
/**
* Copies a region of the currently bound framebuffer into the selected mipmap level of the selected texture.
* This region is defined by the size of the destination texture's mip level, offset by the input position.
*
* @param position Specifies the pixel offset from which to copy out of the framebuffer.
* @param texture Specifies the destination texture.
* @param level Specifies the destination mipmap level of the texture.
*/
copyFramebufferToTexture
(
position
:
Vector2
,
texture
:
Texture
,
level
?:
number
):
void
;
/**
* Copies srcTexture to the specified level of dstTexture, offset by the input position.
*
* @param position Specifies the pixel offset into the dstTexture where the copy will occur.
* @param srcTexture Specifies the source texture.
* @param dstTexture Specifies the destination texture.
* @param level Specifies the destination mipmap level of the texture.
*/
copyTextureToTexture
(
position
:
Vector2
,
srcTexture
:
Texture
,
dstTexture
:
Texture
,
level
?:
number
):
void
;
/**
* @deprecated
*/
...
...
src/renderers/WebGLRenderer.js
浏览文件 @
33ebb86a
...
...
@@ -2719,13 +2719,16 @@ function WebGLRenderer( parameters ) {
this
.
copyFramebufferToTexture
=
function
(
position
,
texture
,
level
)
{
var
width
=
texture
.
image
.
width
;
var
height
=
texture
.
image
.
height
;
if
(
level
===
undefined
)
level
=
0
;
var
levelScale
=
Math
.
pow
(
2
,
-
level
);
var
width
=
Math
.
floor
(
texture
.
image
.
width
*
levelScale
);
var
height
=
Math
.
floor
(
texture
.
image
.
height
*
levelScale
);
var
glFormat
=
utils
.
convert
(
texture
.
format
);
textures
.
setTexture2D
(
texture
,
0
);
_gl
.
copyTexImage2D
(
_gl
.
TEXTURE_2D
,
level
||
0
,
glFormat
,
position
.
x
,
position
.
y
,
width
,
height
,
0
);
_gl
.
copyTexImage2D
(
_gl
.
TEXTURE_2D
,
level
,
glFormat
,
position
.
x
,
position
.
y
,
width
,
height
,
0
);
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录