laymur 0.13.2 → 0.13.4
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.
- package/dist/elements/UIText/UIText.Measuring.d.ts +3 -2
- package/dist/elements/UIText/UIText.Rendering.d.ts +3 -2
- package/dist/index.js +250 -224
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/miscellaneous/canvas.d.ts +13 -0
- package/package.json +2 -2
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** Canvas type that works both in main thread and workers */
|
|
2
|
+
export type UICanvas = OffscreenCanvas | HTMLCanvasElement;
|
|
3
|
+
/** 2D rendering context type for UICanvas */
|
|
4
|
+
export type UICanvasRenderingContext2D = OffscreenCanvasRenderingContext2D | CanvasRenderingContext2D;
|
|
5
|
+
/**
|
|
6
|
+
* Creates a canvas with OffscreenCanvas fallback to HTMLCanvasElement.
|
|
7
|
+
* Uses OffscreenCanvas when available, falls back to HTMLCanvasElement otherwise.
|
|
8
|
+
*
|
|
9
|
+
* @param width - Canvas width in pixels
|
|
10
|
+
* @param height - Canvas height in pixels
|
|
11
|
+
* @returns Canvas instance
|
|
12
|
+
*/
|
|
13
|
+
export declare function createCanvas(width: number, height: number): UICanvas;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "laymur",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.4",
|
|
4
4
|
"description": "Constraint-based UI library for Three.js mobile advertisements",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"clean": "rm -rf dist",
|
|
@@ -66,6 +66,6 @@
|
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
68
|
"@lume/kiwi": "^0.4.4",
|
|
69
|
-
"eventail": "^0.2.
|
|
69
|
+
"eventail": "^0.2.11"
|
|
70
70
|
}
|
|
71
71
|
}
|