Commit graph

195 commits

Author SHA1 Message Date
David Négrier 9425fd70c0 Adding a new property to prevent script from being loaded in "modules" mode
Scripts in module mode need to be abide by the Same Origin Policy (CORS headers are used to load them)
This can cause issues on some setups.

This commit adds a new "scriptDisableModuleSupport" that can be used to disable the "modules" mode.

Closes #1721
2022-01-12 17:36:31 +01:00
David Négrier 24baf5664c All promises are now handled 2022-01-04 17:06:29 +01:00
David Négrier 6e27ffb2d5 Starting fixing unhandled promises 2022-01-04 16:50:43 +01:00
Benedicte Quimbert 85d45071fa Makes onCameraUpdate subscribe-able 2022-01-03 11:45:47 +01:00
Benedicte Quimbert 99f9d56c5c Updates room documentation for embeddedWebsite properties 2022-01-03 11:45:47 +01:00
Bénédicte Q a69f232a06 Update front/src/Api/Events/IframeEvent.ts
Co-authored-by: David Négrier <d.negrier@thecodingmachine.com>
2022-01-03 11:45:47 +01:00
Bénédicte Q adc71b5695 Update front/src/Api/Events/IframeEvent.ts
Co-authored-by: David Négrier <d.negrier@thecodingmachine.com>
2022-01-03 11:45:47 +01:00
Benedicte Quimbert 3abc571e79 Corrects scale managing and camera event listening 2022-01-03 11:45:47 +01:00
Benedicte Quimbert 1e073d8a0e Refactoring and documentation update 2022-01-03 11:45:47 +01:00
Benedicte Quimbert 4356767739 Adds the camera to available APIs with retrieving of the worldView 2022-01-03 11:45:47 +01:00
Benedicte Quimbert d672a2dead WIP API updates for tutorial and more 2022-01-03 11:45:47 +01:00
Benedicte Quimbert cbf7cdfe29 Cleans forgotten useless commentaries 2022-01-03 11:45:47 +01:00
Benedicte Quimbert 516d756db1 Uses the current player position rather than the starting one to position iframe 2022-01-03 11:45:47 +01:00
Benedicte Quimbert 3490daed6b Creates player state and uses it to get and set values from local storage 2022-01-03 11:45:47 +01:00
Benedicte Quimbert e025c1dc8e Allows to read and write "Player properties" from LocalStorage 2022-01-03 11:45:47 +01:00
David Négrier 90f7287860 Adding the ability to set the player's color outline via the scripting API
(currently not shared with the other players yet)
2021-12-21 17:02:53 +01:00
David Négrier 0a705eadf9
Merge pull request #1616 from Waclaw-I/feature-camera-zone-focus
Focusable zones
2021-12-14 15:43:45 +01:00
David Négrier 8a96ff8ee4
Merge pull request #1614 from ValdoTR/user-room-token
Added the user-room token created from admin when we access a room
2021-12-13 17:50:49 +01:00
Valdo Romao 592e07bc4f Fixed linter errors 2021-12-13 16:19:47 +00:00
Hanusiak Piotr b12fb228af fixed typos 2021-12-08 13:25:54 +01:00
Hanusiak Piotr 4d473480cf enter and leave zone events 2021-12-08 13:18:06 +01:00
David Négrier d68da0754e
Merge pull request #1472 from thecodingmachine/type_module
Switching API to use type="module" scripts
2021-12-07 09:23:58 +01:00
Valdo Romao dd79f7d0f4 Added the user-room token created from admin when we access a room 2021-12-01 15:50:14 +00:00
David Négrier 257162c451 Fixing prettier 2021-11-24 17:02:11 +01:00
David Négrier 6e6cdc7bde
Revert "Improving log messages" 2021-11-24 16:20:07 +01:00
David Négrier 2cbf5b56af Fixing linting 2021-11-24 15:29:12 +01:00
David Négrier 4e042389c5 Merge branch 'master' of github.com:thecodingmachine/workadventure into develop
# Conflicts:
#	front/src/Connexion/ConnectionManager.ts
#	pusher/src/Controller/AuthenticateController.ts
#	pusher/src/Controller/IoSocketController.ts
#	pusher/src/Services/JWTTokenManager.ts
2021-11-15 16:30:45 +01:00
Alexis Faizeau d4470568ec Fix change layer api functions 2021-10-29 23:16:36 +02:00
Alexis Faizeau 934e24f837 Implement on enter/leave layer events 2021-10-29 19:44:58 +02:00
Gregoire Parant f8ae189cee HotFix handler message in chat store
Signed-off-by: Gregoire Parant <g.parant@thecodingmachine.com>
2021-10-27 14:29:39 +02:00
Alexis Faizeau fb7fe0dc0a Rename cowebsite API functions 2021-10-25 19:00:26 +02:00
Alexis Faizeau f84c4b3276 Refacto insert cowebsite 2021-10-25 19:00:26 +02:00
Alexis Faizeau b81b1ff68b Implement new cowbesite system on API 2021-10-25 19:00:26 +02:00
David Négrier 0ecabd14f1 Switching API to use type="module" scripts
This allows using imports inside scripts imported by WorkAdventure out of the box (and therefore easily importing the scripting-api-extra without resorting to using a bundler)
2021-09-20 09:14:14 +02:00
David Négrier f92b728a8e Fixing broken chat API 2021-09-13 14:50:02 +02:00
kharhamel 4160235b92 ran pretty on the front 2021-09-06 14:31:59 +02:00
David Négrier 7576fbbe6d
Merge pull request #1392 from thecodingmachine/iframeMenuScript
Iframe menu script
2021-08-27 17:41:04 +02:00
David Négrier 10c08dea6d
Merge pull request #1393 from thecodingmachine/variableHasProxy
Fixing "has/in" on variables proxy object
2021-08-27 15:07:50 +02:00
David Négrier a0d3685227 Fixing "has/in" on variables proxy object
When using WA.state, using `"myVariable" in WA.state` would always return false.
This is now fixed by adding a "has" method on the Proxy class.

