How can Khan Academy computer programs be run offline or on my own website?

前端 未结 3 680
离开以前
离开以前 2021-01-31 12:14

I have developed programs in Khan Academy\'s Computer Programming lessons that I would like to run outside of Khan Academy. How can that be done?

3条回答
  •  轮回少年
    2021-01-31 12:23

    ADDON to the answer of Robert:

    Processing.js uses radians as default for angle values, Khan Academy JS uses degrees. If you add following lines to Robert's code above (before the with statement), then you can use the rotate commands as they come from KA.

    var rotateFn = processing.rotate;
    processing.rotate = function(angle) {
        rotateFn(processing.radians(angle));
    }
    

提交回复
热议问题