Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
f667e4d1
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,发现更多精彩内容 >>
提交
f667e4d1
编写于
12月 15, 2014
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated builds.
上级
92876d83
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
8 addition
and
4 deletion
+8
-4
build/three.js
build/three.js
+4
-0
build/three.min.js
build/three.min.js
+4
-4
未找到文件。
build/three.js
浏览文件 @
f667e4d1
...
@@ -24664,6 +24664,10 @@ THREE.WebGLProgram = ( function () {
...
@@ -24664,6 +24664,10 @@ THREE.WebGLProgram = ( function () {
envMapTypeDefine = "ENVMAP_TYPE_SPHERE";
envMapTypeDefine = "ENVMAP_TYPE_SPHERE";
break;
break;
default:
envMapTypeDefine = "ENVMAP_TYPE_CUBE";
break;
}
}
}
}
...
...
build/three.min.js
浏览文件 @
f667e4d1
...
@@ -577,10 +577,10 @@ a.shareDepthFrom=this.shareDepthFrom;return a},dispose:function(){this.dispatchE
...
@@ -577,10 +577,10 @@ a.shareDepthFrom=this.shareDepthFrom;return a},dispose:function(){this.dispatchE
THREE.WebGLExtensions=function(a){var b={};this.get=function(c){if(void 0!==b[c])return b[c];var d;switch(c){case "EXT_texture_filter_anisotropic":d=a.getExtension("EXT_texture_filter_anisotropic")||a.getExtension("MOZ_EXT_texture_filter_anisotropic")||a.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case "WEBGL_compressed_texture_s3tc":d=a.getExtension("WEBGL_compressed_texture_s3tc")||a.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||a.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");
THREE.WebGLExtensions=function(a){var b={};this.get=function(c){if(void 0!==b[c])return b[c];var d;switch(c){case "EXT_texture_filter_anisotropic":d=a.getExtension("EXT_texture_filter_anisotropic")||a.getExtension("MOZ_EXT_texture_filter_anisotropic")||a.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case "WEBGL_compressed_texture_s3tc":d=a.getExtension("WEBGL_compressed_texture_s3tc")||a.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||a.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");
break;case "WEBGL_compressed_texture_pvrtc":d=a.getExtension("WEBGL_compressed_texture_pvrtc")||a.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:d=a.getExtension(c)}null===d&&console.log("THREE.WebGLRenderer: "+c+" extension not supported.");return b[c]=d}};
break;case "WEBGL_compressed_texture_pvrtc":d=a.getExtension("WEBGL_compressed_texture_pvrtc")||a.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:d=a.getExtension(c)}null===d&&console.log("THREE.WebGLRenderer: "+c+" extension not supported.");return b[c]=d}};
THREE.WebGLProgram=function(){var a=0;return function(b,c,d,e){var f=b.context,g=d.defines,h=d.__webglShader.uniforms,k=d.attributes,n=d.__webglShader.vertexShader,p=d.__webglShader.fragmentShader,q=d.index0AttributeName;void 0===q&&!0===e.morphTargets&&(q="position");var m="SHADOWMAP_TYPE_BASIC";e.shadowMapType===THREE.PCFShadowMap?m="SHADOWMAP_TYPE_PCF":e.shadowMapType===THREE.PCFSoftShadowMap&&(m="SHADOWMAP_TYPE_PCF_SOFT");var t=null;if(e.envMap)switch(d.envMap.mapping){case THREE.CubeReflectionMapping:case THREE.CubeRefractionMapping:t=
THREE.WebGLProgram=function(){var a=0;return function(b,c,d,e){var f=b.context,g=d.defines,h=d.__webglShader.uniforms,k=d.attributes,n=d.__webglShader.vertexShader,p=d.__webglShader.fragmentShader,q=d.index0AttributeName;void 0===q&&!0===e.morphTargets&&(q="position");var m="SHADOWMAP_TYPE_BASIC";e.shadowMapType===THREE.PCFShadowMap?m="SHADOWMAP_TYPE_PCF":e.shadowMapType===THREE.PCFSoftShadowMap&&(m="SHADOWMAP_TYPE_PCF_SOFT");var t=null;if(e.envMap)switch(d.envMap.mapping){case THREE.CubeReflectionMapping:case THREE.CubeRefractionMapping:t=
"
ENVMAP_TYPE_CUBE
"
;
break
;
case
THREE
.
EquirectangularReflectionMapping
:
case
THREE
.
EquirectangularRefractionMapping
:
t
=
"
ENVMAP_TYPE_EQUIREC
"
;
break
;
case
THREE
.
SphericalReflectionMapping
:
t
=
"
ENVMAP_TYPE_SPHERE
"
}
var
s
,
r
;
s
=
[];
for
(
var
u
in
g
)
r
=
g
[
u
],
!
1
!==
r
&&
(
r
=
"
#define
"
+
u
+
"
"
+
r
,
s
.
push
(
r
));
s
=
s
.
join
(
"
\n
"
);
g
=
f
.
createProgram
();
d
instanceof
THREE
.
RawShaderMaterial
?
b
=
d
=
""
:(
d
=
[
"
precision
"
+
e
.
precision
+
"
float;
"
,
"
precision
"
+
e
.
precision
+
"
int;
"
,
s
,
e
.
supportsVertexTextures
?
"
#define VERTEX_TEXTURES
"
:
""
,
b
.
gammaInput
?
"
#define GAMMA_INPUT
"
:
"ENVMAP_TYPE_CUBE";break;case THREE.EquirectangularReflectionMapping:case THREE.EquirectangularRefractionMapping:t="ENVMAP_TYPE_EQUIREC";break;case THREE.SphericalReflectionMapping:t="ENVMAP_TYPE_SPHERE"
;break;default:t="ENVMAP_TYPE_CUBE"}var s,r;s=[];for(var u in g)r=g[u],!1!==r&&(r="#define "+u+" "+r,s.push(r));s=s.join("\n");g=f.createProgram();d instanceof THREE.RawShaderMaterial?b=d="":(d=["precision "+e.precision+" float;","precision "+e.precision+" int;",s,e.supportsVertexTextures?"#define VERTEX_TEXTURES
":
""
,
b
.
gamma
Output
?
"
#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
.
alpha
Map
?
"",b.gamma
Input?"#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.specular
Map?
"
#define USE_
ALPHAMAP
"
:
""
,
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
"
+
m
:
""
,
e
.
shadowMapDebug
?
"
#define SHADOWMAP_DEBUG
"
:
""
,
e
.
shadowMapCascade
?
"
#define SHADOWMAP_CASCADE
"
:
"#define USE_
SPECULARMAP":"",e.alphaMap?"#define USE_ALPHAMAP":"",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 "+m:"",e.shadowMapDebug?"#define SHADOWMAP_DEBUG
":
""
,
e
.
sizeAttenuation
?
"
#define USE_SIZEATTENUATION
"
:
""
,
e
.
logarithmicDepthBuffer
?
"
#define USE_LOGDEPTHBUF
"
:
""
,
"
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
"
),
"",e.s
hadowMapCascade?"#define SHADOWMAP_CASCADE":"",e.s
izeAttenuation?"#define USE_SIZEATTENUATION":"",e.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","uniform mat4 modelMatrix;\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat3 normalMatrix;\nuniform vec3 cameraPosition;\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec2 uv;\nattribute vec2 uv2;\n#ifdef USE_COLOR\n\tattribute vec3 color;\n#endif\n#ifdef USE_MORPHTARGETS\n\tattribute vec3 morphTarget0;\n\tattribute vec3 morphTarget1;\n\tattribute vec3 morphTarget2;\n\tattribute vec3 morphTarget3;\n\t#ifdef USE_MORPHNORMALS\n\t\tattribute vec3 morphNormal0;\n\t\tattribute vec3 morphNormal1;\n\t\tattribute vec3 morphNormal2;\n\t\tattribute vec3 morphNormal3;\n\t#else\n\t\tattribute vec3 morphTarget4;\n\t\tattribute vec3 morphTarget5;\n\t\tattribute vec3 morphTarget6;\n\t\tattribute vec3 morphTarget7;\n\t#endif\n#endif\n#ifdef USE_SKINNING\n\tattribute vec4 skinIndex;\n\tattribute vec4 skinWeight;\n#endif\n"].join("\n"),
b=["precision "+e.precision+" float;","precision "+e.precision+" int;",e.bumpMap||e.normalMap?"#extension GL_OES_standard_derivatives : enable":"",s,"#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,e.alphaTest?"#define ALPHATEST "+e.alphaTest:"",b.gammaInput?"#define GAMMA_INPUT":"",b.gammaOutput?"#define GAMMA_OUTPUT":"",e.useFog&&e.fog?"#define USE_FOG":
b=["precision "+e.precision+" float;","precision "+e.precision+" int;",e.bumpMap||e.normalMap?"#extension GL_OES_standard_derivatives : enable":"",s,"#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,e.alphaTest?"#define ALPHATEST "+e.alphaTest:"",b.gammaInput?"#define GAMMA_INPUT":"",b.gammaOutput?"#define GAMMA_OUTPUT":"",e.useFog&&e.fog?"#define USE_FOG":
"",e.useFog&&e.fogExp?"#define FOG_EXP2":"",e.map?"#define USE_MAP":"",e.envMap?"#define USE_ENVMAP":"",t?"#define "+t:"",e.lightMap?"#define USE_LIGHTMAP":"",e.bumpMap?"#define USE_BUMPMAP":"",e.normalMap?"#define USE_NORMALMAP":"",e.specularMap?"#define USE_SPECULARMAP":"",e.alphaMap?"#define USE_ALPHAMAP":"",e.vertexColors?"#define USE_COLOR":"",e.metal?"#define METAL":"",e.wrapAround?"#define WRAP_AROUND":"",e.doubleSided?"#define DOUBLE_SIDED":"",e.flipSided?"#define FLIP_SIDED":"",e.shadowMapEnabled?
"",e.useFog&&e.fogExp?"#define FOG_EXP2":"",e.map?"#define USE_MAP":"",e.envMap?"#define USE_ENVMAP":"",t?"#define "+t:"",e.lightMap?"#define USE_LIGHTMAP":"",e.bumpMap?"#define USE_BUMPMAP":"",e.normalMap?"#define USE_NORMALMAP":"",e.specularMap?"#define USE_SPECULARMAP":"",e.alphaMap?"#define USE_ALPHAMAP":"",e.vertexColors?"#define USE_COLOR":"",e.metal?"#define METAL":"",e.wrapAround?"#define WRAP_AROUND":"",e.doubleSided?"#define DOUBLE_SIDED":"",e.flipSided?"#define FLIP_SIDED":"",e.shadowMapEnabled?
"#define USE_SHADOWMAP":"",e.shadowMapEnabled?"#define "+m:"",e.shadowMapDebug?"#define SHADOWMAP_DEBUG":"",e.shadowMapCascade?"#define SHADOWMAP_CASCADE":"",e.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","uniform mat4 viewMatrix;\nuniform vec3 cameraPosition;\n"].join("\n"));n=new THREE.WebGLShader(f,f.VERTEX_SHADER,d+n);p=new THREE.WebGLShader(f,f.FRAGMENT_SHADER,b+p);f.attachShader(g,n);f.attachShader(g,p);void 0!==q&&f.bindAttribLocation(g,0,q);f.linkProgram(g);!1===f.getProgramParameter(g,
"#define USE_SHADOWMAP":"",e.shadowMapEnabled?"#define "+m:"",e.shadowMapDebug?"#define SHADOWMAP_DEBUG":"",e.shadowMapCascade?"#define SHADOWMAP_CASCADE":"",e.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","uniform mat4 viewMatrix;\nuniform vec3 cameraPosition;\n"].join("\n"));n=new THREE.WebGLShader(f,f.VERTEX_SHADER,d+n);p=new THREE.WebGLShader(f,f.FRAGMENT_SHADER,b+p);f.attachShader(g,n);f.attachShader(g,p);void 0!==q&&f.bindAttribLocation(g,0,q);f.linkProgram(g);!1===f.getProgramParameter(g,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录