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
|
|
@ -6,7 +6,7 @@ define([
|
|||
|
||||
function (Nc, Exception, Layer) {
|
||||
|
||||
function LayerManager(container) {
|
||||
function LayerManager(container, me) {
|
||||
this.layers = [];
|
||||
this.container = container;
|
||||
|
||||
|
|
@ -21,6 +21,14 @@ function (Nc, Exception, Layer) {
|
|||
Nc.on(Nc.ns.client.view.mesh.removeFilter, this.removeFilter, this)
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
LayerManager.prototype.render = function(centerPosition, zoom) {
|
||||
for (var i = 0; i < this.layers.length; i++) {
|
||||
var layer = this.layers[i];
|
||||
layer.render(centerPosition, zoom);
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
* If no referenceId is given, the layer is inserted in the far background (behind=true)
|
||||
|
|
@ -87,6 +95,11 @@ function (Nc, Exception, Layer) {
|
|||
return null;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
/* Delegate methods */
|
||||
|
||||
LayerManager.prototype.delegate = function() {
|
||||
var methodName = arguments[0];
|
||||
var layerId = arguments[1];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue