Login
You're viewing the ruby.social public feed.
  • Oct 1, 2026, 6:58 PM

    @mjk
    as an IDE this is really cool and promising - I want to be able to scrub values in the block sidebar so much!

    the input/output/view system is interesting, i see that you're limited to one "view()" per block, but I can see how expanding this with things like guide-gizmos could be really useful, I'm imagining guide_point(), guide_line(), guide_rect() for example that add geometry overlaid in the
    "(view)" panel that is rendered (at zoom-independent thickness, with an optional text label etc).
    I guess that could work for cuttle.xyz style input widgets (let point = input_point("name")) as well...?

    💬 1🔄 0⭐ 0

Replies

  • Oct 1, 2026, 7:02 PM

    @mjk
    I'm still getting the hang of the way "Tree" and primitive types interact in Fidget though, here's my attempts at manually implementing sphere() to practice:

    let center = input("center");
    let radius = input("radius");

    // let out = sphere(#{ center: center, radius: radius });

    // let pos = (center - [x, y, z]); // Function not found: - (array, array)
    // let pos = (center - axes()); // Function not found: - (array, map)
    // let pos = (vec3(center) - axes()); // Function not found: - (Vec3, map)
    // let pos = (vec3(center) - vec3(x, y, z)); // Data type incorrect: fidget_core::context::tree::Tree (expecting float)
    let pos = [center[0] - x, center[1] - y, center[2] - z];

    // let out = pos.square().sqrt() - radius; // why is this not what i expect?
    let out = (pos[0].square() + pos[1].square() + pos[2].square()).sqrt() - radius;

    output("out", out);
    view(out);

    I can see why some of the commented lines don't work but I don't understand what does - surely there's some cleaner ways to do what I'm trying to in the first block?

    💬 1🔄 0⭐ 0
  • Oct 1, 2026, 9:26 PM

    @s_ol Thanks for taking a look! I'm traveling now and will lose this on Mastodon; if you direct your comments to discussions in the Halfspace and Fidget repos respectively, I will be more likely to get to them!

    The short answer is that I'm bending Rhai's calling convention in awkward ways, and am increasingly tempted to write a custom GLSL-style scripting language...

    💬 0🔄 0⭐ 0