Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
c52b2a85
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,体验更适合开发者的 AI 搜索 >>
未验证
提交
c52b2a85
编写于
8月 11, 2021
作者:
M
Mr.doob
提交者:
GitHub
8月 11, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Examples: Removed webxr_vr_lorenzattractor. (#22315)
上级
6791f074
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
2 addition
and
183 deletion
+2
-183
docs/manual/ar/introduction/How-to-create-VR-content.html
docs/manual/ar/introduction/How-to-create-VR-content.html
+0
-1
docs/manual/en/introduction/How-to-create-VR-content.html
docs/manual/en/introduction/How-to-create-VR-content.html
+0
-1
docs/manual/ja/introduction/How-to-create-VR-content.html
docs/manual/ja/introduction/How-to-create-VR-content.html
+0
-1
docs/manual/ko/introduction/How-to-create-VR-content.html
docs/manual/ko/introduction/How-to-create-VR-content.html
+2
-3
docs/manual/zh/introduction/How-to-create-VR-content.html
docs/manual/zh/introduction/How-to-create-VR-content.html
+0
-1
examples/files.json
examples/files.json
+0
-1
examples/screenshots/webxr_vr_lorenzattractor.jpg
examples/screenshots/webxr_vr_lorenzattractor.jpg
+0
-0
examples/webxr_vr_lorenzattractor.html
examples/webxr_vr_lorenzattractor.html
+0
-175
未找到文件。
docs/manual/ar/introduction/How-to-create-VR-content.html
浏览文件 @
c52b2a85
...
...
@@ -62,7 +62,6 @@ renderer.setAnimationLoop( function () {
[example:webxr_vr_ballshooter WebXR / VR / ballshooter]
<br
/>
[example:webxr_vr_cubes WebXR / VR / cubes]
<br
/>
[example:webxr_vr_dragging WebXR / VR / dragging]
<br
/>
[example:webxr_vr_lorenzattractor WebXR / VR / lorenzattractor]
<br
/>
[example:webxr_vr_paint WebXR / VR / paint]
<br
/>
[example:webxr_vr_panorama_depth WebXR / VR / panorama_depth]
<br
/>
[example:webxr_vr_panorama WebXR / VR / panorama]
<br
/>
...
...
docs/manual/en/introduction/How-to-create-VR-content.html
浏览文件 @
c52b2a85
...
...
@@ -67,7 +67,6 @@ renderer.setAnimationLoop( function () {
[example:webxr_vr_ballshooter WebXR / VR / ballshooter]
<br
/>
[example:webxr_vr_cubes WebXR / VR / cubes]
<br
/>
[example:webxr_vr_dragging WebXR / VR / dragging]
<br
/>
[example:webxr_vr_lorenzattractor WebXR / VR / lorenzattractor]
<br
/>
[example:webxr_vr_paint WebXR / VR / paint]
<br
/>
[example:webxr_vr_panorama_depth WebXR / VR / panorama_depth]
<br
/>
[example:webxr_vr_panorama WebXR / VR / panorama]
<br
/>
...
...
docs/manual/ja/introduction/How-to-create-VR-content.html
浏览文件 @
c52b2a85
...
...
@@ -61,7 +61,6 @@ renderer.setAnimationLoop( function () {
[example:webxr_vr_ballshooter WebXR / VR / ballshooter]
<br
/>
[example:webxr_vr_cubes WebXR / VR / cubes]
<br
/>
[example:webxr_vr_dragging WebXR / VR / dragging]
<br
/>
[example:webxr_vr_lorenzattractor WebXR / VR / lorenzattractor]
<br
/>
[example:webxr_vr_paint WebXR / VR / paint]
<br
/>
[example:webxr_vr_panorama_depth WebXR / VR / panorama_depth]
<br
/>
[example:webxr_vr_panorama WebXR / VR / panorama]
<br
/>
...
...
docs/manual/ko/introduction/How-to-create-VR-content.html
浏览文件 @
c52b2a85
...
...
@@ -44,7 +44,7 @@ renderer.xr.enabled = true;
</code>
<p>
마지막으로, 자주 쓰이는 *window.requestAnimationFrame()* 기능을 활용할 수 없기 때문에, 애니메이션 루프를 수정해주어야 합니다.
마지막으로, 자주 쓰이는 *window.requestAnimationFrame()* 기능을 활용할 수 없기 때문에, 애니메이션 루프를 수정해주어야 합니다.
VR 프로젝트에서는 [page:WebGLRenderer.setAnimationLoop setAnimationLoop]를 사용합니다.
가장 간소화된 코드는 다음과 같습니다:
</p>
...
...
@@ -65,7 +65,6 @@ renderer.setAnimationLoop( function () {
[example:webxr_vr_ballshooter WebXR / VR / ballshooter]
<br
/>
[example:webxr_vr_cubes WebXR / VR / cubes]
<br
/>
[example:webxr_vr_dragging WebXR / VR / dragging]
<br
/>
[example:webxr_vr_lorenzattractor WebXR / VR / lorenzattractor]
<br
/>
[example:webxr_vr_paint WebXR / VR / paint]
<br
/>
[example:webxr_vr_panorama_depth WebXR / VR / panorama_depth]
<br
/>
[example:webxr_vr_panorama WebXR / VR / panorama]
<br
/>
...
...
@@ -77,4 +76,4 @@ renderer.setAnimationLoop( function () {
</body>
</html>
\ No newline at end of file
</html>
docs/manual/zh/introduction/How-to-create-VR-content.html
浏览文件 @
c52b2a85
...
...
@@ -67,7 +67,6 @@ renderer.setAnimationLoop( function () {
[example:webxr_vr_ballshooter WebXR / VR / ballshooter]
<br
/>
[example:webxr_vr_cubes WebXR / VR / cubes]
<br
/>
[example:webxr_vr_dragging WebXR / VR / dragging]
<br
/>
[example:webxr_vr_lorenzattractor WebXR / VR / lorenzattractor]
<br
/>
[example:webxr_vr_paint WebXR / VR / paint]
<br
/>
[example:webxr_vr_panorama_depth WebXR / VR / panorama_depth]
<br
/>
[example:webxr_vr_panorama WebXR / VR / panorama]
<br
/>
...
...
examples/files.json
浏览文件 @
c52b2a85
...
...
@@ -347,7 +347,6 @@
"webxr_vr_handinput_pressbutton"
,
"webxr_vr_haptics"
,
"webxr_vr_layers"
,
"webxr_vr_lorenzattractor"
,
"webxr_vr_panorama"
,
"webxr_vr_panorama_depth"
,
"webxr_vr_paint"
,
...
...
examples/screenshots/webxr_vr_lorenzattractor.jpg
已删除
100644 → 0
浏览文件 @
6791f074
6.2 KB
examples/webxr_vr_lorenzattractor.html
已删除
100644 → 0
浏览文件 @
6791f074
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<title>
three.js vr - lorenz attractor
</title>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0, user-scalable=no"
>
<link
type=
"text/css"
rel=
"stylesheet"
href=
"main.css"
>
</head>
<body>
<script
type=
"module"
>
import
*
as
THREE
from
'
../build/three.module.js
'
;
import
{
VRButton
}
from
'
./jsm/webxr/VRButton.js
'
;
let
camera
,
scene
,
renderer
;
let
attractor
,
light
;
let
x
=
15
*
Math
.
random
();
let
y
=
15
*
Math
.
random
();
let
z
=
15
*
Math
.
random
();
const
scale
=
.
02
;
// for reducing overall displayed size
const
speed
=
5
;
// integer, increase for faster visualization
const
steps
=
100000
;
let
current
=
1
;
const
shown
=
10000
;
const
beta
=
8
/
3
;
const
rho
=
28
;
const
sigma
=
10
;
const
dt
=
.
005
;
init
();
animate
();
function
draw
()
{
const
geometry
=
attractor
.
geometry
;
geometry
.
attributes
.
position
.
array
.
copyWithin
(
3
);
geometry
.
attributes
.
color
.
array
.
copyWithin
(
3
);
if
(
current
<
steps
)
{
const
dx
=
sigma
*
(
y
-
x
)
*
dt
;
const
dy
=
(
x
*
(
rho
-
z
)
-
y
)
*
dt
;
const
dz
=
(
x
*
y
-
beta
*
z
)
*
dt
;
x
+=
dx
;
y
+=
dy
;
z
+=
dz
;
geometry
.
attributes
.
position
.
set
(
[
scale
*
x
,
scale
*
y
,
scale
*
z
],
0
);
light
.
color
.
setHSL
(
current
/
steps
,
1
,
.
5
);
geometry
.
attributes
.
color
.
set
(
light
.
color
.
toArray
(),
0
);
}
if
(
current
<
steps
+
shown
)
{
current
++
;
}
else
{
current
=
0
;
}
}
function
init
()
{
scene
=
new
THREE
.
Scene
();
camera
=
new
THREE
.
PerspectiveCamera
(
50
,
window
.
innerWidth
/
window
.
innerHeight
,
0.1
,
10
);
camera
.
position
.
set
(
0
,
1.6
,
1
);
//
const
geometry
=
new
THREE
.
BufferGeometry
();
const
positions
=
new
Float32Array
(
3
*
shown
);
for
(
let
i
=
0
;
i
<
positions
.
length
;
i
+=
3
)
{
positions
.
set
(
[
scale
*
x
,
scale
*
y
,
scale
*
z
],
i
);
}
geometry
.
setAttribute
(
'
position
'
,
new
THREE
.
BufferAttribute
(
positions
,
3
)
);
const
colors
=
new
Float32Array
(
3
*
shown
);
for
(
let
i
=
0
;
i
<
positions
.
length
;
i
+=
3
)
{
colors
.
set
(
[
1
,
0
,
0
],
i
);
}
geometry
.
setAttribute
(
'
color
'
,
new
THREE
.
BufferAttribute
(
colors
,
3
)
);
const
material
=
new
THREE
.
LineBasicMaterial
(
{
vertexColors
:
true
}
);
attractor
=
new
THREE
.
Line
(
geometry
,
material
);
attractor
.
position
.
set
(
0
,
1.5
,
-
2
);
attractor
.
frustumCulled
=
false
;
// critical to avoid blackouts!
scene
.
add
(
attractor
);
//
light
=
new
THREE
.
PointLight
(
0xffffff
,
1
);
light
.
distance
=
2
;
attractor
.
add
(
light
);
const
ground
=
new
THREE
.
Mesh
(
new
THREE
.
PlaneGeometry
(
10
,
10
),
new
THREE
.
MeshPhongMaterial
()
);
ground
.
geometry
.
rotateX
(
-
90
*
Math
.
PI
/
180
);
scene
.
add
(
ground
);
//
renderer
=
new
THREE
.
WebGLRenderer
(
{
antialias
:
true
}
);
renderer
.
setPixelRatio
(
window
.
devicePixelRatio
);
renderer
.
setSize
(
window
.
innerWidth
,
window
.
innerHeight
);
renderer
.
xr
.
enabled
=
true
;
document
.
body
.
appendChild
(
renderer
.
domElement
);
document
.
body
.
appendChild
(
VRButton
.
createButton
(
renderer
)
);
//
window
.
addEventListener
(
'
resize
'
,
onWindowResize
);
//
if
(
typeof
TESTING
!==
'
undefined
'
)
{
for
(
let
i
=
0
;
i
<
200
;
i
++
)
{
render
();
}
};
}
function
onWindowResize
()
{
camera
.
aspect
=
window
.
innerWidth
/
window
.
innerHeight
;
camera
.
updateProjectionMatrix
();
renderer
.
setSize
(
window
.
innerWidth
,
window
.
innerHeight
);
}
function
animate
()
{
renderer
.
setAnimationLoop
(
render
);
}
function
render
()
{
for
(
let
i
=
0
;
i
<
speed
;
i
++
)
draw
();
attractor
.
geometry
.
attributes
.
position
.
needsUpdate
=
true
;
attractor
.
geometry
.
attributes
.
color
.
needsUpdate
=
true
;
attractor
.
rotation
.
z
+=
.
001
;
renderer
.
render
(
scene
,
camera
);
}
</script>
</body>
</html>
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录