animanathome / moveme

1 stars 0 forks source link

Add soft ranges to attributes (min/max) #4

Closed animanathome closed 9 years ago

animanathome commented 9 years ago

It seems we can easily extend the exiting animChannel property. Currently this has the following interface:

  1. channelGroup
  2. channelName

Which can be extended to

  1. min and max value
// before
this.animChannels = ["position", ["x", "y", "z"]]
// after
this.animChannels = ["position", ["x", "y", "z"] , [[-Infinity, Infinity],[-Infinity, Infinity],[-Infinity, Infinity],[-Infinity, Infinity]]]
animanathome commented 9 years ago

While we're at it it might also be good to incorporate the attribute type to the channel. This would make the 4th element the type. Currently we have the following types:

  1. number
  2. enum
  3. color
this.animChannels = ["position", ["x", "y", "z"] , [[-Infinity, Infinity],[-Infinity, Infinity],[-Infinity, Infinity],[-Infinity, Infinity]], [number, number, number]]

Not sure about our custom spaceSwitch and parentMaster types.