https://linen.dev logo
Join DiscordCommunities
Powered by
# ceramic
  • o

    orange-van-60470

    08/19/2022, 12:24 PM
    trilateral3 has some 9-slice support https://github.com/nanjizal/trilateral3/blob/master/src/trilateral3/reShape/NineSlice.hx#L27 you can see a pure webgl example https://trilateralx.github.io/HyperKitGLsamples/src/hyperkitGLsamples/nineSlice/index.html the slice parameters are explained here https://twitter.com/Nanjizal_net/status/1378010774791151617 the relevant class https://nanjizal.github.io/trilateral3/pages/trilateral3/reShape/NineSlice.html trilateral3 is wrapper over cornercontour and will work for 2d only in ceramic it is probably some effort to setup but should be feasible
  • o

    orange-van-60470

    08/19/2022, 12:28 PM
    basic ceramic setup with cornercontour. https://github.com/nanjizal/cornerContourSamples/blob/main/src/cornerContourSamples/hxCeramic/SvgExample.hx with trilateral3 your pretty much just using a 3D wrapper. Should in theory work with images as you just set an image for your ceramic mesh and trilateral3/ceramic won't even know
  • o

    orange-van-60470

    08/19/2022, 12:30 PM
    but not sure there is example anywhere. If you get corner contour working on ceramic then can point you on setting up trilateral3 on top.
  • o

    orange-van-60470

    08/19/2022, 12:59 PM
    with trilateral3 you are effectively saving 3d points with colours in an array but you would just need a custom conversion to the mesh similar to the cornercontour one. Also you can apply 3D transform before extracting!
  • b

    billowy-waiter-28954

    08/20/2022, 3:13 PM
    Well, the question is coming over regularly, and anyway I'll need NineSlice at some point, so just started implementing it, with the API explained before: https://discord.com/channels/162395145352904705/853414608747364352/981672474703958076
  • f

    faint-toothbrush-51643

    08/20/2022, 3:16 PM
    yay
  • b

    billowy-waiter-28954

    08/21/2022, 12:33 PM
    Well, well, it seems to work
  • b

    billowy-waiter-28954

    08/21/2022, 12:34 PM
    (the image)
  • b

    billowy-waiter-28954

    08/21/2022, 12:35 PM
    (the code)
    Copy code
    haxe
            nineSlice = new NineSlice();
            nineSlice.texture = assets.texture(Images.YELLOW_BUTTON);
            nineSlice.pos(10, 10);
            nineSlice.slice(
                5, // top
                6, // right
                9, // bottom
                6 // left
            );
  • b

    billowy-waiter-28954

    08/21/2022, 12:44 PM
    Pushed to git! @faint-toothbrush-51643 if you want to use it before next ceramic release, you can just copy the NineSlice.hx file in your project and it should work: https://github.com/ceramic-engine/ceramic/blob/master/runtime/src/ceramic/NineSlice.hx
  • b

    billowy-waiter-28954

    08/21/2022, 1:10 PM
    Well, there is a release https://github.com/ceramic-engine/ceramic/releases/tag/v0.16.0
  • b

    billowy-waiter-28954

    08/21/2022, 2:18 PM
    And here we go with a live sample of nine slice: https://ceramic-engine.com/examples/nine-slice/
  • f

    faint-toothbrush-51643

    08/21/2022, 2:51 PM
    oh i'm at work but i'll look at that when i'm back
  • r

    refined-laptop-39041

    08/21/2022, 3:58 PM
    🎉
  • f

    faint-toothbrush-51643

    08/21/2022, 11:32 PM
    uh shoot how do i update again?
  • f

    faint-toothbrush-51643

    08/21/2022, 11:33 PM
    haxelib run ceramic setup
    says ceramic isn't installed
  • g

    gifted-whale-78169

    08/22/2022, 1:50 AM
    I think you need to use sudo
  • f

    faint-toothbrush-51643

    08/22/2022, 1:52 AM
    don't have sudo
  • f

    faint-toothbrush-51643

    08/22/2022, 1:52 AM
    i'm on windows
  • f

    faint-toothbrush-51643

    08/22/2022, 1:52 AM
    and how would that even help
  • g

    gifted-whale-78169

    08/22/2022, 1:53 AM
    then idk
  • g

    gifted-whale-78169

    08/22/2022, 1:54 AM
    There's a separate haxelib path when you use sudo, and you use sudo when you want to install globally
  • g

    gifted-whale-78169

    08/22/2022, 1:54 AM
    I was thinking that you might trying to update in the wrong haxelib path
  • e

    elegant-twilight-61392

    08/22/2022, 1:55 AM
    your not supposed to run haxelib as root
  • e

    elegant-twilight-61392

    08/22/2022, 1:56 AM
    your supposed to set your haxelib path to somewhere that you have write access to so you dont need to use sudo
  • b

    billowy-waiter-28954

    08/22/2022, 6:29 AM
    Be sure to run the command from the same location as before, if you didn’t install ceramic globally
  • b

    billowy-waiter-28954

    08/22/2022, 8:38 AM
    I should simplify the install process I guess, let it install ceramic always at the same location by default, just like haxe which is always installed into drive:/HaxeToolkit
  • f

    faint-toothbrush-51643

    08/22/2022, 5:30 PM
    What is "earcut" and why is it upset that i don't have it
    Copy code
    Error: Error: Cannot process [earcut]: Library earcut version dev is not installed
  • r

    refined-laptop-39041

    08/22/2022, 5:33 PM
    @faint-toothbrush-51643 https://github.com/ceramic-engine/earcut This I believe
  • r

    refined-laptop-39041

    08/22/2022, 5:34 PM
    https://github.com/ceramic-engine/ceramic/blob/17d66689e8949c38488cc1ce8dbce29f9525c3e5/.gitmodules
1...8910...124Latest