Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
72d463c9
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,发现更多精彩内容 >>
未验证
提交
72d463c9
编写于
3月 15, 2019
作者:
M
Mr.doob
提交者:
GitHub
3月 15, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #15986 from donmccurdy/jsm-import-location
JSM: Move imports beneath JSDoc header.
上级
d7fd8412
328dd899
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
48 addition
and
40 deletion
+48
-40
examples/jsm/controls/MapControls.js
examples/jsm/controls/MapControls.js
+8
-8
examples/jsm/controls/OrbitControls.js
examples/jsm/controls/OrbitControls.js
+7
-7
examples/jsm/exporters/GLTFExporter.js
examples/jsm/exporters/GLTFExporter.js
+23
-23
utils/modularize.js
utils/modularize.js
+10
-2
未找到文件。
examples/jsm/controls/MapControls.js
浏览文件 @
72d463c9
...
...
@@ -7,14 +7,6 @@
* @author moroine / https://github.com/moroine
*/
// This set of controls performs orbiting, dollying (zooming), and panning.
// Unlike TrackballControls, it maintains the "up" direction object.up (+Y by default).
// This is very similar to OrbitControls, another set of touch behavior
//
// Orbit - right mouse, or left mouse + ctrl/meta/shiftKey / touch: two-finger rotate
// Zoom - middle mouse, or mousewheel / touch: two-finger spread or squish
// Pan - left mouse, or arrow keys / touch: one-finger move
import
{
EventDispatcher
,
MOUSE
,
...
...
@@ -24,6 +16,14 @@ import {
Vector3
}
from
"
../../../build/three.module.js
"
;
// This set of controls performs orbiting, dollying (zooming), and panning.
// Unlike TrackballControls, it maintains the "up" direction object.up (+Y by default).
// This is very similar to OrbitControls, another set of touch behavior
//
// Orbit - right mouse, or left mouse + ctrl/meta/shiftKey / touch: two-finger rotate
// Zoom - middle mouse, or mousewheel / touch: two-finger spread or squish
// Pan - left mouse, or arrow keys / touch: one-finger move
var
MapControls
=
function
(
object
,
domElement
)
{
this
.
object
=
object
;
...
...
examples/jsm/controls/OrbitControls.js
浏览文件 @
72d463c9
...
...
@@ -6,13 +6,6 @@
* @author erich666 / http://erichaines.com
*/
// This set of controls performs orbiting, dollying (zooming), and panning.
// Unlike TrackballControls, it maintains the "up" direction object.up (+Y by default).
//
// Orbit - left mouse / touch: one-finger move
// Zoom - middle mouse, or mousewheel / touch: two-finger spread or squish
// Pan - right mouse, or left mouse + ctrl/meta/shiftKey, or arrow keys / touch: two-finger move
import
{
EventDispatcher
,
MOUSE
,
...
...
@@ -22,6 +15,13 @@ import {
Vector3
}
from
"
../../../build/three.module.js
"
;
// This set of controls performs orbiting, dollying (zooming), and panning.
// Unlike TrackballControls, it maintains the "up" direction object.up (+Y by default).
//
// Orbit - left mouse / touch: one-finger move
// Zoom - middle mouse, or mousewheel / touch: two-finger spread or squish
// Pan - right mouse, or left mouse + ctrl/meta/shiftKey, or arrow keys / touch: two-finger move
var
OrbitControls
=
function
(
object
,
domElement
)
{
this
.
object
=
object
;
...
...
examples/jsm/exporters/GLTFExporter.js
浏览文件 @
72d463c9
...
...
@@ -4,6 +4,29 @@
* @author Takahiro / https://github.com/takahirox
*/
import
{
BufferAttribute
,
BufferGeometry
,
ClampToEdgeWrapping
,
DoubleSide
,
InterpolateDiscrete
,
LinearFilter
,
LinearMipMapLinearFilter
,
LinearMipMapNearestFilter
,
Math
as
_Math
,
MirroredRepeatWrapping
,
NearestFilter
,
NearestMipMapLinearFilter
,
NearestMipMapNearestFilter
,
PropertyBinding
,
RGBAFormat
,
RepeatWrapping
,
Scene
,
TriangleFanDrawMode
,
TriangleStripDrawMode
,
Vector3
}
from
"
../../../build/three.module.js
"
;
//------------------------------------------------------------------------------
// Constants
//------------------------------------------------------------------------------
...
...
@@ -58,29 +81,6 @@ var PATH_PROPERTIES = {
//------------------------------------------------------------------------------
// GLTF Exporter
//------------------------------------------------------------------------------
import
{
BufferAttribute
,
BufferGeometry
,
ClampToEdgeWrapping
,
DoubleSide
,
InterpolateDiscrete
,
LinearFilter
,
LinearMipMapLinearFilter
,
LinearMipMapNearestFilter
,
Math
as
_Math
,
MirroredRepeatWrapping
,
NearestFilter
,
NearestMipMapLinearFilter
,
NearestMipMapNearestFilter
,
PropertyBinding
,
RGBAFormat
,
RepeatWrapping
,
Scene
,
TriangleFanDrawMode
,
TriangleStripDrawMode
,
Vector3
}
from
"
../../../build/three.module.js
"
;
var
GLTFExporter
=
function
()
{};
GLTFExporter
.
prototype
=
{
...
...
utils/modularize.js
浏览文件 @
72d463c9
...
...
@@ -12,7 +12,7 @@ var files = [
{
path
:
'
controls/MapControls.js
'
,
ignoreList
:
[]
},
{
path
:
'
controls/TrackballControls.js
'
,
ignoreList
:
[]
},
// { path: 'controls/TransformControls.js', ignoreList: [] },
{
path
:
'
exporters/GLTFExporter.js
'
,
ignoreList
:
[
'
AnimationClip
'
,
'
Camera
'
,
'
Geometry
'
,
'
Material
'
,
'
Mesh
'
,
'
Object3D
'
,
'
RGBFormat
'
,
'
Scenes
'
,
'
ShaderMaterial
'
,
'
VertexColors
'
]
},
{
path
:
'
exporters/GLTFExporter.js
'
,
ignoreList
:
[
'
AnimationClip
'
,
'
Camera
'
,
'
Geometry
'
,
'
Material
'
,
'
Mesh
'
,
'
Object3D
'
,
'
RGBFormat
'
,
'
Scenes
'
,
'
ShaderMaterial
'
,
'
VertexColors
'
]
},
{
path
:
'
exporters/MMDExporter.js
'
,
ignoreList
:
[]
},
{
path
:
'
exporters/OBJExporter.js
'
,
ignoreList
:
[]
},
{
path
:
'
exporters/PLYExporter.js
'
,
ignoreList
:
[]
},
...
...
@@ -39,6 +39,14 @@ function convert( path, ignoreList ) {
var
className
=
''
;
var
dependencies
=
{};
// imports
contents
=
contents
.
replace
(
/^
\/\*
+
[^
*
]
*
\*
+
(?:[^/
*
][^
*
]
*
\*
+
)
*
\/
/
,
function
(
match
)
{
return
`
${
match
}
\n\n_IMPORTS_`
;
}
);
// class name
contents
=
contents
.
replace
(
/THREE
\.([
a-zA-Z0-9
]
+
)
= /g
,
function
(
match
,
p1
)
{
...
...
@@ -47,7 +55,7 @@ function convert( path, ignoreList ) {
console
.
log
(
className
);
return
`
_IMPORTS_\n\n
var
${
p1
}
= `
;
return
`var
${
p1
}
= `
;
}
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录