Every property is a cell
Formo team · 14 November 2014
Hello,
Quick question: what is the most successful programming language in the world? Many people say it is the spreadsheet. This week is about stealing its best trick.
Values that know where they come from
In a spreadsheet you can type =A1*2 into a cell. From then on that cell is not a number any more: it is a rule. Change A1 and the answer follows, without a "refresh" button and without anybody writing a loop.
Now imagine the same for a drawing. The width of a rectangle is just a number — but it does not have to be a typed-in one. It can be a rule: "half the width of the shape next to me". Move the other shape and this one stretches. The eye of a character can be "always at the same height as the other eye". Nobody keeps them in sync by hand, because the rule keeps them in sync.
The old way is to write down a number, then remember to update ten other numbers when it changes. Everyone has forgotten one of them at least once.
A property that is a rule instead of a number.
The first working piece
In the editor we are building, this exists in its first, simple form. In the properties panel you can turn a field into a formula, refer to another shape by its name (for example Star1.width), and get suggestions while you type. When you click a shape on the canvas while editing, its name is inserted for you, drawn in its own colour so you can see what refers to what.
Tip: formulas can use helpers like min, max and clamp, so a value can never go outside the range you choose.
We are drawing a lot of screens like this one, with cells where plain values used to be. Tell us what you would link together first.
As always, let us know what you think on our Discord.