Fix brush
This commit is contained in:
parent
780388d74b
commit
9c7b91000f
2 changed files with 7 additions and 3 deletions
|
|
@ -150,6 +150,10 @@ export default class GameLoop {
|
|||
|
||||
this.device.queue.submit([commandEncoder.finish()]);
|
||||
|
||||
if (!this.isSwipeActive) {
|
||||
this.brushPipeline.clearSwipes();
|
||||
}
|
||||
|
||||
if (settings.simulatedDelayMs > 0) {
|
||||
await sleep(settings.simulatedDelayMs);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -126,12 +126,12 @@ export class BrushPipeline {
|
|||
new Float32Array([brushWidth / 2, brushWidthRandomness])
|
||||
);
|
||||
|
||||
if (this.linePoints.length === 0) {
|
||||
this.actualPoints = this.linePoints.slice();
|
||||
|
||||
if (this.actualPoints.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.actualPoints = this.linePoints.slice();
|
||||
|
||||
if (this.linePoints.length === 1) {
|
||||
this.actualPoints.push(this.linePoints[0]); // allow single point swipes
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue