B4J Question [ABMaterial] graphics with 4.30 doesnt work on Firefox/IE?

Discussion in 'B4J Questions' started by MbedAndroid, Nov 17, 2018.

  1. MbedAndroid

    MbedAndroid Active Member Licensed User

    question about this 4.30 update (and also 4.25)
    i'm using ABMcanvasObject for drawing graphics see code below.
    This works on Chrome with 4.30/4.25 but not Firefox/IE anymore
    What could cause this?

    (4.05 works out of box with this code)
    NB pages are much faster loaded with 4.30!


    Code:
    Sub BuildRainbucket(rain As Double,width As Int,height As Int,id As StringAs ABMCanvasObject
       
    Dim bucket As  ABMCanvasObject
       
    Dim const stb=height-30 As Int
       
    Dim const stt=30 As Int
       
    Dim const tg=0.27 As Double 'precaluculated 15 deg tan

       
    Dim level=rain*40 As Int
       
    Dim y=Sqrt(1/tg*4000As Double 'x1 displacement
       Dim x=y*tg/2 As Double
       
    Dim x2=width/8 As Int
       
    Dim top=y As Int
       
    If rain>200 Then rain=200 ''limit amount of rain just to prevent skyhigh filled bucket
       bucket.beginPath
       bucket.moveTo(width/
    2-x2,stb)
       bucket.lineTo(width/
    2-x-x2,stb-y)
       bucket.lineTo(width/
    2+x+x2,stb-y)
       bucket.lineTo(width/
    2+x2,stb)
       bucket.lineTo(width/
    2-x2,stb)
       bucket.fillStyleColor(
    "#d3d3d3")
       bucket.fill

       y=
    Sqrt(1/tg*level)
       x=y*tg/
    2
       bucket.beginPath
       bucket.moveTo(width/
    2-x2,stb)
       bucket.lineTo(width/
    2-x-x2,stb-y)
       bucket.lineTo(width/
    2+x+x2,stb-y)
       bucket.lineTo(width/
    2+x2,stb)
       bucket.lineTo(width/
    2-x2,stb)
       bucket.fillStyleColor(
    "#0000ff")
       bucket.fill
     
  2. alwaysbusy

    alwaysbusy Expert Licensed User

    Do you see any errors in the consoles of IE/Firefox?
     
  3. MbedAndroid

    MbedAndroid Active Member Licensed User

    seems to be fixed. Running it now on the rasp. Have to check what i changed
     
    alwaysbusy likes this.
  4. MbedAndroid

    MbedAndroid Active Member Licensed User

    i didnt copy the www folder items from the template example, just used the same www as for 4.05. Then this issue is gone
     
    hibrid0 and alwaysbusy like this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice