Commit graph

205 commits

Author SHA1 Message Date
kharhamel f840034d9c FEATURE: chat tweak 2021-07-16 14:25:59 +02:00
GRL78 b2ea368097
Migrate getCurrentUser() to WA.player (#1279) 2021-07-13 15:13:14 +02:00
kharhamel fecbc8a018 WIP: svelte menu 2021-07-13 14:40:35 +02:00
David Négrier 28effd8ad4 Using proxy variables in test 2021-07-12 16:43:40 +02:00
David Négrier b1cb12861f Migrating variables functions to the "state" namespace. 2021-07-07 22:14:59 +02:00
David Négrier e65e8b2097 First version with variables that actually work 2021-07-07 17:17:28 +02:00
David Négrier cb78ff333b Adding client side check of setVariable with writableBy property 2021-07-06 10:58:12 +02:00
David Négrier 86fa869b20 Actually using Type Guards in queries received by WA. 2021-07-06 10:26:44 +02:00
David Négrier 0aa93543bc Adding warning if "template" object is used as a variable 2021-07-05 18:48:26 +02:00
David Négrier bf17ad4567 Switching setVariable to a query and fixing error hangling in query mechanism 2021-07-05 18:29:34 +02:00
David Négrier c30de8c6db Adding support for default variables values 2021-07-05 17:25:23 +02:00
David Négrier abd53b6251 Adding WA.onInit method to wait for API startup. 2021-07-05 14:41:10 +02:00
jonny 369d453455 Merge remote-tracking branch 'remotes/upstream/develop' into trigger-message-refv3 2021-07-02 18:49:22 +02:00
David Négrier ea1460abaf Adding variables (on the front side for now) 2021-07-02 17:36:43 +02:00
GRL c5b5326480 setProperty function doesn't set an empty array if property doesn't exist 2021-07-02 14:40:18 +02:00
GRL e1611969ce Merge branch 'develop' of github.com:thecodingmachine/workadventure into jonnytest1-tiles-start-positions 2021-07-02 14:35:28 +02:00
GRL 01d02124d1 Merge branch 'develop' of github.com:thecodingmachine/workadventure into metadataScriptAPIV2 2021-07-01 11:38:33 +02:00
David Négrier 8f3d9277ac Merging master into develop 2021-06-29 18:39:43 +02:00
GRL 389ca25b6a Cowebsite opened by script can use Iframe Api 2021-06-28 18:00:48 +02:00
David Négrier 1e57028e6e Renaming changeTile to setTiles 2021-06-28 14:58:49 +02:00
David Négrier 71a5e29ae4 Making script URL dynamic
Signed-off-by: David Négrier <d.negrier@thecodingmachine.com>
2021-06-28 14:13:49 +02:00
David Négrier 86cb118378 Merge branch 'develop' of github.com:thecodingmachine/workadventure into metadataScriptAPIV2 2021-06-28 14:12:10 +02:00
David Négrier 303d2a7837 Adding a warning regarding the "controlled" XSS in iframe.html 2021-06-28 13:55:17 +02:00
David Négrier 7f79c2dc4a Making the test page URL dynamic depending on the environment 2021-06-28 13:54:49 +02:00
GRL d38cec0b51 Merge branch 'metadataScriptAPIV2' of github.com:thecodingmachine/workadventure into metadataScriptAPIV2 2021-06-28 13:48:44 +02:00
GRL 651b0a4518 Add test map for changing tiles by script in index 2021-06-28 12:03:06 +02:00
David Négrier 330a795fee Trying to find iframe_api.js URL script dynamically
This would allow us to have tests that don't rely on the iframe_api.js from prod, and would allow scripts that target the correct iframe API, no matter if they are running on workadventu.re or on self-hosted maps.
2021-06-28 11:51:13 +02:00
David Négrier f18291e9d2 Referencing test in index.html and adding some text in the test map. 2021-06-28 10:06:56 +02:00
David Négrier 0b161a2368
Fixing typos 2021-06-28 09:56:18 +02:00
GRL b182a08ca2 correction from review 2021-06-28 09:33:13 +02:00
jonny 7f61e9addd Merge remote-tracking branch 'remotes/upstream/develop' into tiles-start-positions 2021-06-25 18:14:40 +02:00
jonny f536d538ea added backwards compatible check and maps 2021-06-25 17:35:42 +02:00
GRL a666bf310b Change Tiles 2021-06-24 11:31:29 +02:00
jonny 5472d220ba added trigger message code 2021-06-23 17:32:32 +02:00
GRL 24cc340cb9 Merge branch 'metadataScriptingApi' of github.com:thecodingmachine/workadventure into metadataScriptAPIV2 2021-06-23 12:02:29 +02:00
GRL bdb32a29e1 New methods refactored 2021-06-23 11:32:11 +02:00
GRL 85fe92f604 Merge branch 'menu-commands-apiref' of github.com:jonnytest1/workadventure into metadataScriptingApi 2021-06-23 09:18:20 +02:00
GRL cec7087fc2 Merge branch 'develop' of github.com:thecodingmachine/workadventure into metadataScriptingApi 2021-06-22 16:28:45 +02:00
GRL ca3f5c599a Merge branch 'develop' of github.com:thecodingmachine/workadventure into metadataScriptingApi 2021-06-22 14:00:19 +02:00
David Négrier 1283e86ce8 Adding test map for animated tiles 2021-06-22 10:22:48 +02:00
David Négrier be2aa62efc Adding tests for deprecated and moved functions 2021-06-18 18:29:45 +02:00
jonny 1147a21dde fixed documentation 2021-06-16 17:34:00 +02:00
jonny 238f333b81 Merge remote-tracking branch 'remotes/workadventure-main/develop' into load-page-api
# Conflicts:
#	front/src/Api/Events/IframeEvent.ts
#	front/src/Api/IframeListener.ts
#	front/src/Phaser/Game/GameScene.ts
#	front/src/iframe_api.ts
2021-06-15 15:05:49 +02:00
GRL 10e40930e2 Adding map test helpCameraSetting 2021-06-01 11:52:19 +02:00
GRL 8f21ea8385 suppression last line of loadtileset 2021-05-28 14:33:16 +02:00
GRL 858a513569 correction of adding custom menu
correction of setProperty
updating CHANGELOG
updating api-reference
2021-05-28 12:13:10 +02:00
GRL 6dcb0d3750 first step to change tile 2021-05-27 17:06:39 +02:00
GRL 9cd3ff1d31 Merge branch 'correct-merge' into metadataScriptAPIV2 2021-05-27 10:16:00 +02:00
GRL acbe4f89a6 Merge branch 'update-game-tiles' into correct-merge 2021-05-27 09:45:25 +02:00
GRL 5565ddd3f4 Merge branch 'develop' of github.com:thecodingmachine/workadventure into metadataScriptingApi 2021-05-26 17:22:37 +02:00
GRL e1f0192e61 Adding and updating test map for metadata 2021-05-26 17:18:38 +02:00
David Négrier 9aed9713c8 Referencing sound test in index.html 2021-05-26 16:22:58 +02:00
DESKTOP-FMM8UI0\CLV 0c3b9ccfbf Merge branch 'develop' of https://github.com/thecodingmachine/workadventure into SoundInMapScript
# Conflicts:
#	front/src/Api/IframeListener.ts
#	front/src/Phaser/Game/GameScene.ts
#	front/src/iframe_api.ts
#	maps/Tuto/scriptTuto.js
#	maps/Village/Village.json
2021-05-21 17:45:26 +02:00
GRL 3506063e65 first step on loading a tileset from a script 2021-05-20 17:09:10 +02:00
GRL 2f9cc393a7 Implementation of getTag of the current user
documentation of getTag
Adding map for test of getTag
2021-05-20 10:57:36 +02:00
GRL 96545c618a Adding maps for test metadata
Documentation of metadata functions/methods
2021-05-20 08:58:05 +02:00
GRL ce0a72c6ce Merge branch 'menu-command-api' of github.com:jonnytest1/workadventure into metadataScriptingApi 2021-05-19 09:36:11 +02:00
GRL aa78bf44ef implementation of DataLayerEvent
update GetGameState to add nickname to the returned data
update GameMap to separate phaserLayer and mapLayer
2021-05-18 15:41:16 +02:00
GRL 201fcf6afa Merge branch 'gamestate-api-read' of github.com:jonnytest1/workadventure into metadataScriptingApi 2021-05-18 15:18:35 +02:00
GRL 3edfd5b285 GameState is now save in cache
HasPlayerMoved is send when the player is actually moving on the map every 200ms.
2021-05-18 11:33:16 +02:00
GRL 43aad4ab14 phaserLayers managed by Gamemap
Implementation of LayersFlattener
Implementation of Setting properties of a layer form script
Update show/hide layer form script
Update unit test of LayersIteratorTest
2021-05-12 14:30:12 +02:00
GRL 973b3405ef documentation of show/hide layer 2021-05-10 15:10:11 +02:00
GRL fd931c4884 Merge branch 'develop' of github.com:thecodingmachine/workadventure into metadataScriptingApi 2021-05-10 14:45:41 +02:00
GRL 8edd29abaa suppression console.log 2021-05-10 14:43:00 +02:00
David Négrier c025d1798b Renaming restorePlayerControls/disablePlayerControls
Putting "controls" in the plural form:

- restorePlayerControl => restorePlayerControls
- disablePlayerControl => disablePlayerControls
2021-05-10 12:18:06 +02:00
GRL cd2d090a8b Merge branch 'develop' of github.com:thecodingmachine/workadventure into metadataScriptingApi 2021-05-10 11:46:16 +02:00
GRL a6ba8d41b9 implement show/hide layer with scripting 2021-05-10 11:19:18 +02:00
jonny a5260c0831 Merge remote-tracking branch 'remotes/workadventure-main/develop' into load-page-api 2021-05-10 09:58:59 +02:00
David Négrier 66490c9083 Adding test map to test energy consumption 2021-05-06 16:31:39 +02:00
David Négrier c1be97e366 Adding test cases for mobile 2021-05-05 16:18:37 +02:00
jonny 99bd9d88d9 renamed api method "exitSceneTo" 2021-04-29 10:56:56 +02:00
jonny 99926a89b2 added goToPage.json with the loadPAge Api call to the index.html 2021-04-29 10:55:01 +02:00
jonny 8f1aea1c43 Merge remote-tracking branch 'remotes/workadventure-main/develop' into load-page-api 2021-04-29 10:49:14 +02:00
jonny 8f6c65384a added example script for map exit 2021-04-29 10:43:51 +02:00
kharhamel fe27169745 solved conflict with develop 2021-04-29 10:31:16 +02:00
GRL78 57194fd0a1
Add maps for test (#915) 2021-04-27 23:45:28 +02:00
David Négrier 22cb41dc29 Adding the ability to display "Text" objects from Tiled
I honestly don't believe text objects look good on map, and in real maps, I think text should be written on tiles.

However, for a variety of use cases (like in test maps in the /maps/test directory, it can be useful to be
able to display some text easily on a map.

This PR adds the ability to display this text.

Note: the "font" support cannot work correctly, as Tiled is listing fonts from the local
system, and those fonts are not available in a browser.
2021-04-26 11:28:13 +02:00
David Négrier 6815fe7a0a Added a new LayersIterator class
This class iterates recursively over layers, flattening groups.
This enables us to simplify the code when we iterate layers. We can remove all recursive function calls in the GameScene code (it is delegated to the LayersIterator)
2021-04-26 11:21:34 +02:00
DESKTOP-FMM8UI0\CLV b79d76fc2e parameter soundConfig is now optionnal
if user call mySound.play() the sound will be played with the base SoundConfig
2021-04-23 17:03:17 +02:00
DESKTOP-FMM8UI0\CLV f03f8076f3 Sound in Script Done
Fom script user can load, play and stop sound
2021-04-23 15:35:34 +02:00
David Négrier 94317be1ae Improving test cases
This PR improves test cases by adding a "index.html" webpage listing test maps
and by adding text in the map, explaining what needs to be tested.
2021-04-17 21:31:09 +02:00
David Négrier 16daf7332a Adding the ability to display "Text" objects from Tiled
I honestly don't believe text objects look good on map, and in real maps, I think text should be written on tiles.

However, for a variety of use cases (like in test maps in the /maps/test directory, it can be useful to be
able to display some text easily on a map.

This PR adds the ability to display this text.

Note: the "font" support cannot work correctly, as Tiled is listing fonts from the local
system, and those fonts are not available in a browser.
2021-04-17 12:05:54 +02:00
David Négrier aaaa192b71 Merge branch 'develop' of github.com:thecodingmachine/workadventure into iframe_api
# Conflicts:
#	front/dist/.gitignore
#	front/dist/index.tmpl.html
#	front/src/Phaser/Game/GameScene.ts
#	front/src/WebRtc/CoWebsiteManager.ts
2021-03-28 16:53:15 +02:00
DESKTOP-FMM8UI0\CLV 8764fe5de5 Popup openWebSite
Add possibility to open a website with a popup
3 cases :
Open page
GoTo Page
OpenCoWebsite
2021-03-25 17:12:53 +01:00
DESKTOP-FMM8UI0\CLV 3ef3561b57 no message 2021-03-22 16:10:21 +01:00
David Négrier ffb5823b2a Adding the ability to specify a custom Jitsi URL directly in the map
This feature allows to add a "jitsiUrl" property in the map.
As a result, you can use for a given Jitsi room a custom instance of Jitsi.
Using "jitsiUrl" will only work with public Jitsi instances (authentication is not supported when "jitsiUrl" property is provided)

The Jitsi external_api.js script is now lazily loaded.
2021-03-16 20:37:12 +01:00
DESKTOP-FMM8UI0\CLV c5c8770a60 Add First Version of Tuto
PopUp
Player Control disable
Fake bubble displayed
2021-03-12 16:39:29 +01:00
DESKTOP-FMM8UI0\CLV 6c21a31004 Update Map Tuto 2021-03-11 15:17:53 +01:00
DESKTOP-FMM8UI0\CLV 6441fa71d3 Adding placeHolder Popup tuto to Map2
need to cut player controller and simulate bobble
2021-03-11 10:58:48 +01:00
DESKTOP-FMM8UI0\CLV f9f618094d adding error log if name of square in Tile not matching with the param targetObject of OpenPopup in script.js 2021-03-10 17:22:39 +01:00
DESKTOP-FMM8UI0\CLV 8d0411e8a3 can manage position and width/height of a popUp using a square in Tiled 2021-03-10 09:23:45 +01:00
DESKTOP-FMM8UI0\CLV 5e4940dba6 Merge branch 'iframe_api' of https://github.com/thecodingmachine/workadventure into FTUEPopup
* 'iframe_api' of https://github.com/thecodingmachine/workadventure:
  Removing closeOnClick as it is not implemented
  Adding a Popup object with a close() method on it.
2021-03-10 09:00:47 +01:00
DESKTOP-FMM8UI0\CLV f7f8be24bc Set Position of the popUp with pos of an object in floorLayer object group 2021-03-10 08:57:49 +01:00
David Négrier 7fddcc28f1 Removing closeOnClick as it is not implemented 2021-03-09 18:57:25 +01:00
David Négrier bb8b222c22 Adding a Popup object with a close() method on it. 2021-03-09 18:51:30 +01:00
DESKTOP-FMM8UI0\CLV d29e0819f4 Get position of an object in Tile to set popUp Position 2021-03-09 17:07:14 +01:00
David Négrier 1e002f93ed Implementation of openPopup script method (WIP) 2021-03-09 16:21:14 +01:00
David Négrier 2bef328d8a Adding the abaility to track users entering/leaving a zone in the script language. 2021-03-08 18:58:38 +01:00
David Négrier 6fbf165c91 Adding the ability to register a single script using the "script" attribute at the map property level. 2021-03-07 21:02:38 +01:00
David Négrier 7d67f55012 Improving security: only iframes opened with "openWebsiteAllowApi" property are now able to send/receive messages. 2021-03-06 16:00:07 +01:00
David Négrier e927e0fa16 Adding ability to listen to user types chat messages using WA.onChatMessage 2021-03-06 15:26:07 +01:00
David Négrier eb93a04341 Adding an API for inter-iframe communication
Adds a first version of an API to communicate between an iFrame opened by WorkAdventure and WorkAdventure itself.
The first API method is a method allowing to add messages in the chat, from the iFrame.

Comes with a test file.
2021-03-04 19:00:00 +01:00
Gregoire Parant 80449e9a96 Change json map test 2021-02-18 10:00:13 +01:00
David Négrier 91fddd6893 Slugifies the Jitsi room name
This will avoid Jitsi breaking on unexpected characters and displaying a HTTP 404 error.
2021-02-10 13:51:17 +01:00
David Négrier f8b5ca04e5 Adding a test map for Jitsi meet special properties 2021-02-10 11:09:22 +01:00