Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
e78b8cf2
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,发现更多精彩内容 >>
提交
e78b8cf2
编写于
7月 26, 2018
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fixed some LGTM alerts.
上级
755d9290
变更
7
显示空白变更内容
内联
并排
Showing
7 changed file
with
41 addition
and
43 deletion
+41
-43
examples/canvas_lines_colors.html
examples/canvas_lines_colors.html
+2
-2
examples/canvas_lines_dashed.html
examples/canvas_lines_dashed.html
+1
-1
examples/webgl_geometry_colors.html
examples/webgl_geometry_colors.html
+8
-8
examples/webgl_multiple_canvases_complex.html
examples/webgl_multiple_canvases_complex.html
+8
-10
examples/webgl_multiple_canvases_grid.html
examples/webgl_multiple_canvases_grid.html
+8
-8
examples/webgl_multiple_renderers.html
examples/webgl_multiple_renderers.html
+6
-6
examples/webgl_multiple_views.html
examples/webgl_multiple_views.html
+8
-8
未找到文件。
examples/canvas_lines_colors.html
浏览文件 @
e78b8cf2
...
@@ -79,7 +79,7 @@
...
@@ -79,7 +79,7 @@
// 2d lines
// 2d lines
var
vertices
=
hilbert2D
(
new
THREE
.
Vector3
(
0
,
0
,
0
),
400
,
4
);
var
vertices
=
hilbert2D
(
new
THREE
.
Vector3
(
0
,
0
,
0
),
400
,
4
);
numVertices
=
vertices
.
length
;
var
numVertices
=
vertices
.
length
;
var
geometry2
=
new
THREE
.
BufferGeometry
();
var
geometry2
=
new
THREE
.
BufferGeometry
();
...
@@ -108,7 +108,7 @@
...
@@ -108,7 +108,7 @@
// 3d lines
// 3d lines
var
vertices
=
hilbert3D
(
new
THREE
.
Vector3
(
0
,
0
,
0
),
200
,
2
,
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
);
var
vertices
=
hilbert3D
(
new
THREE
.
Vector3
(
0
,
0
,
0
),
200
,
2
,
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
);
numVertices
=
vertices
.
length
;
var
numVertices
=
vertices
.
length
;
var
geometry3
=
new
THREE
.
BufferGeometry
();
var
geometry3
=
new
THREE
.
BufferGeometry
();
...
...
examples/canvas_lines_dashed.html
浏览文件 @
e78b8cf2
...
@@ -65,7 +65,7 @@
...
@@ -65,7 +65,7 @@
var
spline
=
new
THREE
.
CatmullRomCurve3
(
points
);
var
spline
=
new
THREE
.
CatmullRomCurve3
(
points
);
var
samples
=
spline
.
getPoints
(
points
.
length
*
subdivisions
);
var
samples
=
spline
.
getPoints
(
points
.
length
*
subdivisions
);
numSamples
=
samples
.
length
;
var
numSamples
=
samples
.
length
;
var
geometrySpline
=
new
THREE
.
BufferGeometry
();
var
geometrySpline
=
new
THREE
.
BufferGeometry
();
...
...
examples/webgl_geometry_colors.html
浏览文件 @
e78b8cf2
...
@@ -115,8 +115,8 @@
...
@@ -115,8 +115,8 @@
var
count
=
geometry1
.
attributes
.
position
.
count
;
var
count
=
geometry1
.
attributes
.
position
.
count
;
geometry1
.
addAttribute
(
'
color
'
,
new
THREE
.
BufferAttribute
(
new
Float32Array
(
count
*
3
),
3
)
);
geometry1
.
addAttribute
(
'
color
'
,
new
THREE
.
BufferAttribute
(
new
Float32Array
(
count
*
3
),
3
)
);
geometry2
=
geometry1
.
clone
();
var
geometry2
=
geometry1
.
clone
();
geometry3
=
geometry1
.
clone
();
var
geometry3
=
geometry1
.
clone
();
var
color
=
new
THREE
.
Color
();
var
color
=
new
THREE
.
Color
();
var
positions1
=
geometry1
.
attributes
.
position
;
var
positions1
=
geometry1
.
attributes
.
position
;
...
@@ -148,21 +148,21 @@
...
@@ -148,21 +148,21 @@
var
wireframeMaterial
=
new
THREE
.
MeshBasicMaterial
(
{
color
:
0x000000
,
wireframe
:
true
,
transparent
:
true
}
);
var
wireframeMaterial
=
new
THREE
.
MeshBasicMaterial
(
{
color
:
0x000000
,
wireframe
:
true
,
transparent
:
true
}
);
mesh
=
new
THREE
.
Mesh
(
geometry1
,
material
);
var
mesh
=
new
THREE
.
Mesh
(
geometry1
,
material
);
wireframe
=
new
THREE
.
Mesh
(
geometry1
,
wireframeMaterial
);
var
wireframe
=
new
THREE
.
Mesh
(
geometry1
,
wireframeMaterial
);
mesh
.
add
(
wireframe
);
mesh
.
add
(
wireframe
);
mesh
.
position
.
x
=
-
400
;
mesh
.
position
.
x
=
-
400
;
mesh
.
rotation
.
x
=
-
1.87
;
mesh
.
rotation
.
x
=
-
1.87
;
scene
.
add
(
mesh
);
scene
.
add
(
mesh
);
mesh
=
new
THREE
.
Mesh
(
geometry2
,
material
);
var
mesh
=
new
THREE
.
Mesh
(
geometry2
,
material
);
wireframe
=
new
THREE
.
Mesh
(
geometry2
,
wireframeMaterial
);
var
wireframe
=
new
THREE
.
Mesh
(
geometry2
,
wireframeMaterial
);
mesh
.
add
(
wireframe
);
mesh
.
add
(
wireframe
);
mesh
.
position
.
x
=
400
;
mesh
.
position
.
x
=
400
;
scene
.
add
(
mesh
);
scene
.
add
(
mesh
);
mesh
=
new
THREE
.
Mesh
(
geometry3
,
material
);
var
mesh
=
new
THREE
.
Mesh
(
geometry3
,
material
);
wireframe
=
new
THREE
.
Mesh
(
geometry3
,
wireframeMaterial
);
var
wireframe
=
new
THREE
.
Mesh
(
geometry3
,
wireframeMaterial
);
mesh
.
add
(
wireframe
);
mesh
.
add
(
wireframe
);
scene
.
add
(
mesh
);
scene
.
add
(
mesh
);
...
...
examples/webgl_multiple_canvases_complex.html
浏览文件 @
e78b8cf2
...
@@ -177,8 +177,8 @@
...
@@ -177,8 +177,8 @@
var
count
=
geometry1
.
attributes
.
position
.
count
;
var
count
=
geometry1
.
attributes
.
position
.
count
;
geometry1
.
addAttribute
(
'
color
'
,
new
THREE
.
BufferAttribute
(
new
Float32Array
(
count
*
3
),
3
)
);
geometry1
.
addAttribute
(
'
color
'
,
new
THREE
.
BufferAttribute
(
new
Float32Array
(
count
*
3
),
3
)
);
geometry2
=
geometry1
.
clone
();
var
geometry2
=
geometry1
.
clone
();
geometry3
=
geometry1
.
clone
();
var
geometry3
=
geometry1
.
clone
();
var
color
=
new
THREE
.
Color
();
var
color
=
new
THREE
.
Color
();
var
positions1
=
geometry1
.
attributes
.
position
;
var
positions1
=
geometry1
.
attributes
.
position
;
...
@@ -210,23 +210,21 @@
...
@@ -210,23 +210,21 @@
var
wireframeMaterial
=
new
THREE
.
MeshBasicMaterial
(
{
color
:
0x000000
,
wireframe
:
true
,
transparent
:
true
}
);
var
wireframeMaterial
=
new
THREE
.
MeshBasicMaterial
(
{
color
:
0x000000
,
wireframe
:
true
,
transparent
:
true
}
);
var
mesh
,
wireframe
;
var
mesh
=
new
THREE
.
Mesh
(
geometry1
,
material
);
var
wireframe
=
new
THREE
.
Mesh
(
geometry1
,
wireframeMaterial
);
mesh
=
new
THREE
.
Mesh
(
geometry1
,
material
);
wireframe
=
new
THREE
.
Mesh
(
geometry1
,
wireframeMaterial
);
mesh
.
add
(
wireframe
);
mesh
.
add
(
wireframe
);
mesh
.
position
.
x
=
-
400
;
mesh
.
position
.
x
=
-
400
;
mesh
.
rotation
.
x
=
-
1.87
;
mesh
.
rotation
.
x
=
-
1.87
;
scene
.
add
(
mesh
);
scene
.
add
(
mesh
);
mesh
=
new
THREE
.
Mesh
(
geometry2
,
material
);
var
mesh
=
new
THREE
.
Mesh
(
geometry2
,
material
);
wireframe
=
new
THREE
.
Mesh
(
geometry2
,
wireframeMaterial
);
var
wireframe
=
new
THREE
.
Mesh
(
geometry2
,
wireframeMaterial
);
mesh
.
add
(
wireframe
);
mesh
.
add
(
wireframe
);
mesh
.
position
.
x
=
400
;
mesh
.
position
.
x
=
400
;
scene
.
add
(
mesh
);
scene
.
add
(
mesh
);
mesh
=
new
THREE
.
Mesh
(
geometry3
,
material
);
var
mesh
=
new
THREE
.
Mesh
(
geometry3
,
material
);
wireframe
=
new
THREE
.
Mesh
(
geometry3
,
wireframeMaterial
);
var
wireframe
=
new
THREE
.
Mesh
(
geometry3
,
wireframeMaterial
);
mesh
.
add
(
wireframe
);
mesh
.
add
(
wireframe
);
scene
.
add
(
mesh
);
scene
.
add
(
mesh
);
...
...
examples/webgl_multiple_canvases_grid.html
浏览文件 @
e78b8cf2
...
@@ -195,8 +195,8 @@
...
@@ -195,8 +195,8 @@
var
count
=
geometry1
.
attributes
.
position
.
count
;
var
count
=
geometry1
.
attributes
.
position
.
count
;
geometry1
.
addAttribute
(
'
color
'
,
new
THREE
.
BufferAttribute
(
new
Float32Array
(
count
*
3
),
3
)
);
geometry1
.
addAttribute
(
'
color
'
,
new
THREE
.
BufferAttribute
(
new
Float32Array
(
count
*
3
),
3
)
);
geometry2
=
geometry1
.
clone
();
var
geometry2
=
geometry1
.
clone
();
geometry3
=
geometry1
.
clone
();
var
geometry3
=
geometry1
.
clone
();
var
color
=
new
THREE
.
Color
();
var
color
=
new
THREE
.
Color
();
var
positions1
=
geometry1
.
attributes
.
position
;
var
positions1
=
geometry1
.
attributes
.
position
;
...
@@ -228,21 +228,21 @@
...
@@ -228,21 +228,21 @@
var
wireframeMaterial
=
new
THREE
.
MeshBasicMaterial
(
{
color
:
0x000000
,
wireframe
:
true
,
transparent
:
true
}
);
var
wireframeMaterial
=
new
THREE
.
MeshBasicMaterial
(
{
color
:
0x000000
,
wireframe
:
true
,
transparent
:
true
}
);
mesh
=
new
THREE
.
Mesh
(
geometry1
,
material
);
var
mesh
=
new
THREE
.
Mesh
(
geometry1
,
material
);
wireframe
=
new
THREE
.
Mesh
(
geometry1
,
wireframeMaterial
);
var
wireframe
=
new
THREE
.
Mesh
(
geometry1
,
wireframeMaterial
);
mesh
.
add
(
wireframe
);
mesh
.
add
(
wireframe
);
mesh
.
position
.
x
=
-
400
;
mesh
.
position
.
x
=
-
400
;
mesh
.
rotation
.
x
=
-
1.87
;
mesh
.
rotation
.
x
=
-
1.87
;
scene
.
add
(
mesh
);
scene
.
add
(
mesh
);
mesh
=
new
THREE
.
Mesh
(
geometry2
,
material
);
var
mesh
=
new
THREE
.
Mesh
(
geometry2
,
material
);
wireframe
=
new
THREE
.
Mesh
(
geometry2
,
wireframeMaterial
);
var
wireframe
=
new
THREE
.
Mesh
(
geometry2
,
wireframeMaterial
);
mesh
.
add
(
wireframe
);
mesh
.
add
(
wireframe
);
mesh
.
position
.
x
=
400
;
mesh
.
position
.
x
=
400
;
scene
.
add
(
mesh
);
scene
.
add
(
mesh
);
mesh
=
new
THREE
.
Mesh
(
geometry3
,
material
);
var
mesh
=
new
THREE
.
Mesh
(
geometry3
,
material
);
wireframe
=
new
THREE
.
Mesh
(
geometry3
,
wireframeMaterial
);
var
wireframe
=
new
THREE
.
Mesh
(
geometry3
,
wireframeMaterial
);
mesh
.
add
(
wireframe
);
mesh
.
add
(
wireframe
);
scene
.
add
(
mesh
);
scene
.
add
(
mesh
);
...
...
examples/webgl_multiple_renderers.html
浏览文件 @
e78b8cf2
...
@@ -142,21 +142,21 @@
...
@@ -142,21 +142,21 @@
var
wireframeMaterial
=
new
THREE
.
MeshBasicMaterial
(
{
color
:
0x000000
,
wireframe
:
true
,
transparent
:
true
}
);
var
wireframeMaterial
=
new
THREE
.
MeshBasicMaterial
(
{
color
:
0x000000
,
wireframe
:
true
,
transparent
:
true
}
);
mesh1
=
new
THREE
.
Mesh
(
geometry1
,
material
);
var
mesh1
=
new
THREE
.
Mesh
(
geometry1
,
material
);
wireframe
=
new
THREE
.
Mesh
(
geometry1
,
wireframeMaterial
);
var
wireframe
=
new
THREE
.
Mesh
(
geometry1
,
wireframeMaterial
);
mesh1
.
add
(
wireframe
);
mesh1
.
add
(
wireframe
);
mesh1
.
position
.
x
=
-
400
;
mesh1
.
position
.
x
=
-
400
;
mesh1
.
rotation
.
x
=
-
1.87
;
mesh1
.
rotation
.
x
=
-
1.87
;
scene
.
add
(
mesh1
);
scene
.
add
(
mesh1
);
mesh2
=
new
THREE
.
Mesh
(
geometry2
,
material
);
var
mesh2
=
new
THREE
.
Mesh
(
geometry2
,
material
);
wireframe
=
new
THREE
.
Mesh
(
geometry2
,
wireframeMaterial
);
var
wireframe
=
new
THREE
.
Mesh
(
geometry2
,
wireframeMaterial
);
mesh2
.
add
(
wireframe
);
mesh2
.
add
(
wireframe
);
mesh2
.
position
.
x
=
400
;
mesh2
.
position
.
x
=
400
;
scene
.
add
(
mesh2
);
scene
.
add
(
mesh2
);
mesh3
=
new
THREE
.
Mesh
(
geometry3
,
material
);
var
mesh3
=
new
THREE
.
Mesh
(
geometry3
,
material
);
wireframe
=
new
THREE
.
Mesh
(
geometry3
,
wireframeMaterial
);
var
wireframe
=
new
THREE
.
Mesh
(
geometry3
,
wireframeMaterial
);
mesh3
.
add
(
wireframe
);
mesh3
.
add
(
wireframe
);
scene
.
add
(
mesh3
);
scene
.
add
(
mesh3
);
...
...
examples/webgl_multiple_views.html
浏览文件 @
e78b8cf2
...
@@ -166,8 +166,8 @@
...
@@ -166,8 +166,8 @@
var
count
=
geometry1
.
attributes
.
position
.
count
;
var
count
=
geometry1
.
attributes
.
position
.
count
;
geometry1
.
addAttribute
(
'
color
'
,
new
THREE
.
BufferAttribute
(
new
Float32Array
(
count
*
3
),
3
)
);
geometry1
.
addAttribute
(
'
color
'
,
new
THREE
.
BufferAttribute
(
new
Float32Array
(
count
*
3
),
3
)
);
geometry2
=
geometry1
.
clone
();
var
geometry2
=
geometry1
.
clone
();
geometry3
=
geometry1
.
clone
();
var
geometry3
=
geometry1
.
clone
();
var
color
=
new
THREE
.
Color
();
var
color
=
new
THREE
.
Color
();
var
positions1
=
geometry1
.
attributes
.
position
;
var
positions1
=
geometry1
.
attributes
.
position
;
...
@@ -199,21 +199,21 @@
...
@@ -199,21 +199,21 @@
var
wireframeMaterial
=
new
THREE
.
MeshBasicMaterial
(
{
color
:
0x000000
,
wireframe
:
true
,
transparent
:
true
}
);
var
wireframeMaterial
=
new
THREE
.
MeshBasicMaterial
(
{
color
:
0x000000
,
wireframe
:
true
,
transparent
:
true
}
);
mesh
=
new
THREE
.
Mesh
(
geometry1
,
material
);
var
mesh
=
new
THREE
.
Mesh
(
geometry1
,
material
);
wireframe
=
new
THREE
.
Mesh
(
geometry1
,
wireframeMaterial
);
var
wireframe
=
new
THREE
.
Mesh
(
geometry1
,
wireframeMaterial
);
mesh
.
add
(
wireframe
);
mesh
.
add
(
wireframe
);
mesh
.
position
.
x
=
-
400
;
mesh
.
position
.
x
=
-
400
;
mesh
.
rotation
.
x
=
-
1.87
;
mesh
.
rotation
.
x
=
-
1.87
;
scene
.
add
(
mesh
);
scene
.
add
(
mesh
);
mesh
=
new
THREE
.
Mesh
(
geometry2
,
material
);
var
mesh
=
new
THREE
.
Mesh
(
geometry2
,
material
);
wireframe
=
new
THREE
.
Mesh
(
geometry2
,
wireframeMaterial
);
var
wireframe
=
new
THREE
.
Mesh
(
geometry2
,
wireframeMaterial
);
mesh
.
add
(
wireframe
);
mesh
.
add
(
wireframe
);
mesh
.
position
.
x
=
400
;
mesh
.
position
.
x
=
400
;
scene
.
add
(
mesh
);
scene
.
add
(
mesh
);
mesh
=
new
THREE
.
Mesh
(
geometry3
,
material
);
var
mesh
=
new
THREE
.
Mesh
(
geometry3
,
material
);
wireframe
=
new
THREE
.
Mesh
(
geometry3
,
wireframeMaterial
);
var
wireframe
=
new
THREE
.
Mesh
(
geometry3
,
wireframeMaterial
);
mesh
.
add
(
wireframe
);
mesh
.
add
(
wireframe
);
scene
.
add
(
mesh
);
scene
.
add
(
mesh
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录