Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
91d6c8d1
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,发现更多精彩内容 >>
提交
91d6c8d1
编写于
10月 20, 2015
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Renamed MeshStandardMaterial to MeshPhysicalMaterial. See #7381.
上级
1a9e254a
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
26 addition
and
26 deletion
+26
-26
src/materials/MeshPhysicalMaterial.js
src/materials/MeshPhysicalMaterial.js
+5
-5
src/renderers/WebGLRenderer.js
src/renderers/WebGLRenderer.js
+6
-6
src/renderers/shaders/ShaderChunk/envmap_pars_fragment.glsl
src/renderers/shaders/ShaderChunk/envmap_pars_fragment.glsl
+1
-1
src/renderers/shaders/ShaderChunk/envmap_pars_vertex.glsl
src/renderers/shaders/ShaderChunk/envmap_pars_vertex.glsl
+1
-1
src/renderers/shaders/ShaderChunk/envmap_physical_fragment.glsl
...nderers/shaders/ShaderChunk/envmap_physical_fragment.glsl
+0
-0
src/renderers/shaders/ShaderChunk/envmap_vertex.glsl
src/renderers/shaders/ShaderChunk/envmap_vertex.glsl
+1
-1
src/renderers/shaders/ShaderChunk/lights_physical_fragment.glsl
...nderers/shaders/ShaderChunk/lights_physical_fragment.glsl
+0
-0
src/renderers/shaders/ShaderChunk/worldpos_vertex.glsl
src/renderers/shaders/ShaderChunk/worldpos_vertex.glsl
+1
-1
src/renderers/shaders/ShaderLib.js
src/renderers/shaders/ShaderLib.js
+6
-6
src/renderers/webgl/WebGLPrograms.js
src/renderers/webgl/WebGLPrograms.js
+1
-1
utils/build/includes/common.json
utils/build/includes/common.json
+4
-4
未找到文件。
src/materials/Mesh
Standard
Material.js
→
src/materials/Mesh
Physical
Material.js
浏览文件 @
91d6c8d1
...
...
@@ -59,11 +59,11 @@
* }
*/
THREE
.
Mesh
Standard
Material
=
function
(
parameters
)
{
THREE
.
Mesh
Physical
Material
=
function
(
parameters
)
{
THREE
.
Material
.
call
(
this
);
this
.
type
=
'
Mesh
Standard
Material
'
;
this
.
type
=
'
Mesh
Physical
Material
'
;
this
.
color
=
new
THREE
.
Color
(
0xffffff
);
// diffuse
this
.
roughness
=
0.5
;
...
...
@@ -124,10 +124,10 @@ THREE.MeshStandardMaterial = function ( parameters ) {
};
THREE
.
Mesh
Standard
Material
.
prototype
=
Object
.
create
(
THREE
.
Material
.
prototype
);
THREE
.
Mesh
StandardMaterial
.
prototype
.
constructor
=
THREE
.
MeshStandard
Material
;
THREE
.
Mesh
Physical
Material
.
prototype
=
Object
.
create
(
THREE
.
Material
.
prototype
);
THREE
.
Mesh
PhysicalMaterial
.
prototype
.
constructor
=
THREE
.
MeshPhysical
Material
;
THREE
.
Mesh
Standard
Material
.
prototype
.
copy
=
function
(
source
)
{
THREE
.
Mesh
Physical
Material
.
prototype
.
copy
=
function
(
source
)
{
THREE
.
Material
.
prototype
.
copy
.
call
(
this
,
source
);
...
...
src/renderers/WebGLRenderer.js
浏览文件 @
91d6c8d1
...
...
@@ -637,7 +637,7 @@ THREE.WebGLRenderer = function ( parameters ) {
_gl
.
bindBuffer
(
_gl
.
ARRAY_BUFFER
,
buffers
.
normal
);
if
(
material
.
type
!==
'
MeshPhongMaterial
'
&&
material
.
type
!==
'
Mesh
Standard
Material
'
&&
material
.
shading
===
THREE
.
FlatShading
)
{
if
(
material
.
type
!==
'
MeshPhongMaterial
'
&&
material
.
type
!==
'
Mesh
Physical
Material
'
&&
material
.
shading
===
THREE
.
FlatShading
)
{
for
(
var
i
=
0
,
l
=
object
.
count
*
3
;
i
<
l
;
i
+=
9
)
{
...
...
@@ -1573,7 +1573,7 @@ THREE.WebGLRenderer = function ( parameters ) {
if
(
material
instanceof
THREE
.
ShaderMaterial
||
material
instanceof
THREE
.
MeshPhongMaterial
||
material
instanceof
THREE
.
Mesh
Standard
Material
||
material
instanceof
THREE
.
Mesh
Physical
Material
||
material
.
envMap
)
{
if
(
p_uniforms
.
cameraPosition
!==
undefined
)
{
...
...
@@ -1588,7 +1588,7 @@ THREE.WebGLRenderer = function ( parameters ) {
if
(
material
instanceof
THREE
.
MeshPhongMaterial
||
material
instanceof
THREE
.
MeshLambertMaterial
||
material
instanceof
THREE
.
MeshBasicMaterial
||
material
instanceof
THREE
.
Mesh
Standard
Material
||
material
instanceof
THREE
.
Mesh
Physical
Material
||
material
instanceof
THREE
.
ShaderMaterial
||
material
.
skinning
)
{
...
...
@@ -1667,7 +1667,7 @@ THREE.WebGLRenderer = function ( parameters ) {
if
(
material
instanceof
THREE
.
MeshPhongMaterial
||
material
instanceof
THREE
.
MeshLambertMaterial
||
material
instanceof
THREE
.
Mesh
Standard
Material
||
material
instanceof
THREE
.
Mesh
Physical
Material
||
material
.
lights
)
{
if
(
_lightsNeedUpdate
)
{
...
...
@@ -1694,7 +1694,7 @@ THREE.WebGLRenderer = function ( parameters ) {
if
(
material
instanceof
THREE
.
MeshBasicMaterial
||
material
instanceof
THREE
.
MeshLambertMaterial
||
material
instanceof
THREE
.
MeshPhongMaterial
||
material
instanceof
THREE
.
Mesh
Standard
Material
)
{
material
instanceof
THREE
.
Mesh
Physical
Material
)
{
refreshUniformsCommon
(
m_uniforms
,
material
);
...
...
@@ -1719,7 +1719,7 @@ THREE.WebGLRenderer = function ( parameters ) {
refreshUniformsPhong
(
m_uniforms
,
material
);
}
else
if
(
material
instanceof
THREE
.
Mesh
Standard
Material
)
{
}
else
if
(
material
instanceof
THREE
.
Mesh
Physical
Material
)
{
refreshUniformsStandard
(
m_uniforms
,
material
);
...
...
src/renderers/shaders/ShaderChunk/envmap_pars_fragment.glsl
浏览文件 @
91d6c8d1
...
...
@@ -8,7 +8,7 @@
#endif
uniform
float
flipEnvMap
;
#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined(
STANDARD
)
#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined(
PHYSICAL
)
uniform
float
refractionRatio
;
...
...
src/renderers/shaders/ShaderChunk/envmap_pars_vertex.glsl
浏览文件 @
91d6c8d1
#if defined( USE_ENVMAP ) && ! defined( USE_BUMPMAP ) && ! defined( USE_NORMALMAP ) && ! defined( PHONG ) && ! defined(
STANDARD
)
#if defined( USE_ENVMAP ) && ! defined( USE_BUMPMAP ) && ! defined( USE_NORMALMAP ) && ! defined( PHONG ) && ! defined(
PHYSICAL
)
varying
vec3
vReflect
;
...
...
src/renderers/shaders/ShaderChunk/envmap_
standard
_fragment.glsl
→
src/renderers/shaders/ShaderChunk/envmap_
physical
_fragment.glsl
浏览文件 @
91d6c8d1
文件已移动
src/renderers/shaders/ShaderChunk/envmap_vertex.glsl
浏览文件 @
91d6c8d1
#if defined( USE_ENVMAP ) && ! defined( USE_BUMPMAP ) && ! defined( USE_NORMALMAP ) && ! defined( PHONG ) && ! defined(
STANDARD
)
#if defined( USE_ENVMAP ) && ! defined( USE_BUMPMAP ) && ! defined( USE_NORMALMAP ) && ! defined( PHONG ) && ! defined(
PHYSICAL
)
vec3
cameraToVertex
=
normalize
(
worldPosition
.
xyz
-
cameraPosition
);
...
...
src/renderers/shaders/ShaderChunk/lights_
standard
_fragment.glsl
→
src/renderers/shaders/ShaderChunk/lights_
physical
_fragment.glsl
浏览文件 @
91d6c8d1
文件已移动
src/renderers/shaders/ShaderChunk/worldpos_vertex.glsl
浏览文件 @
91d6c8d1
#if defined( USE_ENVMAP ) || defined( PHONG ) || defined(
STANDARD
) || defined( LAMBERT ) || defined ( USE_SHADOWMAP )
#if defined( USE_ENVMAP ) || defined( PHONG ) || defined(
PHYSICAL
) || defined( LAMBERT ) || defined ( USE_SHADOWMAP )
#ifdef USE_SKINNING
...
...
src/renderers/shaders/ShaderLib.js
浏览文件 @
91d6c8d1
...
...
@@ -409,7 +409,7 @@ THREE.ShaderLib = {
},
'
standard
'
:
{
'
physical
'
:
{
uniforms
:
THREE
.
UniformsUtils
.
merge
(
[
...
...
@@ -438,7 +438,7 @@ THREE.ShaderLib = {
vertexShader
:
[
"
#define
STANDARD
"
,
"
#define
PHYSICAL
"
,
"
varying vec3 vViewPosition;
"
,
...
...
@@ -461,7 +461,7 @@ THREE.ShaderLib = {
THREE
.
ShaderChunk
[
"
specularmap_pars_fragment
"
],
THREE
.
ShaderChunk
[
"
logdepthbuf_pars_vertex
"
],
"
void main() {
"
,
//
STANDARD
"
void main() {
"
,
//
PHYSICAL
THREE
.
ShaderChunk
[
"
uv_vertex
"
],
THREE
.
ShaderChunk
[
"
uv2_vertex
"
],
...
...
@@ -499,7 +499,7 @@ THREE.ShaderLib = {
fragmentShader
:
[
"
#define
STANDARD
"
,
"
#define
PHYSICAL
"
,
"
uniform vec3 diffuse;
"
,
"
uniform vec3 emissive;
"
,
...
...
@@ -552,7 +552,7 @@ THREE.ShaderLib = {
THREE
.
ShaderChunk
[
"
aomap_fragment
"
],
THREE
.
ShaderChunk
[
"
emissivemap_fragment
"
],
THREE
.
ShaderChunk
[
"
lights_
standard
_fragment
"
],
THREE
.
ShaderChunk
[
"
lights_
physical
_fragment
"
],
THREE
.
ShaderChunk
[
"
shadowmap_fragment
"
],
"
totalDiffuseLight *= shadowMask;
"
,
...
...
@@ -560,7 +560,7 @@ THREE.ShaderLib = {
"
outgoingLight += diffuseColor.rgb * ( totalDiffuseLight + totalAmbientLight ) + totalSpecularLight + totalEmissiveLight;
"
,
THREE
.
ShaderChunk
[
"
envmap_
standard
_fragment
"
],
THREE
.
ShaderChunk
[
"
envmap_
physical
_fragment
"
],
THREE
.
ShaderChunk
[
"
linear_to_gamma_fragment
"
],
...
...
src/renderers/webgl/WebGLPrograms.js
浏览文件 @
91d6c8d1
...
...
@@ -8,7 +8,7 @@ THREE.WebGLPrograms = function ( renderer, capabilities ) {
MeshBasicMaterial
:
'
basic
'
,
MeshLambertMaterial
:
'
lambert
'
,
MeshPhongMaterial
:
'
phong
'
,
Mesh
StandardMaterial
:
'
standard
'
,
Mesh
PhysicalMaterial
:
'
physical
'
,
LineBasicMaterial
:
'
basic
'
,
LineDashedMaterial
:
'
dashed
'
,
PointsMaterial
:
'
points
'
...
...
utils/build/includes/common.json
浏览文件 @
91d6c8d1
...
...
@@ -66,7 +66,7 @@
"src/loaders/MaterialLoader.js"
,
"src/loaders/ObjectLoader.js"
,
"src/loaders/TextureLoader.js"
,
"src/loaders/CubeTextureLoader.js"
,
"src/loaders/CubeTextureLoader.js"
,
"src/loaders/BinaryTextureLoader.js"
,
"src/loaders/CompressedTextureLoader.js"
,
"src/materials/Material.js"
,
...
...
@@ -75,7 +75,7 @@
"src/materials/MeshBasicMaterial.js"
,
"src/materials/MeshLambertMaterial.js"
,
"src/materials/MeshPhongMaterial.js"
,
"src/materials/Mesh
Standard
Material.js"
,
"src/materials/Mesh
Physical
Material.js"
,
"src/materials/MeshDepthMaterial.js"
,
"src/materials/MeshNormalMaterial.js"
,
"src/materials/MultiMaterial.js"
,
...
...
@@ -125,7 +125,7 @@
"src/renderers/shaders/ShaderChunk/envmap_fragment.glsl"
,
"src/renderers/shaders/ShaderChunk/envmap_pars_fragment.glsl"
,
"src/renderers/shaders/ShaderChunk/envmap_pars_vertex.glsl"
,
"src/renderers/shaders/ShaderChunk/envmap_
standard
_fragment.glsl"
,
"src/renderers/shaders/ShaderChunk/envmap_
physical
_fragment.glsl"
,
"src/renderers/shaders/ShaderChunk/envmap_vertex.glsl"
,
"src/renderers/shaders/ShaderChunk/fog_fragment.glsl"
,
"src/renderers/shaders/ShaderChunk/fog_pars_fragment.glsl"
,
...
...
@@ -138,7 +138,7 @@
"src/renderers/shaders/ShaderChunk/lights_phong_pars_fragment.glsl"
,
"src/renderers/shaders/ShaderChunk/lights_phong_pars_vertex.glsl"
,
"src/renderers/shaders/ShaderChunk/lights_phong_vertex.glsl"
,
"src/renderers/shaders/ShaderChunk/lights_
standard
_fragment.glsl"
,
"src/renderers/shaders/ShaderChunk/lights_
physical
_fragment.glsl"
,
"src/renderers/shaders/ShaderChunk/linear_to_gamma_fragment.glsl"
,
"src/renderers/shaders/ShaderChunk/logdepthbuf_fragment.glsl"
,
"src/renderers/shaders/ShaderChunk/logdepthbuf_pars_fragment.glsl"
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录