Jean-Yves Didier

context changes

......@@ -372,11 +372,12 @@ ARCS.Context = function( ctx ) {
// we need currying here !
var delayInstanciation = function(p,factory) {
return function(obj) {
console.log("instanciating from data file");
components[p].instance = new factory(obj);
return Promise.resolve();
}
};
console.log("loading data file", components[p].url);
promises.push(
loadDataFile(components[p].url).then(delayInstanciation(p,factory))
);
......
This diff is collapsed. Click to expand it.
......@@ -140,11 +140,12 @@ ARCS.Context = function( ctx ) {
// we need currying here !
var delayInstanciation = function(p,factory) {
return function(obj) {
console.log("instanciating from data file");
components[p].instance = new factory(obj);
return Promise.resolve();
}
};
console.log("loading data file", components[p].url);
promises.push(
loadDataFile(components[p].url).then(delayInstanciation(p,factory))
);
......
......@@ -13,7 +13,7 @@
</head>
<body>
<video id="video" width=320 height=240 autoplay="true" loop="true" style="display: none;">
<video id="video" width=320 height=240 autoplay="true" style="display: none;">
</video>
<canvas id="canvas"></canvas>
<div id="container" ></div>
......