Comment

Comment by ttty

Image you have an UI which talks to this. For example you have a button on/off. How would you do?

    var t = texture().lines().stroke('red')
    if(this.button.on) t= texture.heavier()
Compare the previous with this one.

    var t = texture({lines: true, heavier: this.button.on, stroke: 'red'})
I also hate the non standard constructor: this should be like this

    var texture = new Texture({lines: true, heavier: this.button.on, stroke: 'red'});
parent ttty 11 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton