Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
802e589c
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,体验更适合开发者的 AI 搜索 >>
提交
802e589c
编写于
7月 17, 2015
作者:
D
dubejf
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
CloneProperties renamed _copyFrom, swap src / dest arg order
上级
faa8745f
变更
51
隐藏空白更改
内联
并排
Showing
51 changed file
with
217 addition
and
220 deletion
+217
-220
examples/js/renderers/CanvasRenderer.js
examples/js/renderers/CanvasRenderer.js
+1
-1
examples/js/wip/ProxyGeometry.js
examples/js/wip/ProxyGeometry.js
+1
-1
src/cameras/Camera.js
src/cameras/Camera.js
+6
-6
src/cameras/OrthographicCamera.js
src/cameras/OrthographicCamera.js
+1
-1
src/cameras/PerspectiveCamera.js
src/cameras/PerspectiveCamera.js
+1
-1
src/core/BufferGeometry.js
src/core/BufferGeometry.js
+9
-9
src/core/Geometry.js
src/core/Geometry.js
+15
-15
src/core/Object3D.js
src/core/Object3D.js
+22
-22
src/extras/geometries/CircleBufferGeometry.js
src/extras/geometries/CircleBufferGeometry.js
+1
-1
src/extras/geometries/DodecahedronGeometry.js
src/extras/geometries/DodecahedronGeometry.js
+1
-1
src/extras/geometries/IcosahedronGeometry.js
src/extras/geometries/IcosahedronGeometry.js
+1
-1
src/extras/geometries/OctahedronGeometry.js
src/extras/geometries/OctahedronGeometry.js
+1
-1
src/extras/geometries/PlaneBufferGeometry.js
src/extras/geometries/PlaneBufferGeometry.js
+1
-1
src/extras/geometries/PolyhedronGeometry.js
src/extras/geometries/PolyhedronGeometry.js
+5
-5
src/extras/geometries/SphereBufferGeometry.js
src/extras/geometries/SphereBufferGeometry.js
+1
-1
src/extras/geometries/TetrahedronGeometry.js
src/extras/geometries/TetrahedronGeometry.js
+1
-1
src/lights/AmbientLight.js
src/lights/AmbientLight.js
+1
-1
src/lights/AreaLight.js
src/lights/AreaLight.js
+2
-2
src/lights/DirectionalLight.js
src/lights/DirectionalLight.js
+1
-1
src/lights/HemisphereLight.js
src/lights/HemisphereLight.js
+1
-1
src/lights/Light.js
src/lights/Light.js
+5
-5
src/lights/PointLight.js
src/lights/PointLight.js
+1
-1
src/lights/SpotLight.js
src/lights/SpotLight.js
+1
-1
src/materials/LineBasicMaterial.js
src/materials/LineBasicMaterial.js
+1
-1
src/materials/LineDashedMaterial.js
src/materials/LineDashedMaterial.js
+1
-1
src/materials/Material.js
src/materials/Material.js
+23
-23
src/materials/MeshBasicMaterial.js
src/materials/MeshBasicMaterial.js
+1
-1
src/materials/MeshDepthMaterial.js
src/materials/MeshDepthMaterial.js
+1
-1
src/materials/MeshLambertMaterial.js
src/materials/MeshLambertMaterial.js
+1
-1
src/materials/MeshNormalMaterial.js
src/materials/MeshNormalMaterial.js
+1
-1
src/materials/MeshPhongMaterial.js
src/materials/MeshPhongMaterial.js
+1
-1
src/materials/PointCloudMaterial.js
src/materials/PointCloudMaterial.js
+1
-1
src/materials/RawShaderMaterial.js
src/materials/RawShaderMaterial.js
+1
-1
src/materials/ShaderMaterial.js
src/materials/ShaderMaterial.js
+18
-18
src/materials/SpriteMaterial.js
src/materials/SpriteMaterial.js
+1
-1
src/objects/Bone.js
src/objects/Bone.js
+5
-5
src/objects/Group.js
src/objects/Group.js
+4
-4
src/objects/LOD.js
src/objects/LOD.js
+6
-6
src/objects/LensFlare.js
src/objects/LensFlare.js
+9
-9
src/objects/Line.js
src/objects/Line.js
+4
-4
src/objects/LineSegments.js
src/objects/LineSegments.js
+1
-1
src/objects/Mesh.js
src/objects/Mesh.js
+4
-5
src/objects/MorphAnimMesh.js
src/objects/MorphAnimMesh.js
+11
-11
src/objects/PointCloud.js
src/objects/PointCloud.js
+4
-4
src/objects/SkinnedMesh.js
src/objects/SkinnedMesh.js
+4
-4
src/objects/Sprite.js
src/objects/Sprite.js
+4
-4
src/scenes/Scene.js
src/scenes/Scene.js
+8
-10
src/textures/CompressedTexture.js
src/textures/CompressedTexture.js
+1
-1
src/textures/CubeTexture.js
src/textures/CubeTexture.js
+1
-1
src/textures/DataTexture.js
src/textures/DataTexture.js
+1
-1
src/textures/Texture.js
src/textures/Texture.js
+19
-19
未找到文件。
examples/js/renderers/CanvasRenderer.js
浏览文件 @
802e589c
...
...
@@ -22,7 +22,7 @@ THREE.SpriteCanvasMaterial.prototype.clone = function () {
var
material
=
new
THREE
.
SpriteCanvasMaterial
();
THREE
.
Material
.
prototype
.
cloneProperties
.
call
(
this
,
material
);
THREE
.
Material
.
prototype
.
_copyFrom
.
call
(
material
,
this
);
material
.
color
.
copy
(
this
.
color
);
material
.
program
=
this
.
program
;
...
...
examples/js/wip/ProxyGeometry.js
浏览文件 @
802e589c
...
...
@@ -741,7 +741,7 @@ THREE.ProxyGeometry.prototype.computeBoundingBox = function () {
};
THREE
.
ProxyGeometry
.
prototype
.
clone
=
function
()
{
var
buff
=
THREE
.
BufferGeometry
.
prototype
.
clone
Properties
.
call
(
this
);
var
buff
=
THREE
.
BufferGeometry
.
prototype
.
clone
.
call
(
this
);
var
geo
=
new
THREE
.
ProxyGeometry
();
geo
.
attributes
=
buff
.
attributes
;
geo
.
offsets
=
buff
.
drawcalls
;
...
...
src/cameras/Camera.js
浏览文件 @
802e589c
...
...
@@ -53,17 +53,17 @@ THREE.Camera.prototype.lookAt = function () {
THREE
.
Camera
.
prototype
.
clone
=
function
()
{
var
camera
=
new
THREE
.
Camera
();
return
this
.
cloneProperties
(
camera
);
return
camera
.
_copyFrom
(
this
);
};
THREE
.
Camera
.
prototype
.
cloneProperties
=
function
(
camera
)
{
THREE
.
Camera
.
prototype
.
_copyFrom
=
function
(
source
)
{
THREE
.
Object3D
.
prototype
.
cloneProperties
.
call
(
this
,
camera
);
THREE
.
Object3D
.
prototype
.
_copyFrom
.
call
(
this
,
source
);
camera
.
matrixWorldInverse
.
copy
(
this
.
matrixWorldInverse
);
camera
.
projectionMatrix
.
copy
(
this
.
projectionMatrix
);
this
.
matrixWorldInverse
.
copy
(
source
.
matrixWorldInverse
);
this
.
projectionMatrix
.
copy
(
source
.
projectionMatrix
);
return
camera
;
return
this
;
};
src/cameras/OrthographicCamera.js
浏览文件 @
802e589c
...
...
@@ -40,7 +40,7 @@ THREE.OrthographicCamera.prototype.clone = function () {
var
camera
=
new
THREE
.
OrthographicCamera
();
THREE
.
Camera
.
prototype
.
cloneProperties
.
call
(
this
,
camera
);
THREE
.
Camera
.
prototype
.
_copyFrom
.
call
(
camera
,
this
);
camera
.
zoom
=
this
.
zoom
;
...
...
src/cameras/PerspectiveCamera.js
浏览文件 @
802e589c
...
...
@@ -126,7 +126,7 @@ THREE.PerspectiveCamera.prototype.clone = function () {
var
camera
=
new
THREE
.
PerspectiveCamera
();
THREE
.
Camera
.
prototype
.
cloneProperties
.
call
(
this
,
camera
);
THREE
.
Camera
.
prototype
.
_copyFrom
.
call
(
camera
,
this
);
camera
.
zoom
=
this
.
zoom
;
...
...
src/core/BufferGeometry.js
浏览文件 @
802e589c
...
...
@@ -1108,28 +1108,28 @@ THREE.BufferGeometry.prototype = {
clone
:
function
()
{
var
geometry
=
new
THREE
.
BufferGeometry
();
return
this
.
cloneProperties
(
geometry
);
return
geometry
.
_copyFrom
(
this
);
},
cloneProperties
:
function
(
geometry
)
{
_copyFrom
:
function
(
source
)
{
for
(
var
attr
in
this
.
attributes
)
{
for
(
var
attr
in
source
.
attributes
)
{
var
sourceAttr
=
this
.
attributes
[
attr
];
geometry
.
addAttribute
(
attr
,
sourceAttr
.
clone
()
);
var
sourceAttr
=
source
.
attributes
[
attr
];
this
.
addAttribute
(
attr
,
sourceAttr
.
clone
()
);
}
for
(
var
i
=
0
,
il
=
this
.
drawcalls
.
length
;
i
<
il
;
i
++
)
{
for
(
var
i
=
0
,
il
=
source
.
drawcalls
.
length
;
i
<
il
;
i
++
)
{
var
offset
=
this
.
drawcalls
[
i
];
var
offset
=
source
.
drawcalls
[
i
];
geometry
.
addDrawCall
(
offset
.
start
,
offset
.
count
,
offset
.
index
);
this
.
addDrawCall
(
offset
.
start
,
offset
.
count
,
offset
.
index
);
}
return
geometry
;
return
this
;
},
...
...
src/core/Geometry.js
浏览文件 @
802e589c
...
...
@@ -1049,39 +1049,39 @@ THREE.Geometry.prototype = {
clone
:
function
()
{
var
geometry
=
new
THREE
.
Geometry
();
return
this
.
cloneProperties
(
geometry
);
return
geometry
.
_copyFrom
(
this
);
},
cloneProperties
:
function
(
geometry
)
{
_copyFrom
:
function
(
source
)
{
geometry
.
vertices
=
[];
geometry
.
faces
=
[];
geometry
.
faceVertexUvs
=
[
[]
];
this
.
vertices
=
[];
this
.
faces
=
[];
this
.
faceVertexUvs
=
[
[]
];
var
vertices
=
this
.
vertices
;
var
vertices
=
source
.
vertices
;
for
(
var
i
=
0
,
il
=
vertices
.
length
;
i
<
il
;
i
++
)
{
geometry
.
vertices
.
push
(
vertices
[
i
].
clone
()
);
this
.
vertices
.
push
(
vertices
[
i
].
clone
()
);
}
var
faces
=
this
.
faces
;
var
faces
=
source
.
faces
;
for
(
var
i
=
0
,
il
=
faces
.
length
;
i
<
il
;
i
++
)
{
geometry
.
faces
.
push
(
faces
[
i
].
clone
()
);
this
.
faces
.
push
(
faces
[
i
].
clone
()
);
}
for
(
var
i
=
0
,
il
=
this
.
faceVertexUvs
.
length
;
i
<
il
;
i
++
)
{
for
(
var
i
=
0
,
il
=
source
.
faceVertexUvs
.
length
;
i
<
il
;
i
++
)
{
var
faceVertexUvs
=
this
.
faceVertexUvs
[
i
];
var
faceVertexUvs
=
source
.
faceVertexUvs
[
i
];
if
(
geometry
.
faceVertexUvs
[
i
]
===
undefined
)
{
if
(
this
.
faceVertexUvs
[
i
]
===
undefined
)
{
geometry
.
faceVertexUvs
[
i
]
=
[];
this
.
faceVertexUvs
[
i
]
=
[];
}
...
...
@@ -1097,13 +1097,13 @@ THREE.Geometry.prototype = {
}
geometry
.
faceVertexUvs
[
i
].
push
(
uvsCopy
);
this
.
faceVertexUvs
[
i
].
push
(
uvsCopy
);
}
}
return
geometry
;
return
this
;
},
...
...
src/core/Object3D.js
浏览文件 @
802e589c
...
...
@@ -662,52 +662,52 @@ THREE.Object3D.prototype = {
clone
:
function
(
recursive
)
{
var
object
=
new
THREE
.
Object3D
();
return
this
.
cloneProperties
(
object
,
recursive
);
return
object
.
_copyFrom
(
this
,
recursive
);
},
cloneProperties
:
function
(
object
,
recursive
)
{
_copyFrom
:
function
(
source
,
recursive
)
{
if
(
recursive
===
undefined
)
recursive
=
true
;
object
.
name
=
this
.
name
;
this
.
name
=
source
.
name
;
object
.
up
.
copy
(
this
.
up
);
this
.
up
.
copy
(
source
.
up
);
object
.
position
.
copy
(
this
.
position
);
object
.
quaternion
.
copy
(
this
.
quaternion
);
object
.
scale
.
copy
(
this
.
scale
);
this
.
position
.
copy
(
source
.
position
);
this
.
quaternion
.
copy
(
source
.
quaternion
);
this
.
scale
.
copy
(
source
.
scale
);
object
.
rotationAutoUpdate
=
this
.
rotationAutoUpdate
;
this
.
rotationAutoUpdate
=
source
.
rotationAutoUpdate
;
object
.
matrix
.
copy
(
this
.
matrix
);
object
.
matrixWorld
.
copy
(
this
.
matrixWorld
);
this
.
matrix
.
copy
(
source
.
matrix
);
this
.
matrixWorld
.
copy
(
source
.
matrixWorld
);
object
.
matrixAutoUpdate
=
this
.
matrixAutoUpdate
;
object
.
matrixWorldNeedsUpdate
=
this
.
matrixWorldNeedsUpdate
;
this
.
matrixAutoUpdate
=
source
.
matrixAutoUpdate
;
this
.
matrixWorldNeedsUpdate
=
source
.
matrixWorldNeedsUpdate
;
object
.
visible
=
this
.
visible
;
this
.
visible
=
source
.
visible
;
object
.
castShadow
=
this
.
castShadow
;
object
.
receiveShadow
=
this
.
receiveShadow
;
this
.
castShadow
=
source
.
castShadow
;
this
.
receiveShadow
=
source
.
receiveShadow
;
object
.
frustumCulled
=
this
.
frustumCulled
;
object
.
renderOrder
=
this
.
renderOrder
;
this
.
frustumCulled
=
source
.
frustumCulled
;
this
.
renderOrder
=
source
.
renderOrder
;
object
.
userData
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
userData
)
);
this
.
userData
=
JSON
.
parse
(
JSON
.
stringify
(
source
.
userData
)
);
if
(
recursive
===
true
)
{
for
(
var
i
=
0
;
i
<
this
.
children
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
source
.
children
.
length
;
i
++
)
{
var
child
=
this
.
children
[
i
];
object
.
add
(
child
.
clone
()
);
var
child
=
source
.
children
[
i
];
this
.
add
(
child
.
clone
()
);
}
}
return
object
;
return
this
;
}
...
...
src/extras/geometries/CircleBufferGeometry.js
浏览文件 @
802e589c
...
...
@@ -77,7 +77,7 @@ THREE.CircleBufferGeometry.prototype.clone = function () {
this
.
parameters
.
thetaLength
);
THREE
.
BufferGeometry
.
prototype
.
cloneProperties
.
call
(
this
,
geometry
);
THREE
.
BufferGeometry
.
prototype
.
_copyFrom
.
call
(
geometry
,
this
);
return
geometry
;
...
...
src/extras/geometries/DodecahedronGeometry.js
浏览文件 @
802e589c
...
...
@@ -64,7 +64,7 @@ THREE.DodecahedronGeometry.prototype.clone = function () {
this
.
parameters
.
detail
);
THREE
.
PolyhedronGeometry
.
prototype
.
cloneProperties
.
call
(
this
,
geometry
);
THREE
.
PolyhedronGeometry
.
prototype
.
_copyFrom
.
call
(
geometry
,
this
);
return
geometry
;
...
...
src/extras/geometries/IcosahedronGeometry.js
浏览文件 @
802e589c
...
...
@@ -39,7 +39,7 @@ THREE.IcosahedronGeometry.prototype.clone = function () {
this
.
parameters
.
detail
);
THREE
.
PolyhedronGeometry
.
prototype
.
cloneProperties
.
call
(
this
,
geometry
);
THREE
.
PolyhedronGeometry
.
prototype
.
_copyFrom
.
call
(
geometry
,
this
);
return
geometry
;
...
...
src/extras/geometries/OctahedronGeometry.js
浏览文件 @
802e589c
...
...
@@ -32,7 +32,7 @@ THREE.OctahedronGeometry.prototype.clone = function () {
this
.
parameters
.
detail
);
THREE
.
PolyhedronGeometry
.
prototype
.
cloneProperties
.
call
(
this
,
geometry
);
THREE
.
PolyhedronGeometry
.
prototype
.
_copyFrom
.
call
(
geometry
,
this
);
return
geometry
;
...
...
src/extras/geometries/PlaneBufferGeometry.js
浏览文件 @
802e589c
...
...
@@ -104,7 +104,7 @@ THREE.PlaneBufferGeometry.prototype.clone = function () {
this
.
parameters
.
heightSegments
);
THREE
.
BufferGeometry
.
prototype
.
cloneProperties
.
call
(
this
,
geometry
);
THREE
.
BufferGeometry
.
prototype
.
_copyFrom
.
call
(
geometry
,
this
);
return
geometry
;
...
...
src/extras/geometries/PolyhedronGeometry.js
浏览文件 @
802e589c
...
...
@@ -243,13 +243,13 @@ THREE.PolyhedronGeometry.prototype.clone = function () {
this
.
parameters
.
detail
);
return
this
.
cloneProperties
(
geometry
);
return
geometry
.
_copyFrom
(
this
);
};
THREE
.
PolyhedronGeometry
.
prototype
.
cloneProperties
=
function
(
geometry
)
{
THREE
.
PolyhedronGeometry
.
prototype
.
_copyFrom
=
function
(
source
)
{
THREE
.
Geometry
.
prototype
.
cloneProperties
.
call
(
this
,
geometry
);
return
geometry
;
THREE
.
Geometry
.
prototype
.
_copyFrom
.
call
(
this
,
source
);
return
this
;
};
\ No newline at end of file
};
src/extras/geometries/SphereBufferGeometry.js
浏览文件 @
802e589c
...
...
@@ -112,7 +112,7 @@ THREE.SphereBufferGeometry.prototype.clone = function () {
this
.
parameters
.
thetaLength
);
THREE
.
BufferGeometry
.
prototype
.
cloneProperties
.
call
(
this
,
geometry
);
THREE
.
BufferGeometry
.
prototype
.
_copyFrom
.
call
(
geometry
,
this
);
return
geometry
;
...
...
src/extras/geometries/TetrahedronGeometry.js
浏览文件 @
802e589c
...
...
@@ -33,7 +33,7 @@ THREE.TetrahedronGeometry.prototype.clone = function () {
this
.
parameters
.
detail
);
THREE
.
PolyhedronGeometry
.
prototype
.
cloneProperties
.
call
(
this
,
geometry
);
THREE
.
PolyhedronGeometry
.
prototype
.
_copyFrom
.
call
(
geometry
,
this
);
return
geometry
;
...
...
src/lights/AmbientLight.js
浏览文件 @
802e589c
...
...
@@ -17,7 +17,7 @@ THREE.AmbientLight.prototype.clone = function () {
var
light
=
new
THREE
.
AmbientLight
();
THREE
.
Light
.
prototype
.
cloneProperties
.
call
(
this
,
light
);
THREE
.
Light
.
prototype
.
_copyFrom
.
call
(
light
,
this
);
return
light
;
...
...
src/lights/AreaLight.js
浏览文件 @
802e589c
...
...
@@ -31,7 +31,7 @@ THREE.AreaLight.prototype.clone = function () {
var
light
=
new
THREE
.
AreaLight
();
THREE
.
Light
.
prototype
.
cloneProperties
.
call
(
this
,
light
);
THREE
.
Light
.
prototype
.
_copyFrom
.
call
(
light
,
this
);
light
.
normal
.
copy
(
this
.
normal
);
light
.
right
.
copy
(
this
.
right
);
...
...
@@ -40,7 +40,7 @@ THREE.AreaLight.prototype.clone = function () {
light
.
height
=
this
.
height
;
light
.
constantAttenuation
=
this
.
constantAttenuation
;
light
.
linearAttenuation
=
this
.
linearAttenuation
;
light
.
quadraticAttenuation
=
this
.
quadraticAttenuation
light
.
quadraticAttenuation
=
this
.
quadraticAttenuation
;
return
light
;
...
...
src/lights/DirectionalLight.js
浏览文件 @
802e589c
...
...
@@ -67,7 +67,7 @@ THREE.DirectionalLight.prototype.clone = function () {
var
light
=
new
THREE
.
DirectionalLight
();
THREE
.
Light
.
prototype
.
cloneProperties
.
call
(
this
,
light
);
THREE
.
Light
.
prototype
.
_copyFrom
.
call
(
light
,
this
);
light
.
target
=
this
.
target
.
clone
();
...
...
src/lights/HemisphereLight.js
浏览文件 @
802e589c
...
...
@@ -22,7 +22,7 @@ THREE.HemisphereLight.prototype.clone = function () {
var
light
=
new
THREE
.
HemisphereLight
();
THREE
.
Light
.
prototype
.
cloneProperties
.
call
(
this
,
light
);
THREE
.
Light
.
prototype
.
_copyFrom
.
call
(
light
,
this
);
light
.
groundColor
.
copy
(
this
.
groundColor
);
light
.
intensity
=
this
.
intensity
;
...
...
src/lights/Light.js
浏览文件 @
802e589c
...
...
@@ -19,15 +19,15 @@ THREE.Light.prototype.constructor = THREE.Light;
THREE
.
Light
.
prototype
.
clone
=
function
()
{
var
light
=
new
THREE
.
Light
();
return
this
.
cloneProperties
(
light
);
return
light
.
_copyFrom
(
this
);
};
THREE
.
Light
.
prototype
.
cloneProperties
=
function
(
light
)
{
THREE
.
Light
.
prototype
.
_copyFrom
=
function
(
source
)
{
THREE
.
Object3D
.
prototype
.
cloneProperties
.
call
(
this
,
light
);
light
.
color
.
copy
(
this
.
color
);
THREE
.
Object3D
.
prototype
.
_copyFrom
.
call
(
this
,
source
);
this
.
color
.
copy
(
source
.
color
);
return
light
;
return
this
;
};
src/lights/PointLight.js
浏览文件 @
802e589c
...
...
@@ -21,7 +21,7 @@ THREE.PointLight.prototype.clone = function () {
var
light
=
new
THREE
.
PointLight
();
THREE
.
Light
.
prototype
.
cloneProperties
.
call
(
this
,
light
);
THREE
.
Light
.
prototype
.
_copyFrom
.
call
(
light
,
this
);
light
.
intensity
=
this
.
intensity
;
light
.
distance
=
this
.
distance
;
...
...
src/lights/SpotLight.js
浏览文件 @
802e589c
...
...
@@ -50,7 +50,7 @@ THREE.SpotLight.prototype.clone = function () {
var
light
=
new
THREE
.
SpotLight
();
THREE
.
Light
.
prototype
.
cloneProperties
.
call
(
this
,
light
);
THREE
.
Light
.
prototype
.
_copyFrom
.
call
(
light
,
this
);
light
.
target
=
this
.
target
.
clone
();
...
...
src/materials/LineBasicMaterial.js
浏览文件 @
802e589c
...
...
@@ -47,7 +47,7 @@ THREE.LineBasicMaterial.prototype.clone = function () {
var
material
=
new
THREE
.
LineBasicMaterial
();
THREE
.
Material
.
prototype
.
cloneProperties
.
call
(
this
,
material
);
THREE
.
Material
.
prototype
.
_copyFrom
.
call
(
material
,
this
);
material
.
color
.
copy
(
this
.
color
);
...
...
src/materials/LineDashedMaterial.js
浏览文件 @
802e589c
...
...
@@ -50,7 +50,7 @@ THREE.LineDashedMaterial.prototype.clone = function () {
var
material
=
new
THREE
.
LineDashedMaterial
();
THREE
.
Material
.
prototype
.
cloneProperties
.
call
(
this
,
material
);
THREE
.
Material
.
prototype
.
_copyFrom
.
call
(
material
,
this
);
material
.
color
.
copy
(
this
.
color
);
...
...
src/materials/Material.js
浏览文件 @
802e589c
...
...
@@ -164,43 +164,43 @@ THREE.Material.prototype = {
clone
:
function
()
{
var
material
=
new
THREE
.
Material
();
return
this
.
cloneProperties
(
material
);
return
material
.
_copyFrom
(
this
);
},
cloneProperties
:
function
(
material
)
{
_copyFrom
:
function
(
source
)
{
material
.
name
=
this
.
name
;
this
.
name
=
source
.
name
;
material
.
side
=
this
.
side
;
this
.
side
=
source
.
side
;
material
.
opacity
=
this
.
opacity
;
material
.
transparent
=
this
.
transparent
;
this
.
opacity
=
source
.
opacity
;
this
.
transparent
=
source
.
transparent
;
material
.
blending
=
this
.
blending
;
this
.
blending
=
source
.
blending
;
material
.
blendSrc
=
this
.
blendSrc
;
material
.
blendDst
=
this
.
blendDst
;
material
.
blendEquation
=
this
.
blendEquation
;
material
.
blendSrcAlpha
=
this
.
blendSrcAlpha
;
material
.
blendDstAlpha
=
this
.
blendDstAlpha
;
material
.
blendEquationAlpha
=
this
.
blendEquationAlpha
;
this
.
blendSrc
=
source
.
blendSrc
;
this
.
blendDst
=
source
.
blendDst
;
this
.
blendEquation
=
source
.
blendEquation
;
this
.
blendSrcAlpha
=
source
.
blendSrcAlpha
;
this
.
blendDstAlpha
=
source
.
blendDstAlpha
;
this
.
blendEquationAlpha
=
source
.
blendEquationAlpha
;
material
.
depthFunc
=
this
.
depthFunc
;
material
.
depthTest
=
this
.
depthTest
;
material
.
depthWrite
=
this
.
depthWrite
;
this
.
depthFunc
=
source
.
depthFunc
;
this
.
depthTest
=
source
.
depthTest
;
this
.
depthWrite
=
source
.
depthWrite
;
material
.
polygonOffset
=
this
.
polygonOffset
;
material
.
polygonOffsetFactor
=
this
.
polygonOffsetFactor
;
material
.
polygonOffsetUnits
=
this
.
polygonOffsetUnits
;
this
.
polygonOffset
=
source
.
polygonOffset
;
this
.
polygonOffsetFactor
=
source
.
polygonOffsetFactor
;
this
.
polygonOffsetUnits
=
source
.
polygonOffsetUnits
;
material
.
alphaTest
=
this
.
alphaTest
;
this
.
alphaTest
=
source
.
alphaTest
;
material
.
overdraw
=
this
.
overdraw
;
this
.
overdraw
=
source
.
overdraw
;
material
.
visible
=
this
.
visible
;
this
.
visible
=
source
.
visible
;
return
material
;
return
this
;
},
...
...
src/materials/MeshBasicMaterial.js
浏览文件 @
802e589c
...
...
@@ -83,7 +83,7 @@ THREE.MeshBasicMaterial.prototype.clone = function () {
var
material
=
new
THREE
.
MeshBasicMaterial
();
THREE
.
Material
.
prototype
.
cloneProperties
.
call
(
this
,
material
);
THREE
.
Material
.
prototype
.
_copyFrom
.
call
(
material
,
this
);
material
.
color
.
copy
(
this
.
color
);
...
...
src/materials/MeshDepthMaterial.js
浏览文件 @
802e589c
...
...
@@ -35,7 +35,7 @@ THREE.MeshDepthMaterial.prototype.clone = function () {
var
material
=
new
THREE
.
MeshDepthMaterial
();
THREE
.
Material
.
prototype
.
cloneProperties
.
call
(
this
,
material
);
THREE
.
Material
.
prototype
.
_copyFrom
.
call
(
material
,
this
);
material
.
wireframe
=
this
.
wireframe
;
material
.
wireframeLinewidth
=
this
.
wireframeLinewidth
;
...
...
src/materials/MeshLambertMaterial.js
浏览文件 @
802e589c
...
...
@@ -82,7 +82,7 @@ THREE.MeshLambertMaterial.prototype.clone = function () {
var
material
=
new
THREE
.
MeshLambertMaterial
();
THREE
.
Material
.
prototype
.
cloneProperties
.
call
(
this
,
material
);
THREE
.
Material
.
prototype
.
_copyFrom
.
call
(
material
,
this
);
material
.
color
.
copy
(
this
.
color
);
material
.
emissive
.
copy
(
this
.
emissive
);
...
...
src/materials/MeshNormalMaterial.js
浏览文件 @
802e589c
...
...
@@ -36,7 +36,7 @@ THREE.MeshNormalMaterial.prototype.clone = function () {
var
material
=
new
THREE
.
MeshNormalMaterial
();
THREE
.
Material
.
prototype
.
cloneProperties
.
call
(
this
,
material
);
THREE
.
Material
.
prototype
.
_copyFrom
.
call
(
material
,
this
);
material
.
wireframe
=
this
.
wireframe
;
material
.
wireframeLinewidth
=
this
.
wireframeLinewidth
;
...
...
src/materials/MeshPhongMaterial.js
浏览文件 @
802e589c
...
...
@@ -116,7 +116,7 @@ THREE.MeshPhongMaterial.prototype.clone = function () {
var
material
=
new
THREE
.
MeshPhongMaterial
();
THREE
.
Material
.
prototype
.
cloneProperties
.
call
(
this
,
material
);
THREE
.
Material
.
prototype
.
_copyFrom
.
call
(
material
,
this
);
material
.
color
.
copy
(
this
.
color
);
material
.
emissive
.
copy
(
this
.
emissive
);
...
...
src/materials/PointCloudMaterial.js
浏览文件 @
802e589c
...
...
@@ -48,7 +48,7 @@ THREE.PointCloudMaterial.prototype.clone = function () {
var
material
=
new
THREE
.
PointCloudMaterial
();
THREE
.
Material
.
prototype
.
cloneProperties
.
call
(
this
,
material
);
THREE
.
Material
.
prototype
.
_copyFrom
.
call
(
material
,
this
);
material
.
color
.
copy
(
this
.
color
);
...
...
src/materials/RawShaderMaterial.js
浏览文件 @
802e589c
...
...
@@ -17,7 +17,7 @@ THREE.RawShaderMaterial.prototype.clone = function () {
var
material
=
new
THREE
.
RawShaderMaterial
();
THREE
.
ShaderMaterial
.
prototype
.
cloneProperties
.
call
(
this
,
material
);
THREE
.
ShaderMaterial
.
prototype
.
_copyFrom
.
call
(
material
,
this
);
return
material
;
...
...
src/materials/ShaderMaterial.js
浏览文件 @
802e589c
...
...
@@ -92,39 +92,39 @@ THREE.ShaderMaterial.prototype.constructor = THREE.ShaderMaterial;
THREE
.
ShaderMaterial
.
prototype
.
clone
=
function
()
{
var
material
=
new
THREE
.
ShaderMaterial
();
return
this
.
clone
(
material
);
return
material
.
_copyFrom
(
this
);
};
THREE
.
ShaderMaterial
.
prototype
.
cloneProperties
=
function
(
material
)
{
THREE
.
ShaderMaterial
.
prototype
.
_copyFrom
=
function
(
source
)
{
THREE
.
Material
.
prototype
.
cloneProperties
.
call
(
this
,
material
);
THREE
.
Material
.
prototype
.
_copyFrom
.
call
(
this
,
source
);
material
.
fragmentShader
=
this
.
fragmentShader
;
material
.
vertexShader
=
this
.
vertexShader
;
this
.
fragmentShader
=
source
.
fragmentShader
;
this
.
vertexShader
=
source
.
vertexShader
;
material
.
uniforms
=
THREE
.
UniformsUtils
.
clone
(
this
.
uniforms
);
this
.
uniforms
=
THREE
.
UniformsUtils
.
clone
(
source
.
uniforms
);
material
.
attributes
=
this
.
attributes
;
material
.
defines
=
this
.
defines
;
this
.
attributes
=
source
.
attributes
;
this
.
defines
=
source
.
defines
;
material
.
shading
=
this
.
shading
;
this
.
shading
=
source
.
shading
;
material
.
wireframe
=
this
.
wireframe
;
material
.
wireframeLinewidth
=
this
.
wireframeLinewidth
;
this
.
wireframe
=
source
.
wireframe
;
this
.
wireframeLinewidth
=
source
.
wireframeLinewidth
;
material
.
fog
=
this
.
fog
;
this
.
fog
=
source
.
fog
;
material
.
lights
=
this
.
lights
;
this
.
lights
=
source
.
lights
;
material
.
vertexColors
=
this
.
vertexColors
;
this
.
vertexColors
=
source
.
vertexColors
;
material
.
skinning
=
this
.
skinning
;
this
.
skinning
=
source
.
skinning
;
material
.
morphTargets
=
this
.
morphTargets
;
material
.
morphNormals
=
this
.
morphNormals
;
this
.
morphTargets
=
source
.
morphTargets
;
this
.
morphNormals
=
source
.
morphNormals
;
return
material
;
return
this
;
};
...
...
src/materials/SpriteMaterial.js
浏览文件 @
802e589c
...
...
@@ -43,7 +43,7 @@ THREE.SpriteMaterial.prototype.clone = function () {
var
material
=
new
THREE
.
SpriteMaterial
();
THREE
.
Material
.
prototype
.
cloneProperties
.
call
(
this
,
material
);
THREE
.
Material
.
prototype
.
_copyFrom
.
call
(
material
,
this
);
material
.
color
.
copy
(
this
.
color
);
material
.
map
=
this
.
map
;
...
...
src/objects/Bone.js
浏览文件 @
802e589c
...
...
@@ -20,15 +20,15 @@ THREE.Bone.prototype.constructor = THREE.Bone;
THREE
.
Bone
.
prototype
.
clone
=
function
()
{
var
bone
=
new
THREE
.
Bone
(
this
.
skin
);
return
this
.
cloneProperties
(
bone
);
return
bone
.
_copyFrom
(
this
);
};
THREE
.
Bone
.
prototype
.
cloneProperties
=
function
(
bon
e
)
{
THREE
.
Bone
.
prototype
.
_copyFrom
=
function
(
sourc
e
)
{
THREE
.
Object3D
.
prototype
.
cloneProperties
.
call
(
this
,
bon
e
);
bone
.
skin
=
this
.
skin
;
THREE
.
Object3D
.
prototype
.
_copyFrom
.
call
(
this
,
sourc
e
);
this
.
skin
=
source
.
skin
;
return
bone
;
return
this
;
};
src/objects/Group.js
浏览文件 @
802e589c
...
...
@@ -16,13 +16,13 @@ THREE.Group.prototype.constructor = THREE.Group;
THREE
.
Group
.
prototype
.
clone
=
function
()
{
var
group
=
new
THREE
.
Group
();
return
this
.
cloneProperties
(
group
);
return
group
.
_copyFrom
(
this
);
};
THREE
.
Group
.
prototype
.
cloneProperties
=
function
(
group
)
{
THREE
.
Group
.
prototype
.
_copyFrom
=
function
(
source
)
{
THREE
.
Object3D
.
prototype
.
cloneProperties
.
call
(
this
,
group
);
return
group
;
THREE
.
Object3D
.
prototype
.
_copyFrom
.
call
(
this
,
source
);
return
this
;
};
src/objects/LOD.js
浏览文件 @
802e589c
...
...
@@ -133,25 +133,25 @@ THREE.LOD.prototype.update = function () {
THREE
.
LOD
.
prototype
.
clone
=
function
()
{
var
lod
=
new
THREE
.
LOD
();
return
this
.
cloneProperties
(
lod
);
return
lod
.
_copyFrom
(
this
);
};
THREE
.
LOD
.
prototype
.
cloneProperties
=
function
(
lod
)
{
THREE
.
LOD
.
prototype
.
_copyFrom
=
function
(
source
)
{
THREE
.
Object3D
.
prototype
.
cloneProperties
.
call
(
this
,
lod
,
false
);
THREE
.
Object3D
.
prototype
.
_copyFrom
.
call
(
this
,
source
,
false
);
var
levels
=
this
.
levels
;
var
levels
=
source
.
levels
;
for
(
var
i
=
0
,
l
=
levels
.
length
;
i
<
l
;
i
++
)
{
var
level
=
levels
[
i
];
lod
.
addLevel
(
level
.
object
.
clone
(),
level
.
distance
);
this
.
addLevel
(
level
.
object
.
clone
(),
level
.
distance
);
}
return
lod
;
return
this
;
};
src/objects/LensFlare.js
浏览文件 @
802e589c
...
...
@@ -81,23 +81,23 @@ THREE.LensFlare.prototype.updateLensFlares = function () {
THREE
.
LensFlare
.
prototype
.
clone
=
function
()
{
var
flare
=
new
THREE
.
LensFlare
();
return
this
.
cloneProperties
(
flare
);
return
flare
.
_copyFrom
(
this
);
};
THREE
.
LensFlare
.
prototype
.
cloneProperties
=
function
(
flar
e
)
{
THREE
.
LensFlare
.
prototype
.
_copyFrom
=
function
(
sourc
e
)
{
THREE
.
Object3D
.
prototype
.
cloneProperties
.
call
(
this
,
flar
e
);
THREE
.
Object3D
.
prototype
.
_copyFrom
.
call
(
this
,
sourc
e
);
flare
.
positionScreen
.
copy
(
this
.
positionScreen
);
flare
.
customUpdateCallback
=
this
.
customUpdateCallback
;
this
.
positionScreen
.
copy
(
source
.
positionScreen
);
this
.
customUpdateCallback
=
source
.
customUpdateCallback
;
for
(
var
i
=
0
,
l
=
this
.
lensFlares
.
length
;
i
<
l
;
i
++
)
{
for
(
var
i
=
0
,
l
=
source
.
lensFlares
.
length
;
i
<
l
;
i
++
)
{
flare
.
lensFlares
.
push
(
this
.
lensFlares
[
i
]
);
this
.
lensFlares
.
push
(
source
.
lensFlares
[
i
]
);
}
return
flare
;
return
this
;
};
\ No newline at end of file
};
src/objects/Line.js
浏览文件 @
802e589c
...
...
@@ -186,14 +186,14 @@ THREE.Line.prototype.raycast = ( function () {
THREE
.
Line
.
prototype
.
clone
=
function
()
{
var
line
=
new
THREE
.
Line
(
this
.
geometry
,
this
.
material
);
return
this
.
cloneProperties
(
line
);
return
line
.
_copyFrom
(
this
);
};
THREE
.
Line
.
prototype
.
cloneProperties
=
function
(
lin
e
)
{
THREE
.
Line
.
prototype
.
_copyFrom
=
function
(
sourc
e
)
{
THREE
.
Object3D
.
prototype
.
cloneProperties
.
call
(
this
,
lin
e
);
return
line
;
THREE
.
Object3D
.
prototype
.
_copyFrom
.
call
(
this
,
sourc
e
);
return
this
;
};
...
...
src/objects/LineSegments.js
浏览文件 @
802e589c
...
...
@@ -17,7 +17,7 @@ THREE.LineSegments.prototype.clone = function () {
var
line
=
new
THREE
.
LineSegments
(
this
.
geometry
,
this
.
material
);
THREE
.
Line
.
prototype
.
cloneProperties
.
call
(
this
,
line
);
THREE
.
Line
.
prototype
.
_copyFrom
.
call
(
line
,
this
);
return
line
;
...
...
src/objects/Mesh.js
浏览文件 @
802e589c
...
...
@@ -308,15 +308,14 @@ THREE.Mesh.prototype.raycast = ( function () {
THREE
.
Mesh
.
prototype
.
clone
=
function
()
{
var
mesh
=
new
THREE
.
Mesh
(
this
.
geometry
,
this
.
material
);
return
this
.
cloneProperties
(
mesh
);
return
mesh
.
_copyFrom
(
this
);
};
THREE
.
Mesh
.
prototype
.
cloneProperties
=
function
(
mesh
)
{
THREE
.
Mesh
.
prototype
.
_copyFrom
=
function
(
source
)
{
THREE
.
Object3D
.
prototype
.
cloneProperties
.
call
(
this
,
mesh
);
return
mesh
;
THREE
.
Object3D
.
prototype
.
_copyFrom
.
call
(
this
,
source
);
return
this
;
};
...
...
src/objects/MorphAnimMesh.js
浏览文件 @
802e589c
...
...
@@ -195,24 +195,24 @@ THREE.MorphAnimMesh.prototype.interpolateTargets = function ( a, b, t ) {
THREE
.
MorphAnimMesh
.
prototype
.
clone
=
function
()
{
var
morph
=
new
THREE
.
MorphAnimMesh
(
this
.
geometry
,
this
.
material
);
return
this
.
cloneProperties
(
morph
);
return
morph
.
_copyFrom
(
this
);
};
THREE
.
MorphAnimMesh
.
prototype
.
cloneProperties
=
function
(
morph
)
{
THREE
.
MorphAnimMesh
.
prototype
.
_copyFrom
=
function
(
source
)
{
morph
.
duration
=
this
.
duration
;
morph
.
mirroredLoop
=
this
.
mirroredLoop
;
morph
.
time
=
this
.
time
;
this
.
duration
=
source
.
duration
;
this
.
mirroredLoop
=
source
.
mirroredLoop
;
this
.
time
=
source
.
time
;
morph
.
lastKeyframe
=
this
.
lastKeyframe
;
morph
.
currentKeyframe
=
this
.
currentKeyframe
;
this
.
lastKeyframe
=
source
.
lastKeyframe
;
this
.
currentKeyframe
=
source
.
currentKeyframe
;
morph
.
direction
=
this
.
direction
;
morph
.
directionBackwards
=
this
.
directionBackwards
;
this
.
direction
=
source
.
direction
;
this
.
directionBackwards
=
source
.
directionBackwards
;
THREE
.
Mesh
.
prototype
.
cloneProperties
.
call
(
this
,
morph
);
THREE
.
Mesh
.
prototype
.
_copyFrom
.
call
(
this
,
source
);
return
morph
;
return
this
;
};
src/objects/PointCloud.js
浏览文件 @
802e589c
...
...
@@ -139,14 +139,14 @@ THREE.PointCloud.prototype.raycast = ( function () {
THREE
.
PointCloud
.
prototype
.
clone
=
function
()
{
var
pointCloud
=
new
THREE
.
PointCloud
(
this
.
geometry
,
this
.
material
);
return
this
.
cloneProperties
(
pointCloud
);
return
pointCloud
.
_copyFrom
(
this
);
};
THREE
.
PointCloud
.
prototype
.
cloneProperties
=
function
(
pointCloud
)
{
THREE
.
PointCloud
.
prototype
.
_copyFrom
=
function
(
source
)
{
THREE
.
Object3D
.
prototype
.
cloneProperties
.
call
(
this
,
pointCloud
);
return
pointCloud
;
THREE
.
Object3D
.
prototype
.
_copyFrom
.
call
(
this
,
source
);
return
this
;
};
...
...
src/objects/SkinnedMesh.js
浏览文件 @
802e589c
...
...
@@ -157,13 +157,13 @@ THREE.SkinnedMesh.prototype.updateMatrixWorld = function( force ) {
THREE
.
SkinnedMesh
.
prototype
.
clone
=
function
()
{
var
skinMesh
=
new
THREE
.
SkinnedMesh
(
this
.
geometry
,
this
.
material
,
this
.
useVertexTexture
);
return
this
.
cloneProperties
(
skinMesh
);
return
skinMesh
.
_copyFrom
(
this
);
};
THREE
.
SkinnedMesh
.
prototype
.
cloneProperties
=
function
(
skinMesh
)
{
THREE
.
SkinnedMesh
.
prototype
.
_copyFrom
=
function
(
source
)
{
THREE
.
Mesh
.
prototype
.
cloneProperties
.
call
(
this
,
skinMesh
);
return
skinMesh
;
THREE
.
Mesh
.
prototype
.
_copyFrom
.
call
(
this
,
source
);
return
this
;
};
src/objects/Sprite.js
浏览文件 @
802e589c
...
...
@@ -63,14 +63,14 @@ THREE.Sprite.prototype.raycast = ( function () {
THREE
.
Sprite
.
prototype
.
clone
=
function
()
{
var
sprite
=
new
THREE
.
Sprite
(
this
.
material
);
return
this
.
cloneProperties
(
sprite
);
return
sprite
.
_copyFrom
(
this
);
};
THREE
.
Sprite
.
prototype
.
cloneProperties
=
function
(
sprit
e
)
{
THREE
.
Sprite
.
prototype
.
_copyFrom
=
function
(
sourc
e
)
{
THREE
.
Object3D
.
prototype
.
cloneProperties
.
call
(
this
,
sprit
e
);
return
sprite
;
THREE
.
Object3D
.
prototype
.
_copyFrom
.
call
(
this
,
sourc
e
);
return
this
;
};
...
...
src/scenes/Scene.js
浏览文件 @
802e589c
...
...
@@ -21,22 +21,20 @@ THREE.Scene.prototype.constructor = THREE.Scene;
THREE
.
Scene
.
prototype
.
clone
=
function
()
{
var
scene
=
new
THREE
.
Scene
();
return
this
.
cloneProperties
(
scene
);
return
scene
.
_copyFrom
(
this
);
};
THREE
.
Scene
.
prototype
.
cloneProperties
=
function
(
scen
e
)
{
THREE
.
Scene
.
prototype
.
_copyFrom
=
function
(
sourc
e
)
{
if
(
scene
===
undefined
)
scene
=
new
THREE
.
Scene
(
);
THREE
.
Object3D
.
prototype
.
_copyFrom
.
call
(
this
,
source
);
THREE
.
Object3D
.
prototype
.
cloneProperties
.
call
(
this
,
scene
);
if
(
source
.
fog
!==
null
)
this
.
fog
=
source
.
fog
.
clone
();
if
(
source
.
overrideMaterial
!==
null
)
this
.
overrideMaterial
=
source
.
overrideMaterial
.
clone
();
if
(
this
.
fog
!==
null
)
scene
.
fog
=
this
.
fog
.
clone
()
;
if
(
this
.
overrideMaterial
!==
null
)
scene
.
overrideMaterial
=
this
.
overrideMaterial
.
clone
()
;
this
.
autoUpdate
=
source
.
autoUpdate
;
this
.
matrixAutoUpdate
=
source
.
matrixAutoUpdate
;
scene
.
autoUpdate
=
this
.
autoUpdate
;
scene
.
matrixAutoUpdate
=
this
.
matrixAutoUpdate
;
return
scene
;
return
this
;
};
src/textures/CompressedTexture.js
浏览文件 @
802e589c
...
...
@@ -28,7 +28,7 @@ THREE.CompressedTexture.prototype.clone = function () {
var
texture
=
new
THREE
.
CompressedTexture
();
THREE
.
Texture
.
prototype
.
cloneProperties
.
call
(
this
,
texture
);
THREE
.
Texture
.
prototype
.
_copyFrom
.
call
(
texture
,
this
);
return
texture
;
...
...
src/textures/CubeTexture.js
浏览文件 @
802e589c
...
...
@@ -20,7 +20,7 @@ THREE.CubeTexture.clone = function () {
var
texture
=
new
THREE
.
CubeTexture
();
THREE
.
Texture
.
prototype
.
cloneProperties
.
call
(
this
,
texture
);
THREE
.
Texture
.
prototype
.
_copyFrom
.
call
(
texture
,
this
);
texture
.
images
=
this
.
images
;
...
...
src/textures/DataTexture.js
浏览文件 @
802e589c
...
...
@@ -17,7 +17,7 @@ THREE.DataTexture.prototype.clone = function () {
var
texture
=
new
THREE
.
DataTexture
();
THREE
.
Texture
.
prototype
.
cloneProperties
.
call
(
this
,
texture
);
THREE
.
Texture
.
prototype
.
_copyFrom
.
call
(
texture
,
this
);
return
texture
;
...
...
src/textures/Texture.js
浏览文件 @
802e589c
...
...
@@ -66,37 +66,37 @@ THREE.Texture.prototype = {
clone
:
function
()
{
var
texture
=
new
THREE
.
Texture
();
return
t
his
.
cloneProperties
(
texture
);
return
t
exture
.
_copyFrom
(
this
);
},
cloneProperties
:
function
(
textur
e
)
{
_copyFrom
:
function
(
sourc
e
)
{
t
exture
.
image
=
this
.
image
;
t
exture
.
mipmaps
=
this
.
mipmaps
.
slice
(
0
);
t
his
.
image
=
source
.
image
;
t
his
.
mipmaps
=
source
.
mipmaps
.
slice
(
0
);
t
exture
.
mapping
=
this
.
mapping
;
t
his
.
mapping
=
source
.
mapping
;
t
exture
.
wrapS
=
this
.
wrapS
;
t
exture
.
wrapT
=
this
.
wrapT
;
t
his
.
wrapS
=
source
.
wrapS
;
t
his
.
wrapT
=
source
.
wrapT
;
t
exture
.
magFilter
=
this
.
magFilter
;
t
exture
.
minFilter
=
this
.
minFilter
;
t
his
.
magFilter
=
source
.
magFilter
;
t
his
.
minFilter
=
source
.
minFilter
;
t
exture
.
anisotropy
=
this
.
anisotropy
;
t
his
.
anisotropy
=
source
.
anisotropy
;
t
exture
.
format
=
this
.
format
;
t
exture
.
type
=
this
.
type
;
t
his
.
format
=
source
.
format
;
t
his
.
type
=
source
.
type
;
t
exture
.
offset
.
copy
(
this
.
offset
);
t
exture
.
repeat
.
copy
(
this
.
repeat
);
t
his
.
offset
.
copy
(
source
.
offset
);
t
his
.
repeat
.
copy
(
source
.
repeat
);
t
exture
.
generateMipmaps
=
this
.
generateMipmaps
;
t
exture
.
premultiplyAlpha
=
this
.
premultiplyAlpha
;
t
exture
.
flipY
=
this
.
flipY
;
t
exture
.
unpackAlignment
=
this
.
unpackAlignment
;
t
his
.
generateMipmaps
=
source
.
generateMipmaps
;
t
his
.
premultiplyAlpha
=
source
.
premultiplyAlpha
;
t
his
.
flipY
=
source
.
flipY
;
t
his
.
unpackAlignment
=
source
.
unpackAlignment
;
return
t
exture
;
return
t
his
;
},
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录