Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
3c78bc33
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,发现更多精彩内容 >>
提交
3c78bc33
编写于
4月 24, 2019
作者:
M
Mugen87
提交者:
Mr.doob
4月 24, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Examples: Create TrackballControls with renderer.domElement
上级
e10e5aa6
变更
14
显示空白变更内容
内联
并排
Showing
14 changed file
with
100 addition
and
97 deletion
+100
-97
examples/css3d_sandbox.html
examples/css3d_sandbox.html
+2
-2
examples/css3d_youtube.html
examples/css3d_youtube.html
+1
-1
examples/misc_controls_trackball.html
examples/misc_controls_trackball.html
+19
-19
examples/software_sandbox.html
examples/software_sandbox.html
+2
-3
examples/webgl_buffergeometry_instancing2.html
examples/webgl_buffergeometry_instancing2.html
+2
-2
examples/webgl_effects_ascii.html
examples/webgl_effects_ascii.html
+3
-3
examples/webgl_interactive_cubes_gpu.html
examples/webgl_interactive_cubes_gpu.html
+9
-9
examples/webgl_interactive_draggablecubes.html
examples/webgl_interactive_draggablecubes.html
+9
-9
examples/webgl_lights_pointlights2.html
examples/webgl_lights_pointlights2.html
+16
-16
examples/webgl_loader_3ds.html
examples/webgl_loader_3ds.html
+2
-2
examples/webgl_loader_babylon.html
examples/webgl_loader_babylon.html
+4
-2
examples/webgl_loader_pcd.html
examples/webgl_loader_pcd.html
+15
-15
examples/webgl_loader_vtk.html
examples/webgl_loader_vtk.html
+14
-12
examples/webgl_modifier_tessellation.html
examples/webgl_modifier_tessellation.html
+2
-2
未找到文件。
examples/css3d_sandbox.html
浏览文件 @
3c78bc33
...
...
@@ -52,8 +52,6 @@
camera
=
new
THREE
.
PerspectiveCamera
(
45
,
window
.
innerWidth
/
window
.
innerHeight
,
1
,
1000
);
camera
.
position
.
set
(
200
,
200
,
200
);
controls
=
new
THREE
.
TrackballControls
(
camera
);
scene
=
new
THREE
.
Scene
();
scene
.
background
=
new
THREE
.
Color
(
0xf0f0f0
);
...
...
@@ -104,6 +102,8 @@
renderer2
.
domElement
.
style
.
top
=
0
;
document
.
body
.
appendChild
(
renderer2
.
domElement
);
controls
=
new
THREE
.
TrackballControls
(
camera
,
renderer2
.
domElement
);
}
function
animate
()
{
...
...
examples/css3d_youtube.html
浏览文件 @
3c78bc33
...
...
@@ -76,7 +76,7 @@
group
.
add
(
new
Element
(
'
9ubytEsCaS0
'
,
-
240
,
0
,
0
,
-
Math
.
PI
/
2
)
);
scene
.
add
(
group
);
controls
=
new
THREE
.
TrackballControls
(
camera
);
controls
=
new
THREE
.
TrackballControls
(
camera
,
renderer
.
domElement
);
controls
.
rotateSpeed
=
4
;
window
.
addEventListener
(
'
resize
'
,
onWindowResize
,
false
);
...
...
examples/misc_controls_trackball.html
浏览文件 @
3c78bc33
...
...
@@ -67,22 +67,6 @@
camera
=
new
THREE
.
PerspectiveCamera
(
60
,
window
.
innerWidth
/
window
.
innerHeight
,
1
,
1000
);
camera
.
position
.
z
=
500
;
controls
=
new
THREE
.
TrackballControls
(
camera
);
controls
.
rotateSpeed
=
1.0
;
controls
.
zoomSpeed
=
1.2
;
controls
.
panSpeed
=
0.8
;
controls
.
noZoom
=
false
;
controls
.
noPan
=
false
;
controls
.
staticMoving
=
true
;
controls
.
dynamicDampingFactor
=
0.3
;
controls
.
keys
=
[
65
,
83
,
68
];
controls
.
addEventListener
(
'
change
'
,
render
);
// world
scene
=
new
THREE
.
Scene
();
...
...
@@ -126,6 +110,22 @@
renderer
.
setSize
(
window
.
innerWidth
,
window
.
innerHeight
);
document
.
body
.
appendChild
(
renderer
.
domElement
);
controls
=
new
THREE
.
TrackballControls
(
camera
,
renderer
.
domElement
);
controls
.
rotateSpeed
=
1.0
;
controls
.
zoomSpeed
=
1.2
;
controls
.
panSpeed
=
0.8
;
controls
.
noZoom
=
false
;
controls
.
noPan
=
false
;
controls
.
staticMoving
=
true
;
controls
.
dynamicDampingFactor
=
0.3
;
controls
.
keys
=
[
65
,
83
,
68
];
controls
.
addEventListener
(
'
change
'
,
render
);
stats
=
new
Stats
();
document
.
body
.
appendChild
(
stats
.
dom
);
...
...
examples/software_sandbox.html
浏览文件 @
3c78bc33
...
...
@@ -57,8 +57,6 @@
camera
=
new
THREE
.
PerspectiveCamera
(
70
,
window
.
innerWidth
/
window
.
innerHeight
,
1
,
2000
);
camera
.
position
.
z
=
600
;
controls
=
new
THREE
.
TrackballControls
(
camera
);
scene
=
new
THREE
.
Scene
();
// Torus
...
...
@@ -157,9 +155,10 @@
renderer
=
new
THREE
.
SoftwareRenderer
();
renderer
.
setSize
(
window
.
innerWidth
,
window
.
innerHeight
);
container
.
appendChild
(
renderer
.
domElement
);
controls
=
new
THREE
.
TrackballControls
(
camera
,
renderer
.
domElement
);
stats
=
new
Stats
();
container
.
appendChild
(
stats
.
dom
);
...
...
examples/webgl_buffergeometry_instancing2.html
浏览文件 @
3c78bc33
...
...
@@ -116,8 +116,6 @@
camera
=
new
THREE
.
PerspectiveCamera
(
50
,
window
.
innerWidth
/
window
.
innerHeight
,
0.01
,
100
);
camera
.
position
.
z
=
4
;
controls
=
new
THREE
.
TrackballControls
(
camera
);
scene
=
new
THREE
.
Scene
();
//
...
...
@@ -204,6 +202,8 @@
renderer
.
setSize
(
window
.
innerWidth
,
window
.
innerHeight
);
container
.
appendChild
(
renderer
.
domElement
);
controls
=
new
THREE
.
TrackballControls
(
camera
,
renderer
.
domElement
);
if
(
renderer
.
extensions
.
get
(
'
ANGLE_instanced_arrays
'
)
===
null
)
{
document
.
getElementById
(
'
notSupported
'
).
style
.
display
=
''
;
...
...
examples/webgl_effects_ascii.html
浏览文件 @
3c78bc33
...
...
@@ -63,8 +63,6 @@
camera
.
position
.
y
=
150
;
camera
.
position
.
z
=
500
;
controls
=
new
THREE
.
TrackballControls
(
camera
);
scene
=
new
THREE
.
Scene
();
var
light
=
new
THREE
.
PointLight
(
0xffffff
);
...
...
@@ -75,7 +73,7 @@
light
.
position
.
set
(
-
500
,
-
500
,
-
500
);
scene
.
add
(
light
);
sphere
=
new
THREE
.
Mesh
(
new
THREE
.
SphereBufferGeometry
(
200
,
20
,
10
),
new
THREE
.
MeshPhongMaterial
(
{
flatShading
:
true
})
);
sphere
=
new
THREE
.
Mesh
(
new
THREE
.
SphereBufferGeometry
(
200
,
20
,
10
),
new
THREE
.
MeshPhongMaterial
(
{
flatShading
:
true
}
)
);
scene
.
add
(
sphere
);
// Plane
...
...
@@ -98,6 +96,8 @@
document
.
body
.
appendChild
(
effect
.
domElement
);
controls
=
new
THREE
.
TrackballControls
(
camera
,
effect
.
domElement
);
//
window
.
addEventListener
(
'
resize
'
,
onWindowResize
,
false
);
...
...
examples/webgl_interactive_cubes_gpu.html
浏览文件 @
3c78bc33
...
...
@@ -61,15 +61,6 @@
camera
=
new
THREE
.
PerspectiveCamera
(
70
,
window
.
innerWidth
/
window
.
innerHeight
,
1
,
10000
);
camera
.
position
.
z
=
1000
;
controls
=
new
THREE
.
TrackballControls
(
camera
);
controls
.
rotateSpeed
=
1.0
;
controls
.
zoomSpeed
=
1.2
;
controls
.
panSpeed
=
0.8
;
controls
.
noZoom
=
false
;
controls
.
noPan
=
false
;
controls
.
staticMoving
=
true
;
controls
.
dynamicDampingFactor
=
0.3
;
scene
=
new
THREE
.
Scene
();
scene
.
background
=
new
THREE
.
Color
(
0xffffff
);
...
...
@@ -171,6 +162,15 @@
renderer
.
setSize
(
window
.
innerWidth
,
window
.
innerHeight
);
container
.
appendChild
(
renderer
.
domElement
);
controls
=
new
THREE
.
TrackballControls
(
camera
,
renderer
.
domElement
);
controls
.
rotateSpeed
=
1.0
;
controls
.
zoomSpeed
=
1.2
;
controls
.
panSpeed
=
0.8
;
controls
.
noZoom
=
false
;
controls
.
noPan
=
false
;
controls
.
staticMoving
=
true
;
controls
.
dynamicDampingFactor
=
0.3
;
stats
=
new
Stats
();
container
.
appendChild
(
stats
.
dom
);
...
...
examples/webgl_interactive_draggablecubes.html
浏览文件 @
3c78bc33
...
...
@@ -39,15 +39,6 @@
camera
=
new
THREE
.
PerspectiveCamera
(
70
,
window
.
innerWidth
/
window
.
innerHeight
,
1
,
5000
);
camera
.
position
.
z
=
1000
;
controls
=
new
THREE
.
TrackballControls
(
camera
);
controls
.
rotateSpeed
=
1.0
;
controls
.
zoomSpeed
=
1.2
;
controls
.
panSpeed
=
0.8
;
controls
.
noZoom
=
false
;
controls
.
noPan
=
false
;
controls
.
staticMoving
=
true
;
controls
.
dynamicDampingFactor
=
0.3
;
scene
=
new
THREE
.
Scene
();
scene
.
background
=
new
THREE
.
Color
(
0xf0f0f0
);
...
...
@@ -101,6 +92,15 @@
container
.
appendChild
(
renderer
.
domElement
);
controls
=
new
THREE
.
TrackballControls
(
camera
,
renderer
.
domElement
);
controls
.
rotateSpeed
=
1.0
;
controls
.
zoomSpeed
=
1.2
;
controls
.
panSpeed
=
0.8
;
controls
.
noZoom
=
false
;
controls
.
noPan
=
false
;
controls
.
staticMoving
=
true
;
controls
.
dynamicDampingFactor
=
0.3
;
var
dragControls
=
new
THREE
.
DragControls
(
objects
,
camera
,
renderer
.
domElement
);
dragControls
.
addEventListener
(
'
dragstart
'
,
function
()
{
...
...
examples/webgl_lights_pointlights2.html
浏览文件 @
3c78bc33
...
...
@@ -79,22 +79,6 @@
scene
.
background
=
new
THREE
.
Color
(
0x040306
);
scene
.
fog
=
new
THREE
.
Fog
(
0x040306
,
10
,
300
);
// CONTROLS
controls
=
new
THREE
.
TrackballControls
(
camera
);
controls
.
rotateSpeed
=
1.0
;
controls
.
zoomSpeed
=
1.2
;
controls
.
panSpeed
=
0.8
;
controls
.
noZoom
=
false
;
controls
.
noPan
=
false
;
controls
.
staticMoving
=
false
;
controls
.
dynamicDampingFactor
=
0.15
;
controls
.
keys
=
[
65
,
83
,
68
];
// TEXTURES
var
textureLoader
=
new
THREE
.
TextureLoader
();
...
...
@@ -185,6 +169,22 @@
renderer
.
gammaInput
=
true
;
renderer
.
gammaOutput
=
true
;
// CONTROLS
controls
=
new
THREE
.
TrackballControls
(
camera
,
renderer
.
domElement
);
controls
.
rotateSpeed
=
1.0
;
controls
.
zoomSpeed
=
1.2
;
controls
.
panSpeed
=
0.8
;
controls
.
noZoom
=
false
;
controls
.
noPan
=
false
;
controls
.
staticMoving
=
false
;
controls
.
dynamicDampingFactor
=
0.15
;
controls
.
keys
=
[
65
,
83
,
68
];
// STATS
stats
=
new
Stats
();
...
...
examples/webgl_loader_3ds.html
浏览文件 @
3c78bc33
...
...
@@ -50,8 +50,6 @@
camera
=
new
THREE
.
PerspectiveCamera
(
60
,
window
.
innerWidth
/
window
.
innerHeight
,
0.1
,
10
);
camera
.
position
.
z
=
2
;
controls
=
new
THREE
.
TrackballControls
(
camera
);
scene
=
new
THREE
.
Scene
();
scene
.
add
(
new
THREE
.
HemisphereLight
()
);
...
...
@@ -86,6 +84,8 @@
renderer
.
setSize
(
window
.
innerWidth
,
window
.
innerHeight
);
container
.
appendChild
(
renderer
.
domElement
);
controls
=
new
THREE
.
TrackballControls
(
camera
,
renderer
.
domElement
);
window
.
addEventListener
(
'
resize
'
,
resize
,
false
);
}
...
...
examples/webgl_loader_babylon.html
浏览文件 @
3c78bc33
...
...
@@ -45,8 +45,6 @@
camera
=
new
THREE
.
PerspectiveCamera
(
45
,
window
.
innerWidth
/
window
.
innerHeight
,
1
,
2000
);
camera
.
position
.
z
=
100
;
controls
=
new
THREE
.
TrackballControls
(
camera
);
// scene
scene
=
new
THREE
.
Scene
();
...
...
@@ -103,6 +101,10 @@
//
controls
=
new
THREE
.
TrackballControls
(
camera
,
renderer
.
domElement
);
//
window
.
addEventListener
(
'
resize
'
,
onWindowResize
,
false
);
}
...
...
examples/webgl_loader_pcd.html
浏览文件 @
3c78bc33
...
...
@@ -74,21 +74,6 @@
camera
.
position
.
z
=
-
2
;
camera
.
up
.
set
(
0
,
0
,
1
);
controls
=
new
THREE
.
TrackballControls
(
camera
);
controls
.
rotateSpeed
=
2.0
;
controls
.
zoomSpeed
=
0.3
;
controls
.
panSpeed
=
0.2
;
controls
.
noZoom
=
false
;
controls
.
noPan
=
false
;
controls
.
staticMoving
=
true
;
controls
.
dynamicDampingFactor
=
0.3
;
controls
.
minDistance
=
0.3
;
controls
.
maxDistance
=
0.3
*
100
;
scene
.
add
(
camera
);
renderer
=
new
THREE
.
WebGLRenderer
(
{
antialias
:
true
}
);
...
...
@@ -110,6 +95,21 @@
document
.
body
.
appendChild
(
container
);
container
.
appendChild
(
renderer
.
domElement
);
controls
=
new
THREE
.
TrackballControls
(
camera
,
renderer
.
domElement
);
controls
.
rotateSpeed
=
2.0
;
controls
.
zoomSpeed
=
0.3
;
controls
.
panSpeed
=
0.2
;
controls
.
noZoom
=
false
;
controls
.
noPan
=
false
;
controls
.
staticMoving
=
true
;
controls
.
dynamicDampingFactor
=
0.3
;
controls
.
minDistance
=
0.3
;
controls
.
maxDistance
=
0.3
*
100
;
stats
=
new
Stats
();
container
.
appendChild
(
stats
.
dom
);
...
...
examples/webgl_loader_vtk.html
浏览文件 @
3c78bc33
...
...
@@ -62,18 +62,6 @@
camera
=
new
THREE
.
PerspectiveCamera
(
60
,
window
.
innerWidth
/
window
.
innerHeight
,
0.01
,
1
e10
);
camera
.
position
.
z
=
0.2
;
controls
=
new
THREE
.
TrackballControls
(
camera
);
controls
.
rotateSpeed
=
5.0
;
controls
.
zoomSpeed
=
5
;
controls
.
panSpeed
=
2
;
controls
.
noZoom
=
false
;
controls
.
noPan
=
false
;
controls
.
staticMoving
=
true
;
controls
.
dynamicDampingFactor
=
0.3
;
scene
=
new
THREE
.
Scene
();
scene
.
add
(
camera
);
...
...
@@ -162,6 +150,20 @@
document
.
body
.
appendChild
(
container
);
container
.
appendChild
(
renderer
.
domElement
);
// controls
controls
=
new
THREE
.
TrackballControls
(
camera
,
renderer
.
domElement
);
controls
.
rotateSpeed
=
5.0
;
controls
.
zoomSpeed
=
5
;
controls
.
panSpeed
=
2
;
controls
.
noZoom
=
false
;
controls
.
noPan
=
false
;
controls
.
staticMoving
=
true
;
controls
.
dynamicDampingFactor
=
0.3
;
stats
=
new
Stats
();
container
.
appendChild
(
stats
.
dom
);
...
...
examples/webgl_modifier_tessellation.html
浏览文件 @
3c78bc33
...
...
@@ -114,8 +114,6 @@
camera
=
new
THREE
.
PerspectiveCamera
(
40
,
WIDTH
/
HEIGHT
,
1
,
10000
);
camera
.
position
.
set
(
-
100
,
100
,
200
);
controls
=
new
THREE
.
TrackballControls
(
camera
);
scene
=
new
THREE
.
Scene
();
scene
.
background
=
new
THREE
.
Color
(
0x050505
);
...
...
@@ -214,6 +212,8 @@
var
container
=
document
.
getElementById
(
'
container
'
);
container
.
appendChild
(
renderer
.
domElement
);
controls
=
new
THREE
.
TrackballControls
(
camera
,
renderer
.
domElement
);
stats
=
new
Stats
();
container
.
appendChild
(
stats
.
dom
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录