Commit graph

14802 commits

Author SHA1 Message Date
Richard Davey
797aa6a234 Update CHANGELOG.md 2020-07-31 16:54:32 +01:00
Richard Davey
c0109c1ec9 BatchChar is a new internal private function for batching a single character of a Bitmap Text to the pipeline. 2020-07-31 16:54:29 +01:00
Richard Davey
883670f8e0 Update CHANGELOG.md 2020-07-31 16:41:14 +01:00
Richard Davey
2e378b68d1 Apply the dropShadow 2020-07-31 16:39:21 +01:00
Richard Davey
c228dd596a BitmapText.setDropShadow is a new method that allows you to apply a drop shadow effect to a Bitmap Text object. You can set the horizontal and vertical offset of the shadow, as well as the color and alpha levels. Call this method with no parameters to clear a shadow. 2020-07-31 16:39:05 +01:00
Richard Davey
aac2276692 BitmapText.preDestroy is a new method that will tidy-up all of the BitmapText data during object destruction. 2020-07-31 16:22:53 +01:00
Richard Davey
64214dbb4f Update CHANGELOG.md 2020-07-31 16:17:40 +01:00
Richard Davey
7ce39b991c Removed un-used properties 2020-07-31 16:17:36 +01:00
Richard Davey
9419606f12 BitmapText.setCharacterTint is a new method that allows you to set a tint color (either additive, or fill) on a specific range of characters within a static Bitmap Text. You can specify the start and length offsets and a per-corner tint color. 2020-07-31 16:17:23 +01:00
Richard Davey
fc6e7ef759 Removed un-used properties 2020-07-31 15:46:05 +01:00
Richard Davey
2ef28cd0e4 Added getXRound and getYRound 2020-07-31 15:45:55 +01:00
Richard Davey
83bd4d7077 Bump node version 2020-07-31 13:49:06 +01:00
Richard Davey
4baa0522b9 Bumping to 3.50 2020-07-31 13:41:29 +01:00
Richard Davey
25e6868d2d Update CHANGELOG.md 2020-07-31 13:40:02 +01:00
Richard Davey
d16d8dc9ce BitmapTextWebGLRenderer has been rewritten from scratch to make use of the new pre-cached WebGL uv texture and character location data generated by GetBitmapTextSize. This has reduced the number of calculations made in the function dramatically, as it no longer has work out glyph advancing or offsets during render, but only when the text content updates. 2020-07-31 13:39:49 +01:00
Richard Davey
49682e744d Update BitmapText.js 2020-07-31 13:34:50 +01:00
Richard Davey
72654e04d3 Fixed bounds sizes 2020-07-31 13:34:28 +01:00
Richard Davey
c166976fcc Update BitmapTextCharacter.js 2020-07-31 12:06:57 +01:00
Richard Davey
a4577e2135 The GetBitmapTextSize function has a new boolean parameter updateOrigin, which will adjust the origin of the parent BitmapText if set, based on the new bounds calculations. 2020-07-31 12:06:45 +01:00
Richard Davey
a682b83b7c BitmapText.getCharacterAt is a new method that will return the character data from the BitmapText at the given x and y corodinates. The character data includes the code, position, dimensions and glyph information. 2020-07-31 11:36:48 +01:00
Richard Davey
a72fdd44f8 Bumping to 3.50 2020-07-31 11:32:47 +01:00
Richard Davey
e195aac919 ParseXMLBitmapFont will now calculate the WebGL uv data for the glyphs during parsing. This avoids it having to be done during rendering, saving CPU cycles on an operation that never changes. 2020-07-31 11:32:37 +01:00
Richard Davey
0385d108a8 Transform.getLocalPoint is a new method, available on all Game Objects, that takes an x / y pair and translates them into the local space of the Game Object, factoring in parent transforms and display origins. 2020-07-31 10:28:09 +01:00
Richard Davey
214b383fcd Use correct scale and added start of getCharacterAt method 2020-07-30 23:59:06 +01:00
Richard Davey
1ae6287e43 Update .editorconfig 2020-07-30 22:40:08 +01:00
Richard Davey
cbaed39204 Update CHANGELOG.md 2020-07-30 22:38:17 +01:00
Richard Davey
a39bcfe69a Always return chars 2020-07-30 22:38:06 +01:00
Richard Davey
a678f723c6 Always calculate includeChars 2020-07-30 22:37:34 +01:00
Richard Davey
1579069c50 Pixel accurate character data 2020-07-30 18:24:04 +01:00
Richard Davey
eef67b6c11 Update BitmapTextWebGLRenderer.js 2020-07-30 18:23:50 +01:00
Richard Davey
77feb773fd Fixed descriptions 2020-07-30 18:23:45 +01:00
Richard Davey
625fb14354 Update .editorconfig 2020-07-30 18:23:37 +01:00
Richard Davey
bf4c475e85 Floor drawFillRect values 2020-07-30 18:10:23 +01:00
Richard Davey
b108cd03f0 Fix call to GetBitmapTextSize 2020-07-30 15:43:43 +01:00
Richard Davey
f5a863b6e5 Update CHANGELOG.md 2020-07-30 15:24:53 +01:00
Richard Davey
408a545aac BitmapTextWord, BitmapTextCharacter and BitmapTextLines are three new type defs that are now part of the BitmapTextSize config object, as returned by getTextBounds. This improves the TypeScript defs and JS Docs for this object. 2020-07-30 15:24:49 +01:00
Richard Davey
286be7df49 The GetBitmapTextSize and BitmapText.getTextBounds functions have a new boolean parameter includeChars. When set to true it will include a characters array in the returned bounds object that contains the scaled position coordinates of each character in the BitmapText, which you could use for tasks such as determining which character of the object was clicked. 2020-07-30 15:14:25 +01:00
Richard Davey
57fc54a42b Update CHANGELOG.md 2020-07-30 14:47:33 +01:00
Richard Davey
cc3d3f7da3 The GetBitmapTextSize function used Math.round on the values, if the round parameter was true, which didn't create integers. It now uses Math.ceil instead to give integer results. 2020-07-30 14:47:31 +01:00
Richard Davey
841389628e The BitmapText.getTextBounds method was being called every frame, even if the bounds didn't change, potentially costing a lot of CPU depending on the text length and quantity of them. It now only updates the bounds if they change. 2020-07-30 14:46:32 +01:00
Richard Davey
ffc180c14d Update CHANGELOG.md 2020-07-30 12:58:38 +01:00
Richard Davey
ce9c750175 Geom.Polygon.Translate is a new function that allows you to translate all the points of a polygon by the given values. 2020-07-30 12:58:35 +01:00
samme
f653a51cc0 Docs: generic return for add.existing() 2020-07-29 12:19:09 -07:00
Richard Davey
4c6458b500 Update CHANGELOG.md 2020-07-29 18:12:43 +01:00
Richard Davey
ee92d1dac9 Geom.Intersects.GetLineToPolygon is a new function that checks for the closest point of intersection between a line segment and an array of polygons. 2020-07-29 18:12:40 +01:00
Richard Davey
771509d6c2 Phaser.Types.Math.Vector4Like is a new data type representing as Vector 4 like object. 2020-07-29 17:42:12 +01:00
Richard Davey
23c00d148d Phaser.Types.Math.Vector3Like is a new data type representing as Vector 3 like object. 2020-07-29 17:41:59 +01:00
Richard Davey
acab9294f3 Update CHANGELOG.md 2020-07-29 17:16:00 +01:00
Richard Davey
517183fd2e Geom.Intersects.GetLineToLine is a new function that will return a Vector3 containing the point of intersection between 2 line segments, with the z property holding the distance value. 2020-07-29 17:15:57 +01:00
mk360
a7371b9a85 [types] allow Text#setPadding to receive an object 2020-07-24 18:48:17 +03:00