Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
S
shprenderdemo
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liguoqing
shprenderdemo
Commits
9ca67a58
Commit
9ca67a58
authored
Apr 02, 2020
by
liguoqing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
cc95349e
Pipeline
#297
canceled with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
40 deletions
+44
-40
index.html
index.html
+44
-40
No files found.
index.html
View file @
9ca67a58
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"utf-8"
>
<meta
http-equiv=
"x-ua-compatible"
content=
"ie=edge,chrome=1"
>
...
...
@@ -28,17 +29,18 @@
<script
src=
"libs/three.js/loaders/MTLLoader.js"
></script>
<script
src=
"libs/three.js/loaders/OBJLoader.js"
></script>
<script
src=
"libs/other/BinaryHeap.js"
></script>
<script
src=
"libs/tween/tween.min.js"
></script>
<script
src=
"libs/tween/tween.min.js"
></script>
<script
src=
"libs/proj4/proj4-src.js"
></script>
<script
src=
"libs/pt/pt.min.js"
></script>
<!--<script src="libs/pt/statisticsObject.js"></script>
<script src="libs/pt/motorObject.js"></script>-->
<script
src=
"libs/plasio/jsx/laslaz.js"
></script>
<script
src=
"./libs/shapefile/shapefile.min.js"
></script>
<script
src=
"./libs/earcut.js"
></script>
<script
src=
"./libs/shapefile/shapefile.min.js"
></script>
<script
src=
"./libs/earcut.js"
></script>
<div
class=
"potree_container"
style=
"position: absolute; width: 100%; height: 100%; left: 0px; top: 0px; "
>
<div
id=
"potree_render_area"
></div>
<div
id=
"potree_sidebar_container"
style=
"position: absolute; width: 0%; height: 100%; left: 0px; top: 0px; "
>
</div>
<div
id=
"potree_sidebar_container"
style=
"position: absolute; width: 0%; height: 100%; left: 0px; top: 0px; "
>
</div>
<!--<div><span id="dt_test" style="position: fixed;width:48px;height: 24px;right:20px;top:20px;z-index: 1000;background: rgb(149,188,167);text-align: center;vertical-align: middle;">START</span></div>-->
</div>
<!--<script src="./conf.js" TYPE="text/javascript"></script>
...
...
@@ -50,54 +52,55 @@
window
.
viewer
=
new
Potree
.
Viewer
(
document
.
getElementById
(
"potree_render_area"
));
jf
.
viewer
=
viewer
;
jf
.
viewer
.
setFOV
(
60
);
jf
.
viewer
.
setPointBudget
(
8
*
1000
*
1000
);
jf
.
viewer
.
setEDLEnabled
(
false
);
jf
.
viewer
.
setBackground
(
"black"
);
//"black"
jf
.
viewer
.
skybox
=
Potree
.
utils
.
loadSkybox
(
new
URL
(
Potree
.
resourcePath
+
'/textures/sunny/'
).
href
);
jf
.
viewer
.
setNavigationMode
(
Potree
.
EarthControls
);
jf
.
viewer
.
setFOV
(
60
);
jf
.
viewer
.
setPointBudget
(
8
*
1000
*
1000
);
jf
.
viewer
.
setEDLEnabled
(
false
);
jf
.
viewer
.
setBackground
(
"black"
);
//"black"
jf
.
viewer
.
skybox
=
Potree
.
utils
.
loadSkybox
(
new
URL
(
Potree
.
resourcePath
+
'/textures/sunny/'
).
href
);
jf
.
viewer
.
setNavigationMode
(
Potree
.
EarthControls
);
{
jf
.
scene
=
jf
.
viewer
.
scene
.
scene
;
for
(
var
ii
=
0
,
len
=
jf
.
shps
.
length
;
ii
<
len
;
ii
++
)
{
let
url
=
"./hdmap/"
+
jf
.
shps
[
ii
]
+
".shp"
;
let
color
=
jf
.
styles
[
jf
.
shps
[
ii
]].
color
;
let
width
=
jf
.
styles
[
jf
.
shps
[
ii
]].
width
;
let
texture_map
=
jf
.
styles
[
jf
.
shps
[
ii
]].
map
?
jf
.
styles
[
jf
.
shps
[
ii
]].
map
:
null
;
readShp
(
url
,
color
,
width
,
texture_map
);
}
}
for
(
var
ii
=
0
,
len
=
jf
.
shps
.
length
;
ii
<
len
;
ii
++
)
{
let
url
=
"./hdmap/"
+
jf
.
shps
[
ii
]
+
".shp"
;
let
color
=
jf
.
styles
[
jf
.
shps
[
ii
]].
color
;
let
width
=
jf
.
styles
[
jf
.
shps
[
ii
]].
width
;
let
texture_map
=
jf
.
styles
[
jf
.
shps
[
ii
]].
map
?
jf
.
styles
[
jf
.
shps
[
ii
]].
map
:
null
;
readShp
(
url
,
color
,
width
,
texture_map
);
}
}
if
(
window
.
location
.
search
!=
''
)
{
var
queryString
=
window
.
location
.
search
;
var
length
=
queryString
.
length
;
var
queryArr
=
queryString
.
split
(
"="
);
var
id
=
queryArr
[
queryArr
.
length
-
1
];
if
(
id
)
{
if
(
window
.
location
.
search
!=
''
)
{
var
queryString
=
window
.
location
.
search
;
var
length
=
queryString
.
length
;
var
queryArr
=
queryString
.
split
(
"="
);
var
id
=
queryArr
[
queryArr
.
length
-
1
];
if
(
id
)
{
console
.
log
(
id
);
}
else
{
console
.
error
(
"Can't get id of this bus."
);
}
else
{
console
.
error
(
"Can't get id of this bus."
);
}
}
let
box
=
new
THREE
.
Box3
(
new
THREE
.
Vector3
(
242126.1367340088
,
3487175.517250061
,
-
43.8674373626709
),
new
THREE
.
Vector3
(
242394.3067340088
,
3487450.804094238
,
123.85993209838867
));
}
let
box
=
new
THREE
.
Box3
(
new
THREE
.
Vector3
(
242126.1367340088
,
3487175.517250061
,
-
43.8674373626709
),
new
THREE
.
Vector3
(
242394.3067340088
,
3487450.804094238
,
123.85993209838867
));
fitToScreen
();
function
fitToScreen
(
factor
=
1
,
animationDuration
=
0
)
{
var
node
=
new
THREE
.
Object3D
();
node
.
boundingBox
=
box
;
jf
.
viewer
.
scene
.
view
.
yaw
=
0
;
jf
.
viewer
.
scene
.
pitch
=
-
Math
.
PI
/
2
;
jf
.
viewer
.
zoomTo
(
node
,
factor
,
animationDuration
);
jf
.
viewer
.
scene
.
view
.
yawDelta
=
0
;
jf
.
viewer
.
scene
.
view
.
pitchDelta
=
0
;
jf
.
viewer
.
scene
.
view
.
radiusDelta
=
0
;
}
function
fitToScreen
(
factor
=
1
,
animationDuration
=
0
)
{
var
node
=
new
THREE
.
Object3D
();
node
.
boundingBox
=
box
;
jf
.
viewer
.
scene
.
view
.
yaw
=
0
;
jf
.
viewer
.
scene
.
pitch
=
-
Math
.
PI
/
2
;
jf
.
viewer
.
zoomTo
(
node
,
factor
,
animationDuration
);
jf
.
viewer
.
scene
.
view
.
yawDelta
=
0
;
jf
.
viewer
.
scene
.
view
.
pitchDelta
=
0
;
jf
.
viewer
.
scene
.
view
.
radiusDelta
=
0
;
}
</script>
<script>
</script>
</body>
</html>
</body>
</html>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment