Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
5cd646f0
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,发现更多精彩内容 >>
提交
5cd646f0
编写于
8月 26, 2018
作者:
G
Garrett Johnson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix undefined variable problems
上级
b22db83f
变更
26
显示空白变更内容
内联
并排
Showing
26 changed file
with
46 addition
and
35 deletion
+46
-35
examples/canvas_geometry_birds.html
examples/canvas_geometry_birds.html
+0
-4
examples/canvas_geometry_panorama.html
examples/canvas_geometry_panorama.html
+2
-0
examples/canvas_geometry_panorama_fisheye.html
examples/canvas_geometry_panorama_fisheye.html
+2
-0
examples/css2d_label.html
examples/css2d_label.html
+1
-1
examples/css3d_panorama_deviceorientation.html
examples/css3d_panorama_deviceorientation.html
+1
-0
examples/software_lines_splines.html
examples/software_lines_splines.html
+1
-1
examples/webgl_geometry_spline_editor.html
examples/webgl_geometry_spline_editor.html
+1
-1
examples/webgl_gpgpu_water.html
examples/webgl_gpgpu_water.html
+2
-2
examples/webgl_loader_ctm.html
examples/webgl_loader_ctm.html
+1
-0
examples/webgl_marchingcubes.html
examples/webgl_marchingcubes.html
+2
-0
examples/webgl_materials_curvature.html
examples/webgl_materials_curvature.html
+2
-0
examples/webgl_modifier_subdivision.html
examples/webgl_modifier_subdivision.html
+1
-1
examples/webgl_modifier_tessellation.html
examples/webgl_modifier_tessellation.html
+2
-0
examples/webgl_nearestneighbour.html
examples/webgl_nearestneighbour.html
+1
-0
examples/webgl_physics_convex_break.html
examples/webgl_physics_convex_break.html
+2
-2
examples/webgl_physics_terrain.html
examples/webgl_physics_terrain.html
+1
-1
examples/webgl_postprocessing_afterimage.html
examples/webgl_postprocessing_afterimage.html
+9
-3
examples/webgl_postprocessing_procedural.html
examples/webgl_postprocessing_procedural.html
+4
-4
examples/webgl_postprocessing_rgb_halftone.html
examples/webgl_postprocessing_rgb_halftone.html
+1
-1
examples/webgl_postprocessing_taa.html
examples/webgl_postprocessing_taa.html
+3
-4
examples/webgl_raycast_texture.html
examples/webgl_raycast_texture.html
+1
-4
examples/webgl_refraction.html
examples/webgl_refraction.html
+1
-1
examples/webgl_simple_gi.html
examples/webgl_simple_gi.html
+1
-1
examples/webgl_tiled_forward.html
examples/webgl_tiled_forward.html
+2
-2
examples/webgl_water.html
examples/webgl_water.html
+1
-1
examples/webgl_water_flowmap.html
examples/webgl_water_flowmap.html
+1
-1
未找到文件。
examples/canvas_geometry_birds.html
浏览文件 @
5cd646f0
...
...
@@ -355,10 +355,6 @@
}
</script>
<script>
var
SCREEN_WIDTH
=
window
.
innerWidth
,
SCREEN_HEIGHT
=
window
.
innerHeight
,
SCREEN_WIDTH_HALF
=
SCREEN_WIDTH
/
2
,
...
...
examples/canvas_geometry_panorama.html
浏览文件 @
5cd646f0
...
...
@@ -44,6 +44,8 @@
var
texture_placeholder
,
isUserInteracting
=
false
,
onMouseDownMouseX
=
0
,
onMouseDownMouseY
=
0
,
onPointerDownPointerX
=
0
,
onPointerDownPointerY
=
0
,
onPointerDownLon
=
0
,
onPointerDownLat
=
0
,
lon
=
90
,
onMouseDownLon
=
0
,
lat
=
0
,
onMouseDownLat
=
0
,
phi
=
0
,
theta
=
0
,
...
...
examples/canvas_geometry_panorama_fisheye.html
浏览文件 @
5cd646f0
...
...
@@ -44,6 +44,8 @@
var
texture_placeholder
,
isUserInteracting
=
false
,
onMouseDownMouseX
=
0
,
onMouseDownMouseY
=
0
,
onPointerDownPointerX
=
0
,
onPointerDownPointerY
=
0
,
onPointerDownLon
=
0
,
onPointerDownLat
=
0
,
lon
=
90
,
onMouseDownLon
=
0
,
lat
=
0
,
onMouseDownLat
=
0
,
phi
=
0
,
theta
=
0
,
...
...
examples/css2d_label.html
浏览文件 @
5cd646f0
...
...
@@ -46,7 +46,7 @@
<script>
var
camera
,
scene
,
renderer
,
labelRenderer
;
var
camera
,
scene
,
scene2
,
renderer
,
labelRenderer
;
var
controls
;
var
clock
=
new
THREE
.
Clock
();
var
textureLoader
=
new
THREE
.
TextureLoader
();
...
...
examples/css3d_panorama_deviceorientation.html
浏览文件 @
5cd646f0
...
...
@@ -39,6 +39,7 @@
<script>
var
camera
,
scene
,
renderer
;
var
controls
;
var
geometry
,
material
,
mesh
;
init
();
...
...
examples/software_lines_splines.html
浏览文件 @
5cd646f0
...
...
@@ -59,7 +59,7 @@
windowHalfX
=
window
.
innerWidth
/
2
,
windowHalfY
=
window
.
innerHeight
/
2
,
camera
,
scene
,
renderer
,
material
;
camera
,
scene
,
renderer
,
material
,
stats
;
init
();
animate
();
...
...
examples/webgl_geometry_spline_editor.html
浏览文件 @
5cd646f0
...
...
@@ -53,7 +53,7 @@
};
var
container
,
stats
;
var
camera
,
scene
,
renderer
;
var
camera
,
scene
,
renderer
,
spotlight
;
var
splineHelperObjects
=
[],
splineOutline
;
var
splinePointsLength
=
4
;
var
positions
=
[];
...
...
examples/webgl_gpgpu_water.html
浏览文件 @
5cd646f0
...
...
@@ -531,9 +531,9 @@
var
uniforms
=
heightmapVariable
.
material
.
uniforms
;
if
(
mouseMoved
)
{
this
.
raycaster
.
setFromCamera
(
mouseCoords
,
camera
);
raycaster
.
setFromCamera
(
mouseCoords
,
camera
);
var
intersects
=
this
.
raycaster
.
intersectObject
(
meshRay
);
var
intersects
=
raycaster
.
intersectObject
(
meshRay
);
if
(
intersects
.
length
>
0
)
{
var
point
=
intersects
[
0
].
point
;
...
...
examples/webgl_loader_ctm.html
浏览文件 @
5cd646f0
...
...
@@ -64,6 +64,7 @@
var
textureLoader
=
new
THREE
.
TextureLoader
();
var
cubeTextureLoader
=
new
THREE
.
CubeTextureLoader
();
var
reflectionCube
;
document
.
addEventListener
(
'
mousemove
'
,
onDocumentMouseMove
,
false
);
...
...
examples/webgl_marchingcubes.html
浏览文件 @
5cd646f0
...
...
@@ -100,6 +100,8 @@
var
effectController
;
var
controls
;
var
time
=
0
;
var
clock
=
new
THREE
.
Clock
();
...
...
examples/webgl_materials_curvature.html
浏览文件 @
5cd646f0
...
...
@@ -79,6 +79,8 @@
var
camera
,
scene
,
renderer
;
var
controls
;
var
ninjaMeshRaw
,
curvatureAttribute
,
bufferGeo
;
init
();
...
...
examples/webgl_modifier_subdivision.html
浏览文件 @
5cd646f0
...
...
@@ -29,7 +29,7 @@
var
camera
,
controls
,
scene
,
renderer
;
var
cube
,
mesh
,
material
;
var
cube
,
mesh
,
material
,
geometry
,
smooth
,
group
;
// Create new object by parameters
...
...
examples/webgl_modifier_tessellation.html
浏览文件 @
5cd646f0
...
...
@@ -90,6 +90,8 @@
var
renderer
,
scene
,
camera
,
stats
;
var
controls
;
var
mesh
,
uniforms
;
var
WIDTH
=
window
.
innerWidth
,
...
...
examples/webgl_nearestneighbour.html
浏览文件 @
5cd646f0
...
...
@@ -76,6 +76,7 @@
var
amountOfParticles
=
500000
,
maxDistance
=
Math
.
pow
(
120
,
2
);
var
positions
,
alphas
,
particles
,
_particleGeom
;
var
kdtree
;
var
clock
=
new
THREE
.
Clock
();
...
...
examples/webgl_physics_convex_break.html
浏览文件 @
5cd646f0
...
...
@@ -300,9 +300,9 @@
var
shape
=
new
Ammo
.
btConvexHullShape
();
for
(
var
i
=
0
,
il
=
coords
.
length
;
i
<
il
;
i
+=
3
)
{
t
his
.
t
empBtVec3_1
.
setValue
(
coords
[
i
],
coords
[
i
+
1
],
coords
[
i
+
2
]
);
tempBtVec3_1
.
setValue
(
coords
[
i
],
coords
[
i
+
1
],
coords
[
i
+
2
]
);
var
lastOne
=
(
i
>=
(
il
-
3
)
);
shape
.
addPoint
(
t
his
.
t
empBtVec3_1
,
lastOne
);
shape
.
addPoint
(
tempBtVec3_1
,
lastOne
);
}
return
shape
;
...
...
examples/webgl_physics_terrain.html
浏览文件 @
5cd646f0
...
...
@@ -204,7 +204,7 @@
// Create the terrain body
var
groundShape
=
this
.
createTerrainShape
(
heightData
);
var
groundShape
=
createTerrainShape
(
heightData
);
var
groundTransform
=
new
Ammo
.
btTransform
();
groundTransform
.
setIdentity
();
// Shifts the terrain, since bullet re-centers it on its bounding box.
...
...
examples/webgl_postprocessing_afterimage.html
浏览文件 @
5cd646f0
...
...
@@ -32,7 +32,13 @@
var
camera
,
scene
,
renderer
,
composer
;
var
mesh
,
light
;
var
afterimagePass
,
enable
=
true
;
var
afterimagePass
;
var
params
=
{
enable
:
true
};
init
();
createGUI
();
...
...
@@ -73,7 +79,7 @@
var
gui
=
new
dat
.
GUI
(
{
name
:
'
Damp setting
'
}
);
gui
.
add
(
afterimagePass
.
uniforms
[
"
damp
"
],
'
value
'
,
0
,
1
).
step
(
0.001
);
gui
.
add
(
thi
s
,
'
enable
'
);
gui
.
add
(
param
s
,
'
enable
'
);
}
...
...
@@ -94,7 +100,7 @@
mesh
.
rotation
.
x
+=
0.005
;
mesh
.
rotation
.
y
+=
0.01
;
if
(
enable
){
if
(
params
.
enable
){
composer
.
render
();
...
...
examples/webgl_postprocessing_procedural.html
浏览文件 @
5cd646f0
...
...
@@ -81,8 +81,10 @@
<script>
var
camera
,
postScene
,
renderer
,
postMaterial
,
noiseRandom1DMaterial
,
noiseRandon2DMaterial
,
noiseRandom3DMaterial
,
postQuad
;
var
camera
,
postCamera
,
postScene
,
renderer
;
var
postMaterial
,
noiseRandom1DMaterial
,
noiseRandom2DMaterial
,
noiseRandom3DMaterial
,
postQuad
;
var
gui
,
stats
,
texture
;
var
index
=
0
;
var
params
=
{
procedure
:
'
noiseRandom3D
'
};
...
...
@@ -149,11 +151,9 @@
function
animate
()
{
this
.
index
=
this
.
index
||
0
;
requestAnimationFrame
(
animate
);
this
.
index
++
;
index
++
;
switch
(
params
.
procedure
)
{
...
...
examples/webgl_postprocessing_rgb_halftone.html
浏览文件 @
5cd646f0
...
...
@@ -60,7 +60,7 @@
}
// setup
var
wrapper
,
renderer
,
clock
,
camera
,
controls
,
stats
;
var
wrapper
,
renderer
,
clock
,
camera
,
controls
,
stats
,
rotationSpeed
;
wrapper
=
document
.
createElement
(
'
div
'
);
renderer
=
new
THREE
.
WebGLRenderer
();
...
...
examples/webgl_postprocessing_taa.html
浏览文件 @
5cd646f0
...
...
@@ -56,6 +56,7 @@
var
camera
,
scene
,
renderer
,
composer
,
copyPass
,
taaRenderPass
,
renderPass
;
var
gui
,
stats
,
texture
;
var
index
=
0
;
var
param
=
{
TAAEnabled
:
"
1
"
,
TAASampleLevel
:
0
};
...
...
@@ -180,13 +181,11 @@
function
animate
()
{
this
.
index
=
this
.
index
||
0
;
requestAnimationFrame
(
animate
);
this
.
index
++
;
index
++
;
if
(
Math
.
round
(
this
.
index
/
200
)
%
2
===
0
)
{
if
(
Math
.
round
(
index
/
200
)
%
2
===
0
)
{
for
(
var
i
=
0
;
i
<
scene
.
children
.
length
;
i
++
)
{
var
child
=
scene
.
children
[
i
];
...
...
examples/webgl_raycast_texture.html
浏览文件 @
5cd646f0
...
...
@@ -73,7 +73,7 @@
<script
src=
"../build/three.js"
></script>
<script>
CanvasTexture
=
function
(
parentTexture
)
{
var
CanvasTexture
=
function
(
parentTexture
)
{
this
.
_canvas
=
document
.
createElement
(
"
canvas
"
);
this
.
_canvas
.
width
=
this
.
_canvas
.
height
=
1024
;
...
...
@@ -183,9 +183,6 @@
}
</script>
<script>
var
width
=
window
.
innerWidth
;
var
height
=
window
.
innerHeight
;
...
...
examples/webgl_refraction.html
浏览文件 @
5cd646f0
...
...
@@ -47,7 +47,7 @@
if
(
!
Detector
.
webgl
)
Detector
.
addGetWebGLMessage
();
var
scene
,
camera
,
clock
,
renderer
,
refractor
;
var
scene
,
camera
,
clock
,
renderer
,
refractor
,
controls
;
init
();
...
...
examples/webgl_simple_gi.html
浏览文件 @
5cd646f0
...
...
@@ -163,7 +163,7 @@
//
var
camera
,
scene
,
renderer
;
var
camera
,
scene
,
renderer
,
controls
;
init
();
animate
();
...
...
examples/webgl_tiled_forward.html
浏览文件 @
5cd646f0
...
...
@@ -171,7 +171,7 @@
// Screen rectangle bounds from light sphere's world AABB
var
lightBounds
=
function
()
{
v
=
new
THREE
.
Vector3
();
v
ar
v
=
new
THREE
.
Vector3
();
return
function
(
camera
,
pos
,
r
)
{
var
minX
=
State
.
width
,
maxX
=
0
,
minY
=
State
.
height
,
maxY
=
0
,
hw
=
State
.
width
/
2
,
hh
=
State
.
height
/
2
;
...
...
@@ -224,7 +224,7 @@
var
stats
=
new
Stats
();
container
.
appendChild
(
stats
.
dom
);
controls
=
new
THREE
.
OrbitControls
(
camera
,
renderer
.
domElement
);
var
controls
=
new
THREE
.
OrbitControls
(
camera
,
renderer
.
domElement
);
controls
.
minDistance
=
120
;
controls
.
maxDistance
=
320
;
...
...
examples/webgl_water.html
浏览文件 @
5cd646f0
...
...
@@ -49,7 +49,7 @@
if
(
!
Detector
.
webgl
)
Detector
.
addGetWebGLMessage
();
var
scene
,
camera
,
clock
,
renderer
,
water
;
var
scene
,
camera
,
clock
,
renderer
,
controls
,
water
;
var
torusKnot
;
...
...
examples/webgl_water_flowmap.html
浏览文件 @
5cd646f0
...
...
@@ -49,7 +49,7 @@
if
(
!
Detector
.
webgl
)
Detector
.
addGetWebGLMessage
();
var
scene
,
camera
,
renderer
,
water
;
var
scene
,
camera
,
renderer
,
controls
,
water
;
init
();
animate
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录