-
Notifications
You must be signed in to change notification settings - Fork 727
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade game rendering to use Pixi.js 5.3.0, allowing games to run wi…
…th WebGL 2 (#1824) * This brings various upgrades and performance improvement to the internal rendering engine used by games, both in the editor and in exported games. * This also paves the way for adding new objects like Bitmap Text, Mesh or dynamic lights in the future. * Huge thanks to @Quarkstar for working on this task and making most of the necessary upgrades . * Thanks @Bouh for helping fixing/upgrading the Shape Painter object and @Silver-Streak as well as testers from the forum Don't show the rest in changelog: * Add a test game with all effects that can be used, to quickly verify they are working. Co-authored-by: Quarkstar <quarkstar9@gmail.com> Co-authored-by: Aurélien Vivet <bouh.vivez@gmail.com>
- Loading branch information
1 parent
66ce941
commit 661d329
Showing
367 changed files
with
6,974 additions
and
1,187 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,67 @@ | ||
This extension is using release version 0.8.0 (commit 336bed0b206043e2c3e81c373b7ca02094ecabe7) of the pixi-multistyle-text library: | ||
https://github.com/tleunen/pixi-multistyle-text | ||
# pixi-multistyle-text | ||
|
||
The BBcode tag feature was especially added for Gdevelop and this extension (commit 2a7be2084598933502c76419d7a86c0e6cd11719) | ||
[![NPM](https://nodei.co/npm/pixi-multistyle-text.png)](https://nodei.co/npm/pixi-multistyle-text/) | ||
|
||
README: | ||
Add a MultiStyleText object inside pixi.js to easily create text using different styles. | ||
Add a `MultiStyleText` object inside [pixi.js](https://github.com/GoodBoyDigital/pixi.js) to easily create text using different styles. | ||
|
||
License: MIT | ||
## Example | ||
|
||
In the example below, we are defining 4 text styles. | ||
`default` is the default style for the text, and the others matches the tags inside the text. | ||
|
||
```js | ||
let text = new MultiStyleText("Let's make some <ml>multiline</ml>\nand <ms>multistyle</ms> text for\n<pixi>Pixi.js!</pixi>", | ||
{ | ||
"default": { | ||
fontFamily: "Arial", | ||
fontSize: "24px", | ||
fill: "#cccccc", | ||
align: "center" | ||
}, | ||
"ml": { | ||
fontStyle: "italic", | ||
fill: "#ff8888" | ||
}, | ||
"ms": { | ||
fontStyle: "italic", | ||
fill: "#4488ff" | ||
}, | ||
"pixi": { | ||
fontSize: "64px", | ||
fill: "#efefef" | ||
} | ||
}); | ||
``` | ||
## Build instructions | ||
|
||
``` | ||
$ yarn install | ||
$ yarn build | ||
``` | ||
|
||
## Usage | ||
|
||
### `text = new MultiStyleText(text, textStyles)` | ||
|
||
Creates a new `MultiStyleText` with the given text and styles. | ||
|
||
#### `textStyles` | ||
Type: `{ [key: string]: ExtendedTextStyle }` | ||
|
||
Each key of this dictionary should match with a tag in the text. Use the key `default` for the default style. | ||
|
||
Each `ExtendedTextStyle` object can have [any of the properties of a standard PIXI text style](http://pixijs.download/release/docs/PIXI.TextStyle.html), in addition to a `valign` property that allows you to specify where text is rendered relative to larger text on the same line (`"top"`, `"middle"`, or `"bottom"`). | ||
|
||
The `align`, `wordWrap`, `wordWrapWidth`, and `breakWord` properties are ignored on all styles _except for the `default` style_, which controls those properties for the entire text object. | ||
|
||
If text is rendered without any value assigned to a given parameter, Pixi's defaults are used. | ||
|
||
## Demo | ||
``` | ||
$ yarn demo | ||
``` | ||
|
||
|
||
## License | ||
|
||
MIT, see [LICENSE.md](http://github.com/tleunen/pixi-multistyle-text/blob/master/LICENSE.md) for details. |
2 changes: 1 addition & 1 deletion
2
Extensions/BBText/pixi-multistyle-text/dist/pixi-multistyle-text.umd.js
Large diffs are not rendered by default.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
Extensions/BBText/pixi-multistyle-text/dist/pixi-multistyle-text.umd.js.map
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.