Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
6018f260
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,发现更多精彩内容 >>
提交
6018f260
编写于
8月 06, 2012
作者:
S
sole
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'upstream/dev' into dev
上级
0ff2a4ff
33a45179
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
17 addition
and
27 deletion
+17
-27
build/Three.js
build/Three.js
+1
-1
build/custom/ThreeCanvas.js
build/custom/ThreeCanvas.js
+1
-1
build/custom/ThreeWebGL.js
build/custom/ThreeWebGL.js
+1
-1
src/materials/Material.js
src/materials/Material.js
+14
-24
未找到文件。
build/Three.js
浏览文件 @
6018f260
...
...
@@ -190,7 +190,7 @@ x.parameters.map;a.enableDiffuse.value=true}if(x.parameters.lightMap){a.tAO.text
uniforms
:
a
,
lights
:
true
,
fog
:
true
})}
else
M
=
new
THREE
[
x
.
type
](
x
.
parameters
);
N
.
materials
[
m
]
=
M
}
e
(
N
.
scene
,
B
.
objects
);
i
.
callbackSync
(
N
);
h
()};
THREE
.
TextureLoader
=
function
(){
THREE
.
EventTarget
.
call
(
this
);
this
.
crossOrigin
=
null
};
THREE
.
TextureLoader
.
prototype
=
{
constructor
:
THREE
.
TextureLoader
,
load
:
function
(
a
){
var
b
=
this
,
c
=
new
Image
;
c
.
addEventListener
(
"
load
"
,
function
(){
var
a
=
new
THREE
.
Texture
(
c
);
a
.
needsUpdate
=
true
;
b
.
dispatchEvent
({
type
:
"
load
"
,
content
:
a
})},
false
);
c
.
addEventListener
(
"
error
"
,
function
(){
b
.
dispatchEvent
({
type
:
"
error
"
,
message
:
"
Couldn't load URL [
"
+
a
+
"
]
"
})},
false
);
if
(
b
.
crossOrigin
)
c
.
crossOrigin
=
b
.
crossOrigin
;
c
.
src
=
a
}};
THREE
.
Material
=
function
(){
this
.
id
=
THREE
.
MaterialCount
++
;
this
.
name
=
""
;
this
.
side
=
THREE
.
FrontSide
;
this
.
opacity
=
1
;
this
.
transparent
=
false
;
this
.
blending
=
THREE
.
NormalBlending
;
this
.
blendSrc
=
THREE
.
SrcAlphaFactor
;
this
.
blendDst
=
THREE
.
OneMinusSrcAlphaFactor
;
this
.
blendEquation
=
THREE
.
AddEquation
;
this
.
depthWrite
=
this
.
depthTest
=
true
;
this
.
polygonOffset
=
false
;
this
.
alphaTest
=
this
.
polygonOffsetUnits
=
this
.
polygonOffsetFactor
=
0
;
this
.
overdraw
=
false
;
this
.
needsUpdate
=
this
.
visible
=
true
};
THREE
.
Material
.
prototype
.
setValues
=
function
(
a
){
a
===
void
0
&&
(
a
=
{});
for
(
var
b
in
a
){
var
c
=
a
[
b
];
if
(
this
[
b
]
!==
void
0
)
switch
(
b
){
case
"
id
"
:
break
;
case
"
color
"
:
case
"
ambient
"
:
case
"
emissive
"
:
case
"
specular
"
:
c
instanceof
THREE
.
Color
?
this
[
b
].
copy
(
c
):
this
[
b
].
setHex
(
c
);
break
;
case
"
wrapRGB
"
:
this
[
b
].
copy
(
c
);
break
;
default
:
this
[
b
]
=
c
}
}};
THREE
.
Material
.
prototype
.
clone
=
function
(){
return
new
THREE
.
Material
(
this
)};
THREE
.
MaterialCount
=
0
;
THREE
.
Material
.
prototype
.
setValues
=
function
(
a
){
if
(
a
!==
void
0
)
for
(
var
b
in
a
)
if
(
!
(
b
===
"
id
"
||
b
===
"
setValues
"
||
b
===
"
clone
"
)){
var
c
=
a
[
b
];
this
[
b
]
!==
void
0
&&
(
this
[
b
]
instanceof
THREE
.
Color
?
c
instanceof
THREE
.
Color
?
this
[
b
].
copy
(
c
):
this
[
b
].
setHex
(
c
):
this
[
b
]
instanceof
THREE
.
Vector3
?
this
[
b
].
copy
(
c
):
this
[
b
]
=
c
)
}};
THREE
.
Material
.
prototype
.
clone
=
function
(){
return
new
THREE
.
Material
(
this
)};
THREE
.
MaterialCount
=
0
;
THREE
.
LineBasicMaterial
=
function
(
a
){
THREE
.
Material
.
call
(
this
);
this
.
color
=
new
THREE
.
Color
(
16777215
);
this
.
linewidth
=
1
;
this
.
linejoin
=
this
.
linecap
=
"
round
"
;
this
.
vertexColors
=
false
;
this
.
fog
=
true
;
this
.
setValues
(
a
)};
THREE
.
LineBasicMaterial
.
prototype
=
Object
.
create
(
THREE
.
Material
.
prototype
);
THREE
.
LineBasicMaterial
.
prototype
.
clone
=
function
(){
return
new
THREE
.
LineBasicMaterial
(
this
)};
THREE
.
MeshBasicMaterial
=
function
(
a
){
THREE
.
Material
.
call
(
this
);
this
.
color
=
new
THREE
.
Color
(
16777215
);
this
.
envMap
=
this
.
lightMap
=
this
.
map
=
null
;
this
.
combine
=
THREE
.
MultiplyOperation
;
this
.
reflectivity
=
1
;
this
.
refractionRatio
=
0.98
;
this
.
fog
=
true
;
this
.
shading
=
THREE
.
SmoothShading
;
this
.
wireframe
=
false
;
this
.
wireframeLinewidth
=
1
;
this
.
wireframeLinejoin
=
this
.
wireframeLinecap
=
"
round
"
;
this
.
vertexColors
=
THREE
.
NoColors
;
this
.
morphTargets
=
this
.
skinning
=
false
;
this
.
setValues
(
a
)};
THREE
.
MeshBasicMaterial
.
prototype
=
Object
.
create
(
THREE
.
Material
.
prototype
);
THREE
.
MeshBasicMaterial
.
prototype
.
clone
=
function
(){
return
new
THREE
.
MeshBasicMaterial
(
this
)};
...
...
build/custom/ThreeCanvas.js
浏览文件 @
6018f260
...
...
@@ -183,7 +183,7 @@ u.parameters.map;a.enableDiffuse.value=true}if(u.parameters.lightMap){a.tAO.text
uniforms
:
a
,
lights
:
true
,
fog
:
true
})}
else
K
=
new
THREE
[
u
.
type
](
u
.
parameters
);
z
.
materials
[
n
]
=
K
}
f
(
z
.
scene
,
t
.
objects
);
m
.
callbackSync
(
z
);
j
()};
THREE
.
TextureLoader
=
function
(){
THREE
.
EventTarget
.
call
(
this
);
this
.
crossOrigin
=
null
};
THREE
.
TextureLoader
.
prototype
=
{
constructor
:
THREE
.
TextureLoader
,
load
:
function
(
a
){
var
b
=
this
,
c
=
new
Image
;
c
.
addEventListener
(
"
load
"
,
function
(){
var
a
=
new
THREE
.
Texture
(
c
);
a
.
needsUpdate
=
true
;
b
.
dispatchEvent
({
type
:
"
load
"
,
content
:
a
})},
false
);
c
.
addEventListener
(
"
error
"
,
function
(){
b
.
dispatchEvent
({
type
:
"
error
"
,
message
:
"
Couldn't load URL [
"
+
a
+
"
]
"
})},
false
);
if
(
b
.
crossOrigin
)
c
.
crossOrigin
=
b
.
crossOrigin
;
c
.
src
=
a
}};
THREE
.
Material
=
function
(){
this
.
id
=
THREE
.
MaterialCount
++
;
this
.
name
=
""
;
this
.
side
=
THREE
.
FrontSide
;
this
.
opacity
=
1
;
this
.
transparent
=
false
;
this
.
blending
=
THREE
.
NormalBlending
;
this
.
blendSrc
=
THREE
.
SrcAlphaFactor
;
this
.
blendDst
=
THREE
.
OneMinusSrcAlphaFactor
;
this
.
blendEquation
=
THREE
.
AddEquation
;
this
.
depthWrite
=
this
.
depthTest
=
true
;
this
.
polygonOffset
=
false
;
this
.
alphaTest
=
this
.
polygonOffsetUnits
=
this
.
polygonOffsetFactor
=
0
;
this
.
overdraw
=
false
;
this
.
needsUpdate
=
this
.
visible
=
true
};
THREE
.
Material
.
prototype
.
setValues
=
function
(
a
){
a
===
void
0
&&
(
a
=
{});
for
(
var
b
in
a
){
var
c
=
a
[
b
];
if
(
this
[
b
]
!==
void
0
)
switch
(
b
){
case
"
id
"
:
break
;
case
"
color
"
:
case
"
ambient
"
:
case
"
emissive
"
:
case
"
specular
"
:
c
instanceof
THREE
.
Color
?
this
[
b
].
copy
(
c
):
this
[
b
].
setHex
(
c
);
break
;
case
"
wrapRGB
"
:
this
[
b
].
copy
(
c
);
break
;
default
:
this
[
b
]
=
c
}
}};
THREE
.
Material
.
prototype
.
clone
=
function
(){
return
new
THREE
.
Material
(
this
)};
THREE
.
MaterialCount
=
0
;
THREE
.
Material
.
prototype
.
setValues
=
function
(
a
){
if
(
a
!==
void
0
)
for
(
var
b
in
a
)
if
(
!
(
b
===
"
id
"
||
b
===
"
setValues
"
||
b
===
"
clone
"
)){
var
c
=
a
[
b
];
this
[
b
]
!==
void
0
&&
(
this
[
b
]
instanceof
THREE
.
Color
?
c
instanceof
THREE
.
Color
?
this
[
b
].
copy
(
c
):
this
[
b
].
setHex
(
c
):
this
[
b
]
instanceof
THREE
.
Vector3
?
this
[
b
].
copy
(
c
):
this
[
b
]
=
c
)
}};
THREE
.
Material
.
prototype
.
clone
=
function
(){
return
new
THREE
.
Material
(
this
)};
THREE
.
MaterialCount
=
0
;
THREE
.
LineBasicMaterial
=
function
(
a
){
THREE
.
Material
.
call
(
this
);
this
.
color
=
new
THREE
.
Color
(
16777215
);
this
.
linewidth
=
1
;
this
.
linejoin
=
this
.
linecap
=
"
round
"
;
this
.
vertexColors
=
false
;
this
.
fog
=
true
;
this
.
setValues
(
a
)};
THREE
.
LineBasicMaterial
.
prototype
=
Object
.
create
(
THREE
.
Material
.
prototype
);
THREE
.
LineBasicMaterial
.
prototype
.
clone
=
function
(){
return
new
THREE
.
LineBasicMaterial
(
this
)};
THREE
.
MeshBasicMaterial
=
function
(
a
){
THREE
.
Material
.
call
(
this
);
this
.
color
=
new
THREE
.
Color
(
16777215
);
this
.
envMap
=
this
.
lightMap
=
this
.
map
=
null
;
this
.
combine
=
THREE
.
MultiplyOperation
;
this
.
reflectivity
=
1
;
this
.
refractionRatio
=
0.98
;
this
.
fog
=
true
;
this
.
shading
=
THREE
.
SmoothShading
;
this
.
wireframe
=
false
;
this
.
wireframeLinewidth
=
1
;
this
.
wireframeLinejoin
=
this
.
wireframeLinecap
=
"
round
"
;
this
.
vertexColors
=
THREE
.
NoColors
;
this
.
morphTargets
=
this
.
skinning
=
false
;
this
.
setValues
(
a
)};
THREE
.
MeshBasicMaterial
.
prototype
=
Object
.
create
(
THREE
.
Material
.
prototype
);
THREE
.
MeshBasicMaterial
.
prototype
.
clone
=
function
(){
return
new
THREE
.
MeshBasicMaterial
(
this
)};
...
...
build/custom/ThreeWebGL.js
浏览文件 @
6018f260
...
...
@@ -189,7 +189,7 @@ if(x.parameters.map){a.tDiffuse.texture=x.parameters.map;a.enableDiffuse.value=t
vertexShader
:
r
.
vertexShader
,
uniforms
:
a
,
lights
:
true
,
fog
:
true
})}
else
U
=
new
THREE
[
x
.
type
](
x
.
parameters
);
N
.
materials
[
m
]
=
U
}
e
(
N
.
scene
,
z
.
objects
);
l
.
callbackSync
(
N
);
j
()};
THREE
.
TextureLoader
=
function
(){
THREE
.
EventTarget
.
call
(
this
);
this
.
crossOrigin
=
null
};
THREE
.
TextureLoader
.
prototype
=
{
constructor
:
THREE
.
TextureLoader
,
load
:
function
(
a
){
var
b
=
this
,
c
=
new
Image
;
c
.
addEventListener
(
"
load
"
,
function
(){
var
a
=
new
THREE
.
Texture
(
c
);
a
.
needsUpdate
=
true
;
b
.
dispatchEvent
({
type
:
"
load
"
,
content
:
a
})},
false
);
c
.
addEventListener
(
"
error
"
,
function
(){
b
.
dispatchEvent
({
type
:
"
error
"
,
message
:
"
Couldn't load URL [
"
+
a
+
"
]
"
})},
false
);
if
(
b
.
crossOrigin
)
c
.
crossOrigin
=
b
.
crossOrigin
;
c
.
src
=
a
}};
THREE
.
Material
=
function
(){
this
.
id
=
THREE
.
MaterialCount
++
;
this
.
name
=
""
;
this
.
side
=
THREE
.
FrontSide
;
this
.
opacity
=
1
;
this
.
transparent
=
false
;
this
.
blending
=
THREE
.
NormalBlending
;
this
.
blendSrc
=
THREE
.
SrcAlphaFactor
;
this
.
blendDst
=
THREE
.
OneMinusSrcAlphaFactor
;
this
.
blendEquation
=
THREE
.
AddEquation
;
this
.
depthWrite
=
this
.
depthTest
=
true
;
this
.
polygonOffset
=
false
;
this
.
alphaTest
=
this
.
polygonOffsetUnits
=
this
.
polygonOffsetFactor
=
0
;
this
.
overdraw
=
false
;
this
.
needsUpdate
=
this
.
visible
=
true
};
THREE
.
Material
.
prototype
.
setValues
=
function
(
a
){
a
===
void
0
&&
(
a
=
{});
for
(
var
b
in
a
){
var
c
=
a
[
b
];
if
(
this
[
b
]
!==
void
0
)
switch
(
b
){
case
"
id
"
:
break
;
case
"
color
"
:
case
"
ambient
"
:
case
"
emissive
"
:
case
"
specular
"
:
c
instanceof
THREE
.
Color
?
this
[
b
].
copy
(
c
):
this
[
b
].
setHex
(
c
);
break
;
case
"
wrapRGB
"
:
this
[
b
].
copy
(
c
);
break
;
default
:
this
[
b
]
=
c
}
}};
THREE
.
Material
.
prototype
.
clone
=
function
(){
return
new
THREE
.
Material
(
this
)};
THREE
.
MaterialCount
=
0
;
THREE
.
Material
.
prototype
.
setValues
=
function
(
a
){
if
(
a
!==
void
0
)
for
(
var
b
in
a
)
if
(
!
(
b
===
"
id
"
||
b
===
"
setValues
"
||
b
===
"
clone
"
)){
var
c
=
a
[
b
];
this
[
b
]
!==
void
0
&&
(
this
[
b
]
instanceof
THREE
.
Color
?
c
instanceof
THREE
.
Color
?
this
[
b
].
copy
(
c
):
this
[
b
].
setHex
(
c
):
this
[
b
]
instanceof
THREE
.
Vector3
?
this
[
b
].
copy
(
c
):
this
[
b
]
=
c
)
}};
THREE
.
Material
.
prototype
.
clone
=
function
(){
return
new
THREE
.
Material
(
this
)};
THREE
.
MaterialCount
=
0
;
THREE
.
LineBasicMaterial
=
function
(
a
){
THREE
.
Material
.
call
(
this
);
this
.
color
=
new
THREE
.
Color
(
16777215
);
this
.
linewidth
=
1
;
this
.
linejoin
=
this
.
linecap
=
"
round
"
;
this
.
vertexColors
=
false
;
this
.
fog
=
true
;
this
.
setValues
(
a
)};
THREE
.
LineBasicMaterial
.
prototype
=
Object
.
create
(
THREE
.
Material
.
prototype
);
THREE
.
LineBasicMaterial
.
prototype
.
clone
=
function
(){
return
new
THREE
.
LineBasicMaterial
(
this
)};
THREE
.
MeshBasicMaterial
=
function
(
a
){
THREE
.
Material
.
call
(
this
);
this
.
color
=
new
THREE
.
Color
(
16777215
);
this
.
envMap
=
this
.
lightMap
=
this
.
map
=
null
;
this
.
combine
=
THREE
.
MultiplyOperation
;
this
.
reflectivity
=
1
;
this
.
refractionRatio
=
0.98
;
this
.
fog
=
true
;
this
.
shading
=
THREE
.
SmoothShading
;
this
.
wireframe
=
false
;
this
.
wireframeLinewidth
=
1
;
this
.
wireframeLinejoin
=
this
.
wireframeLinecap
=
"
round
"
;
this
.
vertexColors
=
THREE
.
NoColors
;
this
.
morphTargets
=
this
.
skinning
=
false
;
this
.
setValues
(
a
)};
THREE
.
MeshBasicMaterial
.
prototype
=
Object
.
create
(
THREE
.
Material
.
prototype
);
THREE
.
MeshBasicMaterial
.
prototype
.
clone
=
function
(){
return
new
THREE
.
MeshBasicMaterial
(
this
)};
...
...
src/materials/Material.js
浏览文件 @
6018f260
...
...
@@ -43,41 +43,31 @@ THREE.Material.prototype.setValues = function ( values ) {
for
(
var
key
in
values
)
{
if
(
key
===
'
id
'
||
key
===
'
setValues
'
||
key
===
'
clone
'
)
continue
;
var
value
=
values
[
key
];
if
(
this
[
key
]
!==
undefined
)
{
switch
(
key
)
{
case
"
id
"
:
break
;
case
"
color
"
:
case
"
ambient
"
:
case
"
emissive
"
:
case
"
specular
"
:
if
(
value
instanceof
THREE
.
Color
)
{
this
[
key
].
copy
(
value
);
if
(
this
[
key
]
instanceof
THREE
.
Color
)
{
if
(
value
instanceof
THREE
.
Color
)
{
}
else
{
this
[
key
].
setHex
(
value
);
}
this
[
key
].
copy
(
value
);
break
;
}
else
{
case
"
wrapRGB
"
:
this
[
key
].
setHex
(
value
);
this
[
key
].
copy
(
value
);
}
}
else
if
(
this
[
key
]
instanceof
THREE
.
Vector3
)
{
break
;
this
[
key
].
copy
(
value
)
;
default
:
}
else
{
this
[
key
]
=
value
;
this
[
key
]
=
value
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录