implementing more chunk ops based on GPU

composing, toEdits
This commit is contained in:
りき萌 2025-09-08 22:10:55 +02:00
parent bb55e23979
commit 1bbf1b1d94
5 changed files with 259 additions and 38 deletions

View file

@ -122,9 +122,9 @@ export class User {
// Returns the scratch layer committed to the wall, so that the caller may do additional
// processing with the completed layer (i.e. send to the server.)
// The layer has to be .destroy()ed once you're done working with it.
commitScratchLayer(wall) {
commitScratchLayer(chunkAllocator, wall) {
if (this.scratchLayer != null) {
wall.mainLayer.compositeAlpha(this.scratchLayer);
wall.mainLayer.composite(chunkAllocator, this.scratchLayer, "alphaBlend");
wall.removeLayer(this.scratchLayer);
let scratchLayer = this.scratchLayer;
this.scratchLayer = null;