Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
14a84528
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,发现更多精彩内容 >>
提交
14a84528
编写于
4月 26, 2020
作者:
L
linbingquan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Docs: zh for Typescript-setup.html
上级
3c0ec00a
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
8 addition
and
13 deletion
+8
-13
docs/list.js
docs/list.js
+1
-1
docs/manual/zh/introduction/Typescript-setup.html
docs/manual/zh/introduction/Typescript-setup.html
+7
-12
未找到文件。
docs/list.js
浏览文件 @
14a84528
...
...
@@ -462,7 +462,7 @@ var list = {
"
浏览器支持
"
:
"
manual/zh/introduction/Browser-support
"
,
"
WebGL兼容性检查
"
:
"
manual/zh/introduction/WebGL-compatibility-check
"
,
"
如何在本地运行Three.js
"
:
"
manual/zh/introduction/How-to-run-things-locally
"
,
"
Typescript
setup
"
:
"
manual/zh/introduction/Typescript-setup
"
,
"
Typescript
设置
"
:
"
manual/zh/introduction/Typescript-setup
"
,
"
如何使用WebGL 2
"
:
"
manual/zh/introduction/How-to-use-WebGL2
"
,
"
画线
"
:
"
manual/zh/introduction/Drawing-lines
"
,
"
创建文字
"
:
"
manual/zh/introduction/Creating-text
"
,
...
...
docs/manual/zh/introduction/Typescript-setup.html
浏览文件 @
14a84528
...
...
@@ -8,22 +8,19 @@
<link
type=
"text/css"
rel=
"stylesheet"
href=
"page.css"
/>
</head>
<body>
<h1>
[name]
</h1>
<h1>
TypeScript设置([name])
</h1>
<p>
three.js is a JavaScript-based library. However, it's possible to use it in a TypeScript project, as the library
exposes [link:https://www.typescriptlang.org/docs/handbook/declaration-files/introduction.html Declaration Files] (*d.ts* files).
three.js是一个基于JavaScript的库。但是,可以在TypeScript项目中使用它,因为该库公开了声明文件 [link:https://www.typescriptlang.org/docs/handbook/declaration-files/introduction.html Declaration Files](*d.ts* 文件)。
</p>
<p>
A minimal configuration is required for the TypeScript compiler to
discover three.js types.
<br>
You will need to set the [link:https://www.typescriptlang.org/docs/handbook/module-resolution.html moduleResolution]
option to *node*, and the [link:https://www.typescriptlang.org/docs/handbook/compiler-options.html target] option to *es6* or newer.
TypeScript编译器需要最少的配置即可发现three.js类型。
<br>
你将需要设置 [link:https://www.typescriptlang.org/docs/handbook/module-resolution.html moduleResolution] (模块解析)为 *node* 和 [link:https://www.typescriptlang.org/docs/handbook/compiler-options.html target] (目标) 为 *es6* 或更高版本。
</p>
<code>
//
Example of minimal `tsconfig.json` file
//
tsconfig.json文件最少配置例子
{
"compilerOptions": {
"target": "es6",
...
...
@@ -34,13 +31,11 @@
</code>
<p>
Note: As of today, it's not yet possible to use three.js typings without using those two options.
注意:到目前为止,如果不使用这两个选项,则无法使用three.js类型。
</p>
<p>
Note: It happens that some declarations are incorrect and/or missing.
Contributing to Declaration Files is really helpful for the community, making three.js
typings better and more accurate.
注意:某些声明可能不正确或缺失。为声明文件做贡献对社区真的很有帮助,使Three.js开发会更好更准确。
</p>
</body>
</html>
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录