Jean-Yves Didier

Merge branch 'devel' of https://forge.ibisc.univ-evry.fr/arcs/arcs.js into devel

......@@ -65,7 +65,7 @@ arcs_module(
console.log("Falling back on simple texture");
videoTexture = new THREE.Texture(videoSource);
}
var geometry = new THREE.PlaneGeometry(1.0, 1.0, 0.0);
var geometry = new THREE.PlaneGeometry(1.0, 1.0);
var material = new THREE.MeshBasicMaterial( {map: videoTexture, depthTest: false, depthWrite: false} );
var mesh = new THREE.Mesh(geometry, material);
var textureObject = new THREE.Object3D();
......
......@@ -25,6 +25,7 @@ arcs_module(function(ARCS) {
};
var setUserMedia = function() {
console.log("video test");
if (navigator.mediaDevices !== undefined) {
navigator.mediaDevices.getUserMedia({video:true})
.then(handleMediaStream)
......@@ -58,6 +59,7 @@ arcs_module(function(ARCS) {
canvas = document.getElementById(canvasId);
if (video === undefined || canvas === undefined) {
console.log("video elements not defined");
return;
}
context = canvas.getContext("2d");
......
......@@ -4,6 +4,10 @@
}
body, html {
height: 100%;
}
body {
font-family: sans-serif;
......
......@@ -18,13 +18,13 @@
"inertial" : { "type" : "Inertial" },
"fuser" : { "type" : "GPSInertialPose" },
"pipeNetwork" : { "type" : "PipeNetwork", "url": "./Conduites_UFRST.geojson"},
"video": {"type": "VideoSource"},
"video": {"type": "LiveSource"},
"statemachine" : {
"type": "StateMachine",
"value" : {
"initial": "init",
"transitions" : {
"init" : { "next" : "start"}
"init" : { "video&data" : "start"}
}
}
}
......@@ -48,7 +48,9 @@
],
"connections": [
{ "destination": "viewer", "slot": "addScene", "source": "pipeNetwork", "signal": "sendSceneGraph" },
{ "destination": "statemachine", "slot": "next", "source": "pipeNetwork", "signal": "sendSceneGraph" }
{ "destination": "statemachine", "slot": "data", "source": "pipeNetwork", "signal": "sendSceneGraph" },
{ "destination": "statemachine", "slot": "video", "source": "video", "signal": "onReady"}
],
"cleanups": [
]
......