@vpmedia/phaser 1.15.0 → 1.16.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.
Files changed (290) hide show
  1. package/README.md +3 -3
  2. package/package.json +6 -5
  3. package/src/index.js +15 -18
  4. package/src/phaser/core/animation.js +102 -6
  5. package/src/phaser/core/animation_manager.js +88 -10
  6. package/src/phaser/core/animation_parser.js +5 -18
  7. package/src/phaser/core/array_set.js +51 -5
  8. package/src/phaser/core/cache.js +291 -6
  9. package/src/phaser/core/const.js +107 -4
  10. package/src/phaser/core/device.js +3 -6
  11. package/src/phaser/core/device_util.js +3 -16
  12. package/src/phaser/core/dom.js +127 -29
  13. package/src/phaser/core/event_manager.js +128 -6
  14. package/src/phaser/core/factory.js +69 -34
  15. package/src/phaser/core/frame.js +43 -6
  16. package/src/phaser/core/frame_data.js +55 -5
  17. package/src/phaser/core/frame_util.js +7 -12
  18. package/src/phaser/core/game.js +35 -7
  19. package/src/phaser/core/input.js +116 -17
  20. package/src/phaser/core/input_handler.js +242 -42
  21. package/src/phaser/core/input_mouse.js +66 -5
  22. package/src/phaser/core/input_mspointer.js +40 -9
  23. package/src/phaser/core/input_pointer.js +79 -17
  24. package/src/phaser/core/input_touch.js +42 -5
  25. package/src/phaser/core/loader.js +274 -101
  26. package/src/phaser/core/loader_parser.js +2 -10
  27. package/src/phaser/core/raf.js +16 -5
  28. package/src/phaser/core/scale_manager.js +204 -39
  29. package/src/phaser/core/scene.js +24 -5
  30. package/src/phaser/core/scene_manager.js +81 -11
  31. package/src/phaser/core/signal.js +88 -11
  32. package/src/phaser/core/signal_binding.js +35 -15
  33. package/src/phaser/core/sound.js +99 -10
  34. package/src/phaser/core/sound_manager.js +89 -13
  35. package/src/phaser/core/sound_sprite.js +20 -5
  36. package/src/phaser/core/stage.js +43 -7
  37. package/src/phaser/core/time.js +67 -5
  38. package/src/phaser/core/timer.js +107 -30
  39. package/src/phaser/core/timer_event.js +11 -6
  40. package/src/phaser/core/tween.js +124 -30
  41. package/src/phaser/core/tween_data.js +42 -18
  42. package/src/phaser/core/tween_easing.js +1 -8
  43. package/src/phaser/core/tween_manager.js +47 -5
  44. package/src/phaser/core/world.js +9 -6
  45. package/src/phaser/display/bitmap_text.js +91 -10
  46. package/src/phaser/display/button.js +63 -12
  47. package/src/phaser/display/canvas/buffer.js +16 -6
  48. package/src/phaser/display/canvas/graphics.js +1 -13
  49. package/src/phaser/display/canvas/masker.js +0 -6
  50. package/src/phaser/display/canvas/pool.js +0 -7
  51. package/src/phaser/display/canvas/renderer.js +28 -8
  52. package/src/phaser/display/canvas/tinter.js +4 -43
  53. package/src/phaser/display/canvas/util.js +0 -6
  54. package/src/phaser/display/display_object.js +192 -20
  55. package/src/phaser/display/graphics.js +161 -26
  56. package/src/phaser/display/graphics_data.js +14 -6
  57. package/src/phaser/display/graphics_data_util.js +2 -8
  58. package/src/phaser/display/group.js +74 -9
  59. package/src/phaser/display/image.js +85 -9
  60. package/src/phaser/display/sprite_batch.js +3 -8
  61. package/src/phaser/display/sprite_util.js +3 -23
  62. package/src/phaser/display/text.js +331 -31
  63. package/src/phaser/display/webgl/abstract_filter.js +8 -7
  64. package/src/phaser/display/webgl/base_texture.js +20 -12
  65. package/src/phaser/display/webgl/blend_manager.js +14 -7
  66. package/src/phaser/display/webgl/earcut.js +4 -23
  67. package/src/phaser/display/webgl/earcut_node.js +6 -7
  68. package/src/phaser/display/webgl/fast_sprite_batch.js +34 -11
  69. package/src/phaser/display/webgl/filter_manager.js +25 -7
  70. package/src/phaser/display/webgl/filter_texture.js +21 -22
  71. package/src/phaser/display/webgl/graphics.js +5 -28
  72. package/src/phaser/display/webgl/graphics_data.js +10 -7
  73. package/src/phaser/display/webgl/mask_manager.js +0 -6
  74. package/src/phaser/display/webgl/render_texture.js +33 -21
  75. package/src/phaser/display/webgl/renderer.js +38 -11
  76. package/src/phaser/display/webgl/shader/complex.js +10 -6
  77. package/src/phaser/display/webgl/shader/fast.js +10 -6
  78. package/src/phaser/display/webgl/shader/normal.js +23 -32
  79. package/src/phaser/display/webgl/shader/primitive.js +10 -6
  80. package/src/phaser/display/webgl/shader/strip.js +10 -6
  81. package/src/phaser/display/webgl/shader_manager.js +18 -6
  82. package/src/phaser/display/webgl/sprite_batch.js +41 -8
  83. package/src/phaser/display/webgl/stencil_manager.js +28 -6
  84. package/src/phaser/display/webgl/texture.js +28 -15
  85. package/src/phaser/display/webgl/texture_util.js +0 -6
  86. package/src/phaser/display/webgl/util.js +0 -7
  87. package/src/phaser/geom/circle.js +123 -18
  88. package/src/phaser/geom/ellipse.js +39 -18
  89. package/src/phaser/geom/line.js +148 -16
  90. package/src/phaser/geom/matrix.js +73 -6
  91. package/src/phaser/geom/point.js +152 -6
  92. package/src/phaser/geom/polygon.js +42 -14
  93. package/src/phaser/geom/rectangle.js +233 -6
  94. package/src/phaser/geom/rounded_rectangle.js +10 -6
  95. package/src/phaser/geom/util/circle.js +3 -9
  96. package/src/phaser/geom/util/ellipse.js +0 -7
  97. package/src/phaser/geom/util/line.js +5 -14
  98. package/src/phaser/geom/util/matrix.js +1 -7
  99. package/src/phaser/geom/util/point.js +0 -6
  100. package/src/phaser/geom/util/polygon.js +1 -7
  101. package/src/phaser/geom/util/rectangle.js +1 -7
  102. package/src/phaser/geom/util/rounded_rectangle.js +1 -7
  103. package/src/phaser/util/math.js +3 -21
  104. package/types/index.d.ts +2 -1
  105. package/types/index.d.ts.map +1 -1
  106. package/types/phaser/core/animation.d.ts +105 -4
  107. package/types/phaser/core/animation.d.ts.map +1 -1
  108. package/types/phaser/core/animation_manager.d.ts +87 -0
  109. package/types/phaser/core/animation_manager.d.ts.map +1 -1
  110. package/types/phaser/core/animation_parser.d.ts +5 -4
  111. package/types/phaser/core/animation_parser.d.ts.map +1 -1
  112. package/types/phaser/core/array_set.d.ts +53 -7
  113. package/types/phaser/core/array_set.d.ts.map +1 -1
  114. package/types/phaser/core/cache.d.ts +346 -56
  115. package/types/phaser/core/cache.d.ts.map +1 -1
  116. package/types/phaser/core/const.d.ts +143 -40
  117. package/types/phaser/core/const.d.ts.map +1 -1
  118. package/types/phaser/core/device.d.ts +0 -5
  119. package/types/phaser/core/device.d.ts.map +1 -1
  120. package/types/phaser/core/device_util.d.ts +1 -1
  121. package/types/phaser/core/device_util.d.ts.map +1 -1
  122. package/types/phaser/core/dom.d.ts +119 -0
  123. package/types/phaser/core/dom.d.ts.map +1 -1
  124. package/types/phaser/core/event_manager.d.ts +127 -0
  125. package/types/phaser/core/event_manager.d.ts.map +1 -1
  126. package/types/phaser/core/factory.d.ts +74 -7
  127. package/types/phaser/core/factory.d.ts.map +1 -1
  128. package/types/phaser/core/frame.d.ts +64 -21
  129. package/types/phaser/core/frame.d.ts.map +1 -1
  130. package/types/phaser/core/frame_data.d.ts +61 -9
  131. package/types/phaser/core/frame_data.d.ts.map +1 -1
  132. package/types/phaser/core/frame_util.d.ts +10 -8
  133. package/types/phaser/core/frame_util.d.ts.map +1 -1
  134. package/types/phaser/core/game.d.ts +40 -6
  135. package/types/phaser/core/game.d.ts.map +1 -1
  136. package/types/phaser/core/input.d.ts +114 -3
  137. package/types/phaser/core/input.d.ts.map +1 -1
  138. package/types/phaser/core/input_handler.d.ts +257 -24
  139. package/types/phaser/core/input_handler.d.ts.map +1 -1
  140. package/types/phaser/core/input_mouse.d.ts +51 -4
  141. package/types/phaser/core/input_mouse.d.ts.map +1 -1
  142. package/types/phaser/core/input_mspointer.d.ts +43 -9
  143. package/types/phaser/core/input_mspointer.d.ts.map +1 -1
  144. package/types/phaser/core/input_pointer.d.ts +78 -2
  145. package/types/phaser/core/input_pointer.d.ts.map +1 -1
  146. package/types/phaser/core/input_touch.d.ts +45 -8
  147. package/types/phaser/core/input_touch.d.ts.map +1 -1
  148. package/types/phaser/core/loader.d.ts +264 -19
  149. package/types/phaser/core/loader.d.ts.map +1 -1
  150. package/types/phaser/core/loader_parser.d.ts.map +1 -1
  151. package/types/phaser/core/raf.d.ts +17 -7
  152. package/types/phaser/core/raf.d.ts.map +1 -1
  153. package/types/phaser/core/scale_manager.d.ts +201 -6
  154. package/types/phaser/core/scale_manager.d.ts.map +1 -1
  155. package/types/phaser/core/scene.d.ts +21 -5
  156. package/types/phaser/core/scene.d.ts.map +1 -1
  157. package/types/phaser/core/scene_manager.d.ts +90 -10
  158. package/types/phaser/core/scene_manager.d.ts.map +1 -1
  159. package/types/phaser/core/signal.d.ts +93 -9
  160. package/types/phaser/core/signal.d.ts.map +1 -1
  161. package/types/phaser/core/signal_binding.d.ts +34 -5
  162. package/types/phaser/core/signal_binding.d.ts.map +1 -1
  163. package/types/phaser/core/sound.d.ts +111 -14
  164. package/types/phaser/core/sound.d.ts.map +1 -1
  165. package/types/phaser/core/sound_manager.d.ts +93 -7
  166. package/types/phaser/core/sound_manager.d.ts.map +1 -1
  167. package/types/phaser/core/sound_sprite.d.ts +22 -8
  168. package/types/phaser/core/sound_sprite.d.ts.map +1 -1
  169. package/types/phaser/core/stage.d.ts +32 -3
  170. package/types/phaser/core/stage.d.ts.map +1 -1
  171. package/types/phaser/core/time.d.ts +73 -6
  172. package/types/phaser/core/time.d.ts.map +1 -1
  173. package/types/phaser/core/timer.d.ts +103 -2
  174. package/types/phaser/core/timer.d.ts.map +1 -1
  175. package/types/phaser/core/timer_event.d.ts +11 -5
  176. package/types/phaser/core/timer_event.d.ts.map +1 -1
  177. package/types/phaser/core/tween.d.ts +122 -2
  178. package/types/phaser/core/tween.d.ts.map +1 -1
  179. package/types/phaser/core/tween_data.d.ts +41 -2
  180. package/types/phaser/core/tween_data.d.ts.map +1 -1
  181. package/types/phaser/core/tween_easing.d.ts +0 -5
  182. package/types/phaser/core/tween_easing.d.ts.map +1 -1
  183. package/types/phaser/core/tween_manager.d.ts +49 -2
  184. package/types/phaser/core/tween_manager.d.ts.map +1 -1
  185. package/types/phaser/core/world.d.ts +9 -1
  186. package/types/phaser/core/world.d.ts.map +1 -1
  187. package/types/phaser/display/bitmap_text.d.ts +84 -7
  188. package/types/phaser/display/bitmap_text.d.ts.map +1 -1
  189. package/types/phaser/display/button.d.ts +65 -8
  190. package/types/phaser/display/button.d.ts.map +1 -1
  191. package/types/phaser/display/canvas/buffer.d.ts +20 -4
  192. package/types/phaser/display/canvas/buffer.d.ts.map +1 -1
  193. package/types/phaser/display/canvas/graphics.d.ts.map +1 -1
  194. package/types/phaser/display/canvas/masker.d.ts.map +1 -1
  195. package/types/phaser/display/canvas/pool.d.ts +0 -6
  196. package/types/phaser/display/canvas/pool.d.ts.map +1 -1
  197. package/types/phaser/display/canvas/renderer.d.ts +29 -2
  198. package/types/phaser/display/canvas/renderer.d.ts.map +1 -1
  199. package/types/phaser/display/canvas/tinter.d.ts.map +1 -1
  200. package/types/phaser/display/canvas/util.d.ts.map +1 -1
  201. package/types/phaser/display/display_object.d.ts +195 -8
  202. package/types/phaser/display/display_object.d.ts.map +1 -1
  203. package/types/phaser/display/graphics.d.ts +132 -6
  204. package/types/phaser/display/graphics.d.ts.map +1 -1
  205. package/types/phaser/display/graphics_data.d.ts +15 -1
  206. package/types/phaser/display/graphics_data.d.ts.map +1 -1
  207. package/types/phaser/display/graphics_data_util.d.ts +3 -2
  208. package/types/phaser/display/graphics_data_util.d.ts.map +1 -1
  209. package/types/phaser/display/group.d.ts +62 -0
  210. package/types/phaser/display/group.d.ts.map +1 -1
  211. package/types/phaser/display/image.d.ts +66 -2
  212. package/types/phaser/display/image.d.ts.map +1 -1
  213. package/types/phaser/display/sprite_batch.d.ts +4 -3
  214. package/types/phaser/display/sprite_batch.d.ts.map +1 -1
  215. package/types/phaser/display/sprite_util.d.ts.map +1 -1
  216. package/types/phaser/display/text.d.ts +366 -46
  217. package/types/phaser/display/text.d.ts.map +1 -1
  218. package/types/phaser/display/webgl/abstract_filter.d.ts +8 -6
  219. package/types/phaser/display/webgl/abstract_filter.d.ts.map +1 -1
  220. package/types/phaser/display/webgl/base_texture.d.ts +20 -1
  221. package/types/phaser/display/webgl/base_texture.d.ts.map +1 -1
  222. package/types/phaser/display/webgl/blend_manager.d.ts +11 -6
  223. package/types/phaser/display/webgl/blend_manager.d.ts.map +1 -1
  224. package/types/phaser/display/webgl/earcut.d.ts.map +1 -1
  225. package/types/phaser/display/webgl/earcut_node.d.ts +9 -9
  226. package/types/phaser/display/webgl/earcut_node.d.ts.map +1 -1
  227. package/types/phaser/display/webgl/fast_sprite_batch.d.ts +33 -6
  228. package/types/phaser/display/webgl/fast_sprite_batch.d.ts.map +1 -1
  229. package/types/phaser/display/webgl/filter_manager.d.ts +22 -6
  230. package/types/phaser/display/webgl/filter_manager.d.ts.map +1 -1
  231. package/types/phaser/display/webgl/filter_texture.d.ts +21 -3
  232. package/types/phaser/display/webgl/filter_texture.d.ts.map +1 -1
  233. package/types/phaser/display/webgl/graphics.d.ts.map +1 -1
  234. package/types/phaser/display/webgl/graphics_data.d.ts +10 -6
  235. package/types/phaser/display/webgl/graphics_data.d.ts.map +1 -1
  236. package/types/phaser/display/webgl/mask_manager.d.ts.map +1 -1
  237. package/types/phaser/display/webgl/render_texture.d.ts +30 -3
  238. package/types/phaser/display/webgl/render_texture.d.ts.map +1 -1
  239. package/types/phaser/display/webgl/renderer.d.ts +41 -4
  240. package/types/phaser/display/webgl/renderer.d.ts.map +1 -1
  241. package/types/phaser/display/webgl/shader/complex.d.ts +10 -0
  242. package/types/phaser/display/webgl/shader/complex.d.ts.map +1 -1
  243. package/types/phaser/display/webgl/shader/fast.d.ts +10 -0
  244. package/types/phaser/display/webgl/shader/fast.d.ts.map +1 -1
  245. package/types/phaser/display/webgl/shader/normal.d.ts +20 -0
  246. package/types/phaser/display/webgl/shader/normal.d.ts.map +1 -1
  247. package/types/phaser/display/webgl/shader/primitive.d.ts +10 -0
  248. package/types/phaser/display/webgl/shader/primitive.d.ts.map +1 -1
  249. package/types/phaser/display/webgl/shader/strip.d.ts +10 -0
  250. package/types/phaser/display/webgl/shader/strip.d.ts.map +1 -1
  251. package/types/phaser/display/webgl/shader_manager.d.ts +15 -0
  252. package/types/phaser/display/webgl/shader_manager.d.ts.map +1 -1
  253. package/types/phaser/display/webgl/sprite_batch.d.ts +37 -0
  254. package/types/phaser/display/webgl/sprite_batch.d.ts.map +1 -1
  255. package/types/phaser/display/webgl/stencil_manager.d.ts +25 -0
  256. package/types/phaser/display/webgl/stencil_manager.d.ts.map +1 -1
  257. package/types/phaser/display/webgl/texture.d.ts +21 -0
  258. package/types/phaser/display/webgl/texture.d.ts.map +1 -1
  259. package/types/phaser/display/webgl/texture_util.d.ts.map +1 -1
  260. package/types/phaser/display/webgl/util.d.ts +0 -6
  261. package/types/phaser/display/webgl/util.d.ts.map +1 -1
  262. package/types/phaser/geom/circle.d.ts +131 -9
  263. package/types/phaser/geom/circle.d.ts.map +1 -1
  264. package/types/phaser/geom/ellipse.d.ts +43 -5
  265. package/types/phaser/geom/ellipse.d.ts.map +1 -1
  266. package/types/phaser/geom/line.d.ts +159 -13
  267. package/types/phaser/geom/line.d.ts.map +1 -1
  268. package/types/phaser/geom/matrix.d.ts +85 -11
  269. package/types/phaser/geom/matrix.d.ts.map +1 -1
  270. package/types/phaser/geom/point.d.ts +170 -18
  271. package/types/phaser/geom/point.d.ts.map +1 -1
  272. package/types/phaser/geom/polygon.d.ts +45 -5
  273. package/types/phaser/geom/polygon.d.ts.map +1 -1
  274. package/types/phaser/geom/rectangle.d.ts +253 -20
  275. package/types/phaser/geom/rectangle.d.ts.map +1 -1
  276. package/types/phaser/geom/rounded_rectangle.d.ts +11 -1
  277. package/types/phaser/geom/rounded_rectangle.d.ts.map +1 -1
  278. package/types/phaser/geom/util/circle.d.ts +3 -3
  279. package/types/phaser/geom/util/circle.d.ts.map +1 -1
  280. package/types/phaser/geom/util/ellipse.d.ts +0 -6
  281. package/types/phaser/geom/util/ellipse.d.ts.map +1 -1
  282. package/types/phaser/geom/util/line.d.ts +5 -5
  283. package/types/phaser/geom/util/line.d.ts.map +1 -1
  284. package/types/phaser/geom/util/matrix.d.ts.map +1 -1
  285. package/types/phaser/geom/util/point.d.ts.map +1 -1
  286. package/types/phaser/geom/util/polygon.d.ts.map +1 -1
  287. package/types/phaser/geom/util/rectangle.d.ts.map +1 -1
  288. package/types/phaser/geom/util/rounded_rectangle.d.ts.map +1 -1
  289. package/types/phaser/util/math.d.ts +0 -5
  290. package/types/phaser/util/math.d.ts.map +1 -1
