41 lines
1.6 KiB
JavaScript
41 lines
1.6 KiB
JavaScript
shadow$provide.module$node_modules$pixi_DOT_js$lib$scene$graphics$canvas$CanvasGraphicsPipe = function(global, require, module, exports) {
|
|
global = require("module$node_modules$pixi_DOT_js$lib$extensions$Extensions");
|
|
var State = require("module$node_modules$pixi_DOT_js$lib$rendering$renderers$shared$state$State"), GCManagedHash = require("module$node_modules$pixi_DOT_js$lib$utils$data$GCManagedHash");
|
|
"use strict";
|
|
class CanvasGraphicsPipe {
|
|
constructor(renderer, adaptor) {
|
|
this.state = State.State.for2d();
|
|
this.renderer = renderer;
|
|
this._adaptor = adaptor;
|
|
this.renderer.runners.contextChange.add(this);
|
|
this._managedGraphics = new GCManagedHash.GCManagedHash({renderer, type:"renderable", priority:-1, name:"graphics"});
|
|
}
|
|
contextChange() {
|
|
this._adaptor.contextChange(this.renderer);
|
|
}
|
|
validateRenderable(_graphics) {
|
|
return !1;
|
|
}
|
|
addRenderable(graphics, instructionSet) {
|
|
this._managedGraphics.add(graphics);
|
|
this.renderer.renderPipes.batch.break(instructionSet);
|
|
instructionSet.add(graphics);
|
|
}
|
|
updateRenderable(_graphics) {
|
|
}
|
|
execute(graphics) {
|
|
graphics.isRenderable && this._adaptor.execute(this, graphics);
|
|
}
|
|
destroy() {
|
|
this._managedGraphics.destroy();
|
|
this.renderer = null;
|
|
this._adaptor.destroy();
|
|
this._adaptor = null;
|
|
}
|
|
}
|
|
CanvasGraphicsPipe.extension = {type:[global.ExtensionType.CanvasPipes], name:"graphics"};
|
|
exports.CanvasGraphicsPipe = CanvasGraphicsPipe;
|
|
};
|
|
|
|
//# sourceMappingURL=module$node_modules$pixi_DOT_js$lib$scene$graphics$canvas$CanvasGraphicsPipe.js.map
|