laymur 0.3.21 → 0.3.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -60,59 +60,59 @@ export declare class UIGraphics extends UIElement {
60
60
  *
61
61
  * @param fillColor - Optional color to fill after clearing (CSS color string)
62
62
  */
63
- clear(fillColor?: string): void;
63
+ clear(fillColor?: string): this;
64
64
  /**
65
65
  * Draws a rectangle on the canvas.
66
66
  */
67
- rect(x: number, y: number, width: number, height: number): void;
67
+ rect(x: number, y: number, width: number, height: number): this;
68
68
  /**
69
69
  * Draws a filled rectangle on the canvas.
70
70
  */
71
- fillRect(x: number, y: number, width: number, height: number): void;
71
+ fillRect(x: number, y: number, width: number, height: number): this;
72
72
  /**
73
73
  * Draws a stroked rectangle on the canvas.
74
74
  */
75
- strokeRect(x: number, y: number, width: number, height: number): void;
75
+ strokeRect(x: number, y: number, width: number, height: number): this;
76
76
  /**
77
77
  * Draws a circle on the canvas.
78
78
  */
79
- circle(x: number, y: number, radius: number): void;
79
+ circle(x: number, y: number, radius: number): this;
80
80
  /**
81
81
  * Begins a new path.
82
82
  */
83
- beginPath(): void;
83
+ beginPath(): this;
84
84
  /**
85
85
  * Closes the current path.
86
86
  */
87
- closePath(): void;
87
+ closePath(): this;
88
88
  /**
89
89
  * Fills the current path.
90
90
  */
91
- fill(): void;
91
+ fill(): this;
92
92
  /**
93
93
  * Strokes the current path.
94
94
  */
95
- stroke(): void;
95
+ stroke(): this;
96
96
  /**
97
97
  * Moves the path to a point.
98
98
  */
99
- moveTo(x: number, y: number): void;
99
+ moveTo(x: number, y: number): this;
100
100
  /**
101
101
  * Draws a line to a point.
102
102
  */
103
- lineTo(x: number, y: number): void;
103
+ lineTo(x: number, y: number): this;
104
104
  /**
105
105
  * Sets the fill style.
106
106
  */
107
- setFillStyle(style: string | CanvasGradient | CanvasPattern): void;
107
+ setFillStyle(style: string | CanvasGradient | CanvasPattern): this;
108
108
  /**
109
109
  * Sets the stroke style.
110
110
  */
111
- setStrokeStyle(style: string | CanvasGradient | CanvasPattern): void;
111
+ setStrokeStyle(style: string | CanvasGradient | CanvasPattern): this;
112
112
  /**
113
113
  * Sets the line width.
114
114
  */
115
- setLineWidth(width: number): void;
115
+ setLineWidth(width: number): this;
116
116
  /**
117
117
  * Destroys the graphics element by cleaning up resources.
118
118
  */
package/dist/index.js CHANGED
@@ -5290,6 +5290,7 @@ class UIGraphics extends UIElement {
5290
5290
  this._private_ctx.fillRect(0, 0, this._private_canvas.width, this._private_canvas.height);
5291
5291
  }
5292
5292
  this._private_canvasTexture.needsUpdate = true;
5293
+ return this;
5293
5294
  }