@@ -1,15 +1,9 @@
1
- /**
2
- * @module display/text
3
- * @copyright Copyright (c) 2018-present Richard Davey, Photon Storm Ltd., Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)
4
- * @author Andras Csizmadia <andras@vpmedia.hu>
5
- * @author Richard Davey <rich@photonstorm.com>
6
- */
7
1
  import { Point } from '../geom/point';
8
- import { Rectangle } from '../geom/rectangle';
2
+ import { Rectangle } from '../geom/rectangle';
9
3
  import { Image } from './image';
10
4
  import { create, remove } from './canvas/pool';
11
5
  import { textureFromCanvas } from './webgl/texture_util';
12
- import { Game } from '../core/game';
6
+ import { Game } from '../core/game';
13
7
  import { TEXT } from '../core/const';
14
8
  import { snapToCeil } from '../util/math';
15
9
  import { renderCanvas, renderWebGL, getBounds } from './sprite_util';
@@ -52,6 +46,9 @@ export class Text extends Image {
52
46
  }
53
47
  }
54
48
 
49
+ /**
50
+ * TBD.
51
+ */
55
52
  destroy() {
56
53
  this.texture.destroy(true);
57
54
  remove(this);
@@ -69,14 +66,16 @@ export class Text extends Image {
69
66
  super.destroy();
70
67
  }
71
68
 
72
- setShadow(
73
- x = 0,
74
- y = 0,
75
- color = 'rgba(0, 0, 0, 1)',
76
- blur = 0,
77
- shadowStroke = true,
78
- shadowFill = true
79
- ) {
69
+ /**
70
+ * TBD.
71
+ * @param {number} x - TBD.
72
+ * @param {number} y - TBD.
73
+ * @param color - TBD.
74
+ * @param blur
75
+ * @param shadowStroke
76
+ * @param shadowFill
77
+ */
78
+ setShadow(x = 0, y = 0, color = 'rgba(0, 0, 0, 1)', blur = 0, shadowStroke = true, shadowFill = true) {
80
79
  this.style.shadowOffsetX = x;
81
80
  this.style.shadowOffsetY = y;
82
81
  this.style.shadowColor = color;
@@ -87,6 +86,11 @@ export class Text extends Image {
87
86
  return this;
88
87
  }
89
88
 
89
+ /**
90
+ * TBD.
91
+ * @param style
92
+ * @param update
93
+ */
90
94
  setStyle(style = null, update = false) {
91
95
  style = JSON.parse(JSON.stringify(style)) || {};
92
96
  style.font = style.font || 'bold 20pt Arial';
@@ -131,6 +135,9 @@ export class Text extends Image {
131
135
  return this;
132
136
  }
133
137
 
138
+ /**
139
+ * TBD.
140
+ */
134
141
  updateText() {
135
142
  this.texture.baseTexture.resolution = this._res;
136
143
  this.context.font = this.style.font;
@@ -288,6 +295,13 @@ export class Text extends Image {
288
295
  this.dirty = false;
289
296
  }
290
297
 
298
+ /**
299
+ * TBD.
300
+ * @param line
301
+ * @param {number} x - TBD.
302
+ * @param {number} y - TBD.
303
+ * @param fill
304
+ */
291
305
  renderTabLine(line, x, y, fill) {
292
306
  const text = line.split(/(?:\t)/);
293
307
  const tabs = this.style.tabs;
@@ -320,6 +334,10 @@ export class Text extends Image {
320
334
  }
321
335
  }
322
336
 
337
+ /**
338
+ * TBD.
339
+ * @param state
340
+ */
323
341
  updateShadow(state) {
324
342
  if (state) {
325
343
  this.context.shadowOffsetX = this.style.shadowOffsetX;
@@ -334,6 +352,10 @@ export class Text extends Image {
334
352
  }
335
353
  }
336
354
 
355
+ /**
356
+ * TBD.
357
+ * @param line
358
+ */
337
359
  measureLine(line) {
338
360
  let lineLength = 0;
339
361
  for (let i = 0; i < line.length; i += 1) {
@@ -366,6 +388,12 @@ export class Text extends Image {
366
388
  return Math.ceil(lineLength);
367
389
  }
368
390
 
391
+ /**
392
+ * TBD.
393
+ * @param line
394
+ * @param {number} x - TBD.
395
+ * @param {number} y - TBD.
396
+ */
369
397
  updateLine(line, x, y) {
370
398
  for (let i = 0; i < line.length; i += 1) {
371
399
  const letter = line[i];
@@ -398,6 +426,9 @@ export class Text extends Image {
398
426
  }
399
427
  }
400
428
 
429
+ /**
430
+ * TBD.
431
+ */
401
432
  clearColors() {
402
433
  this.colors = [];
403
434
  this.strokeColors = [];
@@ -405,6 +436,9 @@ export class Text extends Image {
405
436
  return this;
406
437
  }
407
438
 
439
+ /**
440
+ * TBD.
441
+ */
408
442
  clearFontValues() {
409
443
  this.fontStyles = [];
410
444
  this.fontWeights = [];
@@ -412,30 +446,54 @@ export class Text extends Image {
412
446
  return this;
413
447
  }
414
448
 
449
+ /**
450
+ * TBD.
451
+ * @param color - TBD.
452
+ * @param position - TBD.
453
+ */
415
454
  addColor(color, position) {
416
455
  this.colors[position] = color;
417
456
  this.dirty = true;
418
457
  return this;
419
458
  }
420
459
 
460
+ /**
461
+ * TBD.
462
+ * @param color - TBD.
463
+ * @param position - TBD.
464
+ */
421
465
  addStrokeColor(color, position) {
422
466
  this.strokeColors[position] = color;
423
467
  this.dirty = true;
424
468
  return this;
425
469
  }
426
470
 
471
+ /**
472
+ * TBD.
473
+ * @param style
474
+ * @param position - TBD.
475
+ */
427
476
  addFontStyle(style, position) {
428
477
  this.fontStyles[position] = style;
429
478
  this.dirty = true;
430
479
  return this;
431
480
  }
432
481
 
482
+ /**
483
+ * TBD.
484
+ * @param weight
485
+ * @param position - TBD.
486
+ */
433
487
  addFontWeight(weight, position) {
434
488
  this.fontWeights[position] = weight;
435
489
  this.dirty = true;
436
490
  return this;
437
491
  }
438
492
 
493
+ /**
494
+ * TBD.
495
+ * @param text - TBD.
496
+ */
439
497
  precalculateWordWrap(text) {
440
498
  this.texture.baseTexture.resolution = this._res;
441
499
  this.context.font = this.style.font;
@@ -443,6 +501,10 @@ export class Text extends Image {
443
501
  return wrappedLines.split(/(?:\r\n|\r|\n)/);
444
502
  }
445
503
 
504
+ /**
505
+ * TBD.
506
+ * @param text - TBD.
507
+ */
446
508
  runWordWrap(text) {
447
509
  if (this.useAdvancedWrap) {
448
510
  return this.advancedWordWrap(text);
@@ -450,6 +512,10 @@ export class Text extends Image {
450
512
  return this.basicWordWrap(text);
451
513
  }
452
514
 
515
+ /**
516
+ * TBD.
517
+ * @param text - TBD.
518
+ */
453
519
  advancedWordWrap(text) {
454
520
  const context = this.context;
455
521
  const wordWrapWidth = this.style.wordWrapWidth;
@@ -492,9 +558,7 @@ export class Text extends Image {
492
558
  // if wordWrapWidth is too small for even a single
493
559
  // letter, shame user failure with a fatal error
494
560
  if (!newWord.length) {
495
- throw new Error(
496
- "This text's wordWrapWidth setting is less than a single character!"
497
- );
561
+ throw new Error("This text's wordWrapWidth setting is less than a single character!");
498
562
  }
499
563
  // replace current word in array with remainder
500
564
  const secondPart = word.substr(newWord.length);
@@ -529,6 +593,10 @@ export class Text extends Image {
529
593
  return output;
530
594
  }
531
595
 
596
+ /**
597
+ * TBD.
598
+ * @param text - TBD.
599
+ */
532
600
  basicWordWrap(text) {
533
601
  let result = '';
534
602
  const lines = text.split('\n');
@@ -557,6 +625,10 @@ export class Text extends Image {
557
625
  return result;
558
626
  }
559
627
 
628
+ /**
629
+ * TBD.
630
+ * @param components
631
+ */
560
632
  updateFont(components) {
561
633
  const font = this.componentsToFont(components);
562
634
  if (this.style.font !== font) {
@@ -568,6 +640,10 @@ export class Text extends Image {
568
640
  }
569
641
  }
570
642
 
643
+ /**
644
+ * TBD.
645
+ * @param font - TBD.
646
+ */
571
647
  fontToComponents(font) {
572
648
  // The format is specified in http://www.w3.org/TR/CSS2/fonts.html#font-shorthand:
573
649
  // style - normal | italic | oblique | inherit
@@ -583,10 +659,7 @@ export class Text extends Image {
583
659
  if (m) {
584
660
  let family = m[5].trim();
585
661
  // If it looks like the value should be quoted, but isn't, then quote it.
586
- if (
587
- !/^(?:inherit|serif|sans-serif|cursive|fantasy|monospace)$/.exec(family) &&
588
- !/['",]/.exec(family)
589
- ) {
662
+ if (!/^(?:inherit|serif|sans-serif|cursive|fantasy|monospace)$/.exec(family) && !/['",]/.exec(family)) {
590
663
  family = "'" + family + "'";
591
664
  }
592
665
  return {
@@ -602,6 +675,10 @@ export class Text extends Image {
602
675
  return { font };
603
676
  }
604
677
 
678
+ /**
679
+ * TBD.
680
+ * @param components
681
+ */
605
682
  componentsToFont(components) {
606
683
  const parts = [];
607
684
  let v;
@@ -632,6 +709,11 @@ export class Text extends Image {
632
709
  return parts.join(' ');
633
710
  }
634
711
 
712
+ /**
713
+ * TBD.
714
+ * @param text - TBD.
715
+ * @param immediate
716
+ */
635
717
  setText(text, immediate = false) {
636
718
  this.text = text.toString() || '';
637
719
  if (immediate) {
@@ -642,6 +724,10 @@ export class Text extends Image {
642
724
  return this;
643
725
  }
644
726
 
727
+ /**
728
+ * TBD.
729
+ * @param list
730
+ */
645
731
  parseList(list) {
646
732
  if (!Array.isArray(list)) {
647
733
  return this;
@@ -665,6 +751,13 @@ export class Text extends Image {
665
751
  return this;
666
752
  }
667
753
 
754
+ /**
755
+ * TBD.
756
+ * @param {number} x - TBD.
757
+ * @param {number} y - TBD.
758
+ * @param {number} width - TBD.
759
+ * @param {number} height - TBD.
760
+ */
668
761
  setTextBounds(x, y, width, height) {
669
762
  if (x === undefined) {
670
763
  this.textBounds = null;
@@ -682,6 +775,9 @@ export class Text extends Image {
682
775
  return this;
683
776
  }
684
777
 
778
+ /**
779
+ * TBD.
780
+ */
685
781
  updateTexture() {
686
782
  const base = this.texture.baseTexture;
687
783
  const crop = this.texture.crop;
@@ -721,6 +817,10 @@ export class Text extends Image {
721
817
  this.texture.baseTexture.dirty();
722
818
  }
723
819
 
820
+ /**
821
+ * TBD.
822
+ * @param renderSession - TBD.
823
+ */
724
824
  renderWebGL(renderSession) {
725
825
  if (this.dirty) {
726
826
  this.updateText();
@@ -729,6 +829,10 @@ export class Text extends Image {
729
829
  renderWebGL(this, renderSession);
730
830
  }
731
831
 
832
+ /**
833
+ * TBD.
834
+ * @param renderSession - TBD.
835
+ */
732
836
  renderCanvas(renderSession) {
733
837
  if (this.dirty) {
734
838
  this.updateText();
@@ -737,6 +841,9 @@ export class Text extends Image {
737
841
  renderCanvas(this, renderSession);
738
842
  }
739
843
 
844
+ /**
845
+ * TBD.
846
+ */
740
847
  getFontPropertiesCache() {
741
848
  if (!window.PhaserRegistry.fontPropertiesCache) {
742
849
  window.PhaserRegistry.fontPropertiesCache = {};
@@ -744,6 +851,9 @@ export class Text extends Image {
744
851
  return window.PhaserRegistry.fontPropertiesCache;
745
852
  }
746
853
 
854
+ /**
855
+ * TBD.
856
+ */
747
857
  getFontPropertiesCanvas() {
748
858
  if (!window.PhaserRegistry.fontPropertiesCanvas) {
749
859
  window.PhaserRegistry.fontPropertiesCanvas = document.createElement('canvas');
@@ -751,16 +861,22 @@ export class Text extends Image {
751
861
  return window.PhaserRegistry.fontPropertiesCanvas;
752
862
  }
753
863
 
864
+ /**
865
+ * TBD.
866
+ */
754
867
  getFontPropertiesContext() {
755
868
  if (!window.PhaserRegistry.fontPropertiesContext) {
756
- window.PhaserRegistry.fontPropertiesContext = this.getFontPropertiesCanvas().getContext(
757
- '2d',
758
- { willReadFrequently: true }
759
- );
869
+ window.PhaserRegistry.fontPropertiesContext = this.getFontPropertiesCanvas().getContext('2d', {
870
+ willReadFrequently: true,
871
+ });
760
872
  }
761
873
  return window.PhaserRegistry.fontPropertiesContext;
762
874
  }
763
875
 
876
+ /**
877
+ * TBD.
878
+ * @param fontStyle
879
+ */
764
880
  determineFontProperties(fontStyle) {
765
881
  const fontPropertiesCache = this.getFontPropertiesCache();
766
882
  let properties = fontPropertiesCache[fontStyle];
@@ -835,6 +951,11 @@ export class Text extends Image {
835
951
  return properties;
836
952
  }
837
953
 
954
+ /**
955
+ * TBD.
956
+ * @param matrix - TBD.
957
+ * @returns {Rectangle} TBD.
958
+ */
838
959
  getBounds(matrix = null) {
839
960
  if (this.dirty) {
840
961
  this.updateText();
@@ -843,10 +964,17 @@ export class Text extends Image {
843
964
  return getBounds(this, matrix);
844
965
  }
845
966
 
967
+ /**
968
+ * TBD.
969
+ * @returns {string} TBD.
970
+ */
846
971
  get text() {
847
972
  return this._text;
848
973
  }
849
974
 
975
+ /**
976
+ * TBD.
977
+ */
850
978
  set text(value) {
851
979
  if (value !== this._text) {
852
980
  this._text = value.toString() || '';
@@ -857,27 +985,38 @@ export class Text extends Image {
857
985
  }
858
986
  }
859
987
 
988
+ /**
989
+ * TBD.
990
+ * @returns {string} TBD.
991
+ */
860
992
  get cssFont() {
861
993
  return this.componentsToFont(this._fontComponents);
862
994
  }
863
995
 
996
+ /**
997
+ * TBD.
998
+ */
864
999
  set cssFont(value) {
865
1000
  this._fontComponents = this.fontToComponents(value || 'bold 20pt Arial');
866
1001
  this.updateFont(this._fontComponents);
867
1002
  }
868
1003
 
1004
+ /**
1005
+ * TBD.
1006
+ * @returns {number} TBD.
1007
+ */
869
1008
  get font() {
870
1009
  return this._fontComponents.fontFamily;
871
1010
  }
872
1011
 
1012
+ /**
1013
+ * TBD.
1014
+ */
873
1015
  set font(value) {
874
1016
  let mutatedValue = value || 'Arial';
875
1017
  mutatedValue = mutatedValue.trim();
876
1018
  // If it looks like the value should be quoted, but isn't, then quote it.
877
- if (
878
- !/^(?:inherit|serif|sans-serif|cursive|fantasy|monospace)$/.exec(mutatedValue) &&
879
- !/['",]/.exec(mutatedValue)
880
- ) {
1019
+ if (!/^(?:inherit|serif|sans-serif|cursive|fantasy|monospace)$/.exec(mutatedValue) && !/['",]/.exec(mutatedValue)) {
881
1020
  mutatedValue = "'" + mutatedValue + "'";
882
1021
  }
883
1022
 
@@ -885,6 +1024,10 @@ export class Text extends Image {
885
1024
  this.updateFont(this._fontComponents);
886
1025
  }
887
1026
 
1027
+ /**
1028
+ * TBD.
1029
+ * @returns {number} TBD.
1030
+ */
888
1031
  get fontSize() {
889
1032
  const size = this._fontComponents.fontSize;
890
1033
  if (size && /(?:^0$|px$)/.exec(size)) {
@@ -893,6 +1036,9 @@ export class Text extends Image {
893
1036
  return size;
894
1037
  }
895
1038
 
1039
+ /**
1040
+ * TBD.
1041
+ */
896
1042
  set fontSize(value) {
897
1043
  let mutatedValue = value || '0';
898
1044
  if (typeof mutatedValue === 'number') {
@@ -902,37 +1048,65 @@ export class Text extends Image {
902
1048
  this.updateFont(this._fontComponents);
903
1049
  }
904
1050
 
1051
+ /**
1052
+ * TBD.
1053
+ * @returns {string} TBD.
1054
+ */
905
1055
  get fontWeight() {
906
1056
  return this._fontComponents.fontWeight || 'normal';
907
1057
  }
908
1058
 
1059
+ /**
1060
+ * TBD.
1061
+ */
909
1062
  set fontWeight(value) {
910
1063
  this._fontComponents.fontWeight = value || 'normal';
911
1064
  this.updateFont(this._fontComponents);
912
1065
  }
913
1066
 
1067
+ /**
1068
+ * TBD.
1069
+ * @returns {string} TBD.
1070
+ */
914
1071
  get fontStyle() {
915
1072
  return this._fontComponents.fontStyle || 'normal';
916
1073
  }
917
1074
 
1075
+ /**
1076
+ * TBD.
1077
+ */
918
1078
  set fontStyle(value) {
919
1079
  this._fontComponents.fontStyle = value || 'normal';
920
1080
  this.updateFont(this._fontComponents);
921
1081
  }
922
1082
 
1083
+ /**
1084
+ * TBD.
1085
+ * @returns {string} TBD.
1086
+ */
923
1087
  get fontVariant() {
924
1088
  return this._fontComponents.fontVariant || 'normal';
925
1089
  }
926
1090
 
1091
+ /**
1092
+ * TBD.
1093
+ */
927
1094
  set fontVariant(value) {
928
1095
  this._fontComponents.fontVariant = value || 'normal';
929
1096
  this.updateFont(this._fontComponents);
930
1097
  }
931
1098
 
1099
+ /**
1100
+ * TBD.
1101
+ * @returns {number} TBD.
1102
+ */
932
1103
  get fill() {
933
1104
  return this.style.fill;
934
1105
  }
935
1106
 
1107
+ /**
1108
+ * TBD.
1109
+ */
936
1110
  set fill(value) {
937
1111
  if (value !== this.style.fill) {
938
1112
  this.style.fill = value;
@@ -940,10 +1114,17 @@ export class Text extends Image {
940
1114
  }
941
1115
  }
942
1116
 
1117
+ /**
1118
+ * TBD.
1119
+ * @returns {string} TBD.
1120
+ */
943
1121
  get align() {
944
1122
  return this.style.align;
945
1123
  }
946
1124
 
1125
+ /**
1126
+ * TBD.
1127
+ */
947
1128
  set align(value) {
948
1129
  if (value !== this.style.align) {
949
1130
  this.style.align = value;
@@ -951,10 +1132,17 @@ export class Text extends Image {
951
1132
  }
952
1133
  }
953
1134
 
1135
+ /**
1136
+ * TBD.
1137
+ * @returns {number} TBD.
1138
+ */
954
1139
  get resolution() {
955
1140
  return this._res;
956
1141
  }
957
1142
 
1143
+ /**
1144
+ * TBD.
1145
+ */
958
1146
  set resolution(value) {
959
1147
  if (value !== this._res) {
960
1148
  this._res = value;
@@ -962,10 +1150,17 @@ export class Text extends Image {
962
1150
  }
963
1151
  }
964
1152
 
1153
+ /**
1154
+ * TBD.
1155
+ * @returns {number} TBD.
1156
+ */
965
1157
  get tabs() {
966
1158
  return this.style.tabs;
967
1159
  }
968
1160
 
1161
+ /**
1162
+ * TBD.
1163
+ */
969
1164
  set tabs(value) {
970
1165
  if (value !== this.style.tabs) {
971
1166
  this.style.tabs = value;
@@ -973,10 +1168,17 @@ export class Text extends Image {
973
1168
  }
974
1169
  }
975
1170
 
1171
+ /**
1172
+ * TBD.
1173
+ * @returns {number} TBD.
1174
+ */
976
1175
  get boundsAlignH() {
977
1176
  return this.style.boundsAlignH;
978
1177
  }
979
1178
 
1179
+ /**
1180
+ * TBD.
1181
+ */
980
1182
  set boundsAlignH(value) {
981
1183
  if (value !== this.style.boundsAlignH) {
982
1184
  this.style.boundsAlignH = value;
@@ -984,10 +1186,17 @@ export class Text extends Image {
984
1186
  }
985
1187
  }
986
1188
 
1189
+ /**
1190
+ * TBD.
1191
+ * @returns {number} TBD.
1192
+ */
987
1193
  get boundsAlignV() {
988
1194
  return this.style.boundsAlignV;
989
1195
  }
990
1196
 
1197
+ /**
1198
+ * TBD.
1199
+ */
991
1200
  set boundsAlignV(value) {
992
1201
  if (value !== this.style.boundsAlignV) {
993
1202
  this.style.boundsAlignV = value;
@@ -995,10 +1204,17 @@ export class Text extends Image {
995
1204
  }
996
1205
  }
997
1206
 
1207
+ /**
1208
+ * TBD.
1209
+ * @returns {number} TBD.
1210
+ */
998
1211
  get stroke() {
999
1212
  return this.style.stroke;
1000
1213
  }
1001
1214
 
1215
+ /**
1216
+ * TBD.
1217
+ */
1002
1218
  set stroke(value) {
1003
1219
  if (value !== this.style.stroke) {
1004
1220
  this.style.stroke = value;
@@ -1006,10 +1222,17 @@ export class Text extends Image {
1006
1222
  }
1007
1223
  }
1008
1224
 
1225
+ /**
1226
+ * TBD.
1227
+ * @returns {number} TBD.
1228
+ */
1009
1229
  get strokeThickness() {
1010
1230
  return this.style.strokeThickness;
1011
1231
  }
1012
1232
 
1233
+ /**
1234
+ * TBD.
1235
+ */
1013
1236
  set strokeThickness(value) {
1014
1237
  if (value !== this.style.strokeThickness) {
1015
1238
  this.style.strokeThickness = value;
@@ -1017,10 +1240,17 @@ export class Text extends Image {
1017
1240
  }
1018
1241
  }
1019
1242
 
1243
+ /**
1244
+ * TBD.
1245
+ * @returns {number} TBD.
1246
+ */
1020
1247
  get wordWrap() {
1021
1248
  return this.style.wordWrap;
1022
1249
  }
1023
1250
 
1251
+ /**
1252
+ * TBD.
1253
+ */
1024
1254
  set wordWrap(value) {
1025
1255
  if (value !== this.style.wordWrap) {
1026
1256
  this.style.wordWrap = value;
@@ -1028,10 +1258,17 @@ export class Text extends Image {
1028
1258
  }
1029
1259
  }
1030
1260
 
1261
+ /**
1262
+ * TBD.
1263
+ * @returns {number} TBD.
1264
+ */
1031
1265
  get wordWrapWidth() {
1032
1266
  return this.style.wordWrapWidth;
1033
1267
  }
1034
1268
 
1269
+ /**
1270
+ * TBD.
1271
+ */
1035
1272
  set wordWrapWidth(value) {
1036
1273
  if (value !== this.style.wordWrapWidth) {
1037
1274
  this.style.wordWrapWidth = value;
@@ -1039,10 +1276,17 @@ export class Text extends Image {
1039
1276
  }
1040
1277
  }
1041
1278
 
1279
+ /**
1280
+ * TBD.
1281
+ * @returns {number} TBD.
1282
+ */
1042
1283
  get lineSpacing() {
1043
1284
  return this._lineSpacing;
1044
1285
  }
1045
1286
 
1287
+ /**
1288
+ * TBD.
1289
+ */
1046
1290
  set lineSpacing(value) {
1047
1291
  if (value !== this._lineSpacing) {
1048
1292
  this._lineSpacing = parseFloat(value);
@@ -1053,10 +1297,17 @@ export class Text extends Image {
1053
1297
  }
1054
1298
  }
1055
1299
 
1300
+ /**
1301
+ * TBD.
1302
+ * @returns {number} TBD.
1303
+ */
1056
1304
  get shadowOffsetX() {
1057
1305
  return this.style.shadowOffsetX;
1058
1306
  }
1059
1307
 
1308
+ /**
1309
+ * TBD.
1310
+ */
1060
1311
  set shadowOffsetX(value) {
1061
1312
  if (value !== this.style.shadowOffsetX) {
1062
1313
  this.style.shadowOffsetX = value;
@@ -1064,10 +1315,17 @@ export class Text extends Image {
1064
1315
  }
1065
1316
  }
1066
1317
 
1318
+ /**
1319
+ * TBD.
1320
+ * @returns {number} TBD.
1321
+ */
1067
1322
  get shadowOffsetY() {
1068
1323
  return this.style.shadowOffsetY;
1069
1324
  }
1070
1325
 
1326
+ /**
1327
+ * TBD.
1328
+ */
1071
1329
  set shadowOffsetY(value) {
1072
1330
  if (value !== this.style.shadowOffsetY) {
1073
1331
  this.style.shadowOffsetY = value;
@@ -1075,10 +1333,17 @@ export class Text extends Image {
1075
1333
  }
1076
1334
  }
1077
1335
 
1336
+ /**
1337
+ * TBD.
1338
+ * @returns {number} TBD.
1339
+ */
1078
1340
  get shadowColor() {
1079
1341
  return this.style.shadowColor;
1080
1342
  }
1081
1343
 
1344
+ /**
1345
+ * TBD.
1346
+ */
1082
1347
  set shadowColor(value) {
1083
1348
  if (value !== this.style.shadowColor) {
1084
1349
  this.style.shadowColor = value;
@@ -1086,10 +1351,17 @@ export class Text extends Image {
1086
1351
  }
1087
1352
  }
1088
1353
 
1354
+ /**
1355
+ * TBD.
1356
+ * @returns {number} TBD.
1357
+ */
1089
1358
  get shadowBlur() {
1090
1359
  return this.style.shadowBlur;
1091
1360
  }
1092
1361
 
1362
+ /**
1363
+ * TBD.
1364
+ */
1093
1365
  set shadowBlur(value) {
1094
1366
  if (value !== this.style.shadowBlur) {
1095
1367
  this.style.shadowBlur = value;
@@ -1097,10 +1369,17 @@ export class Text extends Image {
1097
1369
  }
1098
1370
  }
1099
1371
 
1372
+ /**
1373
+ * TBD.
1374
+ * @returns {number} TBD.
1375
+ */
1100
1376
  get shadowStroke() {
1101
1377
  return this.style.shadowStroke;
1102
1378
  }
1103
1379
 
1380
+ /**
1381
+ * TBD.
1382
+ */
1104
1383
  set shadowStroke(value) {
1105
1384
  if (value !== this.style.shadowStroke) {
1106
1385
  this.style.shadowStroke = value;
@@ -1108,10 +1387,17 @@ export class Text extends Image {
1108
1387
  }
1109
1388
  }
1110
1389
 
1390
+ /**
1391
+ * TBD.
1392
+ * @returns {number} TBD.
1393
+ */
1111
1394
  get shadowFill() {
1112
1395
  return this.style.shadowFill;
1113
1396
  }
1114
1397
 
1398
+ /**
1399
+ * TBD.
1400
+ */
1115
1401
  set shadowFill(value) {
1116
1402
  if (value !== this.style.shadowFill) {
1117
1403
  this.style.shadowFill = value;
@@ -1119,6 +1405,10 @@ export class Text extends Image {
1119
1405
  }
1120
1406
  }
1121
1407
 
1408
+ /**
1409
+ * TBD.
1410
+ * @returns {number} TBD.
1411
+ */
1122
1412
  get width() {
1123
1413
  if (this.dirty) {
1124
1414
  this.updateText();
@@ -1127,11 +1417,18 @@ export class Text extends Image {
1127
1417
  return this.scale.x * this.texture.frame.width;
1128
1418
  }
1129
1419
 
1420
+ /**
1421
+ * TBD.
1422
+ */
1130
1423
  set width(value) {
1131
1424
  this.scale.x = value / this.texture.frame.width;
1132
1425
  this._width = value;
1133
1426
  }
1134
1427
 
1428
+ /**
1429
+ * TBD.
1430
+ * @returns {number} TBD.
1431
+ */
1135
1432
  get height() {
1136
1433
  if (this.dirty) {
1137
1434
  this.updateText();
@@ -1140,6 +1437,9 @@ export class Text extends Image {
1140
1437
  return this.scale.y * this.texture.frame.height;
1141
1438
  }
1142
1439
 
1440
+ /**
1441
+ * TBD.
1442
+ */
1143
1443
  set height(value) {
1144
1444
  this.scale.y = value / this.texture.frame.height;
1145
1445
  this._height = value;