Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
bef846d9
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,发现更多精彩内容 >>
提交
bef846d9
编写于
3月 09, 2014
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated builds.
上级
9d26a2a1
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
9 addition
and
2 deletion
+9
-2
build/three.js
build/three.js
+7
-0
build/three.min.js
build/three.min.js
+2
-2
未找到文件。
build/three.js
浏览文件 @
bef846d9
...
...
@@ -26652,6 +26652,13 @@ THREE.WebGLRenderTarget.prototype = {
constructor: THREE.WebGLRenderTarget,
setSize: function ( width, height ) {
this.width = width;
this.height = height;
},
clone: function () {
var tmp = new THREE.WebGLRenderTarget( this.width, this.height );
...
...
build/three.min.js
浏览文件 @
bef846d9
...
...
@@ -517,8 +517,8 @@ I(m.TEXTURE_2D,a,c),m.texImage2D(m.TEXTURE_2D,0,d,a.width,a.height,0,d,e,null),d
C
(
a
.
__webglRenderbuffer
,
a
),
c
&&
m
.
generateMipmap
(
m
.
TEXTURE_2D
);
b
?
m
.
bindTexture
(
m
.
TEXTURE_CUBE_MAP
,
null
):
m
.
bindTexture
(
m
.
TEXTURE_2D
,
null
);
m
.
bindRenderbuffer
(
m
.
RENDERBUFFER
,
null
);
m
.
bindFramebuffer
(
m
.
FRAMEBUFFER
,
null
)}
a
?(
b
=
b
?
a
.
__webglFramebuffer
[
a
.
activeCubeFace
]:
a
.
__webglFramebuffer
,
c
=
a
.
width
,
a
=
a
.
height
,
e
=
d
=
0
):(
b
=
null
,
c
=
ma
,
a
=
Ea
,
d
=
Aa
,
e
=
wa
);
b
!==
T
&&
(
m
.
bindFramebuffer
(
m
.
FRAMEBUFFER
,
b
),
m
.
viewport
(
d
,
e
,
c
,
a
),
T
=
b
);
Ka
=
c
;
ga
=
a
};
this
.
shadowMapPlugin
=
new
THREE
.
ShadowMapPlugin
;
this
.
addPrePlugin
(
this
.
shadowMapPlugin
);
this
.
addPostPlugin
(
new
THREE
.
SpritePlugin
);
this
.
addPostPlugin
(
new
THREE
.
LensFlarePlugin
)};
THREE
.
WebGLRenderTarget
=
function
(
a
,
b
,
c
){
this
.
width
=
a
;
this
.
height
=
b
;
c
=
c
||
{};
this
.
wrapS
=
void
0
!==
c
.
wrapS
?
c
.
wrapS
:
THREE
.
ClampToEdgeWrapping
;
this
.
wrapT
=
void
0
!==
c
.
wrapT
?
c
.
wrapT
:
THREE
.
ClampToEdgeWrapping
;
this
.
magFilter
=
void
0
!==
c
.
magFilter
?
c
.
magFilter
:
THREE
.
LinearFilter
;
this
.
minFilter
=
void
0
!==
c
.
minFilter
?
c
.
minFilter
:
THREE
.
LinearMipMapLinearFilter
;
this
.
anisotropy
=
void
0
!==
c
.
anisotropy
?
c
.
anisotropy
:
1
;
this
.
offset
=
new
THREE
.
Vector2
(
0
,
0
);
this
.
repeat
=
new
THREE
.
Vector2
(
1
,
1
);
this
.
format
=
void
0
!==
c
.
format
?
c
.
format
:
THREE
.
RGBAFormat
;
this
.
type
=
void
0
!==
c
.
type
?
c
.
type
:
THREE
.
UnsignedByteType
;
this
.
depthBuffer
=
void
0
!==
c
.
depthBuffer
?
c
.
depthBuffer
:
!
0
;
this
.
stencilBuffer
=
void
0
!==
c
.
stencilBuffer
?
c
.
stencilBuffer
:
!
0
;
this
.
generateMipmaps
=!
0
;
this
.
shareDepthFrom
=
null
};
THREE
.
WebGLRenderTarget
.
prototype
=
{
constructor
:
THREE
.
WebGLRenderTarget
,
clone
:
function
(){
var
a
=
new
THREE
.
WebGLRenderTarget
(
this
.
width
,
this
.
height
);
a
.
wrapS
=
this
.
wrapS
;
a
.
wrapT
=
this
.
wrapT
;
a
.
magFilter
=
this
.
magFilter
;
a
.
minFilter
=
this
.
minFilter
;
a
.
anisotropy
=
this
.
anisotropy
;
a
.
offset
.
copy
(
this
.
offset
);
a
.
repeat
.
copy
(
this
.
repeat
);
a
.
format
=
this
.
format
;
a
.
type
=
this
.
type
;
a
.
depthBuffer
=
this
.
depthBuffer
;
a
.
stencilBuffer
=
this
.
stencilBuffer
;
a
.
generateMipmaps
=
this
.
generateMipmaps
;
a
.
shareDepthFrom
=
this
.
shareDepthFrom
;
return
a
},
dispose
:
function
(){
this
.
dispatchEvent
({
type
:
"
dispose
"
})}};
THREE
.
EventDispatcher
.
prototype
.
apply
(
THREE
.
WebGLRenderTarget
.
prototype
);
THREE
.
WebGLRenderTargetCube
=
function
(
a
,
b
,
c
){
THREE
.
WebGLRenderTarget
.
call
(
this
,
a
,
b
,
c
);
this
.
activeCubeFace
=
0
};
THREE
.
WebGLRenderTargetCube
.
prototype
=
Object
.
create
(
THREE
.
WebGLRenderTarget
.
prototype
);
THREE
.
WebGLProgram
=
function
(){
var
a
=
0
;
return
function
(
b
,
c
,
d
,
e
){
var
f
=
b
.
context
,
g
=
d
.
fragmentShader
,
h
=
d
.
vertexShader
,
k
=
d
.
uniforms
,
l
=
d
.
attributes
,
n
=
d
.
defines
,
q
=
d
.
index0AttributeName
;
void
0
===
q
&&!
0
===
e
.
morphTargets
&&
(
q
=
"
position
"
);
var
p
=
"
SHADOWMAP_TYPE_BASIC
"
;
e
.
shadowMapType
===
THREE
.
PCFShadowMap
?
p
=
"
SHADOWMAP_TYPE_PCF
"
:
e
.
shadowMapType
===
THREE
.
PCFSoftShadowMap
&&
(
p
=
"
SHADOWMAP_TYPE_PCF_SOFT
"
);
var
r
,
u
;
r
=
[];
for
(
var
s
in
n
)
u
=
n
[
s
],
!
1
!==
u
&&
(
u
=
"
#define
"
+
s
+
"
"
+
u
,
r
.
push
(
u
));
r
=
r
.
join
(
"
\n
"
);
n
=
f
.
createProgram
();
d
instanceof
THREE
.
WebGLRenderTarget
.
prototype
=
{
constructor
:
THREE
.
WebGLRenderTarget
,
setSize
:
function
(
a
,
b
){
this
.
width
=
a
;
this
.
height
=
b
},
clone
:
function
(){
var
a
=
new
THREE
.
WebGLRenderTarget
(
this
.
width
,
this
.
height
);
a
.
wrapS
=
this
.
wrapS
;
a
.
wrapT
=
this
.
wrapT
;
a
.
magFilter
=
this
.
magFilter
;
a
.
minFilter
=
this
.
minFilter
;
a
.
anisotropy
=
this
.
anisotropy
;
a
.
offset
.
copy
(
this
.
offset
);
a
.
repeat
.
copy
(
this
.
repeat
);
a
.
format
=
this
.
format
;
a
.
type
=
this
.
type
;
a
.
depthBuffer
=
this
.
depthBuffer
;
a
.
stencilBuffer
=
this
.
stencilBuffer
;
a
.
generateMipmaps
=
this
.
generateMipmaps
;
a
.
shareDepthFrom
=
this
.
shareDepthFrom
;
return
a
},
dispose
:
function
(){
this
.
dispatchEvent
({
type
:
"
dispose
"
})}};
THREE
.
EventDispatcher
.
prototype
.
apply
(
THREE
.
WebGLRenderTarget
.
prototype
);
THREE
.
WebGLRenderTargetCube
=
function
(
a
,
b
,
c
){
THREE
.
WebGLRenderTarget
.
call
(
this
,
a
,
b
,
c
);
this
.
activeCubeFace
=
0
};
THREE
.
WebGLRenderTargetCube
.
prototype
=
Object
.
create
(
THREE
.
WebGLRenderTarget
.
prototype
);
THREE
.
WebGLProgram
=
function
(){
var
a
=
0
;
return
function
(
b
,
c
,
d
,
e
){
var
f
=
b
.
context
,
g
=
d
.
fragmentShader
,
h
=
d
.
vertexShader
,
k
=
d
.
uniforms
,
l
=
d
.
attributes
,
n
=
d
.
defines
,
q
=
d
.
index0AttributeName
;
void
0
===
q
&&!
0
===
e
.
morphTargets
&&
(
q
=
"
position
"
);
var
p
=
"
SHADOWMAP_TYPE_BASIC
"
;
e
.
shadowMapType
===
THREE
.
PCFShadowMap
?
p
=
"
SHADOWMAP_TYPE_PCF
"
:
e
.
shadowMapType
===
THREE
.
PCFSoftShadowMap
&&
(
p
=
"
SHADOWMAP_TYPE_PCF_SOFT
"
);
var
r
,
u
;
r
=
[];
for
(
var
s
in
n
)
u
=
n
[
s
],
!
1
!==
u
&&
(
u
=
"
#define
"
+
s
+
"
"
+
u
,
r
.
push
(
u
));
r
=
r
.
join
(
"
\n
"
);
n
=
f
.
createProgram
();
d
instanceof
THREE
.
RawShaderMaterial
?
b
=
d
=
""
:(
d
=
[
"
precision
"
+
e
.
precision
+
"
float;
"
,
"
precision
"
+
e
.
precision
+
"
int;
"
,
r
,
e
.
supportsVertexTextures
?
"
#define VERTEX_TEXTURES
"
:
""
,
b
.
gammaInput
?
"
#define GAMMA_INPUT
"
:
""
,
b
.
gammaOutput
?
"
#define GAMMA_OUTPUT
"
:
""
,
"
#define MAX_DIR_LIGHTS
"
+
e
.
maxDirLights
,
"
#define MAX_POINT_LIGHTS
"
+
e
.
maxPointLights
,
"
#define MAX_SPOT_LIGHTS
"
+
e
.
maxSpotLights
,
"
#define MAX_HEMI_LIGHTS
"
+
e
.
maxHemiLights
,
"
#define MAX_SHADOWS
"
+
e
.
maxShadows
,
"
#define MAX_BONES
"
+
e
.
maxBones
,
e
.
map
?
"
#define USE_MAP
"
:
""
,
e
.
envMap
?
"
#define USE_ENVMAP
"
:
""
,
e
.
lightMap
?
"
#define USE_LIGHTMAP
"
:
""
,
e
.
bumpMap
?
"
#define USE_BUMPMAP
"
:
""
,
e
.
normalMap
?
"
#define USE_NORMALMAP
"
:
""
,
e
.
specularMap
?
"
#define USE_SPECULARMAP
"
:
""
,
e
.
vertexColors
?
"
#define USE_COLOR
"
:
""
,
e
.
skinning
?
"
#define USE_SKINNING
"
:
""
,
e
.
useVertexTexture
?
"
#define BONE_TEXTURE
"
:
""
,
e
.
morphTargets
?
"
#define USE_MORPHTARGETS
"
:
""
,
e
.
morphNormals
?
"
#define USE_MORPHNORMALS
"
:
""
,
e
.
wrapAround
?
"
#define WRAP_AROUND
"
:
""
,
e
.
doubleSided
?
"
#define DOUBLE_SIDED
"
:
""
,
e
.
flipSided
?
"
#define FLIP_SIDED
"
:
""
,
e
.
shadowMapEnabled
?
"
#define USE_SHADOWMAP
"
:
""
,
e
.
shadowMapEnabled
?
"
#define
"
+
p
:
""
,
e
.
shadowMapDebug
?
"
#define SHADOWMAP_DEBUG
"
:
""
,
e
.
shadowMapCascade
?
"
#define SHADOWMAP_CASCADE
"
:
""
,
e
.
sizeAttenuation
?
"
#define USE_SIZEATTENUATION
"
:
""
,
"
uniform mat4 modelMatrix;
\n
uniform mat4 modelViewMatrix;
\n
uniform mat4 projectionMatrix;
\n
uniform mat4 viewMatrix;
\n
uniform mat3 normalMatrix;
\n
uniform vec3 cameraPosition;
\n
attribute vec3 position;
\n
attribute vec3 normal;
\n
attribute vec2 uv;
\n
attribute vec2 uv2;
\n
#ifdef USE_COLOR
\n\t
attribute vec3 color;
\n
#endif
\n
#ifdef USE_MORPHTARGETS
\n\t
attribute vec3 morphTarget0;
\n\t
attribute vec3 morphTarget1;
\n\t
attribute vec3 morphTarget2;
\n\t
attribute vec3 morphTarget3;
\n\t
#ifdef USE_MORPHNORMALS
\n\t\t
attribute vec3 morphNormal0;
\n\t\t
attribute vec3 morphNormal1;
\n\t\t
attribute vec3 morphNormal2;
\n\t\t
attribute vec3 morphNormal3;
\n\t
#else
\n\t\t
attribute vec3 morphTarget4;
\n\t\t
attribute vec3 morphTarget5;
\n\t\t
attribute vec3 morphTarget6;
\n\t\t
attribute vec3 morphTarget7;
\n\t
#endif
\n
#endif
\n
#ifdef USE_SKINNING
\n\t
attribute vec4 skinIndex;
\n\t
attribute vec4 skinWeight;
\n
#endif
\n
"
].
join
(
"
\n
"
),
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录