Also, added a `WA.state.hasVariable` method.
2021-08-27 11:29:59 +02:00
GRL 706f531ca2 Add types file in API 2021-08-27 11:17:48 +02:00
GRL cf7bfe79ca Refactor to only have one function registerMenuCommand
When selected custom menu is removed, go to settings menu
Allow iframe in custom menu to use Scripting API
Return menu object when it is registered, can call remove function on it
2021-08-27 10:34:03 +02:00
GRL78 7c956d1481
REVIEW : Migration Menu and Report Menu in Svelte (#1363)
* WIP: svelte menu

* temp

* temp

* New menu svelte

* Migration of report menu in svelte

* Migration of registerCustomMenu for Menu in Svelte
Refactor subMenuStore
Suppression of old MenuScene and ReportMenu

* Suppression of HTML files that aren't use anymore

* fix deeployer

* First pass on css

* First pass on css

* Second pass on css and reportMenu

* Second pass on css and reportMenu

* Second pass on css and reportMenu

* Third pass on css and reportMenu

* Correction following test

* Contact page only if environment variable exist

* Update service worker

Signed-off-by: Gregoire Parant <g.parant@thecodingmachine.com>

* Change requested

* Change requested

Co-authored-by: kharhamel <oognic@gmail.com>
Co-authored-by: Gregoire Parant <g.parant@thecodingmachine.com>
2021-08-26 12:01:07 +02:00
David Négrier 5cd3ab4b4c Removing ts-ignore 2021-08-25 09:30:05 +02:00
GRL f3c4d344b3 Add iframe submenu by scripting API
Delete menu by scripting API
2021-08-24 17:35:06 +02:00
GRL 49eb28dacf Merge branch 'develop' of github.com:thecodingmachine/workadventure into menuInSvelte 2021-08-24 09:38:24 +02:00
GRL ad95fa5e11 Execute scripts of the map after creating gameScene 2021-08-23 18:53:59 +02:00
GRL edfe440c6e Merge branch 'develop' of github.com:thecodingmachine/workadventure into menuInSvelte 2021-08-20 16:18:45 +02:00
David Négrier 8a64491952 Improving popup
If a popup message is empty, only the buttons will be displayed (not the container)

Unrelated: the Sound.play method in the API now accepts 0 arguments.
2021-08-18 11:53:41 +02:00
GRL f4ce5f9a3b Merge branch 'ReportMenuSvelte' of github.com:thecodingmachine/workadventure into menuInSvelte 2021-08-11 15:04:47 +02:00
GRL 8105e966ff Migration of registerCustomMenu for Menu in Svelte
Refactor subMenuStore
Suppression of old MenuScene and ReportMenu
2021-08-11 14:07:34 +02:00