0
Can I import modules to my mobile Sololearn playground?
I just want to play around with some OpenGL and I have no idea if I can possibly import it here...
8 ответов
+ 7
nope, code playground doesn's support that.
if you want to play with opengl you should use pc
+ 6
There are some interesting solutions to getting at the GPU but I settled on regl and MathBox.
Using regl makes things easier, but not 'too' easy, while MathBox has an animated presentation focus but is complex. I can link codes if you want; just don't want to spoil the fun.
Support on SoloLearn is spotty (Android / WebView versions) but a couple codes have still done well :)
+ 5
Only way to play with *GL on SoloLearn is in Web (possibly PHP, but why?) codes.
+ 4
edit: [FIXED] something's not right here - this is a GL constant (and I'm looking into it)
If you can get a webgl context, you can ask some things about the GPU, e.g., the amount of texture memory you can use:
<body><canvas></canvas></body>
<script>
var cvs = document.getElementsByTagName("canvas")[0];
var gl = cvs.getContext('webgl');
alert(gl.getParameter(gl.MAX_TEXTURE_SIZE));
</script>
I'm working on a code to properly dump all properties.
+ 3
Using regl.party:
[1] Karl's T.'s Cylinder, got some nice attention
[2] Short and simple rotating triangle with only a couple controls
[3] Plasma code (not mine) adapted to the GPU, source links included. If it crashes due to a Javascript issue, try the compatible version linked in its comments.
Check out Karl's codes for a couple more examples.
Using MathBox:
[4] 3D function view - adapted again, but I added some stuff.
1. https://code.sololearn.com/W2bfb7TpGJkk/?ref=app
2. https://code.sololearn.com/Wcw9kppQxRid/?ref=app
3. https://code.sololearn.com/WXo4dZV4H087/?ref=app
4. https://code.sololearn.com/W0jzXMT5qIp0/?ref=app
+ 1
Shame :(
+ 1
Kirk, and JavaScript... But I'm asking because I have no time recently to code on my computer...
0
sure ;) That'll be great