Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
7d9f979b
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,发现更多精彩内容 >>
提交
7d9f979b
编写于
12月 19, 2015
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Replaced Rectangle with Vector4.
上级
3179ceac
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
9 addition
and
53 deletion
+9
-53
src/math/Rectangle.js
src/math/Rectangle.js
+0
-43
src/renderers/WebGLRenderTarget.js
src/renderers/WebGLRenderTarget.js
+2
-2
src/renderers/WebGLRenderer.js
src/renderers/WebGLRenderer.js
+3
-3
src/renderers/webgl/WebGLState.js
src/renderers/webgl/WebGLState.js
+4
-4
utils/build/includes/common.json
utils/build/includes/common.json
+0
-1
未找到文件。
src/math/Rectangle.js
已删除
100644 → 0
浏览文件 @
3179ceac
/**
* @author mrdoob / http://mrdoob.com/
*/
THREE
.
Rectangle
=
function
(
x
,
y
,
width
,
height
)
{
this
.
set
(
x
,
y
,
width
,
height
);
};
THREE
.
Rectangle
.
prototype
=
{
constructor
:
THREE
.
Rectangle
,
set
:
function
(
x
,
y
,
width
,
height
)
{
this
.
x
=
x
;
this
.
y
=
y
;
this
.
width
=
width
;
this
.
height
=
height
;
return
this
;
},
copy
:
function
(
source
)
{
this
.
x
=
source
.
x
;
this
.
y
=
source
.
y
;
this
.
width
=
source
.
width
;
this
.
height
=
source
.
height
;
return
this
;
},
equals
:
function
(
rectangle
)
{
return
this
.
x
===
rectangle
.
x
&&
this
.
y
===
rectangle
.
y
&&
this
.
width
===
rectangle
.
width
&&
this
.
height
===
rectangle
.
height
;
}
};
src/renderers/WebGLRenderTarget.js
浏览文件 @
7d9f979b
...
...
@@ -16,10 +16,10 @@ THREE.WebGLRenderTarget = function ( width, height, options ) {
this
.
width
=
width
;
this
.
height
=
height
;
this
.
scissor
=
new
THREE
.
Rectangle
(
0
,
0
,
width
,
height
);
this
.
scissor
=
new
THREE
.
Vector4
(
0
,
0
,
width
,
height
);
this
.
scissorTest
=
false
;
this
.
viewport
=
new
THREE
.
Rectangle
(
0
,
0
,
width
,
height
);
this
.
viewport
=
new
THREE
.
Vector4
(
0
,
0
,
width
,
height
);
options
=
options
||
{};
...
...
src/renderers/WebGLRenderer.js
浏览文件 @
7d9f979b
...
...
@@ -88,7 +88,7 @@ THREE.WebGLRenderer = function ( parameters ) {
_usedTextureUnits
=
0
,
_viewport
=
new
THREE
.
Rectangle
(
0
,
0
,
_canvas
.
width
,
_canvas
.
height
),
_viewport
=
new
THREE
.
Vector4
(
0
,
0
,
_canvas
.
width
,
_canvas
.
height
),
_currentWidth
=
0
,
_currentHeight
=
0
,
...
...
@@ -238,7 +238,7 @@ THREE.WebGLRenderer = function ( parameters ) {
state
.
init
();
_gl
.
viewport
(
_viewport
.
x
,
_viewport
.
y
,
_viewport
.
width
,
_viewport
.
height
);
_gl
.
viewport
(
_viewport
.
x
,
_viewport
.
y
,
_viewport
.
z
,
_viewport
.
w
);
glClearColor
(
_clearColor
.
r
,
_clearColor
.
g
,
_clearColor
.
b
,
_clearAlpha
);
...
...
@@ -3410,7 +3410,7 @@ THREE.WebGLRenderer = function ( parameters ) {
if
(
framebuffer
!==
_currentFramebuffer
)
{
_gl
.
bindFramebuffer
(
_gl
.
FRAMEBUFFER
,
framebuffer
);
_gl
.
viewport
(
viewport
.
x
,
viewport
.
y
,
viewport
.
width
,
viewport
.
height
);
_gl
.
viewport
(
viewport
.
x
,
viewport
.
y
,
viewport
.
z
,
viewport
.
w
);
_currentFramebuffer
=
framebuffer
;
...
...
src/renderers/webgl/WebGLState.js
浏览文件 @
7d9f979b
...
...
@@ -41,8 +41,8 @@ THREE.WebGLState = function ( gl, extensions, paramThreeToGL ) {
var
currentTextureSlot
=
undefined
;
var
currentBoundTextures
=
{};
var
currentScissor
=
new
THREE
.
Rectangle
();
var
currentViewport
=
new
THREE
.
Rectangle
();
var
currentScissor
=
new
THREE
.
Vector4
();
var
currentViewport
=
new
THREE
.
Vector4
();
this
.
init
=
function
()
{
...
...
@@ -516,7 +516,7 @@ THREE.WebGLState = function ( gl, extensions, paramThreeToGL ) {
if
(
currentScissor
.
equals
(
scissor
)
===
false
)
{
gl
.
scissor
(
scissor
.
x
,
scissor
.
y
,
scissor
.
width
,
scissor
.
height
);
gl
.
scissor
(
scissor
.
x
,
scissor
.
y
,
scissor
.
z
,
scissor
.
w
);
currentScissor
.
copy
(
scissor
);
}
...
...
@@ -527,7 +527,7 @@ THREE.WebGLState = function ( gl, extensions, paramThreeToGL ) {
if
(
currentViewport
.
equals
(
viewport
)
===
false
)
{
gl
.
viewport
(
viewport
.
x
,
viewport
.
y
,
viewport
.
width
,
viewport
.
height
);
gl
.
viewport
(
viewport
.
x
,
viewport
.
y
,
viewport
.
z
,
viewport
.
w
);
currentViewport
.
copy
(
viewport
);
}
...
...
utils/build/includes/common.json
浏览文件 @
7d9f979b
...
...
@@ -16,7 +16,6 @@
"src/math/Frustum.js"
,
"src/math/Plane.js"
,
"src/math/Math.js"
,
"src/math/Rectangle.js"
,
"src/math/Spline.js"
,
"src/math/Triangle.js"
,
"src/math/Interpolant.js"
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录