Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
9987d597
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,发现更多精彩内容 >>
未验证
提交
9987d597
编写于
11月 27, 2019
作者:
M
Michael Herzog
提交者:
GitHub
11月 27, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #18015 from Mugen87/dev29
WebXR: Update docs and TS files.
上级
0dd60387
5b729616
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
43 addition
and
30 deletion
+43
-30
docs/manual/en/introduction/How-to-create-VR-content.html
docs/manual/en/introduction/How-to-create-VR-content.html
+16
-15
docs/manual/zh/introduction/How-to-create-VR-content.html
docs/manual/zh/introduction/How-to-create-VR-content.html
+16
-15
examples/jsm/webxr/VRButton.d.ts
examples/jsm/webxr/VRButton.d.ts
+11
-0
未找到文件。
docs/manual/en/introduction/How-to-create-VR-content.html
浏览文件 @
9987d597
...
@@ -20,22 +20,22 @@
...
@@ -20,22 +20,22 @@
<h2>
Workflow
</h2>
<h2>
Workflow
</h2>
<p>
<p>
First, you have to include [link:https://github.com/mrdoob/three.js/blob/master/examples/js
/vr/WebVR.js WebVR
.js]
First, you have to include [link:https://github.com/mrdoob/three.js/blob/master/examples/js
m/webxr/VRButton.js VRButton
.js]
into your project.
into your project.
</p>
</p>
<code>
<code>
import {
WEBVR } from 'three/examples/jsm/vr/WebVR
.js';
import {
VRButton } from 'three/examples/jsm/webxr/VRButton
.js';
</code>
</code>
<p>
<p>
*
WEBVR
.createButton()* does two important things: It creates a button which indicates
*
VRButton
.createButton()* does two important things: It creates a button which indicates
VR compatibility. Besides, it initiates a VR session if the user activates the button. The only thing you have
VR compatibility. Besides, it initiates a VR session if the user activates the button. The only thing you have
to do is to add the following line of code to your app.
to do is to add the following line of code to your app.
</p>
</p>
<code>
<code>
document.body.appendChild(
WEBVR
.createButton( renderer ) );
document.body.appendChild(
VRButton
.createButton( renderer ) );
</code>
</code>
<p>
<p>
...
@@ -65,17 +65,18 @@ renderer.setAnimationLoop( function () {
...
@@ -65,17 +65,18 @@ renderer.setAnimationLoop( function () {
<p>
<p>
Have a look at one of the official WebVR examples to see this workflow in action.
<br
/><br
/>
Have a look at one of the official WebVR examples to see this workflow in action.
<br
/><br
/>
[example:webvr_ballshooter WebVR / ballshoter]
<br
/>
[example:webxr_vr_ballshooter WebXR / VR / ballshoter]
<br
/>
[example:webvr_cubes WebVR / cubes]
<br
/>
[example:webxr_vr_cubes WebXR / VR / cubes]
<br
/>
[example:webvr_dragging WebVR / dragging]
<br
/>
[example:webxr_vr_dragging WebXR / VR / dragging]
<br
/>
[example:webvr_lorenzattractor WebVR / lorenzattractor]
<br
/>
[example:webxr_vr_lorenzattractor WebXR / VR / lorenzattractor]
<br
/>
[example:webvr_panorama WebVR / panorama]
<br
/>
[example:webxr_vr_multiview WebXR / VR / multiview]
<br
/>
[example:webvr_paint WebVR / paint]
<br
/>
[example:webxr_vr_paint WebXR / VR / paint]
<br
/>
[example:webvr_rollercoaster WebVR / rollercoaster]
<br
/>
[example:webxr_vr_panorama_depth WebXR / VR / panorama_depth]
<br
/>
[example:webvr_sandbox WebVR / sandbox]
<br
/>
[example:webxr_vr_panorama WebXR / VR / panorama]
<br
/>
[example:webvr_sculpt WebVR / sculpt]
<br
/>
[example:webxr_vr_rollercoaster WebXR / VR / rollercoaster]
<br
/>
[example:webvr_vive_paint WebVR / vive / paint]
<br
/>
[example:webxr_vr_sandbox WebXR / VR / sandbox]
<br
/>
[example:webvr_vive_sculpt WebVR / vive / sculpt]
<br
/>
[example:webxr_vr_sculpt WebXR / VR / sculpt]
<br
/>
[example:webxr_vr_video WebXR / VR / video]
</p>
</p>
</body>
</body>
...
...
docs/manual/zh/introduction/How-to-create-VR-content.html
浏览文件 @
9987d597
...
@@ -19,21 +19,21 @@
...
@@ -19,21 +19,21 @@
<h2>
工作流程
</h2>
<h2>
工作流程
</h2>
<p>
<p>
首先,你需要将[link:https://github.com/mrdoob/three.js/blob/master/examples/js
/vr/WebVR.js WebVR
.js]
首先,你需要将[link:https://github.com/mrdoob/three.js/blob/master/examples/js
m/webxr/VRButton.js VRButton
.js]
包含到你的项目中。
包含到你的项目中。
</p>
</p>
<code>
<code>
import {
WEBVR } from 'three/examples/jsm/vr/WebVR
.js';
import {
VRButton } from 'three/examples/jsm/webxr/VRButton
.js';
</code>
</code>
<p>
*
WEBVR
.createButton()*做了两件重要的事情:首先,它创建了一个按钮,指示了VR的兼容性;
<p>
*
VRButton
.createButton()*做了两件重要的事情:首先,它创建了一个按钮,指示了VR的兼容性;
此外,若用户激活了这个按钮,则它将开启一个VR会话。
此外,若用户激活了这个按钮,则它将开启一个VR会话。
你所要做的唯一一件事情,便是把下面的这一行代码加入到你的应用程序里。
你所要做的唯一一件事情,便是把下面的这一行代码加入到你的应用程序里。
</p>
</p>
<code>
<code>
document.body.appendChild(
WEBVR
.createButton( renderer ) );
document.body.appendChild(
VRButton
.createButton( renderer ) );
</code>
</code>
<p>
<p>
...
@@ -65,17 +65,18 @@ renderer.setAnimationLoop( function () {
...
@@ -65,17 +65,18 @@ renderer.setAnimationLoop( function () {
请查看官方示例中与WebVR相关的示例,了解这一工作流程的实际使用、运行情况。
请查看官方示例中与WebVR相关的示例,了解这一工作流程的实际使用、运行情况。
<br
/><br
/>
<br
/><br
/>
[example:webvr_ballshooter WebVR / ballshoter]
<br
/>
[example:webxr_vr_ballshooter WebXR / VR / ballshoter]
<br
/>
[example:webvr_cubes WebVR / cubes]
<br
/>
[example:webxr_vr_cubes WebXR / VR / cubes]
<br
/>
[example:webvr_dragging WebVR / dragging]
<br
/>
[example:webxr_vr_dragging WebXR / VR / dragging]
<br
/>
[example:webvr_lorenzattractor WebVR / lorenzattractor]
<br
/>
[example:webxr_vr_lorenzattractor WebXR / VR / lorenzattractor]
<br
/>
[example:webvr_panorama WebVR / panorama]
<br
/>
[example:webxr_vr_multiview WebXR / VR / multiview]
<br
/>
[example:webvr_paint WebVR / paint]
<br
/>
[example:webxr_vr_paint WebXR / VR / paint]
<br
/>
[example:webvr_rollercoaster WebVR / rollercoaster]
<br
/>
[example:webxr_vr_panorama_depth WebXR / VR / panorama_depth]
<br
/>
[example:webvr_sandbox WebVR / sandbox]
<br
/>
[example:webxr_vr_panorama WebXR / VR / panorama]
<br
/>
[example:webvr_sculpt WebVR / sculpt]
<br
/>
[example:webxr_vr_rollercoaster WebXR / VR / rollercoaster]
<br
/>
[example:webvr_vive_paint WebVR / vive / paint]
<br
/>
[example:webxr_vr_sandbox WebXR / VR / sandbox]
<br
/>
[example:webvr_vive_sculpt WebVR / vive / sculpt]
<br
/>
[example:webxr_vr_sculpt WebXR / VR / sculpt]
<br
/>
[example:webxr_vr_video WebXR / VR / video]
</p>
</p>
</body>
</body>
...
...
examples/jsm/webxr/VRButton.d.ts
0 → 100644
浏览文件 @
9987d597
import
{
WebGLRenderer
}
from
'
../../../src/Three
'
;
export
interface
WebXROptions
{
referenceSpaceType
:
string
;
}
export
namespace
VRButton
{
export
function
createButton
(
renderer
:
WebGLRenderer
,
options
?:
WebXROptions
):
HTMLElement
;
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录