fix synchronisation between users
This commit is contained in:
parent
410f82201d
commit
85dce88ec2
4 changed files with 16 additions and 7 deletions
|
@ -42,7 +42,7 @@ export class User {
|
|||
return result;
|
||||
}
|
||||
|
||||
simulate(chunkAllocator, wall, interactions) {
|
||||
simulate(chunkAllocator, brushRenderer, wall, interactions) {
|
||||
console.group("simulate", this.nickname);
|
||||
for (let interaction of interactions) {
|
||||
if (interaction.kind == "setBrush") {
|
||||
|
@ -72,10 +72,16 @@ export class User {
|
|||
if (interaction.kind == "scribble" && this.#expectContKind(ContKind.Scribble)) {
|
||||
renderToChunksInArea(
|
||||
chunkAllocator,
|
||||
brushRenderer,
|
||||
this.getScratchLayer(wall),
|
||||
this.simulation.renderArea,
|
||||
(pixmap, translationX, translationY) => {
|
||||
return this.haku.contScribble(pixmap, translationX, translationY);
|
||||
(brushRenderer, canvas, translationX, translationY) => {
|
||||
return this.haku.contScribble(
|
||||
brushRenderer,
|
||||
canvas,
|
||||
translationX,
|
||||
translationY,
|
||||
);
|
||||
},
|
||||
);
|
||||
console.info("ended simulation");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue