• Products
    • Isadora
    • Get It
    • ADD-ONS
    • IzzyCast
    • Get It
  • Forum
  • Help
  • Werkstatt
  • Newsletter
  • Impressum
  • Dsgvo
  • Press
  • Isadora
  • Get It
  • ADD-ONS
  • IzzyCast
  • Get It
  • Press
  • Dsgvo
  • Impressum

Navigation

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Tags

    Automatic calculating of Offscreen positions of scrolling Text

    How To... ?
    2
    3
    1274
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      DillTheKraut last edited by

      Hello Community,

      I try to get a automated calculation with the javascript  actor. Maybe someone can help me with this. I think I need a usable mathematical formula for this.
      1\. What I already have:
      I want text in the Text Drawer to be scrolled vertically or horizontally. The Text scrolling should be starting and stopping Offscreen.
      This is already working, if I try to find the right Offscreen values in the Text Draw actors horiz pos and vert pos, by trying manually and give it to the envelope generator.
      2\. What I want:
      I want to calculate the scrolling end positions automatically by a javascript actor. The Basics are the font size, the number of characters (if scrolled horiz.)/rows (if scrolled vert.) and a factor based on the font size.
      3\. My Issue:
      I can't really find a working factor that is exactly enough to get the appropriate results.
      An Example (I tried to get an factor by checking the results at certain values)
      Text ist Numbers by 1 up to 100, 1 Number per row, giving 100 rows.
      Value "vert align" is set to "top" meaning row 1 is at top screen if "vert pos" is set to 0, and just offscreen if "vert pos" is at 100.
      "bounds" are set to 0 and all other values are default.
      font size | manual value of "vert pos" if last row is gone offscreen (not including +100 because of starting offscreen) | % of discrepancy to the factor 1: -111
      1  | -111 | 0%
      1,1 | -138,6 | 13,51%
      1,2 | -138,6 | 4,05%
      1,5 | -166,5 | 0%
      2 | -249,6 | 12,43%
      5 | -582 | 4,86%
      10 | -1165 | 5,81%
      50 | -5739 | 3,41%
      100 | -11480 | 3,3%
      As you can see, there is no exact linear consistency as there are discrepancies of several percentages.
      What is this related to? Is it a bug, or do I miss something?
      Does anyone have an Idea?!
      Thanks,
      Dill
      1 Reply Last reply Reply Quote 0
      • DusX
        DusX Tech Staff last edited by

        You might have better luck if you try to work with a monospace font, otherwise each character will be of varying width.

        Heres a listing of a few: http://hivelogic.com/articles/top-10-programming-fonts/

        Troikatronix Technical Support

        • New Support Ticket Link: https://support.troikatronix.com/support/tickets/new
        • My Add-ons: https://troikatronix.com/add-ons/?u=dusx
        • Profession Services: https://support.troikatronix.com/support/solutions/articles/13000109444-professional-services

        Running: Win 11 64bit, i7, M.2 PCIe SSD's, 32gb DDR4, nVidia GTX 4070 | located in Ontario Canada.

        1 Reply Last reply Reply Quote 0
        • D
          DillTheKraut last edited by

          Hello DusX,

          thank you for your advise. I had this in mind for the horizontal scrolling.
          But the example I gave is about vertical scrolling. I'm aware that maybe different fonts does have different hight within the same "font size" value.
          But if you use the same font in different sizes (as done in the example) shouldn't the rows have the same size each!?
          Especially as "font size" is defined as "The hight of the characters, expressed as a percentage of the hight of the frame"?!
          1 Reply Last reply Reply Quote 0
          • First post
            Last post