Git Product home page Git Product logo

uji's Introduction


A minimalist generative art thing –
press the buttons and play with the sliders!

The interface is designed (or, rather, deliberately not designed) for exploration through play – both for you, as the user, and me, as the person who made the weird-ass interface. It's intended to facilitate a vaguely meditative and creative environment.

It's not desktop-only, by the way!

The tiled buttons at the top are presets – use them as jumping-off points, or click your way through them to see what's possible before starting afresh by yourself. The preset has all options set to their defaults, so it's a good starting point once you've played around a bit.

The sliders determine all aspects of the generated images. Hover over the icons next to them (which feature glyphs from Imperial Aramaic and Phoenician) for descriptions of what each slider does. You can also edit the options directly through the text inputs next to the sliders, which you're able to conveniently tab through. And pressing +, , or while your mouse pointer's hovering over a slider will increase its value (-, , or will decrease it instead). Press shift at the same time to adjust in 10× larger increments.

If you find that changing a slider slightly modifies some behavior you'd expect to be the domain of other sliders: Let's just say that's a constraint designed to send your creativity down fresh paths (and not a result of lazy implementation details).

At the bottom of the sidebar, there's a couple of buttons: Firstly, the conjoined buttons sporting chevron icons provide undo/redo functionality (the usual keyboard shortcuts work as well). Upon clicking the self-explantory "Export" button, you'll be presented with a choice of available formats: PNG, JPEG, SVG, and JSON, the latter two of which are intended for pen plotting. The adjacent "Share" button reveals a shareable URL that encodes your options, which comes in real handy if you want to show a thing you've made with UJI to someone else. (If you press alt while clicking either button, the default action is performed in each case – PNG download slash URL-to-clipboard-copying.)

This is how your apartment could look with one simple trick! (The trick is: Makin' stuff with this tool.)

About the name: I could pretend that it's referring to the concept of uji in Zen Buddhism, but really, the letters just lend themselves to a pretty logo, an initial iteration of which I had previously cobbled together with my pen plotting tool Brachiosaurus and later made the final logo (along with the undo, redo, export, and share icons) using the Markdeep Diagram Drafting Board.

Notes

Setup

It's just some HTML, JavaScript, an image, and a few webfonts – so no setup is required! If you want to run this tool locally, simply git clone this repository or download a ZIP, then open index.html in your favorite browser. Of course, link sharing doesn't make a whole lot of sense in that context, but the rest should work just fine.

Features I wanted to add but didn't because I would've gotten bored of it and never released this thing in the first place

Perhaps I'll knock some of those down at some point if motivation strikes. (Update: Done quite a few, but there's always more!) In the meantime, feel free to file an issue if you really want one of them to be implemented (or do it yourself and send a pull request!).

  • Some way of randomizing options without constantly generating junk, see here.
  • WebGL rendering for performance – although blend modes and blurring might not be so easy there, and the current <canvas>-based approach would still be needed as a fallback.
  • Exporting the generation process as a video, see here – this might be worth revisiting later since it's only been made possible at all somewhat recently. [In a similar vein, "meta sliders" that enable the generation of short animations like this one. But that seems too complex from a user-interface perspective (and prohibitively slow to render all the frames for even just a preview), so this is really just a pipe dream.]
  • Due to an oversight early on, for circle/square/triangle-shaped lines, the line terminates a bit short of its origin – the lower the segment count, the more apparent this is. That's not a difficult fix, but it would subtly change the appearance of previously-created-and-then-accessed-through-share-URLs drawings – for some of which the present behavior may constitute a point of important visual interest – so, if this was to be addressed, some sort of drawing algorithm versioning scheme appended to share URLs and downloaded filenames would be required.
  • The ability to drop a previously-created drawing back into UJI and resume modifying the parameters (extracted from the filename).

Known bugs

Chrome tends to draw less distinct/clear/bright lines than other browsers.

License

You may use this repository's contents under the terms of the bespoke It's the MIT License Except You're Not Allowed to Make an NFT Unless You Use the Proceeds to Feed Birds & Send Me Pictures of Them license, see LICENSE.

However, the subdirectory fonts/ contains third-party webfonts with their own licenses:

  • Renzhi Li's Iosevka Aile, the typeface used throughout the interface, is licensed under the SIL Open Font License Version 1.1, see here.
  • Google's Noto Sans, which provides the glyphs of the ancient scripts used for presets and slider labels, is also used in accordance with its SIL Open Font License Version 1.1, see here.

Further, the stock photo of the laptop was taken by Howard Bouchevereau, the one showing the chair and the picture frames was captured by Christopher Burns, and both have been sourced from Unsplash.

Finally – this isn't relevant of licensing but I'd like to mention it – the general layout has been adapted from Markdeep Diagram Drafting Board and Crop Circles, both are previous projects of mine.

uji's People

Contributors

crul avatar doersino avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

uji's Issues

Add SVG export for pen plotting

As requested on Twitter...

@thatsmaik: Any chance to export it in SVG for pen plotting?

@doersino: That wouldn’t be too much trouble to implement, I believe – are there any constraints regarding the structure of the SVG that I should know about? Is there an existing standard? (I assume color/opacity/etc. aren’t relevant in this context, only line geometry?)

@thatsmaik: I'm a newbie to pen plotting so no expert opinion here - there's no constrains as far as i concern.
Exactly, line geometry is key and the only thing you need. Color, thickness etc. is all 100% pen dependent.
This would be such an awesome feature! Glowing star

@thatsmaik: Maybe a feature which lets you extract different SVG files / layers based on color could come in handy. :) Otherwise you'll need to separate them by hand for each color. [...]

I think it'd be best to have the "Download" button pop up a sheet (similar to the share button) where the user could choose between PNG and SVG (and perhaps JPG, too). This would also provide space for some explanation. Perhaps alt+click could invoke the present "instant" PNG download behavior (this could also be carried over to the share button for share URL copying).

Allow variables and arithmetic in option values

I had this idea while doing the dishes today and got really excited, but the work required to implement turns out to be significant, so I'm merely keeping it as an idea for now. Would open up a host of possibilities, though (and make some sliders obsolete, but I'd keep them anyway).

My hastily-jotted-down notes, left for future me to make sense of:

// TODO allow variables and arithmetic in option values
// variables: i (iteration), s (segment number), x, y
// +, -, *, /, ^ (exponentiation (or maybe bitwise operators)), %
// (parens)
// sine, cosine, tan, etc.
// write parser or just eval? how to show errors? e.g. parse errors, div by 0
// encode permissible variables for each option in options data structure (e.g. line shape has none, color has iteration, etc.)
// could show permissible variables in popover
// display like out-of-range numbers, or greenish?
// gray out slider if value is not a number (or out of range)?, also disable increment and decrement via keyboard, provideo some ui element to reset back into bounds
// would need to have some kind of evalOpt(o, env=[i, s, x, y]) function
// challenge: serialization for url - encode alpha characters somehow? capitals? any issues with math characters?

Clip the drawing at the edges of the canvas for SVG export

As a follow-up to #3 and my comments about the current implementation there, Maik asked:

Would it be possible to implement a feature that strips of and deletes all paths going over the canvas size?

Going to try to address this over the weekend.

Randomize all slider options?

Hey, super cool! I was thinking, as a feature request, the option to randomize within sets, it might lend to more easily discovering cool patterns.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.