Toggle navigation
Toggle navigation
This project
Loading...
Sign in
arcs
/
arcs.js
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
3
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Jean-Yves Didier
2017-10-08 21:26:41 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
6d2493b950b65a0022b6d153c859b13c28d9bbee
6d2493b9
1 parent
ed6ad025
pipe app debugging
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
94 additions
and
8 deletions
build/arcs.js
components/arviewer.js
components/inertial.js
components/video.js
tests/pipe/arcs.css
tests/pipe/arcsapp.json
tests/pipe/pipe.html
build/arcs.js
View file @
6d2493b
This diff is collapsed. Click to expand it.
components/arviewer.js
View file @
6d2493b
...
...
@@ -131,7 +131,6 @@ arcs_module(
// put here the code to set orientation and position of object camera3d
// see also documentation of Object3D (API Three.js)
// since a camera is an Object3D
console
.
log
(
"viewing"
);
var
rotation
=
markers
[
i
].
pose
.
rotation
;
var
translation
=
markers
[
i
].
pose
.
position
;
...
...
@@ -310,4 +309,4 @@ arcs_module(
return
{
ARViewer
:
ARViewer
};
},
[
'deps/three.js/index'
,
'deps/three.js/frustumcamera'
]
);
);
\ No newline at end of file
...
...
components/inertial.js
View file @
6d2493b
...
...
@@ -16,7 +16,7 @@ arcs_module(function (ARCS) {
this
.
start
=
function
()
{
if
(
window
.
DeviceOrientationEvent
)
{
console
.
log
(
"Device orientation capability detected"
);
window
.
addEventListener
(
"deviceorientation"
,
handleOrientation
,
tru
e
);
window
.
addEventListener
(
"deviceorientation"
,
handleOrientation
,
fals
e
);
//window.ondeviceorientation = handleOrientation;
}
else
{
console
.
log
(
"[Inertial]"
,
"no device orientation API"
);
...
...
@@ -28,6 +28,8 @@ arcs_module(function (ARCS) {
}
else
{
console
.
log
(
"[Inertial]"
,
"no device motion API"
);
}
};
},
...
...
components/video.js
View file @
6d2493b
...
...
@@ -26,15 +26,17 @@ arcs_module(function(ARCS) {
var
setUserMedia
=
function
()
{
if
(
navigator
.
mediaDevices
!==
undefined
)
{
navigator
.
mediaDevices
.
getUserMedia
({
video
:
true
})
navigator
.
mediaDevices
.
getUserMedia
({
video
:
{
facingMode
:
"environment"
}
})
.
then
(
handleMediaStream
)
.
catch
(
errorMediaStream
);
}
else
{
var
getUserMedia
=
navigator
.
getUserMedia
||
navigator
.
webkitGetUserMedia
||
navigator
.
mozGetUserMedia
;
if
(
getUserMedia
!==
undefined
)
{
getUserMedia
({
video
:
true
},
handleMediaStream
,
console
.
log
(
getUserMedia
(),
handleMediaStream
,
errorMediaStream
);
/*getUserMedia({video:true}, handleMediaStream,
errorMediaStream
);
);*/
getUserMedia
({
video
:
true
}).
then
(
handleMediaStream
);
}
}
};
...
...
tests/pipe/arcs.css
View file @
6d2493b
@viewport
{
width
:
device-width
;
height
:
device-height
;
zoom
:
1
;
}
...
...
@@ -125,7 +126,7 @@ body {
left
:
0px
;
top
:
0px
;
width
:
100%
;
height
:
100
%
;
height
:
100
vh
;
}
...
...
tests/pipe/arcsapp.json
View file @
6d2493b
{
"context"
:
{
"libraries"
:
[
"components/animator"
,
"components/arviewer"
,
"components/geojson"
,
"components/geolocator"
,
"components/gpsinertialpose"
,
"components/inertial"
,
"components/video"
,
"components/windowevent"
],
"components"
:
{
"viewer"
:
{
"type"
:
"ARViewer"
},
"animator"
:
{
"type"
:
"Animator"
},
"windowresize"
:
{
"type"
:
"WindowEvent"
},
"gps"
:
{
"type"
:
"GeoLocator"
},
"inertial"
:
{
"type"
:
"Inertial"
},
"fuser"
:
{
"type"
:
"GPSInertialPose"
},
"pipeNetwork"
:
{
"type"
:
"PipeNetwork"
,
"url"
:
"./Conduites_UFRST.geojson"
},
"video"
:
{
"type"
:
"LiveSource"
},
"statemachine"
:
{
"type"
:
"StateMachine"
,
"value"
:
{
"initial"
:
"init"
,
"transitions"
:
{
"init"
:
{
"next"
:
"start"
}
}
}
}
}
},
"controller"
:
"statemachine"
,
"sheets"
:
{
"init"
:
{
"preconnections"
:
[
{
"destination"
:
"video"
,
"slot"
:
"setWidgets"
,
"value"
:
[
"video"
,
"canvas"
]
},
{
"destination"
:
"viewer"
,
"slot"
:
"keepAspectRatio"
,
"value"
:
[
true
]
},
{
"destination"
:
"viewer"
,
"slot"
:
"setWidgets"
,
"value"
:
[
"container"
,
"video"
]},
{
"destination"
:
"viewer"
,
"slot"
:
"setFocal"
,
"value"
:
[
600
]},
{
"destination"
:
"fuser"
,
"slot"
:
"setId"
,
"value"
:
[
17
]
},
{
"destination"
:
"viewer"
,
"slot"
:
"setSceneId"
,
"value"
:
[
17
]
},
{
"destination"
:
"inertial"
,
"slot"
:
"start"
,
"value"
:
[]
},
{
"destination"
:
"gps"
,
"slot"
:
"watchPosition"
,
"value"
:
[]
}
],
"postconnections"
:
[
{
"destination"
:
"pipeNetwork"
,
"slot"
:
"init"
,
"value"
:
[]
}
],
"connections"
:
[
{
"destination"
:
"viewer"
,
"slot"
:
"addScene"
,
"source"
:
"pipeNetwork"
,
"signal"
:
"sendSceneGraph"
},
{
"destination"
:
"statemachine"
,
"slot"
:
"next"
,
"source"
:
"pipeNetwork"
,
"signal"
:
"sendSceneGraph"
}
],
"cleanups"
:
[
]
},
"start"
:
{
"preconnections"
:
[
],
"postconnections"
:
[
{
"destination"
:
"viewer"
,
"slot"
:
"viewAll"
,
"value"
:
[]},
{
"destination"
:
"animator"
,
"slot"
:
"start"
,
"value"
:[]}
],
"connections"
:
[
{
"source"
:
"windowresize"
,
"signal"
:
"onResize"
,
"destination"
:
"viewer"
,
"slot"
:
"setSize"
},
{
"source"
:
"animator"
,
"signal"
:
"onAnimationFrame"
,
"destination"
:
"video"
,
"slot"
:
"grabFrame"
},
{
"source"
:
"video"
,
"signal"
:
"onImage"
,
"destination"
:
"viewer"
,
"slot"
:
"render"
},
{
"source"
:
"video"
,
"signal"
:
"onReady"
,
"destination"
:
"viewer"
,
"slot"
:
"resetCamera"
},
{
"source"
:
"gps"
,
"signal"
:
"sendCoordinates"
,
"destination"
:
"fuser"
,
"slot"
:
"setPosition"
},
{
"source"
:
"inertial"
,
"signal"
:
"sendOrientation"
,
"destination"
:
"fuser"
,
"slot"
:
"setOrientation"
},
{
"source"
:
"fuser"
,
"signal"
:
"sendPose"
,
"destination"
:
"viewer"
,
"slot"
:
"setExtrinsics"
}
],
"cleanups"
:
[]
}
}
}
\ No newline at end of file
...
...
tests/pipe/pipe.html
View file @
6d2493b
...
...
@@ -13,7 +13,13 @@
</head>
<body>
<video
id=
"video"
width=
320
height=
240
autoplay=
"true"
style=
"display: none;"
></video>
<canvas
id=
"canvas"
></canvas>
<div
id=
"container"
></div>
<div
id=
"contents"
>
<a
id=
"logo"
href=
"http://arcs.ibisc.univ-evry.fr"
><img
src=
"../../docs/arcs_logo.png"
alt=
"ARCS"
/></a>
</div>
</body>
</html>
\ No newline at end of file
...
...
Please
register
or
login
to post a comment