Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
e9ad7508
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,发现更多精彩内容 >>
提交
e9ad7508
编写于
4月 04, 2020
作者:
M
Mugen87
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Examples: Clean up.
上级
1e17676c
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
130 addition
and
103 deletion
+130
-103
examples/js/loaders/DDSLoader.js
examples/js/loaders/DDSLoader.js
+31
-31
examples/jsm/loaders/DDSLoader.js
examples/jsm/loaders/DDSLoader.js
+31
-31
examples/models/obj/verify/gulpfile.js
examples/models/obj/verify/gulpfile.js
+56
-33
examples/webgl_instancing_scatter.html
examples/webgl_instancing_scatter.html
+11
-7
examples/webgl_loader_gltf.html
examples/webgl_loader_gltf.html
+1
-1
未找到文件。
examples/js/loaders/DDSLoader.js
浏览文件 @
e9ad7508
...
...
@@ -24,34 +24,34 @@ THREE.DDSLoader.prototype = Object.assign( Object.create( THREE.CompressedTextur
var
DDS_MAGIC
=
0x20534444
;
var
DDSD_CAPS
=
0x1
,
DDSD_HEIGHT
=
0x2
,
DDSD_WIDTH
=
0x4
,
DDSD_PITCH
=
0x8
,
DDSD_PIXELFORMAT
=
0x1000
,
DDSD_MIPMAPCOUNT
=
0x20000
,
DDSD_LINEARSIZE
=
0x80000
,
DDSD_DEPTH
=
0x800000
;
var
DDSCAPS_COMPLEX
=
0x8
,
DDSCAPS_MIPMAP
=
0x400000
,
DDSCAPS_TEXTURE
=
0x1000
;
var
DDSCAPS2_CUBEMAP
=
0x200
,
DDSCAPS2_CUBEMAP_POSITIVEX
=
0x400
,
DDSCAPS2_CUBEMAP_NEGATIVEX
=
0x800
,
DDSCAPS2_CUBEMAP_POSITIVEY
=
0x1000
,
DDSCAPS2_CUBEMAP_NEGATIVEY
=
0x2000
,
DDSCAPS2_CUBEMAP_POSITIVEZ
=
0x4000
,
DDSCAPS2_CUBEMAP_NEGATIVEZ
=
0x8000
,
DDSCAPS2_VOLUME
=
0x200000
;
var
DDPF_ALPHAPIXELS
=
0x1
,
DDPF_ALPHA
=
0x2
,
DDPF_FOURCC
=
0x4
,
DDPF_RGB
=
0x40
,
DDPF_YUV
=
0x200
,
DDPF_LUMINANCE
=
0x20000
;
// var DDSD_CAPS = 0x1;
// var DDSD_HEIGHT = 0x2;
// var DDSD_WIDTH = 0x4;
// var DDSD_PITCH = 0x8;
// var DDSD_PIXELFORMAT = 0x1000;
var
DDSD_MIPMAPCOUNT
=
0x20000
;
// var DDSD_LINEARSIZE = 0x80000;
// var
DDSD_DEPTH = 0x800000;
// var DDSCAPS_COMPLEX = 0x8;
// var DDSCAPS_MIPMAP = 0x400000;
// var
DDSCAPS_TEXTURE = 0x1000;
var
DDSCAPS2_CUBEMAP
=
0x200
;
var
DDSCAPS2_CUBEMAP_POSITIVEX
=
0x400
;
var
DDSCAPS2_CUBEMAP_NEGATIVEX
=
0x800
;
var
DDSCAPS2_CUBEMAP_POSITIVEY
=
0x1000
;
var
DDSCAPS2_CUBEMAP_NEGATIVEY
=
0x2000
;
var
DDSCAPS2_CUBEMAP_POSITIVEZ
=
0x4000
;
var
DDSCAPS2_CUBEMAP_NEGATIVEZ
=
0x8000
;
// var
DDSCAPS2_VOLUME = 0x200000;
// var DDPF_ALPHAPIXELS = 0x1;
// var DDPF_ALPHA = 0x2;
var
DDPF_FOURCC
=
0x4
;
// var DDPF_RGB = 0x40;
// var DDPF_YUV = 0x200;
// var
DDPF_LUMINANCE = 0x20000;
function
fourCCToInt32
(
value
)
{
...
...
@@ -126,10 +126,10 @@ THREE.DDSLoader.prototype = Object.assign( Object.create( THREE.CompressedTextur
var
off_BBitMask
=
25
;
var
off_ABitMask
=
26
;
var
off_caps
=
27
;
//
var off_caps = 27;
var
off_caps2
=
28
;
var
off_caps3
=
29
;
var
off_caps4
=
30
;
//
var off_caps3 = 29;
//
var off_caps4 = 30;
// Parse header
...
...
examples/jsm/loaders/DDSLoader.js
浏览文件 @
e9ad7508
...
...
@@ -33,34 +33,34 @@ DDSLoader.prototype = Object.assign( Object.create( CompressedTextureLoader.prot
var
DDS_MAGIC
=
0x20534444
;
var
DDSD_CAPS
=
0x1
,
DDSD_HEIGHT
=
0x2
,
DDSD_WIDTH
=
0x4
,
DDSD_PITCH
=
0x8
,
DDSD_PIXELFORMAT
=
0x1000
,
DDSD_MIPMAPCOUNT
=
0x20000
,
DDSD_LINEARSIZE
=
0x80000
,
DDSD_DEPTH
=
0x800000
;
var
DDSCAPS_COMPLEX
=
0x8
,
DDSCAPS_MIPMAP
=
0x400000
,
DDSCAPS_TEXTURE
=
0x1000
;
var
DDSCAPS2_CUBEMAP
=
0x200
,
DDSCAPS2_CUBEMAP_POSITIVEX
=
0x400
,
DDSCAPS2_CUBEMAP_NEGATIVEX
=
0x800
,
DDSCAPS2_CUBEMAP_POSITIVEY
=
0x1000
,
DDSCAPS2_CUBEMAP_NEGATIVEY
=
0x2000
,
DDSCAPS2_CUBEMAP_POSITIVEZ
=
0x4000
,
DDSCAPS2_CUBEMAP_NEGATIVEZ
=
0x8000
,
DDSCAPS2_VOLUME
=
0x200000
;
var
DDPF_ALPHAPIXELS
=
0x1
,
DDPF_ALPHA
=
0x2
,
DDPF_FOURCC
=
0x4
,
DDPF_RGB
=
0x40
,
DDPF_YUV
=
0x200
,
DDPF_LUMINANCE
=
0x20000
;
// var DDSD_CAPS = 0x1;
// var DDSD_HEIGHT = 0x2;
// var DDSD_WIDTH = 0x4;
// var DDSD_PITCH = 0x8;
// var DDSD_PIXELFORMAT = 0x1000;
var
DDSD_MIPMAPCOUNT
=
0x20000
;
// var DDSD_LINEARSIZE = 0x80000;
// var
DDSD_DEPTH = 0x800000;
// var DDSCAPS_COMPLEX = 0x8;
// var DDSCAPS_MIPMAP = 0x400000;
// var
DDSCAPS_TEXTURE = 0x1000;
var
DDSCAPS2_CUBEMAP
=
0x200
;
var
DDSCAPS2_CUBEMAP_POSITIVEX
=
0x400
;
var
DDSCAPS2_CUBEMAP_NEGATIVEX
=
0x800
;
var
DDSCAPS2_CUBEMAP_POSITIVEY
=
0x1000
;
var
DDSCAPS2_CUBEMAP_NEGATIVEY
=
0x2000
;
var
DDSCAPS2_CUBEMAP_POSITIVEZ
=
0x4000
;
var
DDSCAPS2_CUBEMAP_NEGATIVEZ
=
0x8000
;
// var
DDSCAPS2_VOLUME = 0x200000;
// var DDPF_ALPHAPIXELS = 0x1;
// var DDPF_ALPHA = 0x2;
var
DDPF_FOURCC
=
0x4
;
// var DDPF_RGB = 0x40;
// var DDPF_YUV = 0x200;
// var
DDPF_LUMINANCE = 0x20000;
function
fourCCToInt32
(
value
)
{
...
...
@@ -135,10 +135,10 @@ DDSLoader.prototype = Object.assign( Object.create( CompressedTextureLoader.prot
var
off_BBitMask
=
25
;
var
off_ABitMask
=
26
;
var
off_caps
=
27
;
//
var off_caps = 27;
var
off_caps2
=
28
;
var
off_caps3
=
29
;
var
off_caps4
=
30
;
//
var off_caps3 = 29;
//
var off_caps4 = 30;
// Parse header
...
...
examples/models/obj/verify/gulpfile.js
浏览文件 @
e9ad7508
...
...
@@ -17,21 +17,21 @@ var obj_verify = {
materials
:
[]
};
obj_verify
.
vertices
.
push
(
[
-
1
,
1
,
1
]
);
obj_verify
.
vertices
.
push
(
[
-
1
,
-
1
,
1
]
);
obj_verify
.
vertices
.
push
(
[
1
,
-
1
,
1
]
);
obj_verify
.
vertices
.
push
(
[
1
,
1
,
1
]
);
obj_verify
.
vertices
.
push
(
[
-
1
,
1
,
-
1
]
);
obj_verify
.
vertices
.
push
(
[
-
1
,
-
1
,
-
1
]
);
obj_verify
.
vertices
.
push
(
[
1
,
-
1
,
-
1
]
);
obj_verify
.
vertices
.
push
(
[
1
,
1
,
-
1
]
);
obj_verify
.
normals
.
push
(
[
0
,
0
,
1
]
);
obj_verify
.
normals
.
push
(
[
0
,
0
,
-
1
]
);
obj_verify
.
normals
.
push
(
[
0
,
1
,
0
]
);
obj_verify
.
normals
.
push
(
[
0
,
-
1
,
0
]
);
obj_verify
.
normals
.
push
(
[
1
,
0
,
0
]
);
obj_verify
.
normals
.
push
(
[
-
1
,
0
,
0
]
);
obj_verify
.
vertices
.
push
(
[
-
1
,
1
,
1
]
);
obj_verify
.
vertices
.
push
(
[
-
1
,
-
1
,
1
]
);
obj_verify
.
vertices
.
push
(
[
1
,
-
1
,
1
]
);
obj_verify
.
vertices
.
push
(
[
1
,
1
,
1
]
);
obj_verify
.
vertices
.
push
(
[
-
1
,
1
,
-
1
]
);
obj_verify
.
vertices
.
push
(
[
-
1
,
-
1
,
-
1
]
);
obj_verify
.
vertices
.
push
(
[
1
,
-
1
,
-
1
]
);
obj_verify
.
vertices
.
push
(
[
1
,
1
,
-
1
]
);
obj_verify
.
normals
.
push
(
[
0
,
0
,
1
]
);
obj_verify
.
normals
.
push
(
[
0
,
0
,
-
1
]
);
obj_verify
.
normals
.
push
(
[
0
,
1
,
0
]
);
obj_verify
.
normals
.
push
(
[
0
,
-
1
,
0
]
);
obj_verify
.
normals
.
push
(
[
1
,
0
,
0
]
);
obj_verify
.
normals
.
push
(
[
-
1
,
0
,
0
]
);
obj_verify
.
uvs
.
push
(
[
0
,
1
]
);
obj_verify
.
uvs
.
push
(
[
1
,
1
]
);
...
...
@@ -68,42 +68,56 @@ obj_verify.materials.push( 'usemtl purple' );
function
vobjCreateVertices
(
factor
,
offsets
)
{
var
output
=
'
\n
'
;
for
(
var
x
,
y
,
z
,
i
=
0
,
v
=
obj_verify
.
vertices
,
length
=
v
.
length
;
i
<
length
;
i
++
)
{
for
(
var
x
,
y
,
z
,
i
=
0
,
v
=
obj_verify
.
vertices
,
length
=
v
.
length
;
i
<
length
;
i
++
)
{
x
=
v
[
i
][
0
]
*
factor
+
offsets
[
0
];
y
=
v
[
i
][
1
]
*
factor
+
offsets
[
1
];
z
=
v
[
i
][
2
]
*
factor
+
offsets
[
2
];
output
+=
'
v
'
+
x
+
'
'
+
y
+
'
'
+
z
+
'
\n
'
;
}
return
output
;
};
}
function
vobjCreateUvs
()
{
var
output
=
'
\n
'
;
for
(
var
x
,
y
,
z
,
i
=
0
,
vn
=
obj_verify
.
uvs
,
length
=
vn
.
length
;
i
<
length
;
i
++
)
{
for
(
var
x
,
y
,
i
=
0
,
vn
=
obj_verify
.
uvs
,
length
=
vn
.
length
;
i
<
length
;
i
++
)
{
x
=
vn
[
i
][
0
];
y
=
vn
[
i
][
1
];
output
+=
'
vt
'
+
x
+
'
'
+
y
+
'
\n
'
;
}
return
output
;
};
}
function
vobjCreateNormals
()
{
var
output
=
'
\n
'
;
for
(
var
x
,
y
,
z
,
i
=
0
,
vn
=
obj_verify
.
normals
,
length
=
vn
.
length
;
i
<
length
;
i
++
)
{
for
(
var
x
,
y
,
z
,
i
=
0
,
vn
=
obj_verify
.
normals
,
length
=
vn
.
length
;
i
<
length
;
i
++
)
{
x
=
vn
[
i
][
0
];
y
=
vn
[
i
][
1
];
z
=
vn
[
i
][
2
];
output
+=
'
vn
'
+
x
+
'
'
+
y
+
'
'
+
z
+
'
\n
'
;
}
return
output
;
};
}
function
vobjCreateCubeV
(
offsets
,
groups
,
usemtls
)
{
var
output
=
'
\n
'
;
if
(
groups
===
null
||
groups
.
length
===
0
)
groups
=
[
null
,
null
,
null
,
null
,
null
,
null
];
if
(
usemtls
===
null
||
usemtls
.
length
===
0
)
usemtls
=
[
null
,
null
,
null
,
null
,
null
,
null
];
for
(
var
group
,
usemtl
,
f0
,
f1
,
f2
,
f3
,
i
=
0
,
facesV
=
obj_verify
.
facesV
,
length
=
facesV
.
length
;
i
<
length
;
i
++
)
{
for
(
var
group
,
usemtl
,
f0
,
f1
,
f2
,
f3
,
i
=
0
,
facesV
=
obj_verify
.
facesV
,
length
=
facesV
.
length
;
i
<
length
;
i
++
)
{
f0
=
facesV
[
i
][
0
]
+
offsets
[
0
];
f1
=
facesV
[
i
][
1
]
+
offsets
[
0
];
f2
=
facesV
[
i
][
2
]
+
offsets
[
0
];
...
...
@@ -114,15 +128,18 @@ function vobjCreateCubeV( offsets, groups, usemtls ) {
if
(
group
)
output
+=
'
g
'
+
group
+
'
\n
'
;
if
(
usemtl
)
output
+=
'
usemtl
'
+
usemtl
+
'
\n
'
;
output
+=
'
f
'
+
f0
+
'
'
+
f1
+
'
'
+
f2
+
'
'
+
f3
+
'
\n
'
;
}
return
output
;
};
}
function
vobjCreateCubeVVn
(
offsets
,
groups
,
usemtls
)
{
var
output
=
'
\n
'
;
if
(
groups
===
null
||
groups
.
length
===
0
)
groups
=
[
null
,
null
,
null
,
null
,
null
,
null
];
if
(
usemtls
===
null
||
usemtls
.
length
===
0
)
usemtls
=
[
null
,
null
,
null
,
null
,
null
,
null
];
for
(
var
group
,
usemtl
,
f0
,
f1
,
f2
,
f3
,
i
=
0
,
facesV
=
obj_verify
.
facesV
,
facesVn
=
obj_verify
.
facesVn
;
i
<
6
;
i
++
)
{
for
(
var
group
,
usemtl
,
f0
,
f1
,
f2
,
f3
,
i
=
0
,
facesV
=
obj_verify
.
facesV
,
facesVn
=
obj_verify
.
facesVn
;
i
<
6
;
i
++
)
{
f0
=
facesV
[
i
][
0
]
+
offsets
[
0
]
+
'
//
'
+
(
facesVn
[
i
][
0
]
+
offsets
[
1
]
);
f1
=
facesV
[
i
][
1
]
+
offsets
[
0
]
+
'
//
'
+
(
facesVn
[
i
][
1
]
+
offsets
[
1
]
);
...
...
@@ -137,13 +154,15 @@ function vobjCreateCubeVVn( offsets, groups, usemtls ) {
}
return
output
;
};
}
function
vobjCreateCubeVVt
(
offsets
,
groups
,
usemtls
)
{
var
output
=
'
\n
'
;
if
(
groups
===
null
||
groups
.
length
===
0
)
groups
=
[
null
,
null
,
null
,
null
,
null
,
null
];
if
(
usemtls
===
null
||
usemtls
.
length
===
0
)
usemtls
=
[
null
,
null
,
null
,
null
,
null
,
null
];
for
(
var
group
,
usemtl
,
f0
,
f1
,
f2
,
f3
,
i
=
0
,
facesV
=
obj_verify
.
facesV
,
facesVt
=
obj_verify
.
facesVt
;
i
<
6
;
i
++
)
{
for
(
var
group
,
usemtl
,
f0
,
f1
,
f2
,
f3
,
i
=
0
,
facesV
=
obj_verify
.
facesV
,
facesVt
=
obj_verify
.
facesVt
;
i
<
6
;
i
++
)
{
f0
=
facesV
[
i
][
0
]
+
offsets
[
0
]
+
'
/
'
+
(
facesVt
[
i
][
0
]
+
offsets
[
1
]
);
f1
=
facesV
[
i
][
1
]
+
offsets
[
0
]
+
'
/
'
+
(
facesVt
[
i
][
1
]
+
offsets
[
1
]
);
...
...
@@ -158,13 +177,15 @@ function vobjCreateCubeVVt( offsets, groups, usemtls ) {
}
return
output
;
};
}
function
vobjCreateCubeVVnVt
(
offsets
,
groups
,
usemtls
)
{
var
output
=
'
\n
'
;
if
(
groups
===
null
||
groups
.
length
===
0
)
groups
=
[
null
,
null
,
null
,
null
,
null
,
null
];
if
(
usemtls
===
null
||
usemtls
.
length
===
0
)
usemtls
=
[
null
,
null
,
null
,
null
,
null
,
null
];
for
(
var
group
,
usemtl
,
f0
,
f1
,
f2
,
f3
,
i
=
0
,
facesV
=
obj_verify
.
facesV
,
facesVt
=
obj_verify
.
facesVt
,
facesVn
=
obj_verify
.
facesVn
;
i
<
6
;
i
++
)
{
for
(
var
group
,
usemtl
,
f0
,
f1
,
f2
,
f3
,
i
=
0
,
facesV
=
obj_verify
.
facesV
,
facesVt
=
obj_verify
.
facesVt
,
facesVn
=
obj_verify
.
facesVn
;
i
<
6
;
i
++
)
{
f0
=
facesV
[
i
][
0
]
+
offsets
[
0
]
+
'
/
'
+
(
facesVt
[
i
][
0
]
+
offsets
[
1
]
)
+
'
/
'
+
(
facesVn
[
i
][
0
]
+
offsets
[
2
]
);
f1
=
facesV
[
i
][
1
]
+
offsets
[
0
]
+
'
/
'
+
(
facesVt
[
i
][
1
]
+
offsets
[
1
]
)
+
'
/
'
+
(
facesVn
[
i
][
1
]
+
offsets
[
2
]
);
...
...
@@ -179,12 +200,14 @@ function vobjCreateCubeVVnVt( offsets, groups, usemtls ) {
}
return
output
;
};
gulp
.
task
(
'
default
'
,
function
(
cb
){
}
gulp
.
task
(
'
default
'
,
function
()
{
gutil
.
log
(
'
Building: verify.obj
'
);
var
offsets
=
[
0
,
0
,
0
];
var
pos
=
[
-
150
,
50
,
0
];
var
pos
=
[
-
150
,
50
,
0
];
fs
.
writeFileSync
(
'
./verify.obj
'
,
'
# Verification OBJ created with gulp
\n\n
'
);
fs
.
appendFileSync
(
'
./verify.obj
'
,
'
mtllib verify.mtl
\n\n
# Cube no materials. Translated x:
'
+
pos
[
0
]
);
fs
.
appendFileSync
(
'
./verify.obj
'
,
vobjCreateVertices
(
10
,
pos
)
);
...
...
@@ -223,7 +246,7 @@ gulp.task( 'default', function( cb ){
fs
.
appendFileSync
(
'
./verify.obj
'
,
'
\n\n
# cube with uvs and normals and two materials and group for every quad. Translated x:
'
+
pos
[
0
]
);
fs
.
appendFileSync
(
'
./verify.obj
'
,
vobjCreateVertices
(
10
,
pos
)
);
fs
.
appendFileSync
(
'
./verify.obj
'
,
vobjCreateNormals
()
);
fs
.
appendFileSync
(
'
./verify.obj
'
,
vobjCreateCubeVVnVt
(
[
-
9
,
offsets
[
1
],
offsets
[
2
]
],
fs
.
appendFileSync
(
'
./verify.obj
'
,
vobjCreateCubeVVnVt
(
[
-
9
,
offsets
[
1
],
offsets
[
2
]
],
[
'
cube6a
'
,
'
cube6b
'
,
'
cube6c
'
,
'
cube6d
'
,
'
cube6e
'
,
'
cube6f
'
],
[
'
green
'
,
null
,
null
,
'
orange
'
,
null
,
null
]
)
);
...
...
@@ -255,4 +278,4 @@ gulp.task( 'default', function( cb ){
});
\ No newline at end of file
}
);
examples/webgl_instancing_scatter.html
浏览文件 @
e9ad7508
...
...
@@ -49,7 +49,11 @@
var
surface
=
new
THREE
.
Mesh
(
surfaceGeometry
,
surfaceMaterial
);
// Source: https://gist.github.com/gre/1650294
var
easeOutCubic
=
function
(
t
)
{
return
(
--
t
)
*
t
*
t
+
1
;
};
var
easeOutCubic
=
function
(
t
)
{
return
(
--
t
)
*
t
*
t
+
1
;
};
// Scaling curve causes particles to grow quickly, ease gradually into full scale, then
// disappear quickly. More of the particle's lifetime is spent around full scale.
...
...
@@ -63,8 +67,8 @@
loader
.
load
(
'
./models/gltf/Flower/Flower.glb
'
,
function
(
gltf
)
{
var
_stemMesh
=
gltf
.
scene
.
getObjectByName
(
'
Stem
'
);
var
_blossomMesh
=
gltf
.
scene
.
getObjectByName
(
'
Blossom
'
);
var
_stemMesh
=
gltf
.
scene
.
getObjectByName
(
'
Stem
'
);
var
_blossomMesh
=
gltf
.
scene
.
getObjectByName
(
'
Blossom
'
);
stemGeometry
=
new
THREE
.
InstancedBufferGeometry
();
blossomGeometry
=
new
THREE
.
InstancedBufferGeometry
();
...
...
@@ -74,7 +78,7 @@
var
defaultTransform
=
new
THREE
.
Matrix4
()
.
makeRotationX
(
Math
.
PI
)
.
multiply
(
new
THREE
.
Matrix4
().
makeScale
(
7
,
7
,
7
)
)
.
multiply
(
new
THREE
.
Matrix4
().
makeScale
(
7
,
7
,
7
)
)
;
stemGeometry
.
applyMatrix4
(
defaultTransform
);
blossomGeometry
.
applyMatrix4
(
defaultTransform
);
...
...
@@ -123,7 +127,7 @@
scene
.
background
=
new
THREE
.
Color
(
api
.
backgroundColor
);
var
pointLight
=
new
THREE
.
PointLight
(
0xAA8899
,
0.75
);
pointLight
.
position
.
set
(
50
,
-
25
,
75
);
pointLight
.
position
.
set
(
50
,
-
25
,
75
);
scene
.
add
(
pointLight
);
scene
.
add
(
new
THREE
.
HemisphereLight
()
);
...
...
@@ -214,7 +218,7 @@
}
function
resampleParticle
(
i
)
{
function
resampleParticle
(
i
)
{
sampler
.
sample
(
_position
,
_normal
);
_normal
.
add
(
_position
);
...
...
@@ -229,7 +233,7 @@
}
function
updateParticle
(
i
)
{
function
updateParticle
(
i
)
{
// Update lifecycle.
...
...
examples/webgl_loader_gltf.html
浏览文件 @
e9ad7508
...
...
@@ -97,7 +97,7 @@
controls
=
new
OrbitControls
(
camera
,
renderer
.
domElement
);
controls
.
addEventListener
(
'
change
'
,
render
);
// use if there is no animation loop
controls
.
minDistance
=
2
;
controls
.
maxDistance
=
10
controls
.
maxDistance
=
10
;
controls
.
target
.
set
(
0
,
0
,
-
0.2
);
controls
.
update
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录