Looking-Glass / bridge.js

Bridge.js is a javascript API for interacting with Looking Glass displays via Looking Glass Bridge 2.2.0+
https://lookingglassfactory.com/software/looking-glass-bridge
MIT License
8 stars 0 forks source link

what if bridge was a singleton? #3

Closed BryanChrisBrown closed 1 year ago

BryanChrisBrown commented 1 year ago

This PR gives us an idea of what it'd look like to make the Bridge object a singleton.

This means only one bridge client would exist.

It'd allow us to share/use the bridgeclient elsewhere in the codebase as well.

An example here I used is a get/setter for error verbosity, which allows us (and our end users) to control how the rest of the codebase logs errors.