Solved Using an external Javascript library for UI app

Discussion in 'Mod Support' started by angelo234, Jun 15, 2021.

  1. angelo234

    angelo234
    Expand Collapse
    Programmer
    BeamNG Team

    Joined:
    Aug 11, 2017
    Messages:
    540
    Anybody know how to use an external Javascript library for a UI app? Thanks in advance! :)
     
  2. angelo234

    angelo234
    Expand Collapse
    Programmer
    BeamNG Team

    Joined:
    Aug 11, 2017
    Messages:
    540
    I figured out how to do it and if anyone wants to know how, literally all you have to do is copy and paste the entire library code into the AngularJS file.
     
  3. Agent_Y

    Agent_Y
    Expand Collapse
    Jbeam/QA support
    BeamNG Team

    Joined:
    Jul 10, 2020
    Messages:
    10,056
    Isn't there another solution? Because that's a lot of code
     
  4. angelo234

    angelo234
    Expand Collapse
    Programmer
    BeamNG Team

    Joined:
    Aug 11, 2017
    Messages:
    540
    I was using a different method before but it required you to reload the Javascript code and also it could break easily if other mods relied on the same technique. And so what I do now is minimize the library code all into one line and paste that in so it doesn't take up the entire file lol.
     
  5. Agent_Y

    Agent_Y
    Expand Collapse
    Jbeam/QA support
    BeamNG Team

    Joined:
    Jul 10, 2020
    Messages:
    10,056
    That probably makes it ultra messy for anyone who wants to look into your code to see how it works but ok
     
  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