Skip to content

Instantly share code, notes, and snippets.

@bnmnetp
Last active November 7, 2020 00:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save bnmnetp/20bd9105f11f2a164fc0 to your computer and use it in GitHub Desktop.
Save bnmnetp/20bd9105f11f2a164fc0 to your computer and use it in GitHub Desktop.
Include a Third Party library not in skulpt-stdlib.js
// This snippet shows the cool new functionality added by @bzwheeler and the team at trinket.io
// You can now develop and host your own modules for skulpt, and set up a page to make those
// modules available as in the following.
Sk.externalLibraries = {
numpy : {
path: 'http://example.com/static/primeronoo/skulpt/external/numpy/__init__.js',
dependencies: ['/static/primeronoo/skulpt/external/deps/math.js'],
},
matplotlib : {
path: '/static/primeronoo/skulpt/external/matplotlib/__init__.js'
},
"matplotlib.pyplot" : {
path: '/static/primeronoo/skulpt/external/matplotlib/pyplot/__init__.js',
dependencies: ['/static/primeronoo/skulpt/external/deps/d3.min.js'],
},
"arduino": {
path: '/static/primeronoo/skulpt/external/arduino/__init__.js'
}
};
@kondoudesu45
Copy link

Hi
How can I creat the file of init.js and math.js?
Must I use py2js as tool or complie the file of init.py in source?
Let me know how to creat it.

@izzy-dreisen
Copy link

hi where can i get arduino lib?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment