workadventure / scripting-api-extra Goto Github PK
View Code? Open in Web Editor NEWA set of reusable utility functions and features that can be used to enhance WorkAdventure maps.
A set of reusable utility functions and features that can be used to enhance WorkAdventure maps.
Hey!
First of all SUPER AWESOME STUFF WITH THE SCRIPTING!!!!!!!!!!!
Second of all: found a bug!
If I load the scripting api into my map using the map properties with
https://unpkg.com/@workadventure/[email protected]/dist/bundle.js
And then try to add a config screen and open it I get this error:
Cannot find "/distconfiguration.html" in @workadventure/[email protected]
I definitly see the missing slash between dist and configuration.html
I also did not test the doors with keypad but I think they would fail because of the same reason.
I have "fixed" the issue for myself by changing the asset url in default_asset_url.ts, then rebuilding and selfhosting the script on my own server. With this in place it works just as intended!
But I would assume that it should also work with the version from unpkg.com :-)
Should be fairly easy to solve I guess
Greetings,
Lukas
Here is the error:
TypeError: Cannot read properties of undefined (reading 'entries')
at Proxy.initVariables (state.ts:49:48)
at iframe_api.ts:38:18
I am running a fairly old Workadventure, ~Nov 2021
I debugged in a bit. It seems, that the WA.onInit()
call returns undefined
instead of a valid Promise.
This causes the catch block around it to directly fire and hinders the preparation of the Keypad.
The Keypad shows up, but no key-sounds are played nor the door opens like it did before (worked on 5th of Jan still, can confirm)
I tried forcing the version of scripting-api-extra to 1.1.1 which was available at 5th of Jan when it still worked, but it still gave the same error on my instance.
Right now, it seems to be impossible to use variables templating inside an embedded website.
We should consider adding this possibility.
Feature request: being able to save passwords as variables (rather than hard coding the password in a property of the map)
We should add a "reference" doc that contains all the new properties (and same thing in WorkAdventure repository)
Hi there sorry to bother you but i can't get my head around the fact how this is hosted on unpkg.com and how i can clone and self-host this library. i would like to do some changes on the styling. Can you give me a quick hint about the steps i should take?
I saw that the bundle.js is also published to github-pages. Could it be imported like this:
script: https://workadventure.github.io/scripting-api-extra/bundle.js
instead of:
script: https://unpkg.com/@workadventure/scripting-api-extra@^1/dist/bundle.js
i already tried to install the library in my project like so:
npm install --save git+https://github.com/workadventure/scripting-api-extra.git
but i get errors - i guess because the map-starter-kit uses vite while here we are using webpack.
Anyways, my main question:
How can i tell workadventure (self-hosted) to not load from unpkg.com but my version? Ideally hosted with github pages. Just a few hints in the right direction would be really appreciated. thanks a lot!
TODO: check on an iOS device if the "Configure the room" page works.
In the configure the room sub pages, the back button is now broken.
Also, a number of errors are displayed when opening the "Configure the room" page.
When the Scripting API is ready to modify existing object layers, we should consider adding variable templating inside those objects too.
I used this function in WA.onInit
, I tried to change property of openWebsite layer. But it was not took into the map.
When using subgroups to group variables, it is not possible to hide a "button" by adding a "tag" on the sublayer of the variables.
I have 2 rooms, each of them uses variables to set the visibility of an overlay layer using the configuration menu. This works fine, but when changing rooms using the zones the variables get reset and the layers will always be visible, no matter what...
The only way to get them back to the desired state is to do a full page reload in the new room. So this is definitly a problem of the frontend / scripting extension as the server side var state seems to stay correct
Hi,
first, thanks for this project, really nice!
I was reading the API and I couldn't find a way to check if a member is online or not, is there a way of doing that?
Thanks!
Despite the release of v1.3.3, it seems doors cannot find variables if the variable is defined with a "class" attribute (instead of a type) as is customary with Tiled 1.9
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.