5294
5295
  /**
5295
5296
  * Draws a rectangle on the canvas.
@@ -5297,6 +5298,7 @@ class UIGraphics extends UIElement {
5297
5298
  rect(x, y, width, height) {
5298
5299
  this._private_ctx.rect(x, y, width, height);
5299
5300
  this._private_canvasTexture.needsUpdate = true;
5301
+ return this;
5300
5302
  }
5301
5303
  /**
5302
5304
  * Draws a filled rectangle on the canvas.
@@ -5304,6 +5306,7 @@ class UIGraphics extends UIElement {
5304
5306
  fillRect(x, y, width, height) {
5305
5307
  this._private_ctx.fillRect(x, y, width, height);
5306
5308
  this._private_canvasTexture.needsUpdate = true;
5309
+ return this;
5307
5310
  }
5308
5311
  /**
5309
5312
  * Draws a stroked rectangle on the canvas.
@@ -5311,6 +5314,7 @@ class UIGraphics extends UIElement {
5311
5314
  strokeRect(x, y, width, height) {
5312
5315
  this._private_ctx.strokeRect(x, y, width, height);
5313
5316
  this._private_canvasTexture.needsUpdate = true;
5317
+ return this;
5314
5318
  }
5315
5319
  /**
5316
5320
  * Draws a circle on the canvas.
@@ -5320,6 +5324,7 @@ class UIGraphics extends UIElement {
5320
5324
  this._private_ctx.arc(x, y, radius, 0, Math.PI * 2);
5321
5325
  this._private_ctx.closePath();
5322
5326
  this._private_canvasTexture.needsUpdate = true;
5327
+ return this;
5323
5328
  }
5324
5329
  /**
5325
5330
  * Begins a new path.
@@ -5327,6 +5332,7 @@ class UIGraphics extends UIElement {
5327
5332
  beginPath() {
5328
5333
  this._private_ctx.beginPath();
5329
5334
  this._private_canvasTexture.needsUpdate = true;
5335
+ return this;
5330
5336
  }
5331
5337
  /**
5332
5338
  * Closes the current path.
@@ -5334,6 +5340,7 @@ class UIGraphics extends UIElement {
5334
5340
  closePath() {
5335
5341
  this._private_ctx.closePath();
5336
5342
  this._private_canvasTexture.needsUpdate = true;
5343
+ return this;
5337
5344
  }
5338
5345
  /**
5339
5346
  * Fills the current path.
@@ -5341,6 +5348,7 @@ class UIGraphics extends UIElement {
5341
5348
  fill() {
5342
5349
  this._private_ctx.fill();
5343
5350
  this._private_canvasTexture.needsUpdate = true;
5351
+ return this;
5344
5352
  }
5345
5353
  /**
5346
5354
  * Strokes the current path.
@@ -5348,13 +5356,14 @@ class UIGraphics extends UIElement {
5348
5356
  stroke() {
5349
5357
  this._private_ctx.stroke();
5350
5358
  this._private_canvasTexture.needsUpdate = true;
5359
+ return this;
5351
5360
  }
5352
5361
  /**
5353
5362
  * Moves the path to a point.
5354
5363
  */
5355
5364
  moveTo(x, y) {
5356
5365
  this._private_ctx.moveTo(x, y);
5357
- this._private_canvasTexture.needsUpdate = true;
5366
+ return this;
5358
5367
  }
5359
5368
  /**
5360
5369
  * Draws a line to a point.
@@ -5362,27 +5371,28 @@ class UIGraphics extends UIElement {
5362
5371
  lineTo(x, y) {
5363
5372
  this._private_ctx.lineTo(x, y);
5364
5373
  this._private_canvasTexture.needsUpdate = true;
5374
+ return this;
5365
5375
  }
5366
5376
  /**
5367
5377
  * Sets the fill style.
5368
5378
  */
5369
5379
  setFillStyle(style) {
5370
5380
  this._private_ctx.fillStyle = style;
5371
- this._private_canvasTexture.needsUpdate = true;
5381
+ return this;
5372
5382
  }
5373
5383
  /**
5374
5384
  * Sets the stroke style.
5375
5385
  */
5376
5386
  setStrokeStyle(style) {
5377
5387
  this._private_ctx.strokeStyle = style;
5378
- this._private_canvasTexture.needsUpdate = true;
5388
+ return this;
5379
5389
  }
5380
5390
  /**
5381
5391
  * Sets the line width.
5382
5392
  */
5383
5393
  setLineWidth(width) {
5384
5394
  this._private_ctx.lineWidth = width;
5385
- this._private_canvasTexture.needsUpdate = true;
5395
+ return this;
5386
5396
  }
5387
5397
  /**
5388
5398
  * Destroys the graphics element by cleaning up resources.