Commit graph

9 commits

Author SHA1 Message Date
Lera Elvoé
51652ef277 add port usage type to Port (#69)
first part of addressing #59

every `Port` now has a `usage_type` field that indicates whether it can be used for triggers (eg. sending and receiving events), value requests, or both. `Deck` has an additional method to validate if a potential connection is legal, which checks for the following in order:

1. the source and target nodes are not the same node;
2. the port usage is valid (trigger to trigger, value to value, both to any);
3. the port types are compatible
4. the connection doesn't already exist

all node ports by default use the "both" usage, since that will be the most common use case (especially in cases where an input port can accept either a trigger and a value request but the output can only send one type), but it can be specified as an optional argument in `add_[input|output]_port()`

usage types are represented in the renderer by different port icons:

![image](/attachments/28d3cfe9-c62c-4dd4-937d-64dbe87cb205)

there is a reference implementation in the Compare Values and Twitch Chat Received nodes, since those were used as examples in #59. other nodes will be added as a separate PR later if this is merged, since behavior will vary greatly per node.

Reviewed-on: https://codeberg.org/StreamGraph/StreamGraph/pulls/69
Co-authored-by: Lera Elvoé <yagich@poto.cafe>
Co-committed-by: Lera Elvoé <yagich@poto.cafe>
2024-02-21 04:08:36 +00:00
Lera Elvoé
b55a462945 Add OBS and Twitch nodes. Improve UX significantly. Rework groups from the ground up with a new instancing feature. Open to the public. (#18)
After months of work and over a hundred commits on this repo alone (not to mention the old, half-working repos on GitHub), StreamGraph is finally ready to be shown to the public, even if in an incomplete state.

This PR is a culmination of numerous design discussions, re-writes, and hours spent by both @Eroax and myself.

Reviewed-on: https://codeberg.org/Eroax/StreamGraph/pulls/18
Co-authored-by: Lera Elvoé <yagich@poto.cafe>
Co-committed-by: Lera Elvoé <yagich@poto.cafe>
2023-12-15 21:44:25 +00:00
Eroax
0716c2f4da Adds Expression Node (#9)
Adds both the Codeblock Descriptor along with the needed update to Port.set_value to allow Callbacks.  + Adds the Expression node which utilizes the Codeblock descriptor.

Co-authored-by: Eroax <eroaxe.business@gmail.com>
Co-authored-by: Lera Elvoé <yagich@poto.cafe>
Reviewed-on: https://codeberg.org/Eroax/Re-DotDeck/pulls/9
2023-11-27 09:21:43 +00:00
Lera Elvoé
c4e35043df types system simplification (#8)
no longer using classes for every type. the type system has been greatly simplified, with the added bonus that it hooks directly into GraphEdit's slot type system. connections will still fail if the type conversion fails, which may be used by other renderers.

the type conversion map is straightforward to understand, and easy to extend should the need arise (hopefully it shouldn't).

Reviewed-on: https://codeberg.org/Eroax/Re-DotDeck/pulls/8
Co-authored-by: Lera Elvoé <yagich@poto.cafe>
Co-committed-by: Lera Elvoé <yagich@poto.cafe>
2023-11-26 22:07:15 +00:00
Lera Elvoé
b36bdaf71c yag's doc sprint (#4)
documented everything (except NodeDB) in the classes/ folder

Reviewed-on: https://codeberg.org/Eroax/Re-DotDeck/pulls/4
Co-authored-by: Lera Elvoé <yagich@poto.cafe>
Co-committed-by: Lera Elvoé <yagich@poto.cafe>
2023-11-25 10:40:53 +00:00
Lera Elvoé
2f92233ca0
saving and loading port values 2023-07-21 11:26:43 +03:00
Lera Elvoé
f0f3b2e685
unify ports into one container array 2023-06-12 18:32:16 +03:00
Lera Elvoé
6b43e807d6
receive callbacks 2023-06-10 21:23:57 +03:00
Lera Elvoé
39a18a4087
types, ports, nodes, decks, test renderer 2023-06-10 20:13:16 +03:00