On Thursday, December 29, 2011 02:13:57 PM Werner Almesberger wrote: > Our parser already allows omitting the per_frame= (provided > there's one somewhere earlier)
How will this "per-frame" omission be done? I would prefer to have special statements (that do not appear in MilkDrop), such as: [initial] [per_frame] [per_vertex] that make the compiler treat all following equations without a per_*= prefix as respectively initial conditions, per-frame equations or per-vertex equations. This way we retain MilkDrop compatibility (by assuming [initial] mode at the beginning of the patch). Otherwise, code such as: per_frame=eq1 eq2 would treat both eq1 and eq2 as per-frame, while MD treats eq1 as per-frame and eq2 as initial condition. (By the way: my parser only allows initial condition 'equations' in the simple case where the right member is simply a constant. MD allows math expressions to be written here. This isn't a priority as most presets use constants, but could be a small addition.) > We could also have C's ternary operator just like in the original, > which happens to be reasonably easy on the eye: > > foo = bar ? sin(time) : 1-cos(time) I'm for this option. S. _______________________________________________ http://lists.milkymist.org/listinfo.cgi/devel-milkymist.org IRC: #milkymist@Freenode
