code: function onActivateEvent() {
           var _updateLayerFn = this.updateLayer.bind(this); // register to the viewport change notification
  
  
           this.vpChangeHdlr = me.event.subscribe(me.event.VIEWPORT_ONCHANGE, _updateLayerFn);
           this.vpResizeHdlr = me.event.subscribe(me.event.VIEWPORT_ONRESIZE, this.resize.bind(this));
           this.vpLoadedHdlr = me.event.subscribe(me.event.LEVEL_LOADED, function () {
             // force a first refresh when the level is loaded
             _updateLayerFn(me.game.viewport.pos);
           }); // in case the level is not added to the root container,
           // the onActivateEvent call happens after the LEVEL_LOADED event
           // so we need to force a first update
  
           if (this.ancestor.root !== true) {
             this.updateLayer(me.game.viewport.pos);
           }
         }
docs: called when the layer is added to the game world or a container