https://linen.dev logo
Join Discord
Powered by
# haxe-ui
  • b

    bright-gpu-74537

    02/06/2023, 9:51 PM
    html is also super generic, haxeui xml is super specific
  • h

    hallowed-ocean-84954

    02/06/2023, 9:52 PM
    Specific to the ui use case you mean ?
  • b

    bright-gpu-74537

    02/06/2023, 9:57 PM
    well, i just mean that html describes generic "documents", haxeui (xml) instantiates a fixed set of ui components
  • h

    hallowed-ocean-84954

    02/06/2023, 9:59 PM
    True, html is broader in scope but you could specify a ui in it using a subset right ? And would web- components handle the component piece ? Not arguing for it for other reasons already noted but it seems possible
  • b

    bright-gpu-74537

    02/06/2023, 10:00 PM
    well, if you go down the web component type of route, then i would argue they are basically the same (at a high level point of view)
  • b

    bright-gpu-74537

    02/06/2023, 10:01 PM
    i think web components make html more like xml
  • b

    bright-gpu-74537

    02/06/2023, 10:02 PM
    but thats just superficial really, under the hood, any UI in html is still build out of a bunch of document fragments
  • h

    hallowed-ocean-84954

    02/06/2023, 10:05 PM
    I thought about that but xml files are docs in a similar sense. I think they operate at different levels of abstraction wrt to this particular problem
  • h

    hallowed-ocean-84954

    02/06/2023, 10:06 PM
    One more like a spec, another more like an impl
  • b

    bright-gpu-74537

    02/06/2023, 10:06 PM
    well, true enough
  • o

    orange-van-60470

    02/06/2023, 10:29 PM
    Ian, it draws curves with line and quads, with triangles with pixels. So drawing can create a hitTest objects. Gradient triangles allow shader style RGB fills using Barycentric coordinates you get the 0 to 1 distance from each corner as a ratio coordinate. UV triangles allow shader style image mapping, allowing rotation and arbitary scaling without too much distortion. So for instance you can rotate images without them always being too pixelated. Smoothed edges, basically you can times a barycentic ratio against alpha and limit it to stay below 1 to create a smooth edge down one side.
  • o

    orange-van-60470

    02/06/2023, 10:30 PM
    So with a many sided polygon you instead can get a fairly smooth gradient circle because the barycentric times-ed alpha smooth is on the outer edge.
  • o

    orange-van-60470

    02/06/2023, 10:31 PM
    then if you only take the lower part of all 3 ratios in this way then you can get a triangle with smoothed sides
  • o

    orange-van-60470

    02/06/2023, 10:31 PM
    or with just two sides
  • o

    orange-van-60470

    02/06/2023, 10:32 PM
    so for instance can be applied to a quad/line to have smooth edges
  • o

    orange-van-60470

    02/06/2023, 10:32 PM
    I have created a very basic XML mark up for the shapes
  • o

    orange-van-60470

    02/06/2023, 10:34 PM
    So Ian for instance this is a Quint ( Quad with inner corner ). https://nanjizal.github.io/pixelimage-samples/bin/canvas_quints.html as you can see different smooth can be applied
  • o

    orange-van-60470

    02/06/2023, 10:35 PM
    oh the pixel text example is a bit small at mo! https://nanjizal.github.io/pixelimage-samples/bin/canvas_text.html
  • o

    orange-van-60470

    02/06/2023, 10:36 PM
    but as you can see rotation is fine
  • o

    orange-van-60470

    02/06/2023, 10:36 PM
    arrows needs more work, still sorting out the sides that need smoothing when applied https://nanjizal.github.io/pixelimage-samples/bin/canvas_arrows.html
  • o

    orange-van-60470

    02/06/2023, 10:37 PM
    rounded rectangles https://nanjizal.github.io/pixelimage-samples/bin/canvas_rectangles.html still need to add a smooth option
  • o

    orange-van-60470

    02/06/2023, 10:38 PM
    this is with the xml specifying the pattern
  • o

    orange-van-60470

    02/06/2023, 10:39 PM
    yer probably need to sort out a few more of the demos...
  • o

    orange-van-60470

    02/06/2023, 10:40 PM
    some it is because the TriGML xml markup needs tweaking
  • o

    orange-van-60470

    02/06/2023, 10:41 PM
    The new testing repo is here.. https://nanjizal.github.io/pixelimage-samples/bin/canvas_rectangles.html nine slice is working
  • o

    orange-van-60470

    02/06/2023, 10:42 PM
    in fact most stuff is but maybe not all with the TriXML markup
  • o

    orange-van-60470

    02/06/2023, 10:43 PM
    so natively you can look though the and see most of the initial tests commented out
  • o

    orange-van-60470

    02/06/2023, 10:44 PM
    but will fix up the samples folder. https://github.com/nanjizal/pixelimage-samples arrows is probably one of the nicest to read. https://github.com/nanjizal/pixelimage-samples/blob/main/src/pixelimage_samples/pixelimage_canvas/Arrows.hx
  • o

    orange-van-60470

    02/06/2023, 10:46 PM
    What sort of stuff would be sensible. I can rework the conversion to a specific display texture and remove js specifics
  • o

    orange-van-60470

    02/06/2023, 10:47 PM
    maybe it needs more polish I guess I develop too many aspects at once
1...147214731474...1687Latest