Code Monkey home page Code Monkey logo

syrinscall's Introduction

Syrinscall

Shareable controls for syrinscape online

Syrinscall is a simple one-page website control panel, designed to allow subscribers of Syrinscape (https://www.syrinscape.com) to share control of the online players with other members of their roleplaying groups.

Using Syrinscall

There is a live demo of syrinscall hosted on github, while traffic allows:

https://yamahito.github.io/Syrinscall/

There are a few settings that must be made before Syrinscall will do anything:

  1. Specify your API key; you can find this at your online control panel at https://www.syrinscape.com/online/cp/
  2. Add any soundsets or elements that you wish to control, using their 'pk' number. Syrinscape will automatically load all moods and their associated elements from the given soundsets, and show them when they play.

Elements which are added from the settings pane - or which are pinned from the control panel - are always visible.

Soundsets, elements and the API key can all be provided as part of the URL for easy sharing with members of your group. Multiple values are concatenated using a '+' character.

Example

The following URL (API key redacted) will load the 'witchwood' soundset with the pinned music elements 'Dark Elf Harpist' and 'A Nervous Wait':

https://yamahito.github.io/Syrinscall/?sets=1&elems=3964%2B3965&auth_token=XXX_REPLACE_WITH_YOUR_AUTH_TOKEN_HERE_XXX

Hosting your own instance of Syrinscall

Hosting the page itself is as simple as placing the contents of this repository in a web browser, but for one complication: the page must be configured to point at a CORS proxy such as CORS-Anywhere (https://github.com/Rob--W/cors-anywhere), or else the calls to Syrinscape's API will be blocked by the cross-origin security policy.

Configuring the CORS proxy can be as simple as supplying the cors parameter in the URL (useful for local development), by providing the parameter CORSproxy to the js function SaxonJS.transform() in the HTML (see also https://www.saxonica.com/saxon-js/documentation/index.html#!api/transform), or by editing and recompiling the js/Syrinscall.xsl stylesheet.

Contributing

Please feel free to raise bugs and feature requests as issues: https://github.com/yamahito/Syrinscall/issues

Syrinscape is written using SaxonJS to implement XSLT in javascript, partly as a learning exercise. I am neither apologising for this, nor asserting that it is the wisest choice of programming language for interacting with APIs - sometimes if all you have is a hammer, you can treat everything as a nail! If you are familiar with XSLT, please feel free to submit a PR for any issue or feature request you care to.

Syrinscape also uses Sass, extending the bulma.io CSS framework. Contributions to the styling of Syrinscall would be very welcome indeed.

One more thing...

If you like a dark mode, there is an experimental dark mode version at https://yamahito.github.io/Syrinscall/darkly.html

syrinscall's People

Contributors

yamahito avatar

Stargazers

Bryan Cox avatar Jamz avatar

Watchers

Tai Lee avatar James Cloos avatar  avatar

syrinscall's Issues

Revise state updates

At the moment, state updates hide everything and then show what's playing. They also refresh the page independently of the other REST calls, since everything is asynchronous. At best this means updates look like they're reloading the page, at worst, the page refresh misses the update because it fires out of order.

I need to limit the updates so that they only touch sets and elements that have actually changed, then have them called as the result of whatever triggering REST call has been made (preferably without having to re-call the state from the API).

Add custom elements

Custom elements should be specified in a similar way to soundsets, and will remain visible at all times

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.