Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
x3domlet
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Elphel
x3domlet
Commits
aee5b257
Commit
aee5b257
authored
Sep 26, 2018
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
+clipping planes: near and far
parent
35a34987
Pipeline
#643
canceled with stages
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
1 deletion
+54
-1
ui_init.js
js/ui_init.js
+9
-1
ui_menu.js
js/ui_menu.js
+37
-0
viewer.html
viewer.html
+8
-0
No files found.
js/ui_init.js
View file @
aee5b257
...
@@ -79,7 +79,9 @@ var SETTINGS = {
...
@@ -79,7 +79,9 @@ var SETTINGS = {
x
:
0
,
x
:
0
,
y
:
0
,
y
:
0
,
z
:
-
0.12
z
:
-
0.12
}
},
'clipnear'
:
-
20000
,
'clipfar'
:
20000
// 'kml' : "scene.kml"
// 'kml' : "scene.kml"
}
}
...
@@ -128,6 +130,10 @@ function parseURL(){
...
@@ -128,6 +130,10 @@ function parseURL(){
case
"slidingdrag"
:
SETTINGS
.
slidingdrag
=
true
;
break
;
case
"slidingdrag"
:
SETTINGS
.
slidingdrag
=
true
;
break
;
case
"shiftspeed"
:
SETTINGS
.
shiftspeed
=
parseFloat
(
parameters
[
i
][
1
]);
break
;
case
"shiftspeed"
:
SETTINGS
.
shiftspeed
=
parseFloat
(
parameters
[
i
][
1
]);
break
;
case
"markersize"
:
SETTINGS
.
markersize
=
parseFloat
(
parameters
[
i
][
1
]);
break
;
case
"markersize"
:
SETTINGS
.
markersize
=
parseFloat
(
parameters
[
i
][
1
]);
break
;
case
"clipnear"
:
SETTINGS
.
clipNear
=
parseFloat
(
parameters
[
i
][
1
]);
break
;
case
"clipfar"
:
SETTINGS
.
clipFar
=
parseFloat
(
parameters
[
i
][
1
]);
break
;
case
"basepath"
:
SETTINGS
.
basepath
=
parameters
[
i
][
1
];
break
;
case
"basepath"
:
SETTINGS
.
basepath
=
parameters
[
i
][
1
];
break
;
case
"group"
:
SETTINGS
.
group
=
parameters
[
i
][
1
];
break
;
case
"group"
:
SETTINGS
.
group
=
parameters
[
i
][
1
];
break
;
case
"path"
:
SETTINGS
.
path
=
parameters
[
i
][
1
];
break
;
case
"path"
:
SETTINGS
.
path
=
parameters
[
i
][
1
];
break
;
...
@@ -280,6 +286,8 @@ function light_init(){
...
@@ -280,6 +286,8 @@ function light_init(){
' <transform id=
\'
x3d_transform
\'
class=
\'
inline_wrapper
\'
>'
,
' <transform id=
\'
x3d_transform
\'
class=
\'
inline_wrapper
\'
>'
,
' <transform translation=
\'
'
+
([
SETTINGS
.
mountshift
.
x
,
SETTINGS
.
mountshift
.
y
,
SETTINGS
.
mountshift
.
z
].
join
(
','
))
+
'
\'
>'
,
' <transform translation=
\'
'
+
([
SETTINGS
.
mountshift
.
x
,
SETTINGS
.
mountshift
.
y
,
SETTINGS
.
mountshift
.
z
].
join
(
','
))
+
'
\'
>'
,
' <inline name="x3d_'
+
model_name
+
'" namespacename="x3d_'
+
model_name
+
'" url="'
+
model_url
+
'"></inline>'
,
' <inline name="x3d_'
+
model_name
+
'" namespacename="x3d_'
+
model_name
+
'" url="'
+
model_url
+
'"></inline>'
,
' <clipplane id=
\'
clipfar_cp
\'
enabled="true" on="true" plane="0,0,1,20000"></clipplane>'
,
' <clipplane id=
\'
clipnear_cp
\'
enabled="true" on="true" plane="0,0,-1,20000"></clipplane>'
,
' </transform>'
,
' </transform>'
,
' </transform>'
,
' </transform>'
,
' </switch>'
,
' </switch>'
,
...
...
js/ui_menu.js
View file @
aee5b257
...
@@ -109,7 +109,10 @@ function menu_init(){
...
@@ -109,7 +109,10 @@ function menu_init(){
crosshair_init
();
crosshair_init
();
shiftspeed_init
();
shiftspeed_init
();
marker_size_color_init
();
marker_size_color_init
();
clipping_planes_init
();
reset_view_init
();
reset_view_init
();
remove_markers_init
();
remove_markers_init
();
align_init
();
align_init
();
...
@@ -165,6 +168,40 @@ function marker_size_color_init(){
...
@@ -165,6 +168,40 @@ function marker_size_color_init(){
}
}
function
clipping_planes_init
(){
$
(
'#clipnear'
).
on
(
'change'
,
function
(
e
){
SETTINGS
.
clipnear
=
$
(
this
).
val
();
if
(
$
(
"#clipnear_cp"
)
!==
undefined
){
var
dist
=
$
(
"#clipnear_cp"
).
attr
(
"plane"
);
if
(
dist
!==
undefined
){
var
vals
=
dist
.
split
(
","
);
$
(
"#clipnear_cp"
).
attr
(
"plane"
,[
vals
[
0
],
vals
[
1
],
vals
[
2
],
-
SETTINGS
.
clipnear
].
join
(
","
));
}
}
});
$
(
'#clipnear'
).
change
();
$
(
'#clipfar'
).
on
(
'change'
,
function
(
e
)
{
SETTINGS
.
clipfar
=
$
(
this
).
val
();
if
(
$
(
"#clipfar_cp"
)
!==
undefined
){
var
dist
=
$
(
"#clipfar_cp"
).
attr
(
"plane"
);
if
(
dist
!==
undefined
){
var
vals
=
dist
.
split
(
","
);
$
(
"#clipfar_cp"
).
attr
(
"plane"
,[
vals
[
0
],
vals
[
1
],
vals
[
2
],
SETTINGS
.
clipfar
].
join
(
","
));
}
}
});
$
(
'#clipfar'
).
change
();
}
function
reset_view_init
(){
function
reset_view_init
(){
$
(
"#reset_view"
).
on
(
'click'
,
function
(){
$
(
"#reset_view"
).
on
(
'click'
,
function
(){
...
...
viewer.html
View file @
aee5b257
...
@@ -171,6 +171,14 @@ Instructions:
...
@@ -171,6 +171,14 @@ Instructions:
<td>
3D marker color
</td>
<td>
3D marker color
</td>
<td><input
id=
'markercolor'
type=
'text'
class=
'input donothide'
/></td>
<td><input
id=
'markercolor'
type=
'text'
class=
'input donothide'
/></td>
</tr>
</tr>
<tr>
<td>
Clipping plane near, m
</td>
<td><input
id=
'clipnear'
type=
'text'
class=
'input donothide'
/></td>
</tr>
<tr>
<td>
Clipping plane far, m
</td>
<td><input
id=
'clipfar'
type=
'text'
class=
'input donothide'
/></td>
</tr>
<tr>
<tr>
<td>
</td>
<td>
</td>
</tr>
</tr>
...
...
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