Code Monkey home page Code Monkey logo

scripting-api-extra's Introduction

WorkAdventure Scripting API Extra features

Github Actions codecov

This NPM package contains a set of reusable utility functions and features that can be used to enhance WorkAdventure maps.

Usage

There are many ways to import the @workadventure/scripting-api-extra package.

Importing directly in a map

If you only want to use the extra "features", you can directly import the package in your map, by adding a "script" property at the map level, pointing to the "bundled" package:

script: https://unpkg.com/@workadventure/scripting-api-extra@^1/dist/bundle.js

Please note that you can change the version number of the package in the URL.

Importing in your application / own scripts

If you are developing your own scripts, you can import the library using NPM.

npm install --save @workadventure/scripting-api-extra

Table of content

Features

Functions

  • Properties related functions (utility functions to acces properties...)
  • Variables related functions (access variables metadata...)
  • Layers related functions (get a list of all layers, find layers boundaries...)

Contributing

# install dependencies
$ npm install

# run unit tests
$ npm run tests

# run integration tests
$ npm run start  # then browse to http://localhost:3000/test/maps/

Note: npm run start will connect to play.workadventu.re to server WorkAdventure.

If for development purpose, you want to connect to a development WorkAdventure server, you can use the WORKADVENTURE_URL environment variable:

$ WORKADVENTURE_URL="http://play.workadventure.localhost" npm run start

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.