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

    billowy-waiter-28954

    01/25/2023, 11:19 PM
    😨
  • a

    ambitious-knife-25690

    01/25/2023, 11:19 PM
    100% just using depth field now
  • a

    ambitious-knife-25690

    01/25/2023, 11:19 PM
    but, for colours, everything is null checked
  • a

    ambitious-knife-25690

    01/25/2023, 11:20 PM
    i overwrite the base colour once style is called
  • a

    ambitious-knife-25690

    01/25/2023, 11:20 PM
    so confused why the inconsistency
  • b

    billowy-waiter-28954

    01/25/2023, 11:20 PM
    Try to test on a smaller example
  • b

    billowy-waiter-28954

    01/25/2023, 11:20 PM
    you'll find where it breaks
  • a

    ambitious-knife-25690

    01/25/2023, 11:21 PM
    It's awkward cause i can't debug or get line errors 😅
  • a

    ambitious-knife-25690

    01/25/2023, 11:22 PM
    Copy code
    hx
            if (style.backgroundColor != null) {
                var alpha:Int = 0xFF000000;
                var bgcolor = style.backgroundColor;
                _surface.color = (bgcolor);
                if (style.backgroundColorEnd != null && style.backgroundColor != style.backgroundColorEnd) {
                        
                        _surface.colorMapping = VERTICES;     
                        
                        var hend = style.backgroundColorEnd;
                        var start = (bgcolor | alpha);
                        var end = (hend | alpha);
                        var type = "vertical";
                        if (style.backgroundGradientStyle != null) {
                                type = style.backgroundGradientStyle;
                        }
                        switch (type) {
                            case "horizontal":
                                _surface.colors = [start, end, start, end];
                            case "vertical" | _:
                                _surface.colors = [start, start, end, end];
                        }
                } else {
                        _surface.colorMapping = MESH;
                        if (style.backgroundOpacity != null) {
                                _surface.alpha = style.backgroundOpacity;
                        }
    
                }
            }
  • a

    ambitious-knife-25690

    01/25/2023, 11:23 PM
    I think the black is coming from that
    alpha
    int
  • a

    ambitious-knife-25690

    01/25/2023, 11:23 PM
    but, i overwrite the surface bg color so i don't think the default surface colour of
    None
    or
    Transparent
    shouldn't apply anymore
  • b

    bright-gpu-74537

    01/25/2023, 11:25 PM
    doesnt ceramic want RGBA cols?
  • a

    ambitious-knife-25690

    01/25/2023, 11:26 PM
    it depends
  • a

    ambitious-knife-25690

    01/25/2023, 11:27 PM
    .color
    is fine with
    rgb
    gradient mesh
    .colors
    wants
    rgba
  • b

    bright-gpu-74537

    01/25/2023, 11:27 PM
    gotcha
  • a

    ambitious-knife-25690

    01/25/2023, 11:29 PM
    it looks like the components that have the issue are components that don't get backgrounds set via the stylesheet
  • b

    bright-gpu-74537

    01/25/2023, 11:30 PM
    thats likely a red herring, there is no difference where the css comes from, it all ends up in the same place
  • a

    ambitious-knife-25690

    01/25/2023, 11:31 PM
    hehe
  • a

    ambitious-knife-25690

    01/25/2023, 11:31 PM
    got it 😄
  • a

    ambitious-knife-25690

    01/25/2023, 11:31 PM
    does seem like there's some other oddities here tho
  • a

    ambitious-knife-25690

    01/25/2023, 11:32 PM
    not sure what's going on with
    Bottom
    button
  • a

    ambitious-knife-25690

    01/25/2023, 11:33 PM
    I did
    this._surface.colors = [AlphaColor.TRANSPARENT];
    instead of
    this._surface.color = Color.NONE
  • a

    ambitious-knife-25690

    01/25/2023, 11:34 PM
    NONE
    seems to translate to
    white
    on native so that meant those items that don't set a backgroundcolor just all get a nice big white background
  • b

    billowy-waiter-28954

    01/25/2023, 11:40 PM
    Color.NONE should never be assigned to quad or meshes
  • b

    billowy-waiter-28954

    01/25/2023, 11:40 PM
    it exists more for other usages
  • a

    ambitious-knife-25690

    01/25/2023, 11:41 PM
    here's the exported app if ya'll wanna have a feel for it 😄
  • b

    billowy-waiter-28954

    01/25/2023, 11:41 PM
    also if you want to make something invisible, you should rather use active = false than assigning a transparent color
  • b

    billowy-waiter-28954

    01/25/2023, 11:42 PM
    I'm on mac 😬
  • a

    ambitious-knife-25690

    01/25/2023, 11:42 PM
    ahh dang
  • a

    ambitious-knife-25690

    01/25/2023, 11:44 PM
    if you have electron just run
    electron main.js
    in the folder
1...464748...124Latest