-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Readymade 3.1.0 #59
Merged
Merged
Readymade 3.1.0 #59
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
feat: dial input
fix: dial position on init feat: better type definitions for controls
fix: setting 0 for currentValue on slider and dial feat: make border-radius and border-width variables fix: radio buttons had same name in lib.ts
feat: tweak dial styles fix: remove deprecated view
…WebRTC DataChannel, WebSocket, and TouchOSC.
fix: transmit README
feat: version bump packages
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
3.1.0
Readymade 3.1.0 Large Glass breaks the glass, adding new features that allow UI controls to communicate over WebSocket, WebRTC Data Channel, and Touch OSC.
@readymade/ui
RdDial
has similar interface toRdSlider
but action is limited to a rotary dialRdControl
can now be set via attribute or viasetControl
method on all inputs in @readymade/uiRdButton
viasetControl
. Any provided styles are bound to the internalHTMLButtonElement
@readymade/transmit
Transmitter
is a newclass
for handlingWebRTC DataChannel
,WebSocket
andTouch OSC
communication.Transmitter
is a Swiss-army knife for communicating over WebRTC DataChannel, WebSocket or Touch OSC.Getting Started
Import
Transmitter
and instantiate with a configuration Object.Messages
When
signal
andannounce
servers are configured, the instance ofTransmitter
will automatically attempt a handshake with a remote peer. If a peer is found, a WebRTC DataChannel peer to peer connection will open. To send a message over the data channel use thesend
method.If you want to send messages over WebSocket, use
sendSocketMessage
.To send a message over TouchOSC, use
sendTouchOSCMessage
, ensuring the data your are sending follows the OSC protocol. Below is an example of sending a OSC message with type definitions.To listen for messages, inject a callback into the configuration. In the above example,
onMessage
would appear like so:To react to a peer to peer connection, bind an
onConnect
callback to the configuration.BREAKING CHANGES
RdControl
type definition in @readymade/ui has been updated to normalize types for all controls and make type definitions more specific per control.RdLegacyControl
is now exported which is the old type definition. The interface of all controls have been normalized, some properties are deprecated, while other shared properties are now moved toattributes
that are unique to each control.Before
After
For instance, in
RdSlider
which is a custom element that has several unique attributes, the type definition is now:The reason for this change is to support @readymade/transmit. Passing an event from custom element to
BroadcastChannel
or any of the available channels inTransmitter
is much simpler when the API is normalized.