working paralax (not for zoom)

This commit is contained in:
Jeena 2014-11-15 23:28:03 +01:00
parent 357ef181d9
commit 85867f92af
10 changed files with 117 additions and 15 deletions

View file

@ -90,7 +90,11 @@ function (Parent, Settings, Nc, PIXI, AbstractLayer) {
Level.prototype.setupLayer = function(options, behind, referenceId) {
Parent.prototype.setupLayer.call(this, options, behind, referenceId);
Nc.trigger(Nc.ns.client.view.layer.createAndInsert, options.layerId, 1, behind, referenceId);
var parallaxSpeed = 0.0;
if (options.properties && options.properties.parallaxSpeed) {
parallaxSpeed = parseFloat(options.properties.parallaxSpeed);
}
Nc.trigger(Nc.ns.client.view.layer.createAndInsert, options.layerId, parallaxSpeed, behind, referenceId);
};
return Level;