Coder Social home page Coder Social logo

Comments (4)

mcslee avatar mcslee commented on July 21, 2024

If you want to build your model statically in code, keep extending LXModel like before and ignore all the LXStructure and LXFixture stuff. Those fixtures are things that would show up in the dynamic model construction system (e.g. not via JSON file, but still via dynamically adding/removing/modifying fixture settings in the left-hand model pane).

If you pass in a LXModel instance at constructor-time, all that stuff is ignored and your static model will be used instead. So, basically - make no changes if you prefer to stick with how it worked before.

from lx.

Geethree avatar Geethree commented on July 21, 2024

Though, leveraging the new LXStructure and LXFigure construcuts would allow for using the UI to tweak things and save it to the project?

from lx.

mcslee avatar mcslee commented on July 21, 2024

Yep - if you want to go that route, you can define your own custom LXFixture subclasses and register them. Don't pass an LXModel to the LX constructor. Your custom LXFixture type will be available to add in the left-hand Model column as a fixture type.

You probably want to subclass from LXBasicFixture if you're using a normal protocol type (e.g. artnet/sacn). That'll automatically get you the basics. Take a look at StripFixture to understand the basics of what your subclass needs to implement. It's mainly the methods: size() which indicates how many LEDs are in the fixture, and computePointGeometry() which sets the positions of the points based upon fixture geometry.

Feel free to ping w/ questions if it's not clear or working as expected.

from lx.

raldi avatar raldi commented on July 21, 2024

It's not the prettiest code, but if you'd like a working, recent example to read over: https://github.com/titanicsend/LXStudio-TE/blob/main/src/main/java/titanicsend/model/TEWholeModel.java

from lx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.