@vpmedia/phaser 1.13.0 → 1.15.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 +1 -1
- package/package.json +2 -2
- package/src/phaser/core/animation_manager.js +1 -1
- package/src/phaser/core/animation_parser.js +0 -2
- package/src/phaser/core/cache.js +1 -1
- package/src/phaser/core/device.js +2 -0
- package/src/phaser/core/device_util.js +0 -9
- package/src/phaser/core/dom.js +1 -1
- package/src/phaser/core/event_manager.js +1 -1
- package/src/phaser/core/frame_util.js +0 -2
- package/src/phaser/core/game.js +5 -5
- package/src/phaser/core/input.js +5 -5
- package/src/phaser/core/input_handler.js +1 -1
- package/src/phaser/core/input_mouse.js +3 -5
- package/src/phaser/core/input_mspointer.js +1 -1
- package/src/phaser/core/input_pointer.js +1 -1
- package/src/phaser/core/input_touch.js +1 -1
- package/src/phaser/core/loader.js +1 -1
- package/src/phaser/core/loader_parser.js +0 -4
- package/src/phaser/core/scale_manager.js +1 -1
- package/src/phaser/core/timer.js +1 -1
- package/src/phaser/core/timer_event.js +1 -1
- package/src/phaser/core/tween_easing.js +31 -31
- package/src/phaser/display/bitmap_text.js +2 -2
- package/src/phaser/display/button.js +3 -3
- package/src/phaser/display/canvas/buffer.js +1 -1
- package/src/phaser/display/canvas/graphics.js +0 -3
- package/src/phaser/display/canvas/masker.js +0 -2
- package/src/phaser/display/canvas/pool.js +0 -7
- package/src/phaser/display/canvas/renderer.js +1 -1
- package/src/phaser/display/canvas/tinter.js +1 -6
- package/src/phaser/display/canvas/util.js +0 -9
- package/src/phaser/display/graphics.js +3 -3
- package/src/phaser/display/graphics_data_util.js +0 -1
- package/src/phaser/display/group.js +2 -2
- package/src/phaser/display/image.js +4 -4
- package/src/phaser/display/sprite_batch.js +1 -2
- package/src/phaser/display/sprite_util.js +0 -5
- package/src/phaser/display/text.js +2 -2
- package/src/phaser/display/webgl/abstract_filter.js +1 -1
- package/src/phaser/display/webgl/blend_manager.js +1 -1
- package/src/phaser/display/webgl/earcut.js +28 -28
- package/src/phaser/display/webgl/earcut_node.js +1 -1
- package/src/phaser/display/webgl/fast_sprite_batch.js +1 -3
- package/src/phaser/display/webgl/filter_manager.js +1 -1
- package/src/phaser/display/webgl/filter_texture.js +1 -1
- package/src/phaser/display/webgl/graphics.js +10 -12
- package/src/phaser/display/webgl/mask_manager.js +0 -2
- package/src/phaser/display/webgl/render_texture.js +3 -3
- package/src/phaser/display/webgl/renderer.js +6 -6
- package/src/phaser/display/webgl/shader/complex.js +1 -1
- package/src/phaser/display/webgl/shader/fast.js +1 -1
- package/src/phaser/display/webgl/shader/normal.js +1 -1
- package/src/phaser/display/webgl/shader/primitive.js +1 -1
- package/src/phaser/display/webgl/shader/strip.js +1 -1
- package/src/phaser/display/webgl/shader_manager.js +6 -6
- package/src/phaser/display/webgl/sprite_batch.js +3 -5
- package/src/phaser/display/webgl/stencil_manager.js +1 -1
- package/src/phaser/display/webgl/texture_util.js +0 -2
- package/src/phaser/display/webgl/util.js +0 -4
- package/src/phaser/geom/circle.js +0 -1
- package/src/phaser/geom/ellipse.js +0 -1
- package/src/phaser/geom/line.js +0 -1
- package/src/phaser/geom/matrix.js +0 -1
- package/src/phaser/geom/point.js +0 -1
- package/src/phaser/geom/rectangle.js +0 -1
- package/src/phaser/geom/rounded_rectangle.js +0 -1
- package/src/phaser/geom/util/circle.js +0 -7
- package/src/phaser/geom/util/ellipse.js +0 -1
- package/src/phaser/geom/util/line.js +0 -5
- package/src/phaser/geom/util/matrix.js +0 -3
- package/src/phaser/geom/util/point.js +0 -20
- package/src/phaser/geom/util/polygon.js +0 -1
- package/src/phaser/geom/util/rectangle.js +0 -16
- package/src/phaser/geom/util/rounded_rectangle.js +0 -1
- package/src/phaser/util/math.js +0 -22
- package/{types → typedefs}/global.d.ts +1 -1
- package/types/phaser/core/animation.d.ts +1 -1
- package/types/phaser/core/animation.d.ts.map +1 -1
- package/types/phaser/core/animation_manager.d.ts +2 -2
- package/types/phaser/core/animation_manager.d.ts.map +1 -1
- package/types/phaser/core/animation_parser.d.ts +0 -2
- package/types/phaser/core/animation_parser.d.ts.map +1 -1
- package/types/phaser/core/cache.d.ts +5 -5
- package/types/phaser/core/cache.d.ts.map +1 -1
- package/types/phaser/core/device.d.ts +2 -0
- package/types/phaser/core/device.d.ts.map +1 -1
- package/types/phaser/core/device_util.d.ts +0 -9
- package/types/phaser/core/device_util.d.ts.map +1 -1
- package/types/phaser/core/dom.d.ts +4 -4
- package/types/phaser/core/dom.d.ts.map +1 -1
- package/types/phaser/core/event_manager.d.ts +16 -16
- package/types/phaser/core/event_manager.d.ts.map +1 -1
- package/types/phaser/core/factory.d.ts +5 -5
- package/types/phaser/core/factory.d.ts.map +1 -1
- package/types/phaser/core/frame.d.ts +7 -8
- package/types/phaser/core/frame.d.ts.map +1 -1
- package/types/phaser/core/frame_data.d.ts +3 -3
- package/types/phaser/core/frame_data.d.ts.map +1 -1
- package/types/phaser/core/frame_util.d.ts +0 -2
- package/types/phaser/core/frame_util.d.ts.map +1 -1
- package/types/phaser/core/game.d.ts +20 -20
- package/types/phaser/core/game.d.ts.map +1 -1
- package/types/phaser/core/input.d.ts +23 -23
- package/types/phaser/core/input.d.ts.map +1 -1
- package/types/phaser/core/input_handler.d.ts +3 -3
- package/types/phaser/core/input_handler.d.ts.map +1 -1
- package/types/phaser/core/input_mouse.d.ts +9 -9
- package/types/phaser/core/input_mouse.d.ts.map +1 -1
- package/types/phaser/core/input_mspointer.d.ts +7 -7
- package/types/phaser/core/input_mspointer.d.ts.map +1 -1
- package/types/phaser/core/input_pointer.d.ts +4 -4
- package/types/phaser/core/input_pointer.d.ts.map +1 -1
- package/types/phaser/core/input_touch.d.ts +8 -8
- package/types/phaser/core/input_touch.d.ts.map +1 -1
- package/types/phaser/core/loader.d.ts +19 -19
- package/types/phaser/core/loader.d.ts.map +1 -1
- package/types/phaser/core/loader_parser.d.ts +0 -4
- package/types/phaser/core/loader_parser.d.ts.map +1 -1
- package/types/phaser/core/scale_manager.d.ts +10 -10
- package/types/phaser/core/scale_manager.d.ts.map +1 -1
- package/types/phaser/core/signal.d.ts +4 -4
- package/types/phaser/core/signal.d.ts.map +1 -1
- package/types/phaser/core/signal_binding.d.ts +1 -1
- package/types/phaser/core/signal_binding.d.ts.map +1 -1
- package/types/phaser/core/sound.d.ts +1 -1
- package/types/phaser/core/sound.d.ts.map +1 -1
- package/types/phaser/core/sound_manager.d.ts +2 -2
- package/types/phaser/core/sound_manager.d.ts.map +1 -1
- package/types/phaser/core/timer.d.ts +1 -1
- package/types/phaser/core/timer.d.ts.map +1 -1
- package/types/phaser/core/timer_event.d.ts +1 -1
- package/types/phaser/core/tween.d.ts +1 -1
- package/types/phaser/core/tween.d.ts.map +1 -1
- package/types/phaser/core/tween_data.d.ts +1 -1
- package/types/phaser/core/tween_data.d.ts.map +1 -1
- package/types/phaser/core/tween_easing.d.ts +31 -31
- package/types/phaser/display/bitmap_text.d.ts +5 -5
- package/types/phaser/display/bitmap_text.d.ts.map +1 -1
- package/types/phaser/display/button.d.ts +4 -4
- package/types/phaser/display/button.d.ts.map +1 -1
- package/types/phaser/display/canvas/buffer.d.ts +2 -2
- package/types/phaser/display/canvas/buffer.d.ts.map +1 -1
- package/types/phaser/display/canvas/graphics.d.ts +0 -3
- package/types/phaser/display/canvas/graphics.d.ts.map +1 -1
- package/types/phaser/display/canvas/masker.d.ts +0 -2
- package/types/phaser/display/canvas/masker.d.ts.map +1 -1
- package/types/phaser/display/canvas/pool.d.ts +0 -7
- package/types/phaser/display/canvas/pool.d.ts.map +1 -1
- package/types/phaser/display/canvas/renderer.d.ts +2 -2
- package/types/phaser/display/canvas/tinter.d.ts +0 -5
- package/types/phaser/display/canvas/tinter.d.ts.map +1 -1
- package/types/phaser/display/canvas/util.d.ts +0 -9
- package/types/phaser/display/canvas/util.d.ts.map +1 -1
- package/types/phaser/display/display_object.d.ts +5 -5
- package/types/phaser/display/display_object.d.ts.map +1 -1
- package/types/phaser/display/graphics.d.ts +10 -10
- package/types/phaser/display/graphics.d.ts.map +1 -1
- package/types/phaser/display/graphics_data.d.ts +1 -1
- package/types/phaser/display/graphics_data.d.ts.map +1 -1
- package/types/phaser/display/graphics_data_util.d.ts +0 -1
- package/types/phaser/display/graphics_data_util.d.ts.map +1 -1
- package/types/phaser/display/group.d.ts +6 -6
- package/types/phaser/display/group.d.ts.map +1 -1
- package/types/phaser/display/image.d.ts +13 -15
- package/types/phaser/display/image.d.ts.map +1 -1
- package/types/phaser/display/sprite_batch.d.ts +2 -3
- package/types/phaser/display/sprite_batch.d.ts.map +1 -1
- package/types/phaser/display/sprite_util.d.ts +0 -5
- package/types/phaser/display/sprite_util.d.ts.map +1 -1
- package/types/phaser/display/text.d.ts +7 -7
- package/types/phaser/display/text.d.ts.map +1 -1
- package/types/phaser/display/webgl/abstract_filter.d.ts +2 -2
- package/types/phaser/display/webgl/abstract_filter.d.ts.map +1 -1
- package/types/phaser/display/webgl/blend_manager.d.ts +1 -1
- package/types/phaser/display/webgl/earcut.d.ts +27 -27
- package/types/phaser/display/webgl/earcut_node.d.ts +1 -1
- package/types/phaser/display/webgl/fast_sprite_batch.d.ts +1 -1
- package/types/phaser/display/webgl/fast_sprite_batch.d.ts.map +1 -1
- package/types/phaser/display/webgl/filter_manager.d.ts +2 -2
- package/types/phaser/display/webgl/filter_manager.d.ts.map +1 -1
- package/types/phaser/display/webgl/filter_texture.d.ts +1 -1
- package/types/phaser/display/webgl/graphics.d.ts +10 -12
- package/types/phaser/display/webgl/graphics.d.ts.map +1 -1
- package/types/phaser/display/webgl/graphics_data.d.ts +2 -2
- package/types/phaser/display/webgl/graphics_data.d.ts.map +1 -1
- package/types/phaser/display/webgl/mask_manager.d.ts +0 -2
- package/types/phaser/display/webgl/mask_manager.d.ts.map +1 -1
- package/types/phaser/display/webgl/render_texture.d.ts +4 -4
- package/types/phaser/display/webgl/render_texture.d.ts.map +1 -1
- package/types/phaser/display/webgl/renderer.d.ts +7 -7
- package/types/phaser/display/webgl/renderer.d.ts.map +1 -1
- package/types/phaser/display/webgl/shader/complex.d.ts +3 -3
- package/types/phaser/display/webgl/shader/complex.d.ts.map +1 -1
- package/types/phaser/display/webgl/shader/fast.d.ts +3 -3
- package/types/phaser/display/webgl/shader/fast.d.ts.map +1 -1
- package/types/phaser/display/webgl/shader/normal.d.ts +2 -2
- package/types/phaser/display/webgl/shader/normal.d.ts.map +1 -1
- package/types/phaser/display/webgl/shader/primitive.d.ts +3 -3
- package/types/phaser/display/webgl/shader/primitive.d.ts.map +1 -1
- package/types/phaser/display/webgl/shader/strip.d.ts +3 -3
- package/types/phaser/display/webgl/shader/strip.d.ts.map +1 -1
- package/types/phaser/display/webgl/shader_manager.d.ts +11 -11
- package/types/phaser/display/webgl/shader_manager.d.ts.map +1 -1
- package/types/phaser/display/webgl/sprite_batch.d.ts +3 -3
- package/types/phaser/display/webgl/sprite_batch.d.ts.map +1 -1
- package/types/phaser/display/webgl/stencil_manager.d.ts +1 -1
- package/types/phaser/display/webgl/texture.d.ts +1 -1
- package/types/phaser/display/webgl/texture.d.ts.map +1 -1
- package/types/phaser/display/webgl/texture_util.d.ts +0 -2
- package/types/phaser/display/webgl/texture_util.d.ts.map +1 -1
- package/types/phaser/display/webgl/util.d.ts +0 -4
- package/types/phaser/display/webgl/util.d.ts.map +1 -1
- package/types/phaser/geom/circle.d.ts +1 -3
- package/types/phaser/geom/circle.d.ts.map +1 -1
- package/types/phaser/geom/ellipse.d.ts +1 -3
- package/types/phaser/geom/ellipse.d.ts.map +1 -1
- package/types/phaser/geom/line.d.ts +2 -3
- package/types/phaser/geom/line.d.ts.map +1 -1
- package/types/phaser/geom/matrix.d.ts +3 -5
- package/types/phaser/geom/matrix.d.ts.map +1 -1
- package/types/phaser/geom/point.d.ts +1 -2
- package/types/phaser/geom/point.d.ts.map +1 -1
- package/types/phaser/geom/polygon.d.ts +1 -1
- package/types/phaser/geom/polygon.d.ts.map +1 -1
- package/types/phaser/geom/rectangle.d.ts +2 -3
- package/types/phaser/geom/rectangle.d.ts.map +1 -1
- package/types/phaser/geom/rounded_rectangle.d.ts +0 -1
- package/types/phaser/geom/rounded_rectangle.d.ts.map +1 -1
- package/types/phaser/geom/util/circle.d.ts +0 -7
- package/types/phaser/geom/util/circle.d.ts.map +1 -1
- package/types/phaser/geom/util/ellipse.d.ts +0 -1
- package/types/phaser/geom/util/ellipse.d.ts.map +1 -1
- package/types/phaser/geom/util/line.d.ts +0 -5
- package/types/phaser/geom/util/line.d.ts.map +1 -1
- package/types/phaser/geom/util/matrix.d.ts +0 -3
- package/types/phaser/geom/util/matrix.d.ts.map +1 -1
- package/types/phaser/geom/util/point.d.ts +0 -20
- package/types/phaser/geom/util/point.d.ts.map +1 -1
- package/types/phaser/geom/util/polygon.d.ts +0 -1
- package/types/phaser/geom/util/polygon.d.ts.map +1 -1
- package/types/phaser/geom/util/rectangle.d.ts +0 -16
- package/types/phaser/geom/util/rectangle.d.ts.map +1 -1
- package/types/phaser/geom/util/rounded_rectangle.d.ts +0 -1
- package/types/phaser/geom/util/rounded_rectangle.d.ts.map +1 -1
- package/types/phaser/util/math.d.ts +0 -22
- package/types/phaser/util/math.d.ts.map +1 -1
|
@@ -18,7 +18,6 @@ import { triangulate } from './earcut';
|
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* TBD.
|
|
21
|
-
*
|
|
22
21
|
* @returns {number} TBD.
|
|
23
22
|
*/
|
|
24
23
|
export function getStencilBufferLimit() {
|
|
@@ -30,7 +29,6 @@ export function getStencilBufferLimit() {
|
|
|
30
29
|
|
|
31
30
|
/**
|
|
32
31
|
* TBD.
|
|
33
|
-
*
|
|
34
32
|
* @returns {object[]} TBD.
|
|
35
33
|
*/
|
|
36
34
|
export function getGraphicsDataPool() {
|
|
@@ -41,7 +39,7 @@ export function getGraphicsDataPool() {
|
|
|
41
39
|
}
|
|
42
40
|
|
|
43
41
|
/**
|
|
44
|
-
*
|
|
42
|
+
* TBD.
|
|
45
43
|
* @param {object} webGL - TBD.
|
|
46
44
|
* @param {number} type - TBD.
|
|
47
45
|
* @returns {object} TBD.
|
|
@@ -65,7 +63,7 @@ export function switchMode(webGL, type) {
|
|
|
65
63
|
}
|
|
66
64
|
|
|
67
65
|
/**
|
|
68
|
-
*
|
|
66
|
+
* TBD.
|
|
69
67
|
* @param {object} graphicsData - TBD.
|
|
70
68
|
* @param {object} webGLData - TBD.
|
|
71
69
|
*/
|
|
@@ -230,7 +228,7 @@ export function buildLine(graphicsData, webGLData) {
|
|
|
230
228
|
}
|
|
231
229
|
|
|
232
230
|
/**
|
|
233
|
-
*
|
|
231
|
+
* TBD.
|
|
234
232
|
* @param {object} graphicsData - TBD.
|
|
235
233
|
* @param {object} webGLData - TBD.
|
|
236
234
|
*/
|
|
@@ -274,7 +272,7 @@ export function buildRectangle(graphicsData, webGLData) {
|
|
|
274
272
|
}
|
|
275
273
|
|
|
276
274
|
/**
|
|
277
|
-
*
|
|
275
|
+
* TBD.
|
|
278
276
|
* @param {number} fromX - TBD.
|
|
279
277
|
* @param {number} fromY - TBD.
|
|
280
278
|
* @param {number} cpX - TBD.
|
|
@@ -313,7 +311,7 @@ export function quadraticBezierCurve(fromX, fromY, cpX, cpY, toX, toY) {
|
|
|
313
311
|
}
|
|
314
312
|
|
|
315
313
|
/**
|
|
316
|
-
*
|
|
314
|
+
* TBD.
|
|
317
315
|
* @param {object} graphicsData - TBD.
|
|
318
316
|
* @param {object} webGLData - TBD.
|
|
319
317
|
*/
|
|
@@ -374,7 +372,7 @@ export function buildRoundedRectangle(graphicsData, webGLData) {
|
|
|
374
372
|
}
|
|
375
373
|
|
|
376
374
|
/**
|
|
377
|
-
*
|
|
375
|
+
* TBD.
|
|
378
376
|
* @param {object} graphicsData - TBD.
|
|
379
377
|
* @param {object} webGLData - TBD.
|
|
380
378
|
*/
|
|
@@ -425,7 +423,7 @@ export function buildCircle(graphicsData, webGLData) {
|
|
|
425
423
|
}
|
|
426
424
|
|
|
427
425
|
/**
|
|
428
|
-
*
|
|
426
|
+
* TBD.
|
|
429
427
|
* @param {object} graphicsData - TBD.
|
|
430
428
|
* @param {object} webGLData - TBD.
|
|
431
429
|
*/
|
|
@@ -469,7 +467,7 @@ export function buildComplexPoly(graphicsData, webGLData) {
|
|
|
469
467
|
}
|
|
470
468
|
|
|
471
469
|
/**
|
|
472
|
-
*
|
|
470
|
+
* TBD.
|
|
473
471
|
* @param {object} graphicsData - TBD.
|
|
474
472
|
* @param {object} webGLData - TBD.
|
|
475
473
|
* @returns {boolean} TBD.
|
|
@@ -508,7 +506,7 @@ export function buildPoly(graphicsData, webGLData) {
|
|
|
508
506
|
}
|
|
509
507
|
|
|
510
508
|
/**
|
|
511
|
-
*
|
|
509
|
+
* TBD.
|
|
512
510
|
* @param {object} graphics - TBD.
|
|
513
511
|
* @param {object} gl - TBD.
|
|
514
512
|
*/
|
|
@@ -597,7 +595,7 @@ export function updateGraphics(graphics, gl) {
|
|
|
597
595
|
}
|
|
598
596
|
|
|
599
597
|
/**
|
|
600
|
-
*
|
|
598
|
+
* TBD.
|
|
601
599
|
* @param {object} graphics - TBD.
|
|
602
600
|
* @param {object} renderSession - TBD.
|
|
603
601
|
*/
|
|
@@ -8,7 +8,6 @@ import { updateGraphics } from './graphics';
|
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* TBD.
|
|
11
|
-
*
|
|
12
11
|
* @param {object} maskData - TBD.
|
|
13
12
|
* @param {object} renderSession - TBD.
|
|
14
13
|
*/
|
|
@@ -29,7 +28,6 @@ export function pushMask(maskData, renderSession) {
|
|
|
29
28
|
|
|
30
29
|
/**
|
|
31
30
|
* TBD.
|
|
32
|
-
*
|
|
33
31
|
* @param {object} maskData - TBD.
|
|
34
32
|
* @param {object} renderSession - TBD.
|
|
35
33
|
*/
|
|
@@ -8,11 +8,11 @@ import { Rectangle } from '../../geom/rectangle';
|
|
|
8
8
|
import { Point } from '../../geom/point';
|
|
9
9
|
import { Texture } from './texture';
|
|
10
10
|
import { BaseTexture } from './base_texture';
|
|
11
|
-
import FilterTexture from './filter_texture';
|
|
12
|
-
import CanvasBuffer from '../canvas/buffer';
|
|
11
|
+
import { FilterTexture } from './filter_texture';
|
|
12
|
+
import { CanvasBuffer } from '../canvas/buffer';
|
|
13
13
|
import { RENDER_WEBGL } from '../../core/const';
|
|
14
14
|
|
|
15
|
-
export
|
|
15
|
+
export class RenderTexture extends Texture {
|
|
16
16
|
constructor(width, height, renderer, scaleMode, resolution = 1) {
|
|
17
17
|
const w = width || 100;
|
|
18
18
|
const h = height || 100;
|
|
@@ -28,14 +28,14 @@ import {
|
|
|
28
28
|
import { remove } from '../canvas/pool';
|
|
29
29
|
import { isPowerOfTwo } from '../../util/math';
|
|
30
30
|
import { Point } from '../../geom/point';
|
|
31
|
-
import WebGLShaderManager from './shader_manager';
|
|
32
|
-
import WebGLSpriteBatch from './sprite_batch';
|
|
31
|
+
import { WebGLShaderManager } from './shader_manager';
|
|
32
|
+
import { WebGLSpriteBatch } from './sprite_batch';
|
|
33
33
|
import * as WebGLMaskManager from './mask_manager';
|
|
34
|
-
import WebGLFilterManager from './filter_manager';
|
|
35
|
-
import WebGLStencilManager from './stencil_manager';
|
|
36
|
-
import WebGLBlendModeManager from './blend_manager';
|
|
34
|
+
import { WebGLFilterManager } from './filter_manager';
|
|
35
|
+
import { WebGLStencilManager } from './stencil_manager';
|
|
36
|
+
import { WebGLBlendModeManager } from './blend_manager';
|
|
37
37
|
|
|
38
|
-
export
|
|
38
|
+
export class WebGLRenderer {
|
|
39
39
|
constructor(game) {
|
|
40
40
|
this.type = RENDER_WEBGL;
|
|
41
41
|
this.resolution = game.config.resolution;
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
* @author Richard Davey <rich@photonstorm.com>
|
|
5
5
|
* @author Mat Groves http://matgroves.com/ @Doormat23
|
|
6
6
|
*/
|
|
7
|
-
import PrimitiveShader from './shader/primitive';
|
|
8
|
-
import ComplexPrimitiveShader from './shader/complex';
|
|
9
|
-
import NormalShader from './shader/normal';
|
|
10
|
-
import FastShader from './shader/fast';
|
|
11
|
-
import StripShader from './shader/strip';
|
|
7
|
+
import { PrimitiveShader } from './shader/primitive';
|
|
8
|
+
import { ComplexPrimitiveShader } from './shader/complex';
|
|
9
|
+
import { NormalShader } from './shader/normal';
|
|
10
|
+
import { FastShader } from './shader/fast';
|
|
11
|
+
import { StripShader } from './shader/strip';
|
|
12
12
|
|
|
13
|
-
export
|
|
13
|
+
export class WebGLShaderManager {
|
|
14
14
|
constructor() {
|
|
15
15
|
this.gl = null;
|
|
16
16
|
this.primitiveShader = null;
|
|
@@ -4,12 +4,10 @@
|
|
|
4
4
|
* @author Richard Davey <rich@photonstorm.com>
|
|
5
5
|
* @author Mat Groves http://matgroves.com/ @Doormat23
|
|
6
6
|
*/
|
|
7
|
-
import AbstractFilter from './abstract_filter';
|
|
8
|
-
import NormalShader from './shader/normal';
|
|
7
|
+
import { AbstractFilter } from './abstract_filter';
|
|
8
|
+
import { NormalShader } from './shader/normal';
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export default class {
|
|
10
|
+
export class WebGLSpriteBatch {
|
|
13
11
|
constructor() {
|
|
14
12
|
this.vertSize = 5;
|
|
15
13
|
this.size = 2000; // Math.pow(2, 16) / this.vertSize;
|
|
@@ -9,7 +9,6 @@ import { Texture } from './texture';
|
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* TBD.
|
|
12
|
-
*
|
|
13
12
|
* @param {HTMLCanvasElement} canvas - TBD.
|
|
14
13
|
* @param {number} scaleMode - TBD.
|
|
15
14
|
* @returns {object} TBD.
|
|
@@ -26,7 +25,6 @@ export function baseTextureFromCanvas(canvas, scaleMode) {
|
|
|
26
25
|
|
|
27
26
|
/**
|
|
28
27
|
* TBD.
|
|
29
|
-
*
|
|
30
28
|
* @param {HTMLCanvasElement} canvas - TBD.
|
|
31
29
|
* @param {number} scaleMode - TBD.
|
|
32
30
|
* @returns {object} TBD.
|
|
@@ -12,7 +12,6 @@ export function initDefaultShaders() {}
|
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* TBD.
|
|
15
|
-
*
|
|
16
15
|
* @param {object} gl - TBD.
|
|
17
16
|
* @param {string[]|string} shaderSrc - TBD.
|
|
18
17
|
* @param {object} shaderType - TBD.
|
|
@@ -37,7 +36,6 @@ export function compileShader(gl, shaderSrc, shaderType) {
|
|
|
37
36
|
|
|
38
37
|
/**
|
|
39
38
|
* TBD.
|
|
40
|
-
*
|
|
41
39
|
* @param {object} gl - TBD.
|
|
42
40
|
* @param {string[]|string} shaderSrc - TBD.
|
|
43
41
|
* @returns {object} TBD.
|
|
@@ -48,7 +46,6 @@ export function compileVertexShader(gl, shaderSrc) {
|
|
|
48
46
|
|
|
49
47
|
/**
|
|
50
48
|
* TBD.
|
|
51
|
-
*
|
|
52
49
|
* @param {object} gl - TBD.
|
|
53
50
|
* @param {string[]|string} shaderSrc - TBD.
|
|
54
51
|
* @returns {object} TBD.
|
|
@@ -59,7 +56,6 @@ export function compileFragmentShader(gl, shaderSrc) {
|
|
|
59
56
|
|
|
60
57
|
/**
|
|
61
58
|
* TBD.
|
|
62
|
-
*
|
|
63
59
|
* @param {object} gl - TBD.
|
|
64
60
|
* @param {string[]|string} vertexSrc - TBD.
|
|
65
61
|
* @param {string[]|string} fragmentSrc - TBD.
|
package/src/phaser/geom/line.js
CHANGED
package/src/phaser/geom/point.js
CHANGED
|
@@ -10,7 +10,6 @@ import { degToRad, distance } from '../../util/math';
|
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* TBD.
|
|
13
|
-
*
|
|
14
13
|
* @param {Circle} input - TBD.
|
|
15
14
|
* @param {Circle} output - TBD.
|
|
16
15
|
* @returns {Circle} TBD.
|
|
@@ -25,7 +24,6 @@ export function clone(input, output = null) {
|
|
|
25
24
|
|
|
26
25
|
/**
|
|
27
26
|
* TBD.
|
|
28
|
-
*
|
|
29
27
|
* @param {Circle} a - TBD.
|
|
30
28
|
* @param {number} x - TBD.
|
|
31
29
|
* @param {number} y - TBD.
|
|
@@ -42,7 +40,6 @@ export function contains(a, x, y) {
|
|
|
42
40
|
|
|
43
41
|
/**
|
|
44
42
|
* TBD.
|
|
45
|
-
*
|
|
46
43
|
* @param {Circle} a - TBD.
|
|
47
44
|
* @param {Circle} b - TBD.
|
|
48
45
|
* @returns {boolean} TBD.
|
|
@@ -53,7 +50,6 @@ export function equals(a, b) {
|
|
|
53
50
|
|
|
54
51
|
/**
|
|
55
52
|
* TBD.
|
|
56
|
-
*
|
|
57
53
|
* @param {Circle} a - TBD.
|
|
58
54
|
* @param {Circle} b - TBD.
|
|
59
55
|
* @returns {boolean} TBD.
|
|
@@ -64,7 +60,6 @@ export function intersects(a, b) {
|
|
|
64
60
|
|
|
65
61
|
/**
|
|
66
62
|
* TBD.
|
|
67
|
-
*
|
|
68
63
|
* @param {Circle} a - TBD.
|
|
69
64
|
* @param {number} angle - TBD.
|
|
70
65
|
* @param {boolean} asDegrees - TBD.
|
|
@@ -83,7 +78,6 @@ export function circumferencePoint(a, angle, asDegrees = false, output = null) {
|
|
|
83
78
|
|
|
84
79
|
/**
|
|
85
80
|
* TBD.
|
|
86
|
-
*
|
|
87
81
|
* @param {Circle} a - TBD.
|
|
88
82
|
* @param {number} angle - TBD.
|
|
89
83
|
* @param {boolean} asDegrees - TBD.
|
|
@@ -102,7 +96,6 @@ export function intersectsPoint(a, angle, asDegrees = false, output = null) {
|
|
|
102
96
|
|
|
103
97
|
/**
|
|
104
98
|
* TBD.
|
|
105
|
-
*
|
|
106
99
|
* @param {Circle} c - TBD.
|
|
107
100
|
* @param {object} r - TBD.
|
|
108
101
|
* @returns {boolean} TBD.
|
|
@@ -10,7 +10,6 @@ import { intersects as intersectsRect } from './rectangle';
|
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* TBD.
|
|
13
|
-
*
|
|
14
13
|
* @param {Line} input - TBD.
|
|
15
14
|
* @param {Line} output - TBD.
|
|
16
15
|
* @returns {Line} TBD.
|
|
@@ -26,7 +25,6 @@ export function clone(input, output = null) {
|
|
|
26
25
|
|
|
27
26
|
/**
|
|
28
27
|
* TBD.
|
|
29
|
-
*
|
|
30
28
|
* @param {object} a - TBD.
|
|
31
29
|
* @param {object} b - TBD.
|
|
32
30
|
* @param {object} e - TBD.
|
|
@@ -63,7 +61,6 @@ export function intersectsPoints(a, b, e, f, asSegment = true, output = null) {
|
|
|
63
61
|
|
|
64
62
|
/**
|
|
65
63
|
* TBD.
|
|
66
|
-
*
|
|
67
64
|
* @param {object} a - TBD.
|
|
68
65
|
* @param {object} b - TBD.
|
|
69
66
|
* @param {boolean} asSegment - TBD.
|
|
@@ -76,7 +73,6 @@ export function intersects(a, b, asSegment, result) {
|
|
|
76
73
|
|
|
77
74
|
/**
|
|
78
75
|
* TBD.
|
|
79
|
-
*
|
|
80
76
|
* @param {object} line - TBD.
|
|
81
77
|
* @param {object} rect - TBD.
|
|
82
78
|
* @returns {boolean} TBD.
|
|
@@ -134,7 +130,6 @@ export function intersectsRectangle(line, rect) {
|
|
|
134
130
|
|
|
135
131
|
/**
|
|
136
132
|
* TBD.
|
|
137
|
-
*
|
|
138
133
|
* @param {object} a - TBD.
|
|
139
134
|
* @param {object} b - TBD.
|
|
140
135
|
* @returns {number} TBD.
|
|
@@ -8,7 +8,6 @@ import { Matrix } from '../matrix';
|
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* TBD.
|
|
11
|
-
*
|
|
12
11
|
* @param {Matrix} input - TBD.
|
|
13
12
|
* @param {Matrix} output - TBD.
|
|
14
13
|
* @returns {Matrix} TBD.
|
|
@@ -26,7 +25,6 @@ export function clone(input, output = null) {
|
|
|
26
25
|
|
|
27
26
|
/**
|
|
28
27
|
* TBD.
|
|
29
|
-
*
|
|
30
28
|
* @returns {Matrix} TBD.
|
|
31
29
|
*/
|
|
32
30
|
export function getIdentityMatrix() {
|
|
@@ -41,7 +39,6 @@ export function getIdentityMatrix() {
|
|
|
41
39
|
|
|
42
40
|
/**
|
|
43
41
|
* TBD.
|
|
44
|
-
*
|
|
45
42
|
* @returns {Matrix} TBD.
|
|
46
43
|
*/
|
|
47
44
|
export function getTempMatrix() {
|
|
@@ -8,7 +8,6 @@ import { Point } from '../point';
|
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* TBD.
|
|
11
|
-
*
|
|
12
11
|
* @param {Point} a - TBD.
|
|
13
12
|
* @param {Point} b - TBD.
|
|
14
13
|
* @param {Point} output - TBD.
|
|
@@ -23,7 +22,6 @@ export function add(a, b, output = null) {
|
|
|
23
22
|
|
|
24
23
|
/**
|
|
25
24
|
* TBD.
|
|
26
|
-
*
|
|
27
25
|
* @param {Point} a - TBD.
|
|
28
26
|
* @param {Point} b - TBD.
|
|
29
27
|
* @param {Point} output - TBD.
|
|
@@ -38,7 +36,6 @@ export function subtract(a, b, output = null) {
|
|
|
38
36
|
|
|
39
37
|
/**
|
|
40
38
|
* TBD.
|
|
41
|
-
*
|
|
42
39
|
* @param {Point} a - TBD.
|
|
43
40
|
* @param {Point} b - TBD.
|
|
44
41
|
* @param {Point} output - TBD.
|
|
@@ -53,7 +50,6 @@ export function multiply(a, b, output = null) {
|
|
|
53
50
|
|
|
54
51
|
/**
|
|
55
52
|
* TBD.
|
|
56
|
-
*
|
|
57
53
|
* @param {Point} a - TBD.
|
|
58
54
|
* @param {Point} b - TBD.
|
|
59
55
|
* @param {Point} output - TBD.
|
|
@@ -68,7 +64,6 @@ export function divide(a, b, output = null) {
|
|
|
68
64
|
|
|
69
65
|
/**
|
|
70
66
|
* TBD.
|
|
71
|
-
*
|
|
72
67
|
* @param {Point} a - TBD.
|
|
73
68
|
* @param {Point} b - TBD.
|
|
74
69
|
* @returns {boolean} TBD.
|
|
@@ -79,7 +74,6 @@ export function equals(a, b) {
|
|
|
79
74
|
|
|
80
75
|
/**
|
|
81
76
|
* TBD.
|
|
82
|
-
*
|
|
83
77
|
* @param {Point} a - TBD.
|
|
84
78
|
* @param {Point} b - TBD.
|
|
85
79
|
* @returns {number} TBD.
|
|
@@ -90,7 +84,6 @@ export function angle(a, b) {
|
|
|
90
84
|
|
|
91
85
|
/**
|
|
92
86
|
* TBD.
|
|
93
|
-
*
|
|
94
87
|
* @param {Point} a - TBD.
|
|
95
88
|
* @param {Point} output - TBD.
|
|
96
89
|
* @returns {Point} TBD.
|
|
@@ -102,7 +95,6 @@ export function negative(a, output = null) {
|
|
|
102
95
|
|
|
103
96
|
/**
|
|
104
97
|
* TBD.
|
|
105
|
-
*
|
|
106
98
|
* @param {Point} a - TBD.
|
|
107
99
|
* @param {Point} b - TBD.
|
|
108
100
|
* @param {number} s - TBD.
|
|
@@ -116,7 +108,6 @@ export function multiplyAdd(a, b, s, output = null) {
|
|
|
116
108
|
|
|
117
109
|
/**
|
|
118
110
|
* TBD.
|
|
119
|
-
*
|
|
120
111
|
* @param {Point} a - TBD.
|
|
121
112
|
* @param {Point} b - TBD.
|
|
122
113
|
* @param {number} f - TBD.
|
|
@@ -130,7 +121,6 @@ export function interpolate(a, b, f, output = null) {
|
|
|
130
121
|
|
|
131
122
|
/**
|
|
132
123
|
* TBD.
|
|
133
|
-
*
|
|
134
124
|
* @param {Point} a - TBD.
|
|
135
125
|
* @param {Point} output - TBD.
|
|
136
126
|
* @returns {Point} TBD.
|
|
@@ -142,7 +132,6 @@ export function perp(a, output = null) {
|
|
|
142
132
|
|
|
143
133
|
/**
|
|
144
134
|
* TBD.
|
|
145
|
-
*
|
|
146
135
|
* @param {Point} a - TBD.
|
|
147
136
|
* @param {Point} output - TBD.
|
|
148
137
|
* @returns {Point} TBD.
|
|
@@ -154,7 +143,6 @@ export function rperp(a, output = null) {
|
|
|
154
143
|
|
|
155
144
|
/**
|
|
156
145
|
* TBD.
|
|
157
|
-
*
|
|
158
146
|
* @param {Point} a - TBD.
|
|
159
147
|
* @param {Point} b - TBD.
|
|
160
148
|
* @param {boolean} round - TBD.
|
|
@@ -169,7 +157,6 @@ export function distance(a, b, round = false) {
|
|
|
169
157
|
|
|
170
158
|
/**
|
|
171
159
|
* TBD.
|
|
172
|
-
*
|
|
173
160
|
* @param {Point} a - TBD.
|
|
174
161
|
* @param {Point} b - TBD.
|
|
175
162
|
* @param {Point} output - TBD.
|
|
@@ -186,7 +173,6 @@ export function project(a, b, output = null) {
|
|
|
186
173
|
|
|
187
174
|
/**
|
|
188
175
|
* TBD.
|
|
189
|
-
*
|
|
190
176
|
* @param {Point} a - TBD.
|
|
191
177
|
* @param {Point} b - TBD.
|
|
192
178
|
* @param {Point} output - TBD.
|
|
@@ -203,7 +189,6 @@ export function projectUnit(a, b, output = null) {
|
|
|
203
189
|
|
|
204
190
|
/**
|
|
205
191
|
* TBD.
|
|
206
|
-
*
|
|
207
192
|
* @param {Point} a - TBD.
|
|
208
193
|
* @param {Point} output - TBD.
|
|
209
194
|
* @returns {Point} TBD.
|
|
@@ -215,7 +200,6 @@ export function normalRightHand(a, output = null) {
|
|
|
215
200
|
|
|
216
201
|
/**
|
|
217
202
|
* TBD.
|
|
218
|
-
*
|
|
219
203
|
* @param {Point} a - TBD.
|
|
220
204
|
* @param {Point} output - TBD.
|
|
221
205
|
* @returns {Point} TBD.
|
|
@@ -231,7 +215,6 @@ export function normalize(a, output = null) {
|
|
|
231
215
|
|
|
232
216
|
/**
|
|
233
217
|
* TBD.
|
|
234
|
-
*
|
|
235
218
|
* @param {Point} a - TBD.
|
|
236
219
|
* @param {number} x - TBD.
|
|
237
220
|
* @param {number} y - TBD.
|
|
@@ -262,7 +245,6 @@ export function rotate(a, x, y, ang, asDegrees, dist) {
|
|
|
262
245
|
|
|
263
246
|
/**
|
|
264
247
|
* TBD.
|
|
265
|
-
*
|
|
266
248
|
* @param {Point[]} points - TBD.
|
|
267
249
|
* @param {Point} output - TBD.
|
|
268
250
|
* @returns {Point} TBD.
|
|
@@ -287,7 +269,6 @@ export function centroid(points, output = null) {
|
|
|
287
269
|
|
|
288
270
|
/**
|
|
289
271
|
* TBD.
|
|
290
|
-
*
|
|
291
272
|
* @param {object} obj - TBD.
|
|
292
273
|
* @param {string} xProp - TBD.
|
|
293
274
|
* @param {string} yProp - TBD.
|
|
@@ -306,7 +287,6 @@ export function parse(obj, xProp = 'x', yProp = 'y') {
|
|
|
306
287
|
|
|
307
288
|
/**
|
|
308
289
|
* TBD.
|
|
309
|
-
*
|
|
310
290
|
* @param {Point} input - TBD.
|
|
311
291
|
* @param {Point} output - TBD.
|
|
312
292
|
* @returns {Point} TBD.
|