Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
gzweb
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Neurorobotics Platform
gzweb
Commits
530108db
Commit
530108db
authored
9 years ago
by
Sandro Weber
Committed by
BBP code review
9 years ago
Browse files
Options
Downloads
Plain Diff
Merge "[NRRPLT-2730] handle view container design via css, prepare view frustum visualization"
parents
f45d2ead
60980edb
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
gz3d/client/style/gz3d.css
+22
-0
22 additions, 0 deletions
gz3d/client/style/gz3d.css
gz3d/src/gziface.js
+4
-2
4 additions, 2 deletions
gz3d/src/gziface.js
gz3d/src/gzmultiview.js
+4
-13
4 additions, 13 deletions
gz3d/src/gzmultiview.js
with
30 additions
and
15 deletions
gz3d/client/style/gz3d.css
+
22
−
0
View file @
530108db
...
@@ -733,3 +733,25 @@ input[type=number]::-webkit-inner-spin-button
...
@@ -733,3 +733,25 @@ input[type=number]::-webkit-inner-spin-button
}
}
}
}
.viewContainer
{
position
:
absolute
;
minWidth
:
50px
;
maxWidth
:
100%
;
maxHeight
:
100%
;
boxShadow
:
0px
0px
0px
3px
rgba
(
0
,
0
,
0
,
0.3
);
borderRadius
:
2px
;
background
:
rgba
(
0
,
0
,
0
,
0
);
}
.viewContainer
>
.frustumCheckbox
{
position
:
absolute
;
left
:
0px
;
top
:
0px
;
}
.viewContainer
>
.frustumLabel
{
position
:
absolute
;
left
:
20px
;
top
:
0px
;
}
This diff is collapsed.
Click to expand it.
gz3d/src/gziface.js
+
4
−
2
View file @
530108db
...
@@ -1068,8 +1068,10 @@ GZ3D.GZIface.prototype.createSensorFromMsg = function(sensor)
...
@@ -1068,8 +1068,10 @@ GZ3D.GZIface.prototype.createSensorFromMsg = function(sensor)
// visualization - Deactivated since it causes the robot to be very big and the user
// visualization - Deactivated since it causes the robot to be very big and the user
// can't barely select other objects on the scene. Reactivate for debug purposes !
// can't barely select other objects on the scene. Reactivate for debug purposes !
// var cameraHelper = new THREE.CameraHelper(view.camera);
var
cameraHelper
=
new
THREE
.
CameraHelper
(
view
.
camera
);
// view.camera.add( cameraHelper );
cameraHelper
.
visible
=
false
;
view
.
camera
.
cameraHelper
=
cameraHelper
;
view
.
camera
.
add
(
cameraHelper
);
view
.
type
=
sensor
.
type
;
view
.
type
=
sensor
.
type
;
...
...
This diff is collapsed.
Click to expand it.
gz3d/src/gzmultiview.js
+
4
−
13
View file @
530108db
...
@@ -38,7 +38,8 @@ GZ3D.MultiView.prototype.init = function()
...
@@ -38,7 +38,8 @@ GZ3D.MultiView.prototype.init = function()
}
}
this
.
createRenderContainerCallback
=
function
()
{
this
.
createRenderContainerCallback
=
function
()
{
return
document
.
createElement
(
'
div
'
);
var
renderContainer
=
document
.
createElement
(
'
div
'
);
return
renderContainer
;
};
};
this
.
createMainUserView
();
this
.
createMainUserView
();
...
@@ -138,30 +139,20 @@ GZ3D.MultiView.prototype.createViewContainer = function(displayParams, name)
...
@@ -138,30 +139,20 @@ GZ3D.MultiView.prototype.createViewContainer = function(displayParams, name)
return
undefined
;
return
undefined
;
}
}
viewContainer
.
className
+=
'
viewContainer
'
;
// z-index
// z-index
var
zIndexTop
=
parseInt
(
this
.
mainContainer
.
style
.
zIndex
,
10
)
+
this
.
views
.
length
+
1
;
var
zIndexTop
=
parseInt
(
this
.
mainContainer
.
style
.
zIndex
,
10
)
+
this
.
views
.
length
+
1
;
viewContainer
.
style
.
zIndex
=
angular
.
isDefined
(
displayParams
.
zIndex
)
?
displayParams
.
zIndex
:
zIndexTop
;
viewContainer
.
style
.
zIndex
=
angular
.
isDefined
(
displayParams
.
zIndex
)
?
displayParams
.
zIndex
:
zIndexTop
;
// positioning
// positioning
viewContainer
.
style
.
position
=
'
absolute
'
;
viewContainer
.
style
.
left
=
displayParams
.
left
;
viewContainer
.
style
.
left
=
displayParams
.
left
;
viewContainer
.
style
.
top
=
displayParams
.
top
;
viewContainer
.
style
.
top
=
displayParams
.
top
;
viewContainer
.
style
.
width
=
displayParams
.
width
;
viewContainer
.
style
.
width
=
displayParams
.
width
;
viewContainer
.
style
.
height
=
displayParams
.
height
;
viewContainer
.
style
.
height
=
displayParams
.
height
;
// We set 50px as a min-width for now and set the min height accordingly
viewContainer
.
style
.
minWidth
=
'
50px
'
;
var
aspectRatio
=
parseInt
(
displayParams
.
height
,
10
)
/
parseInt
(
displayParams
.
width
,
10
);
var
aspectRatio
=
parseInt
(
displayParams
.
height
,
10
)
/
parseInt
(
displayParams
.
width
,
10
);
viewContainer
.
style
.
minHeight
=
Math
.
floor
(
50
*
aspectRatio
)
+
'
px
'
;
viewContainer
.
style
.
minHeight
=
Math
.
floor
(
parseInt
(
viewContainer
.
style
.
minWidth
,
10
)
*
aspectRatio
)
+
'
px
'
;
viewContainer
.
style
.
maxWidth
=
'
100%
'
;
viewContainer
.
style
.
maxHeight
=
'
100%
'
;
// Transparent view-container so that we can render viewport with one renderer in the same context
// view-container is only taken as reference for viewport
viewContainer
.
style
.
boxShadow
=
'
0px 0px 0px 3px rgba(0,0,0,0.3)
'
;
viewContainer
.
style
.
borderRadius
=
'
2px
'
;
viewContainer
.
style
.
background
=
'
rgba(0,0,0,0)
'
;
if
(
this
.
renderMethod
===
GZ3D
.
MULTIVIEW_RENDER_COPY2CANVAS
)
{
if
(
this
.
renderMethod
===
GZ3D
.
MULTIVIEW_RENDER_COPY2CANVAS
)
{
// canvas
// canvas
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment