mrdoob / frame.js

JavaScript Sequence Editor

Home Page:https://framejs.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Parameters description

fernandojsg opened this issue · comments

I was thinking what could be the first feature I'll add to the sequencer, and I think could be the parameters tweaking. It will help just having a simple effect to play with it and see something more than just a player of a jsoned demo.
Thinking in what I had in my editor, I'll propose something like:

{
    "amount": {
        "shortname": "Amount",
        "desc": "Amount of sprites",
        "type": "i",
        "default": 20,
        "min": 1,
        "max": 50
    }
    "size": {
        "shortname": "Size",
        "desc": "Size of the sprite",
        "type": "f",
        "default": 3.5,
        "min": 1.0,
        "max": null
    }
}

So you could create controls for each kind of parameter.
The basic kind of parameters that will be necessary could be:

  • integer
  • float
  • color
  • boolean
  • combo/list
  • texture

And of course after that you could also integrate types of the three.js like vector2, vector3 or so. But at least to start with something to create custom controls for the editor.

Yup. That was actually the next feature I was going to work on. I've just committed a very basic (non-working yet) implementation. The parameters definitely need a "type". By now we can do boolean, integer, float, color, vector2 and vector3.

Ok, I would like to create some kind of controls similar to the ones I had in my editor (http://t.co/BrspyMNbMH).
A mix of controls like dat.gui and those ones. Each control should have in the right a little box to link to or create a curve for that control.
In the case of the colors, the link will be a gradient.

I opted for making it more Object Oriented (less likely to produce typos)...

"amount": new FRAME.ModuleParameter.Integer( 20 );

Closing this because since 6449949 the code base is now different. Open a new PR is needed.