merge latest dev

This commit is contained in:
_Bastler 2021-05-28 15:53:27 +02:00
commit de02580ac8
6 changed files with 18 additions and 7 deletions

View File

@ -12,6 +12,11 @@
- The emote menu can be opened by clicking on your character.
- Clicking on one of its element will close the menu and play an emote above your character.
- This emote can be seen by other players.
- Player names were improved. (@Kharhamel)
- We now create a GameObject.Text instead of GameObject.BitmapText
- now use the 'Press Start 2P' font family and added an outline
- As a result, we can now allow non-standard letters like french accents or chinese characters!
- Mobile support has been improved
- WorkAdventure automatically sets the zoom level based on the viewport size to ensure a sensible size of the map is visible, whatever the viewport used
- Mouse wheel support to zoom in / out

View File

@ -1,3 +1,4 @@
/*This file is a workaround to allow phaser to load directly this font */
@font-face {
font-family: "Press Start 2P";
src: url("/fonts/press-start-2p-latin-400-normal.woff2") format('woff2');

View File

@ -291,7 +291,6 @@ export class GameScene extends DirtyScene implements CenterListener {
testString: 'abcdefg'
},
});
//this function must stay at the end of preload function
addLoader(this);
}

View File

@ -4,4 +4,4 @@
@import "cowebsite-mobile.scss";
@import "style.css";
@import "mobile-style.scss";
@import "fonts";
@import "fonts.scss";

View File

@ -19,8 +19,14 @@ describe("isUserNameValid()", () => {
it("should not validate spaces", () => {
expect(isUserNameValid(' ')).toBe(false);
});
it("should not validate special characters", () => {
expect(isUserNameValid('a&-')).toBe(false);
it("should validate special characters", () => {
expect(isUserNameValid('%&-')).toBe(true);
});
it("should validate accents", () => {
expect(isUserNameValid('éàëè')).toBe(true);
});
it("should validate chinese characters", () => {
expect(isUserNameValid('中文鍵盤')).toBe(true);
});
});