WebGL SDK - leiawebglsdk npm package missing (temp. alternative found)

Hey there, I was digging through the docs and wanted to give the WebGL SDK a go, unfortunately, the npm package mentioned in the docs: leiawebglsdk is not on npm:

i think i found it here tho:

just wanted to share in case anyone found this useful, and so that the team could either publish the package or update the docs

3 Likes

Npm should now work as expected now with the npm command:

npm install leiawebglsdkdemo

We have updated our online documentation to match.

@jakedowns, thank you for bringing this to our attention!

3 Likes

Are there any WEBGL examples available?

i have one kind of working. but in my experience the backlight toggling can be a little unreliable at times. ill work on posting it to my github io page

2 Likes

I posted a basic one here:
https://jakedowns.github.io/Leia_WebGL_SDK

demo 0 is the original one from the repo i found
demo 1 is me playing with adding a joystick to control a cube

things to note:

  1. you have to allow popups on the page
  2. you probably need to rotate your device once after loading the page to get the proper aspect ratio to render
  3. you have to have “backlight_switch_url” apk installed in order to be able to let the webpage open a url to toggle the backlight between 2D/3D mode (download link for the apk will be presented in a popup window if you don’t have it installed… or, even if you do have it installed and the page gets confused)
  4. i don’t have any code to set it back to 2D after you leave the page, so you need to jog it by switching android apps
  5. when entering fullscreen mode, the control buttons are disappearing, and the rendered aspect ratio seems to go into some mismatched state where the 3D effect just becomes a mess since the pixels aren’t aligning with the diffractive backlighting hogels (holographic pixels?, i dunno, something like that)

so yeah, needs a bunch of work and TLC, but the proof of concept is there.
I look forward to playing with it more once I get my other little side projects out of the way.

5 Likes

Hello All,

We have smoothed out our initialization process and added to our documentation, including a new Three.js tutorial:

We appreciate everyone’s patience as we worked through this. Please let us know if you experience any other issues!

Thank you,

Joe

1 Like