Open peternewman opened 6 years ago
Fixtures are created using JavaScript code in Fivetwelve. That makes exporting tricky (there won't be a nice object-to-JSON conversion or a builder class).
The most-starred dependent is NERDDISCO/luminave (they have some example fixtures which may help us) – however, there's also already an issue to use our format instead. :smiley:
Ah, I came across it from https://github.com/TimPietrusky/fivetwelve-enttec-dmx-usb-pro-mk2-test/blob/master/src/device/AdjStarburst.js .
I assumed your export thing could generate plain text too, in whcih case it shouldn't be too hard to map to RgbParam/RangeParam/MultiRangeParam. But I guess it's easier/neater to do it their end and read in JSON, assuming you can dynamically generate classes in JS.
@fxedel @peternewman What is the status on this? What do you want to achieve?
My use case is that I want to create fixture definitions on the fly and before I implement something myself, I would love to use what you already created.
As I understand the ticket, we would need something that fivetwelve can understand, right? Some kind of converter. Are there any starting points for me?
I'm the creator of luminave and contributor of fivetwelve.
Hey @TimPietrusky, the idea is to write an export plugin for OFL that automatically converts our fixtures to the fivetwelve format. That would make it possible to use all OFL fixtures in luminave without the need for changes in fivetwelve/luminaire.
Unfortunately, we haven't started developing that plugin yet. Maybe you want to write it by yourself? The Contributing Guidelines, our fixture format docs and our plugin docs might help you, and we'd be happy to answer your question as well.
I try my best!
@fxedel are the plugins supposed to only run on the CLI? And the user then has to copy the generated files into the target software?
Export plugins convert our internal fixture format to whatever format you require. They can be used from the CLI (with cli/export-fixture.js
) or from the OFL website, where they automatically appear in the download dropdown on each fixture's page and on the homepage. How the exported file(s) can be imported into the lighting software depends on the software; see https://open-fixture-library.org/about/plugins for how it works for other supported formats.
Only because I found it... https://github.com/beyondscreen/fivetwelve