![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
DMX-512 controller library for node.js
npm install dmx
const DMX = require('dmx')
Create a new DMX instance. This class is used to tie multiple universes together.
name
- Stringmodule
- Object implementing the Driver APIRegister a new DMX Driver module by its name. These drivers are currently registered by default:
name
- Stringdriver
- String, referring a registered driverdevice_id
- Number or Objectoptions
- Object, driver specific optionsAdd a new DMX Universe with a name, driver and an optional device_id used by the driver to identify the device. For enttec-usb-dmx-pro and enttec-open-usb-dmx device_id is the path the the serial device. For artnet it is the target ip.
universe
- String, name of the universechannels
- Object, keys are channel numbers, values the values to set that channel toextraData
- Object, this data will be passed unmodified to the update
Event. (Optional; default value is {}
)Update one or multiple channels of a universe. Also emits a update
Event with the same information.
A JSON Object describing some Devices and how many channels they use.
Currently not many devices are in there but more can be added to the devices.js
file. Pull requests welcome ;-)
The following Devices are known:
Create a new DMX Animation instance. This can be chained similar to jQuery.
The options Object takes the following keys:
loop
- Number, the number of times this animation sequence will loop when run
is invoked. This value is overridden if you invoke runLoop
.filter
- Function, allows you to read or modify the values being set to each channel during each animation step.If you specify a filter
function, it must take a single object parameter in which keys are channel numbers and values are the values to set those channels to.
You may modify the values in the object to override the values in real-time, for example to scale channel brightness based on a master fader.
to
- Object, keys are channel numbers, values the values to set that channel toduration
- Number, duration in msoptions
- ObjectAdd an animation Step.
The options Object takes an easing
key which allows to set a easing function from the following list:
Returns a Animation object with the animation step added.
duration
- Number, duration in msDelay the next animation step for duration. Returns a Animation object with the delay step added.
universe
- Object, reference to the universe driveronFinish
- Function, called when the animation is doneRun the Animation on the specified universe.
universe
- Object, reference to the universe driverRuns an animation constantly until animation.stop()
is called
The example below shows a value being animated for 5 seconds:
const animation = new DMX.Animation().add({
1: 255,
}, 100).add({
1: 0,
}, 100).runLoop(universe)
setTimeout(() => {
animation.stop()
}, 5000)
universe
- String, name of the universechannels
- Object, keys are channel numbers, values the values to set that channel toextraData
- Object, data that was passed to the update
method.This event is emitted whenever update
is called either by the integrating application or by an animation step.
If triggered by an animation step, extraData.origin
will be the string 'animation'
.
Versions prior to 0.2 included a Webinterface. This has since been moved into its own repository at https://github.com/node-dmx/dmx-web
We're happy to help. Chat with us on IRC in #node-dmx on freenode.
FAQs
A nodejs DMX library
The npm package dmx receives a total of 106 weekly downloads. As such, dmx popularity was classified as not popular.
We found that dmx demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.