https://linen.dev logo
Join Discord
Powered by
# ceramic
  • f

    faint-toothbrush-51643

    02/10/2023, 11:35 PM
    now how can i make the area for clicking on it a fixed bigger size so the player doesn't need to select the text specifically?
  • a

    ambitious-knife-25690

    02/10/2023, 11:53 PM
    wdym
  • a

    ambitious-knife-25690

    02/11/2023, 12:40 AM
    thanks!
  • a

    ambitious-knife-25690

    02/11/2023, 12:40 AM
    basic navigation works
  • b

    billowy-waiter-28954

    02/11/2023, 9:39 AM
    It was way harder to implement the API for that, for sure 😄
  • f

    faint-toothbrush-51643

    02/11/2023, 3:31 PM
    back when i did vanilla js, i did everything else with the canvas but for text input i just moved around a ln html input
  • b

    billowy-waiter-28954

    02/11/2023, 4:28 PM
    Not surprised, text input is a mess to implement from scratch
  • o

    orange-van-60470

    02/12/2023, 8:43 PM
    @billowy-waiter-28954 I have been playing with using barycentric coordinates to do triangle gradients and UV mapped textures on cpu with pixels. So was interested in your frac shader code Sharpen, as I think I could use it in the triangle drawing loop. Had a quick go at porting.. but unsure https://gist.github.com/nanjizal/dec39218c62337551e85b2a321ebe7cf#file-sharpen-hx-L1
  • o

    orange-van-60470

    02/12/2023, 8:44 PM
    as perhaps could be used here.. https://github.com/nanjizal/pixelimage/blob/main/src/pixelimage/algo/TriPixel.hx#L455
  • o

    orange-van-60470

    02/12/2023, 10:40 PM
    I am thinking...
    Copy code
    Haxe
    public var sharpness = 2.;
    inline
    function fract( v: Float ){
        return v - Math.floor( v ); 
    }
    inline
    function sharpen( px: Float, resolution: Float ){
        px = px * resolution;
        var norm = (frac(px)-0.5)*2.;
        var norm2 = norm*norm;
        return ( Math.floor( px ) + norm * Math.pow( norm2*sharpness ) /2 + 0.5 )/resolution;
    }
    // code within barycentric drawing loop
    var u = au*ratioA + bu*ratioB + cu*ratioC;
    var v = av*ratioA + bv*ratioB + cv*ratioC;
    var x = Std.int( u*win.width  + win.x );
    var y = Std.int( v*win.height + win.y );
    var col = texture.getARGB( sharpen( x, win.width ), sharpen( y, win.height ) );
    pixelImage.setARGB( px, py, col * pixelImage.getARGB( px, py ) );
  • o

    orange-van-60470

    02/12/2023, 10:41 PM
    but the points are not Float... so won't work
  • o

    orange-van-60470

    02/12/2023, 10:42 PM
    mmm
  • f

    faint-toothbrush-51643

    02/13/2023, 6:14 AM
    Is there a way to set the alpha of a visual and all its children?
  • b

    billowy-waiter-28954

    02/13/2023, 8:50 AM
    @orange-van-60470 sorry I don’t really have the bandwidth to help you debug your code
  • b

    billowy-waiter-28954

    02/13/2023, 8:50 AM
    Children will inherit the parent alpha if their inheritAlpha property is true
  • o

    orange-van-60470

    02/13/2023, 9:18 AM
    no worries, have kept the snipit but would probably need to rethink completely, your effectively mixing blured edges with the background depending on size, I might be able to implement something similar differently. I will be adding pixelimage ( changing to pixelimageXY ) to ceramic in the future. I am not sure if it will become ideal pixel approach for anyone as shaders are faster - probably not, but a decoupled solution is quite nice and has some advantages as you can compare between render toolkits and would have png solution for gl headless ceramic.
  • m

    miniature-lawyer-98519

    02/13/2023, 11:36 AM
    Where is the arcade physics repo code? Or ceramic uses nape for arcade?
  • a

    ambitious-knife-25690

    02/13/2023, 11:44 AM
    ceramic has support for both/whatever you wish to use
  • a

    ambitious-knife-25690

    02/13/2023, 11:44 AM
    what repo are you referring to?
  • m

    miniature-lawyer-98519

    02/13/2023, 11:57 AM
    Arcade physics?
  • m

    miniature-lawyer-98519

    02/13/2023, 11:57 AM
    Basic physics
  • m

    miniature-lawyer-98519

    02/13/2023, 11:57 AM
    AABB
  • a

    ambitious-knife-25690

    02/13/2023, 11:58 AM
    it doesn't exist in standalone ceramic
  • a

    ambitious-knife-25690

    02/13/2023, 11:59 AM
    if you wish to use physics you need to enable the plugin or add a physics lib
  • a

    ambitious-knife-25690

    02/13/2023, 12:00 PM
    i think all you need to do is add
    - arcade
    to the yml under plugins
  • m

    miniature-lawyer-98519

    02/13/2023, 12:04 PM
    Therefore the arcade isnt public available?
  • a

    ambitious-knife-25690

    02/13/2023, 12:05 PM
    i think you misunderstood what I said?
  • m

    miniature-lawyer-98519

    02/13/2023, 12:05 PM
    I think so
  • m

    miniature-lawyer-98519

    02/13/2023, 12:06 PM
    Im looking for the source code of basic arcade physics
  • a

    ambitious-knife-25690

    02/13/2023, 12:06 PM
    ohhh
1...636465...124Latest