melonjs 18.2.2 → 18.3.0
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/README.md +22 -23
- package/build/application/application.d.ts +85 -13
- package/build/application/application.d.ts.map +1 -1
- package/build/application/defaultApplicationSettings.d.ts +1 -0
- package/build/application/defaultApplicationSettings.d.ts.map +1 -1
- package/build/application/settings.d.ts +20 -1
- package/build/application/settings.d.ts.map +1 -1
- package/build/camera/camera2d.d.ts +9 -9
- package/build/camera/camera2d.d.ts.map +1 -1
- package/build/geometries/path2d.d.ts.map +1 -1
- package/build/index.d.ts +82 -92
- package/build/index.d.ts.map +1 -1
- package/build/index.js +12447 -11605
- package/build/index.js.map +4 -4
- package/build/input/gamepad.d.ts.map +1 -1
- package/build/input/keyboard.d.ts.map +1 -1
- package/build/input/pointer.d.ts.map +1 -1
- package/build/input/pointerevent.d.ts +6 -0
- package/build/input/pointerevent.d.ts.map +1 -1
- package/build/level/level.d.ts +2 -2
- package/build/level/level.d.ts.map +1 -1
- package/build/level/tiled/TMXGroup.d.ts +1 -1
- package/build/level/tiled/TMXLayer.d.ts +4 -4
- package/build/level/tiled/TMXLayer.d.ts.map +1 -1
- package/build/level/tiled/TMXObject.d.ts +1 -1
- package/build/level/tiled/TMXObjectFactory.d.ts +98 -0
- package/build/level/tiled/TMXObjectFactory.d.ts.map +1 -0
- package/build/level/tiled/TMXTileMap.d.ts +7 -3
- package/build/level/tiled/TMXTileMap.d.ts.map +1 -1
- package/build/level/tiled/TMXTileset.d.ts.map +1 -1
- package/build/level/tiled/TMXUtils.d.ts +22 -0
- package/build/level/tiled/TMXUtils.d.ts.map +1 -1
- package/build/level/tiled/factories/shape.d.ts +9 -0
- package/build/level/tiled/factories/shape.d.ts.map +1 -0
- package/build/level/tiled/factories/text.d.ts +8 -0
- package/build/level/tiled/factories/text.d.ts.map +1 -0
- package/build/level/tiled/factories/tile.d.ts +8 -0
- package/build/level/tiled/factories/tile.d.ts.map +1 -0
- package/build/level/tiled/renderer/TMXHexagonalRenderer.d.ts +1 -1
- package/build/level/tiled/renderer/TMXIsometricRenderer.d.ts +1 -1
- package/build/loader/loadingscreen.d.ts +1 -1
- package/build/loader/loadingscreen.d.ts.map +1 -1
- package/build/loader/parsers/fetchdata.d.ts.map +1 -1
- package/build/loader/parsers/fontface.d.ts +2 -2
- package/build/loader/parsers/tmx.d.ts +0 -1
- package/build/loader/parsers/tmx.d.ts.map +1 -1
- package/build/loader/parsers/video.d.ts.map +1 -1
- package/build/particles/emitter.d.ts +2 -2
- package/build/physics/bounds.d.ts +1 -1
- package/build/physics/collision.d.ts +1 -1
- package/build/physics/detector.d.ts +1 -1
- package/build/physics/quadtree.d.ts.map +1 -1
- package/build/physics/world.d.ts +3 -3
- package/build/physics/world.d.ts.map +1 -1
- package/build/plugin/plugin.d.ts +3 -3
- package/build/renderable/container.d.ts +11 -3
- package/build/renderable/container.d.ts.map +1 -1
- package/build/renderable/draggable.d.ts.map +1 -1
- package/build/renderable/dragndrop.d.ts.map +1 -1
- package/build/renderable/imagelayer.d.ts +1 -4
- package/build/renderable/imagelayer.d.ts.map +1 -1
- package/build/renderable/renderable.d.ts +3 -3
- package/build/renderable/sprite.d.ts +1 -1
- package/build/renderable/sprite.d.ts.map +1 -1
- package/build/renderable/text/bitmaptext.d.ts +1 -1
- package/build/renderable/text/bitmaptext.d.ts.map +1 -1
- package/build/renderable/text/bitmaptextdata.d.ts +2 -0
- package/build/renderable/text/bitmaptextdata.d.ts.map +1 -1
- package/build/renderable/text/text.d.ts +6 -1
- package/build/renderable/text/text.d.ts.map +1 -1
- package/build/renderable/text/textmetrics.d.ts +2 -0
- package/build/renderable/text/textmetrics.d.ts.map +1 -1
- package/build/renderable/ui/uibaseelement.d.ts +0 -1
- package/build/renderable/ui/uibaseelement.d.ts.map +1 -1
- package/build/state/stage.d.ts +6 -4
- package/build/state/stage.d.ts.map +1 -1
- package/build/state/state.d.ts +2 -2
- package/build/state/state.d.ts.map +1 -1
- package/build/system/bootstrap.d.ts +13 -0
- package/build/system/bootstrap.d.ts.map +1 -0
- package/build/system/device.d.ts +5 -4
- package/build/system/device.d.ts.map +1 -1
- package/build/system/event.d.ts +25 -5
- package/build/system/event.d.ts.map +1 -1
- package/build/system/eventEmitter.d.ts +4 -4
- package/build/system/eventEmitter.d.ts.map +1 -1
- package/build/system/legacy_pool.d.ts +32 -4
- package/build/system/legacy_pool.d.ts.map +1 -1
- package/build/system/platform.d.ts.map +1 -1
- package/build/system/timer.d.ts.map +1 -1
- package/build/tweens/tween.d.ts +4 -2
- package/build/tweens/tween.d.ts.map +1 -1
- package/build/utils/function.d.ts +1 -1
- package/build/utils/function.d.ts.map +1 -1
- package/build/video/canvas/canvas_renderer.d.ts +27 -6
- package/build/video/canvas/canvas_renderer.d.ts.map +1 -1
- package/build/video/gradient.d.ts +85 -0
- package/build/video/gradient.d.ts.map +1 -0
- package/build/video/renderer.d.ts +43 -0
- package/build/video/renderer.d.ts.map +1 -1
- package/build/video/renderstate.d.ts +18 -0
- package/build/video/renderstate.d.ts.map +1 -1
- package/build/video/rendertarget/canvasrendertarget.d.ts +3 -1
- package/build/video/rendertarget/canvasrendertarget.d.ts.map +1 -1
- package/build/video/texture/atlas.d.ts.map +1 -1
- package/build/video/texture/cache.d.ts +2 -1
- package/build/video/texture/cache.d.ts.map +1 -1
- package/build/video/utils/dash.d.ts +15 -0
- package/build/video/utils/dash.d.ts.map +1 -0
- package/build/video/utils/tessellation.d.ts +29 -0
- package/build/video/utils/tessellation.d.ts.map +1 -0
- package/build/video/video.d.ts +16 -2
- package/build/video/video.d.ts.map +1 -1
- package/build/video/webgl/utils/program.d.ts.map +1 -1
- package/build/video/webgl/webgl_renderer.d.ts +32 -6
- package/build/video/webgl/webgl_renderer.d.ts.map +1 -1
- package/package.json +9 -9
- package/build/system/eventEmitter.spec.d.ts +0 -2
- package/build/system/eventEmitter.spec.d.ts.map +0 -1
|
@@ -144,6 +144,33 @@ export default class CanvasRenderer extends Renderer {
|
|
|
144
144
|
* adds a straight line to the current sub-path by connecting the sub-path's last point to the specified (x, y) coordinates.
|
|
145
145
|
*/
|
|
146
146
|
lineTo(x: any, y: any): void;
|
|
147
|
+
/**
|
|
148
|
+
* Adds a quadratic Bezier curve to the current sub-path.
|
|
149
|
+
* @param {number} cpx - The x-axis coordinate of the control point.
|
|
150
|
+
* @param {number} cpy - The y-axis coordinate of the control point.
|
|
151
|
+
* @param {number} x - The x-axis coordinate of the end point.
|
|
152
|
+
* @param {number} y - The y-axis coordinate of the end point.
|
|
153
|
+
*/
|
|
154
|
+
quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void;
|
|
155
|
+
/**
|
|
156
|
+
* Adds a cubic Bezier curve to the current sub-path.
|
|
157
|
+
* @param {number} cp1x - The x-axis coordinate of the first control point.
|
|
158
|
+
* @param {number} cp1y - The y-axis coordinate of the first control point.
|
|
159
|
+
* @param {number} cp2x - The x-axis coordinate of the second control point.
|
|
160
|
+
* @param {number} cp2y - The y-axis coordinate of the second control point.
|
|
161
|
+
* @param {number} x - The x-axis coordinate of the end point.
|
|
162
|
+
* @param {number} y - The y-axis coordinate of the end point.
|
|
163
|
+
*/
|
|
164
|
+
bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void;
|
|
165
|
+
/**
|
|
166
|
+
* Adds a circular arc to the current sub-path, using the given control points and radius.
|
|
167
|
+
* @param {number} x1 - The x-axis coordinate of the first control point.
|
|
168
|
+
* @param {number} y1 - The y-axis coordinate of the first control point.
|
|
169
|
+
* @param {number} x2 - The x-axis coordinate of the second control point.
|
|
170
|
+
* @param {number} y2 - The y-axis coordinate of the second control point.
|
|
171
|
+
* @param {number} radius - The arc's radius. Must be non-negative.
|
|
172
|
+
*/
|
|
173
|
+
arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void;
|
|
147
174
|
/**
|
|
148
175
|
* creates a rectangular path whose starting point is at (x, y) and whose size is specified by width and height.
|
|
149
176
|
* @param {number} x - The x axis of the coordinate for the rectangle starting point.
|
|
@@ -338,12 +365,6 @@ export default class CanvasRenderer extends Renderer {
|
|
|
338
365
|
* @param {number} y - Scaling factor in the vertical direction. A negative value flips pixels across the horizontal axis. A value of 1 results in no vertical scaling
|
|
339
366
|
*/
|
|
340
367
|
scale(x: number, y: number): void;
|
|
341
|
-
/**
|
|
342
|
-
* Set the current fill & stroke style color.
|
|
343
|
-
* By default, or upon reset, the value is set to #000000.
|
|
344
|
-
* @param {Color|string} color - css color value
|
|
345
|
-
*/
|
|
346
|
-
setColor(color: Color | string): void;
|
|
347
368
|
/**
|
|
348
369
|
* Set the global alpha
|
|
349
370
|
* @param {number} alpha - 0.0 to 1.0 values accepted.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"canvas_renderer.d.ts","sourceRoot":"","sources":["../../../src/video/canvas/canvas_renderer.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"canvas_renderer.d.ts","sourceRoot":"","sources":["../../../src/video/canvas/canvas_renderer.js"],"names":[],"mappings":"AAYA;;;;;;;;GAQG;AAEH;;;GAGG;AACH;IAcE,oBAAmC;IA4CpC;;OAEG;IACH,uBAEC;IAED;;;;;OAKG;IACH,sBAFW,QAAQ,QAclB;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAkCG;IACH,oBAHW,MAAM,GACJ,MAAM,CAqClB;IAWD;;;;OAIG;IACH,mBAHW,KAAK,GAAC,MAAM,WACZ,OAAO,QAajB;IAED;;;;;;OAMG;IACH,aALW,MAAM,KACN,MAAM,SACN,MAAM,UACN,MAAM,QAIhB;IAED;;;;;;;;;;;OAWG;IACH,qBAVW,gBAAgB,GAAC,eAAe,GAAC,gBAAgB,GAAC,iBAAiB,GAAC,WAAW,GAAC,eAAe,GAAC,UAAU,UAC1G,MAAM,GACJ,aAAa,CAUzB;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACH,iBAjBW,gBAAgB,GAAC,eAAe,GAAC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G;IACH,gBAPW,QAAQ,GAAC,MAAM,KACf,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,QAKhB;IAED;;;;;;;;;OASG;IACH,aAPW,QAAQ,GAAC,MAAM,KACf,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,QAoBhB;IAED;;;;OAIG;IACH,aAHW,MAAM,KACN,MAAM,QAQhB;IAED;;;;;;;;;;OAUG;IACH,YALW,MAAM,KACN,MAAM,SACN,MAAM,UACN,MAAM,QA8BhB;IAED;;;;;;;OAOG;IACH,eAHW,IAAI,GAAC,SAAS,GAAC,OAAO,GAAC,IAAI,GAAC,OAAO,WACnC,OAAO,QAuFjB;CAYD;qBAnhCoB,kBAAkB;yBACd,uBAAuB;sBAV1B,uBAAuB;0BActB,iCAAiC;+BAC5B,iCAAiC;6BACnC,6BAA6B;0BAChC,4BAA4B;6BACzB,+BAA+B;8BAC9B,wBAAwB"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A Gradient object representing a linear or radial gradient fill.
|
|
3
|
+
* Created via {@link Renderer#createLinearGradient} or {@link Renderer#createRadialGradient}.
|
|
4
|
+
* Can be passed to {@link Renderer#setColor} as a fill style.
|
|
5
|
+
*/
|
|
6
|
+
export class Gradient {
|
|
7
|
+
/**
|
|
8
|
+
* @param {"linear"|"radial"} type - the gradient type
|
|
9
|
+
* @param {number[]} coords - gradient coordinates [x0, y0, x1, y1] for linear, [x0, y0, r0, x1, y1, r1] for radial
|
|
10
|
+
*/
|
|
11
|
+
constructor(type: "linear" | "radial", coords: number[]);
|
|
12
|
+
/**
|
|
13
|
+
* gradient type
|
|
14
|
+
* @type {"linear"|"radial"}
|
|
15
|
+
*/
|
|
16
|
+
/** @ignore */
|
|
17
|
+
_id: number;
|
|
18
|
+
type: "linear" | "radial";
|
|
19
|
+
/**
|
|
20
|
+
* gradient coordinates
|
|
21
|
+
* @type {number[]}
|
|
22
|
+
* @ignore
|
|
23
|
+
*/
|
|
24
|
+
coords: number[];
|
|
25
|
+
/**
|
|
26
|
+
* color stops
|
|
27
|
+
* @type {Array<{offset: number, color: string}>}
|
|
28
|
+
* @ignore
|
|
29
|
+
*/
|
|
30
|
+
colorStops: Array<{
|
|
31
|
+
offset: number;
|
|
32
|
+
color: string;
|
|
33
|
+
}>;
|
|
34
|
+
/**
|
|
35
|
+
* cached canvas gradient (for Canvas renderer)
|
|
36
|
+
* @type {CanvasGradient|undefined}
|
|
37
|
+
* @ignore
|
|
38
|
+
*/
|
|
39
|
+
_canvasGradient: CanvasGradient | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* cached gradient render target (for WebGL renderer)
|
|
42
|
+
* @type {CanvasRenderTarget|undefined}
|
|
43
|
+
* @ignore
|
|
44
|
+
*/
|
|
45
|
+
_renderTarget: CanvasRenderTarget | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* whether the gradient needs to be regenerated
|
|
48
|
+
* @type {boolean}
|
|
49
|
+
* @ignore
|
|
50
|
+
*/
|
|
51
|
+
_dirty: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Add a color stop to the gradient.
|
|
54
|
+
* @param {number} offset - value between 0.0 and 1.0
|
|
55
|
+
* @param {Color|string} color - a CSS color string or Color object
|
|
56
|
+
* @returns {Gradient} this gradient for chaining
|
|
57
|
+
* @example
|
|
58
|
+
* gradient.addColorStop(0, "#FF0000");
|
|
59
|
+
* gradient.addColorStop(0.5, "green");
|
|
60
|
+
* gradient.addColorStop(1, "blue");
|
|
61
|
+
*/
|
|
62
|
+
addColorStop(offset: number, color: Color | string): Gradient;
|
|
63
|
+
/**
|
|
64
|
+
* Get or create a native CanvasGradient for use with a 2D context.
|
|
65
|
+
* @param {CanvasRenderingContext2D} context - the 2D context to create the gradient on
|
|
66
|
+
* @returns {CanvasGradient}
|
|
67
|
+
* @ignore
|
|
68
|
+
*/
|
|
69
|
+
toCanvasGradient(context: CanvasRenderingContext2D): CanvasGradient;
|
|
70
|
+
/**
|
|
71
|
+
* Render the gradient onto a canvas matching the given draw rect.
|
|
72
|
+
* Uses the original gradient coordinates so the result matches Canvas 2D behavior.
|
|
73
|
+
* @param {CanvasRenderer|WebGLRenderer} renderer - the active renderer (used to invalidate GPU texture)
|
|
74
|
+
* @param {number} x - draw rect x
|
|
75
|
+
* @param {number} y - draw rect y
|
|
76
|
+
* @param {number} width - draw rect width
|
|
77
|
+
* @param {number} height - draw rect height
|
|
78
|
+
* @returns {HTMLCanvasElement|OffscreenCanvas} the rendered gradient canvas
|
|
79
|
+
* @ignore
|
|
80
|
+
*/
|
|
81
|
+
toCanvas(renderer: CanvasRenderer | WebGLRenderer, x: number, y: number, width: number, height: number): HTMLCanvasElement | OffscreenCanvas;
|
|
82
|
+
}
|
|
83
|
+
import CanvasRenderTarget from "./rendertarget/canvasrendertarget.js";
|
|
84
|
+
import type { Color } from "../math/color.ts";
|
|
85
|
+
//# sourceMappingURL=gradient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gradient.d.ts","sourceRoot":"","sources":["../../src/video/gradient.js"],"names":[],"mappings":"AAkBA;;;;GAIG;AACH;IACC;;;OAGG;IACH,kBAHW,QAAQ,GAAC,QAAQ,UACjB,MAAM,EAAE,EA8ClB;IA3CA;;;OAGG;IACH,cAAc;IACd,YAA2B;IAE3B,0BAAgB;IAEhB;;;;OAIG;IACH,QAHU,MAAM,EAAE,CAGE;IAEpB;;;;OAIG;IACH,YAHU,KAAK,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAC,CAAC,CAG5B;IAEpB;;;;OAIG;IACH,iBAHU,cAAc,GAAC,SAAS,CAGF;IAEhC;;;;OAIG;IACH,eAHU,kBAAkB,GAAC,SAAS,CAGR;IAE9B;;;;OAIG;IACH,QAHU,OAAO,CAGC;IAGnB;;;;;;;;;OASG;IACH,qBARW,MAAM,SACN,KAAK,GAAC,MAAM,GACV,QAAQ,CAmBpB;IAED;;;;;OAKG;IACH,0BAJW,wBAAwB,GACtB,cAAc,CAiC1B;IAED;;;;;;;;;;OAUG;IACH,mBARW,cAAc,GAAC,aAAa,KAC5B,MAAM,KACN,MAAM,SACN,MAAM,UACN,MAAM,GACJ,iBAAiB,GAAC,eAAe,CAwE7C;CACD;+BAzN8B,sCAAsC;2BAG7C,kBAAkB"}
|
|
@@ -153,11 +153,53 @@ export default class Renderer {
|
|
|
153
153
|
* @param {boolean} [premultipliedAlpha=true] - whether textures use premultiplied alpha (WebGL only)
|
|
154
154
|
*/
|
|
155
155
|
setBlendMode(mode?: string): void;
|
|
156
|
+
/**
|
|
157
|
+
* Set the current fill & stroke style color.
|
|
158
|
+
* By default, or upon reset, the value is set to #000000.
|
|
159
|
+
* @param {Color|string|Gradient} color - css color value or a Gradient object
|
|
160
|
+
*/
|
|
161
|
+
setColor(color: Color | string | Gradient): void;
|
|
156
162
|
/**
|
|
157
163
|
* get the current fill & stroke style color.
|
|
158
164
|
* @returns {Color} current global color
|
|
159
165
|
*/
|
|
160
166
|
getColor(): Color;
|
|
167
|
+
/**
|
|
168
|
+
* Create a linear gradient that can be used with {@link Renderer#setColor}.
|
|
169
|
+
* @param {number} x0 - x-axis coordinate of the start point
|
|
170
|
+
* @param {number} y0 - y-axis coordinate of the start point
|
|
171
|
+
* @param {number} x1 - x-axis coordinate of the end point
|
|
172
|
+
* @param {number} y1 - y-axis coordinate of the end point
|
|
173
|
+
* @returns {Gradient} a Gradient object
|
|
174
|
+
*/
|
|
175
|
+
createLinearGradient(x0: number, y0: number, x1: number, y1: number): Gradient;
|
|
176
|
+
/**
|
|
177
|
+
* Create a radial gradient that can be used with {@link Renderer#setColor}.
|
|
178
|
+
* @param {number} x0 - x-axis coordinate of the start circle
|
|
179
|
+
* @param {number} y0 - y-axis coordinate of the start circle
|
|
180
|
+
* @param {number} r0 - radius of the start circle
|
|
181
|
+
* @param {number} x1 - x-axis coordinate of the end circle
|
|
182
|
+
* @param {number} y1 - y-axis coordinate of the end circle
|
|
183
|
+
* @param {number} r1 - radius of the end circle
|
|
184
|
+
* @returns {Gradient} a Gradient object
|
|
185
|
+
*/
|
|
186
|
+
createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): Gradient;
|
|
187
|
+
/**
|
|
188
|
+
* Set the line dash pattern for stroke operations.
|
|
189
|
+
* @param {number[]} segments - an array of numbers specifying distances to alternately draw a line and a gap. An empty array clears the dash pattern (solid lines).
|
|
190
|
+
* @example
|
|
191
|
+
* // draw a dashed line
|
|
192
|
+
* renderer.setLineDash([10, 5]);
|
|
193
|
+
* renderer.strokeLine(0, 0, 100, 0);
|
|
194
|
+
* // clear the dash pattern
|
|
195
|
+
* renderer.setLineDash([]);
|
|
196
|
+
*/
|
|
197
|
+
setLineDash(segments: number[]): void;
|
|
198
|
+
/**
|
|
199
|
+
* Get the current line dash pattern.
|
|
200
|
+
* @returns {number[]} the current dash pattern
|
|
201
|
+
*/
|
|
202
|
+
getLineDash(): number[];
|
|
161
203
|
/**
|
|
162
204
|
* return the current global alpha
|
|
163
205
|
* @returns {number}
|
|
@@ -263,6 +305,7 @@ import Path2D from "./../geometries/path2d.js";
|
|
|
263
305
|
import { Color } from "./../math/color.ts";
|
|
264
306
|
import RenderState from "./renderstate.js";
|
|
265
307
|
import { Matrix3d } from "../math/matrix3d.ts";
|
|
308
|
+
import { Gradient } from "./gradient.js";
|
|
266
309
|
import type { Rect } from "./../geometries/rectangle.ts";
|
|
267
310
|
import type { Bounds } from "./../physics/bounds.ts";
|
|
268
311
|
import type { RoundRect } from "./../geometries/roundrect.ts";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderer.d.ts","sourceRoot":"","sources":["../../src/video/renderer.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"renderer.d.ts","sourceRoot":"","sources":["../../src/video/renderer.js"],"names":[],"mappings":"AASA;;;;;;;GAOG;AAEH;;;GAGG;AACH;IACC;;OAEG;IACH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,qBAAqB;yBAGrB,eAAe;0BAKjB,8BAA8B;4BAK5B,wBAAwB;+BAJrB,8BAA8B;6BAChC,0BAA0B;0BAC7B,yBAAyB;6BACtB,4BAA4B"}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @import {Gradient} from "./gradient.js";
|
|
3
|
+
*/
|
|
1
4
|
/**
|
|
2
5
|
* Renderer-agnostic state container with a pre-allocated save/restore stack.
|
|
3
6
|
*
|
|
@@ -27,6 +30,16 @@ export default class RenderState {
|
|
|
27
30
|
* @type {Int32Array}
|
|
28
31
|
*/
|
|
29
32
|
currentScissor: Int32Array;
|
|
33
|
+
/**
|
|
34
|
+
* current gradient fill (null when using solid color)
|
|
35
|
+
* @type {Gradient|null}
|
|
36
|
+
*/
|
|
37
|
+
currentGradient: Gradient | null;
|
|
38
|
+
/**
|
|
39
|
+
* current line dash pattern (empty array = solid line)
|
|
40
|
+
* @type {number[]}
|
|
41
|
+
*/
|
|
42
|
+
lineDash: number[];
|
|
30
43
|
/**
|
|
31
44
|
* current blend mode
|
|
32
45
|
* @type {string}
|
|
@@ -50,8 +63,12 @@ export default class RenderState {
|
|
|
50
63
|
/** @ignore */
|
|
51
64
|
_scissorStack: Int32Array<ArrayBuffer>[];
|
|
52
65
|
/** @ignore */
|
|
66
|
+
_lineDashStack: any[];
|
|
67
|
+
/** @ignore */
|
|
53
68
|
_scissorActive: Uint8Array<ArrayBuffer>;
|
|
54
69
|
/** @ignore */
|
|
70
|
+
_gradientStack: any[];
|
|
71
|
+
/** @ignore */
|
|
55
72
|
_blendStack: any[];
|
|
56
73
|
/**
|
|
57
74
|
* Save the current state onto the stack (zero allocations).
|
|
@@ -82,4 +99,5 @@ export default class RenderState {
|
|
|
82
99
|
}
|
|
83
100
|
import { Color } from "./../math/color.ts";
|
|
84
101
|
import { Matrix2d } from "../math/matrix2d.ts";
|
|
102
|
+
import type { Gradient } from "./gradient.js";
|
|
85
103
|
//# sourceMappingURL=renderstate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderstate.d.ts","sourceRoot":"","sources":["../../src/video/renderstate.js"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH;IAEE;;;OAGG;IACH,cAFU,KAAK,CAE4B;IAE3C;;;OAGG;IACH,aAFU,KAAK,CAEiC;IAEhD;;;OAGG;IACH,kBAFU,QAAQ,CAEoB;IAEtC;;;OAGG;IACH,gBAFU,UAAU,CAEmB;IAEvC;;;OAGG;IACH,kBAFU,MAAM,CAEc;IAI9B;;OAEG;IACH,uBAAwB;IAExB;;;OAGG;IACH,oBAAoB;IAEpB,cAAc;IACd,qBAEE;IAEF,cAAc;IACd,oBAEE;IAEF,cAAc;IACd,yBAEE;IAEF,cAAc;IACd,yCAEE;IAEF,cAAc;IACd,wCAAyD;IAEzD,cAAc;IACd,mBAAiD;IAGlD;;;OAGG;IACH,yBAFW,OAAO,
|
|
1
|
+
{"version":3,"file":"renderstate.d.ts","sourceRoot":"","sources":["../../src/video/renderstate.js"],"names":[],"mappings":"AAGA;;GAEG;AAEH;;;;;;;GAOG;AACH;IAEE;;;OAGG;IACH,cAFU,KAAK,CAE4B;IAE3C;;;OAGG;IACH,aAFU,KAAK,CAEiC;IAEhD;;;OAGG;IACH,kBAFU,QAAQ,CAEoB;IAEtC;;;OAGG;IACH,gBAFU,UAAU,CAEmB;IAEvC;;;OAGG;IACH,iBAFU,QAAQ,GAAC,IAAI,CAEI;IAE3B;;;OAGG;IACH,UAFU,MAAM,EAAE,CAEA;IAElB;;;OAGG;IACH,kBAFU,MAAM,CAEc;IAI9B;;OAEG;IACH,uBAAwB;IAExB;;;OAGG;IACH,oBAAoB;IAEpB,cAAc;IACd,qBAEE;IAEF,cAAc;IACd,oBAEE;IAEF,cAAc;IACd,yBAEE;IAEF,cAAc;IACd,yCAEE;IAEF,cAAc;IACd,sBAAoD;IAEpD,cAAc;IACd,wCAAyD;IAEzD,cAAc;IACd,sBAAoD;IAEpD,cAAc;IACd,mBAAiD;IAGlD;;;OAGG;IACH,yBAFW,OAAO,QAwBjB;IAED;;;;;;;;OAQG;IACH,qBAJW,MAAM,gBACN,MAAM,GACJ;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI,CAwBhE;IAED;;;;OAIG;IACH,aAHW,MAAM,UACN,MAAM,QAShB;IAED,sDAAsD;IACtD,oBAgBC;CACD;sBAtMqB,oBAAoB;yBACjB,qBAAqB;8BAGnB,eAAe"}
|
|
@@ -100,9 +100,11 @@ declare class CanvasRenderTarget {
|
|
|
100
100
|
invalidate(renderer: CanvasRenderer | WebGLRenderer): void;
|
|
101
101
|
glTextureUnit: any;
|
|
102
102
|
/**
|
|
103
|
+
* Destroy this canvas render target and release associated GPU resources.
|
|
104
|
+
* @param {CanvasRenderer|WebGLRenderer} [renderer] - the renderer to clean up WebGL resources from
|
|
103
105
|
* @ignore
|
|
104
106
|
*/
|
|
105
|
-
destroy(): void;
|
|
107
|
+
destroy(renderer?: CanvasRenderer | WebGLRenderer): void;
|
|
106
108
|
public set width(val: number);
|
|
107
109
|
/**
|
|
108
110
|
* The width of this canvas texture in pixels
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"canvasrendertarget.d.ts","sourceRoot":"","sources":["../../../src/video/rendertarget/canvasrendertarget.js"],"names":[],"mappings":";AA8EA;;;GAGG;AACH;IACC;;;;;;;;;;OAUG;IACH,mBAVW,MAAM,UACN,MAAM,eAEd;QAA4B,OAAO;QACN,YAAY;QACZ,WAAW;QACX,eAAe;QACf,kBAAkB;QAClB,SAAS;KACxC,EAuCA;IArCA;;;OAGG;IAGH;;;OAGG;IAGH,YAJU,wBAAwB,GAAC,qBAAqB,CAIU;IASjE,YAA+B;IAUhC,aAA0D;IAE1D,kBAAgC;IAMjC;;OAEG;IACH,4CAGC;IAED;;OAEG;IACH,cAGC;IAED;;;OAGG;IACH,sBAFW,OAAO,QAwBjB;IAED;;;;OAIG;IACH,cAHW,MAAM,UACN,MAAM,QAKhB;IAED;;;;;;;;OAQG;IACH,gBANW,MAAM,KACN,MAAM,SACN,MAAM,UACN,MAAM,GACJ,SAAS,CAUrB;IAED;;;;;;;OAOG;IACH,cANW,MAAM,YACN,MAAM,gBAmBhB;IAED;;;;;;;OAOG;IACH,qBANW,MAAM,YACN,MAAM,gBAmBhB;IAED;;;;;;;;OAQG;IACH,iBANW,MAAM,YACN,MAAM,gBAShB;IAED;;;;OAIG;IACH,qBAFW,cAAc,GAAC,aAAa,QAYtC;IALC,mBAEC;IAKH
|
|
1
|
+
{"version":3,"file":"canvasrendertarget.d.ts","sourceRoot":"","sources":["../../../src/video/rendertarget/canvasrendertarget.js"],"names":[],"mappings":";AA8EA;;;GAGG;AACH;IACC;;;;;;;;;;OAUG;IACH,mBAVW,MAAM,UACN,MAAM,eAEd;QAA4B,OAAO;QACN,YAAY;QACZ,WAAW;QACX,eAAe;QACf,kBAAkB;QAClB,SAAS;KACxC,EAuCA;IArCA;;;OAGG;IAGH;;;OAGG;IAGH,YAJU,wBAAwB,GAAC,qBAAqB,CAIU;IASjE,YAA+B;IAUhC,aAA0D;IAE1D,kBAAgC;IAMjC;;OAEG;IACH,4CAGC;IAED;;OAEG;IACH,cAGC;IAED;;;OAGG;IACH,sBAFW,OAAO,QAwBjB;IAED;;;;OAIG;IACH,cAHW,MAAM,UACN,MAAM,QAKhB;IAED;;;;;;;;OAQG;IACH,gBANW,MAAM,KACN,MAAM,SACN,MAAM,UACN,MAAM,GACJ,SAAS,CAUrB;IAED;;;;;;;OAOG;IACH,cANW,MAAM,YACN,MAAM,gBAmBhB;IAED;;;;;;;OAOG;IACH,qBANW,MAAM,YACN,MAAM,gBAmBhB;IAED;;;;;;;;OAQG;IACH,iBANW,MAAM,YACN,MAAM,gBAShB;IAED;;;;OAIG;IACH,qBAFW,cAAc,GAAC,aAAa,QAYtC;IALC,mBAEC;IAKH;;;;OAIG;IACH,mBAHW,cAAc,GAAC,aAAa,QAoBtC;IAWD,sBANU,MAAM,EAQf;IAXD;;;;OAIG;IACH,oBAFU,MAAM,CAIf;IAeD,uBANU,MAAM,EAQf;IAXD;;;;OAIG;IACH,qBAFU,MAAM,CAIf;CAKD;gCA1U8B,gCAAgC;+BACjC,8BAA8B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"atlas.d.ts","sourceRoot":"","sources":["../../../src/video/texture/atlas.js"],"names":[],"mappings":"AASA;;;GAGG;AAEH;;;GAGG;AACH;;;;;;;;;;;;;;;;;;;EAoBC;AAED;;;GAGG;AACH,+FAYC;AAED;;;;;;;;;;GAUG;AACH;IACC;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,qBAzBW,MAAM,GAAC,MAAM,EAAE,QACf,gBAAgB,GAAC,iBAAiB,GAAC,eAAe,GAAC,eAAe,GAAC,MAAM,GAAC,eAAe,EAAE,GAAC,gBAAgB,EAAE,GAAC,iBAAiB,EAAE,GAAC,MAAM,EAAE,UAC3I,OAAO,EAsKjB;IA9IA;;;OAGG;IACH,sBAAkB;IAElB;;;;OAIG;IACH,uBAAwB;IAExB;;;;OAIG;IACH,uBAAwB;IAExB;;;;OAIG;IACH,2BAA4B;IAE5B;;;OAGG;IACH;;;;;;MAA6D;IAW1D,YAA8C;IAsGlD;;;;OAIG;IACH,gBAHW,MAAM,GACJ,MAAM,CAQlB;IAED;;;OAGG;IACH,aAFa,MAAM,CAIlB;IAED;;;;OAIG;IACH,oBAHW,MAAM,GACJ,gBAAgB,GAAC,iBAAiB,CAQ9C;IAED;;;;;;;;OAQG;IACH,gBAPW,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,GACJ,MAAM,
|
|
1
|
+
{"version":3,"file":"atlas.d.ts","sourceRoot":"","sources":["../../../src/video/texture/atlas.js"],"names":[],"mappings":"AASA;;;GAGG;AAEH;;;GAGG;AACH;;;;;;;;;;;;;;;;;;;EAoBC;AAED;;;GAGG;AACH,+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lBkB,8BAA8B;iCAQjB,uCAAuC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../../src/video/texture/cache.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../../src/video/texture/cache.js"],"names":[],"mappings":";AAKA;;;GAGG;AACH;IACC;;OAEG;IACH,8CAUC;IARA,cAAwB;IAExB,qBAAgC;IAChC,sBAAuB;IACvB,qBAAsB;IACtB,oBAA0B;IAC1B,iBAAwB;IAIzB;;OAEG;IACH,cAKC;IAED;;OAEG;IACH,8BAuBC;IAED;;OAEG;IACH,oCAQC;IAED;;OAEG;IACH,2BAMC;IAED;;;OAGG;IACH,4BAGC;IAED;;;OAGG;IACH,yCAsBC;IAED;;OAEG;IACH,yBAEC;IAED;;;OAGG;IACH,iCAwCC;IAED;;OAEG;IACH,yBAQC;IAED;;OAEG;IACH,gCAcC;CACD;8BA/M6B,+BAA+B"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export function dashPath(pts: any, pattern: any): any;
|
|
2
|
+
/**
|
|
3
|
+
* Split a single line segment into dashed sub-segments.
|
|
4
|
+
* @param {number} x0 - start x
|
|
5
|
+
* @param {number} y0 - start y
|
|
6
|
+
* @param {number} x1 - end x
|
|
7
|
+
* @param {number} y1 - end y
|
|
8
|
+
* @param {number[]} pattern - dash pattern [on, off, on, off, ...]
|
|
9
|
+
* @returns {Array<{x: number, y: number}>} pairs of start/end points for visible segments
|
|
10
|
+
*/
|
|
11
|
+
export function dashSegments(x0: number, y0: number, x1: number, y1: number, pattern: number[]): Array<{
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
}>;
|
|
15
|
+
//# sourceMappingURL=dash.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dash.d.ts","sourceRoot":"","sources":["../../../src/video/utils/dash.js"],"names":[],"mappings":"AAUA,sDA8DC;AAED;;;;;;;;GAQG;AACH,iCAPW,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,WACN,MAAM,EAAE,GACN,KAAK,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAC,CAAC,CAsDzC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generate triangle fan vertices for arcs, ellipses, and rounded rect corners.
|
|
3
|
+
* @param {number} cx - center x
|
|
4
|
+
* @param {number} cy - center y
|
|
5
|
+
* @param {number} rx - horizontal radius
|
|
6
|
+
* @param {number} ry - vertical radius
|
|
7
|
+
* @param {number} startAngle - start angle in radians
|
|
8
|
+
* @param {number} endAngle - end angle in radians
|
|
9
|
+
* @param {number} segments - number of segments
|
|
10
|
+
* @returns {Array<{x: number, y: number}>} triangle vertices
|
|
11
|
+
*/
|
|
12
|
+
export function generateTriangleFan(cx: number, cy: number, rx: number, ry: number, startAngle: number, endAngle: number, segments: number): Array<{
|
|
13
|
+
x: number;
|
|
14
|
+
y: number;
|
|
15
|
+
}>;
|
|
16
|
+
/**
|
|
17
|
+
* Generate triangle vertices for round line join circles at the given centers.
|
|
18
|
+
* @param {Array<{x: number, y: number}>} centers - join point positions
|
|
19
|
+
* @param {number} radius - join circle radius (typically lineWidth / 2)
|
|
20
|
+
* @returns {Array<{x: number, y: number}>} triangle vertices
|
|
21
|
+
*/
|
|
22
|
+
export function generateJoinCircles(centers: Array<{
|
|
23
|
+
x: number;
|
|
24
|
+
y: number;
|
|
25
|
+
}>, radius: number): Array<{
|
|
26
|
+
x: number;
|
|
27
|
+
y: number;
|
|
28
|
+
}>;
|
|
29
|
+
//# sourceMappingURL=tessellation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tessellation.d.ts","sourceRoot":"","sources":["../../../src/video/utils/tessellation.js"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,wCATW,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,cACN,MAAM,YACN,MAAM,YACN,MAAM,GACJ,KAAK,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAC,CAAC,CA0BzC;AAED;;;;;GAKG;AACH,6CAJW,KAAK,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAC,CAAC,UAC7B,MAAM,GACJ,KAAK,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAC,CAAC,CAsBzC"}
|
package/build/video/video.d.ts
CHANGED
|
@@ -5,8 +5,18 @@
|
|
|
5
5
|
* @param {number} height - The height of the canvas viewport
|
|
6
6
|
* @param {ApplicationSettings} [options] - optional parameters for the renderer
|
|
7
7
|
* @returns {boolean} false if initialization failed (canvas not supported)
|
|
8
|
+
* @deprecated since 18.3.0 — use {@link Application} constructor instead:
|
|
9
|
+
* `const app = new Application(width, height, options)`
|
|
10
|
+
* @see Application
|
|
8
11
|
* @example
|
|
9
|
-
* //
|
|
12
|
+
* // using the new Application entry point (recommended)
|
|
13
|
+
* const app = new Application(640, 480, {
|
|
14
|
+
* parent : "screen",
|
|
15
|
+
* scale : "auto",
|
|
16
|
+
* scaleMethod : "fit"
|
|
17
|
+
* });
|
|
18
|
+
*
|
|
19
|
+
* // legacy usage (still supported)
|
|
10
20
|
* me.video.init(640, 480, {
|
|
11
21
|
* parent : "screen",
|
|
12
22
|
* renderer : me.video.AUTO,
|
|
@@ -28,12 +38,16 @@ export function createCanvas(width: number, height: number, returnOffscreenCanva
|
|
|
28
38
|
* return a reference to the parent DOM element holding the main canvas
|
|
29
39
|
* @memberof video
|
|
30
40
|
* @returns {HTMLElement} the HTML parent element
|
|
41
|
+
* @deprecated since 18.3.0 — use {@link Application#getParentElement app.getParentElement()} instead.
|
|
42
|
+
* @see Application#getParentElement
|
|
31
43
|
*/
|
|
32
44
|
export function getParent(): HTMLElement;
|
|
33
45
|
/**
|
|
34
|
-
* A reference to the active Canvas or WebGL
|
|
46
|
+
* A reference to the active Canvas or WebGL renderer.
|
|
35
47
|
* @memberof video
|
|
36
48
|
* @type {CanvasRenderer|WebGLRenderer}
|
|
49
|
+
* @deprecated since 18.3.0 — use {@link Application#renderer app.renderer} instead.
|
|
50
|
+
* @see Application#renderer
|
|
37
51
|
*/
|
|
38
52
|
export let renderer: CanvasRenderer | WebGLRenderer;
|
|
39
53
|
export { AUTO, CANVAS, WEBGL } from "../const";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"video.d.ts","sourceRoot":"","sources":["../../src/video/video.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"video.d.ts","sourceRoot":"","sources":["../../src/video/video.js"],"names":[],"mappings":"AAoCA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,4BAvBW,MAAM,UACN,MAAM,YACN,mBAAmB,GACjB,OAAO,CAyCnB;AAED;;;;;;;GAOG;AACH,oCALW,MAAM,UACN,MAAM,0BACN,OAAO,GACL,iBAAiB,GAAC,eAAe,CA0B7C;AAED;;;;;;GAMG;AACH,6BAJa,WAAW,CAMvB;AA3GD;;;;;;GAMG;AACH,qBAJU,cAAc,GAAC,aAAa,CAIX"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"program.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/utils/program.js"],"names":[],"mappings":"AAeA;;;GAGG;AACH,
|
|
1
|
+
{"version":3,"file":"program.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/utils/program.js"],"names":[],"mappings":"AAeA;;;GAGG;AACH,0FA2CC"}
|
|
@@ -49,6 +49,7 @@ export default class WebGLRenderer extends Renderer {
|
|
|
49
49
|
y: number;
|
|
50
50
|
}[];
|
|
51
51
|
_polyVerts: any[];
|
|
52
|
+
_currentGradient: any;
|
|
52
53
|
/**
|
|
53
54
|
* The current transformation matrix used for transformations on the overall scene
|
|
54
55
|
* (alias to renderState.currentTransform for backward compatibility)
|
|
@@ -189,6 +190,36 @@ export default class WebGLRenderer extends Renderer {
|
|
|
189
190
|
* adds a straight line to the current sub-path by connecting the sub-path's last point to the specified (x, y) coordinates.
|
|
190
191
|
*/
|
|
191
192
|
lineTo(x: any, y: any): void;
|
|
193
|
+
/**
|
|
194
|
+
* Adds a quadratic Bezier curve to the current sub-path.
|
|
195
|
+
* The curve is tessellated into line segments for WebGL rendering.
|
|
196
|
+
* @param {number} cpx - The x-axis coordinate of the control point.
|
|
197
|
+
* @param {number} cpy - The y-axis coordinate of the control point.
|
|
198
|
+
* @param {number} x - The x-axis coordinate of the end point.
|
|
199
|
+
* @param {number} y - The y-axis coordinate of the end point.
|
|
200
|
+
*/
|
|
201
|
+
quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void;
|
|
202
|
+
/**
|
|
203
|
+
* Adds a cubic Bezier curve to the current sub-path.
|
|
204
|
+
* The curve is tessellated into line segments for WebGL rendering.
|
|
205
|
+
* @param {number} cp1x - The x-axis coordinate of the first control point.
|
|
206
|
+
* @param {number} cp1y - The y-axis coordinate of the first control point.
|
|
207
|
+
* @param {number} cp2x - The x-axis coordinate of the second control point.
|
|
208
|
+
* @param {number} cp2y - The y-axis coordinate of the second control point.
|
|
209
|
+
* @param {number} x - The x-axis coordinate of the end point.
|
|
210
|
+
* @param {number} y - The y-axis coordinate of the end point.
|
|
211
|
+
*/
|
|
212
|
+
bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void;
|
|
213
|
+
/**
|
|
214
|
+
* Adds a circular arc to the current sub-path, using the given control points and radius.
|
|
215
|
+
* The arc is tessellated into line segments for WebGL rendering.
|
|
216
|
+
* @param {number} x1 - The x-axis coordinate of the first control point.
|
|
217
|
+
* @param {number} y1 - The y-axis coordinate of the first control point.
|
|
218
|
+
* @param {number} x2 - The x-axis coordinate of the second control point.
|
|
219
|
+
* @param {number} y2 - The y-axis coordinate of the second control point.
|
|
220
|
+
* @param {number} radius - The arc's radius. Must be non-negative.
|
|
221
|
+
*/
|
|
222
|
+
arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void;
|
|
192
223
|
/**
|
|
193
224
|
* creates a rectangular path whose starting point is at (x, y) and whose size is specified by width and height.
|
|
194
225
|
* @param {number} x - The x axis of the coordinate for the rectangle starting point.
|
|
@@ -252,6 +283,7 @@ export default class WebGLRenderer extends Renderer {
|
|
|
252
283
|
* @returns {string} the blend mode actually applied (may differ if the requested mode is unsupported)
|
|
253
284
|
*/
|
|
254
285
|
setBlendMode(mode?: string, premultipliedAlpha?: boolean): string;
|
|
286
|
+
currentPremultipliedAlpha: any;
|
|
255
287
|
/**
|
|
256
288
|
* restores the most recently saved renderer state by popping the top entry in the drawing state stack
|
|
257
289
|
* @example
|
|
@@ -309,12 +341,6 @@ export default class WebGLRenderer extends Renderer {
|
|
|
309
341
|
* @returns {number} global alpha value
|
|
310
342
|
*/
|
|
311
343
|
getGlobalAlpha(): number;
|
|
312
|
-
/**
|
|
313
|
-
* Set the current fill & stroke style color.
|
|
314
|
-
* By default, or upon reset, the value is set to #000000.
|
|
315
|
-
* @param {Color|string} color - css color string.
|
|
316
|
-
*/
|
|
317
|
-
setColor(color: Color | string): void;
|
|
318
344
|
/**
|
|
319
345
|
* Stroke an arc at the specified coordinates with given radius, start and end points
|
|
320
346
|
* @param {number} x - arc center point x-axis
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webgl_renderer.d.ts","sourceRoot":"","sources":["../../../src/video/webgl/webgl_renderer.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"webgl_renderer.d.ts","sourceRoot":"","sources":["../../../src/video/webgl/webgl_renderer.js"],"names":[],"mappings":"AAqCA;;;GAGG;AACH;IAQE;;;;;OAKG;IACH,oBAJU,MAAM,CAIU;IAU1B;;;;OAIG;IACH,IAFU,qBAAqB,CAEI;IAEnC;;;;OAIG;IACH,WAHU,MAAM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ehB;IAED;;;;OAIG;IACH,aAHW,MAAM,KACN,MAAM,QAWhB;IAED;;;;;;;;;;OAUG;IACH,YALW,MAAM,KACN,MAAM,SACN,MAAM,UACN,MAAM,QA6ChB;IAED;;;;;;;OAOG;IACH,eAHW,IAAI,GAAC,SAAS,GAAC,OAAO,GAAC,IAAI,GAAC,OAAO,WACnC,OAAO,QAmCjB;;CAcD;qBAtqDoB,kBAAkB;8BAkBZ,wBAAwB;6BAEzB,uBAAuB;yBAlBxB,uBAAuB;6BADN,uBAAuB;sBAZhC,uBAAuB;0BAwBjC,iCAAiC;+BAC5B,iCAAiC;6BACnC,6BAA6B;0BAChC,4BAA4B;6BACzB,+BAA+B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "melonjs",
|
|
3
|
-
"version": "18.
|
|
3
|
+
"version": "18.3.0",
|
|
4
4
|
"description": "melonJS Game Engine",
|
|
5
5
|
"homepage": "http://www.melonjs.org/",
|
|
6
6
|
"type": "module",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"author": "Olivier Biot (AltByte Pte Ltd)",
|
|
39
39
|
"funding": "https://github.com/sponsors/melonjs",
|
|
40
40
|
"engines": {
|
|
41
|
-
"node": "
|
|
41
|
+
"node": ">=24.0.0"
|
|
42
42
|
},
|
|
43
43
|
"types": "./build/index.d.ts",
|
|
44
44
|
"module": "./build/index.js",
|
|
@@ -60,17 +60,17 @@
|
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@types/howler": "^2.2.12",
|
|
63
|
-
"@types/node": "^25.5.
|
|
63
|
+
"@types/node": "^25.5.2",
|
|
64
64
|
"concurrently": "^9.2.1",
|
|
65
65
|
"del-cli": "^7.0.0",
|
|
66
66
|
"esbuild": "^0.27.3",
|
|
67
67
|
"serve": "^14.2.6",
|
|
68
68
|
"tsconfig": "workspace:^",
|
|
69
69
|
"tsx": "^4.21.0",
|
|
70
|
-
"type-fest": "^5.
|
|
71
|
-
"typedoc": "^0.28.
|
|
72
|
-
"typescript": "^
|
|
73
|
-
"vite": "
|
|
70
|
+
"type-fest": "^5.5.0",
|
|
71
|
+
"typedoc": "^0.28.18",
|
|
72
|
+
"typescript": "^6.0.2",
|
|
73
|
+
"vite": "8.0.3",
|
|
74
74
|
"vite-plugin-glsl": "^1.5.6"
|
|
75
75
|
},
|
|
76
76
|
"scripts": {
|
|
@@ -80,8 +80,8 @@
|
|
|
80
80
|
"lint": "eslint src tests",
|
|
81
81
|
"build": "pnpm lint && tsx scripts/build.js && pnpm types",
|
|
82
82
|
"dist": "pnpm clean && pnpm lint && pnpm vitest run && pnpm build && pnpm doc && cp ../../README.md .",
|
|
83
|
-
"doc": "typedoc src/index.
|
|
84
|
-
"doc:watch": "typedoc src/index.
|
|
83
|
+
"doc": "typedoc src/index.ts --tsconfig tsconfig.build.json --readme DOC_README.md --hideGenerator --name 'melonJS' --navigation.includeCategories true --categorizeByGroup false",
|
|
84
|
+
"doc:watch": "typedoc src/index.ts --tsconfig tsconfig.build.json --readme DOC_README.md --hideGenerator --name 'melonJS' --navigation.includeCategories true --categorizeByGroup false --watch --skipErrorChecking --preserveWatchOutput --logLevel Error",
|
|
85
85
|
"serve": "serve docs",
|
|
86
86
|
"prepublishOnly": "pnpm dist",
|
|
87
87
|
"clean": "tsx scripts/clean.ts",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"eventEmitter.spec.d.ts","sourceRoot":"","sources":["../../src/system/eventEmitter.spec.ts"],"names":[],"mappings":""}
|