Hacker News new | past | comments | ask | show | jobs | submit login

This is a great idea. For now though, the spec is under-specified and ambiguously terse. A few points that could be clarified:

- How do coordinates work? Does +Y point up (OpenGL) or down (web)? Is the origin meaningful? What are the units - how does this interact with font sizes? High-DPI displays?

- What’s the difference between a file node and a URL node linking to file://./? Are files supposed to be transcluded? What filetypes are allowed? The home page seems to have an image — was this done using a file node or a markdown node with an <img /> element?

- What HTML tags are allowable in markdown? Is JavaScript allowed?

- Why does the group node allow a background image? If both image and color are specified, which takes precedence? How are children of the group specified?

A couple feature requests for extensibility or interoperability with Excalidraw and TLDRaw and friends: drawings / scribbles, predefined shapes like circle or rectangles, ability to specify fill style, edge width, transparency, ability to embed images, more detailed placement for connector start/end points, etc.




> Is the origin meaningful?

I assume no.

> What are the units

Arbitrary. The website says pixels, but the demo lets you zoom in and out, so I think defining the unit as pixels is pretty meaningless, except as a hint to the viewer of the initial scale for the canvas. Even then I can see good reasons for a viewer program to just ignore that and use whatever initial scale allows everything to fit on screen.

> how does this interact with font sizes?

Seems like the font size can't be changed, but I'd imagine it's a specific number of units.

> High-DPI displays?

Not sure what kind of answer you're looking for here. You can just scale everything, so support for High-DPI displays would be up to the viewer program.


I know this isn’t intended as a document presentation format, but for a consistent layout, it would be a good idea to specify the ratio between pixels (for layout) and font size (in pt). Otherwise, viewers would render text inconsistently-each node would be some ratio too big or too small for its contents.


> Is the origin meaningful?

I assume yes, as it makes placement of things much easier if they're all relative to a known origin. The limits of the canvas would be "realistically infinite" in all directions though I assume...


I don't know if "realistically infinite" does or doesn't work here. A lot of video games with huge worlds start to break down with big coordinates due to loss of precision in the floats I presume.

If using integers, I'd cap it at 2^53 to align with js's max safe integer which I think is just a double.


> How do coordinates work?

This is a data format. This is an abstract data model.

So the spec doesn't specify rendering.

Rendering could however be specified separately (and its reference implementation is Obsidian).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: