javascriptcanvasprocessing.jskhan-academy

using khan academy programs in websites


I'm a student using Khan Academy to learn coding, and I've made quite a progress there. I've also learnt a fair bit of HTML, CSS and JS in my college. I was wondering if there's a way to play my game (on Khan Academy, written in ProcessingJS) as an offline HTML page.

Now, I've done a fair amount of research before asking here. I've tried the following:

1. This HTML template on Khan Academy.
2. This template too.
3. And this one on Stack Overflow too.

Using any of the above templates gives me a half-baked output, and it seems that the keyboard controls aren't working. Neither are the animations.

Thanks in advance!


Solution

  • I've created a project which allows KhanAcademy projects to work offline: https://github.com/prolightHub/KaTemplate

    Steps:

    1. Download it and extract it to where you want it
    2. Rename the folder and title in index.html
    3. Open js/index.js
    4. Put your code into the function:
      function main()
      {
          // Paste your Khan Academy code here
      }
      
      createProcessing(main);
      
      
    5. Open index.html

    And it should all work.