mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
working paralax (not for zoom)
This commit is contained in:
parent
357ef181d9
commit
85867f92af
10 changed files with 117 additions and 15 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue