BJS ~ PWA WrappShell Update


#21

So it is possible… :cocktail: A western route! :sunny:


#22

See: Get Collecto - Microsoft Store


#23

“In app purchases”? Well look at that… and “XBox One” too…

QUESTION: can Collecto collect PWA Apps? Slight smile… :slight_smile:

Emerging (exceptional) PWA life-cycle:


> html web-site  > gallery
> downloads > PWA App 
> downloads > PWA Episodes 
> downloads scene data 
> downloads > other PWA app
> is all collectible in Collecto?

Might Collecto collect URLS? (then, run in iframes, pass “beforeinstallprompt” as postMessage in)?
And perhaps then save manifest data with route.
Also…Collecto solves exposure problem? Check it out…
Look URLS others collecto! Badges.:name_badge:
Tradeable channels of exposure. :checkered_flag:
afalcon collecto Amazon Socks.
Game on!


#24

TRYING COLLECTO on AppStore:

  • Tried again - confirmed behavior. And waited “a bit”. Funny. :black_heart: Same behavior.

A few days later (works, weird):

image


Wait! Woah....


cansee


#25

Another: MS-AppStore: FAIL:


" **App Policies:** 10.4.2 App Crash or Freeze

Notes To Developer

Unfortunately, we can’t test the app, because the app does not display any content at launch; (ha!) and crashes after a minute. (web doesn’t do that…) Tip: A Windows app may run flawlessly during development and testing, (on web) but after submitting it for certification testing, (MS:PWABuilder) the app may crash or perform unexpectedly. (Wait. Srsly?) Along these same lines, your app may not perform as expected after publication. (That is Gold!) You can contact Developer Support at (yeah nice guys) http://aka.ms/storesupport if you need assistance with troubleshooting.
(uh, sure - > 304)

Tested Devices: Dell Inspiron 12-5280, Lenovo MIIX 520 (no comodore64?)
"


image

My experience with -every-last-app-store.

MS-AppStore RESULTS:

3 different builds
3 different failures
35 days.

~Failure to Deliver to Market does not fit our Business Model.

Email is last resort… :black_heart:


Swiitching back to Itch and Node. Appscope and PWA.rocks.

:sunny:


#26

Were you able to check with Jeff ?


#27

Hi sebavan, like your work! Yeah Jeff is awesome. Email pending from over the weekend. Hoping for the best.

The error seems platform related (similar to above).

Not sure how we could possibly replicate and debug.

Jeff supports PWABuilder… not PWA on AppStore?

We change Icon and submit again (and again).

: )


#28

Sad to hear that (for the store not my work obviously :wink: ), hope we can figure soon enough.


#29

Support:

“Let us know if you need Assistance Troubleshooting.”

I need assistance troubleshooting.

“Let us know if you need Additional Assistance.”

Wait what? :slight_smile:

“Did we resolve your issue?”

Not really. Nvm. 304. Too slow. :black_heart:

CONFIRM: AppStores are Tar-Pit-Trap:

To make jump from SCENE to EPISODE - 3D Artists require a faster alternative.

Plan B: Appscope

GOOD NEWS: support directs the blind bird to the “Developer Forum”’. Which is great. Slipped my mind. A case of endless-user-error… or so it seems. However, a hint of PWA topics. So that is fantastic!

Will follow up on “PWA Freeze Crash” topic there. :heart_eyes:


#30

Made this:

…halfway to Appscope.

:sunglasses:


UPDATE: PWA-WRAPSHELL - open-source - live on GitHub

ping @Deltakosh - TITLESCREEN performance op works. (three-quarters to Appscope…)

:cow:


#31

FANTASTIC NEWS:

Hello, Trusted Web Activity?

Also, did anyone see, “we think PWA is game changer” above? Or somewhere?

The great web ice barrier may be in thaw.

If PWA is a game changer … that is big news for BABYLONJS!

Lets make some noize ppl! Ppl? Helloooo. : )

UPDATE: Submitted BOXiGON (FREE) to Appscope.

Cross fingers - there may SOON be BabylonJS PWA on APPSCOPE.

(with a pretty great Lighthouse Audit Score). Waiting to hear back. Moar random hurdles?

image

  • 93 is for needing Http/2 on my Node box. And 76 will be faster with babylon.js upgrade soon. v3.

Try out the new and improved BOXiGON (FREE) Moar Fun! 3D PUZZLE!

image

Make your own PWA with BJS in the vanilla 3D-WRAPSHELL - open-source - live on GitHub


#32

Phenomenal Score with Babylon PWA on Lighthouse:
image
Lazy Loaded BabylonJS behind the TitleSequence Screen (above).

SOLUTION: retrofit this js-loader to be babylon-loader:

ERROR did come up (in the Promise, before onload…resolve()) in the Grid Plugin:
ATTEMPTED RESOLUTION: change order it is loaded. Delay render.
Removing render of grid avoids error. And could still NOT lazy-load grid. But…

Curious about this:

anyone know why a Promise .append() would cause ExtendStatics to be undefined before resolve()?


#33

seems like the material class is not available when creating the GridMaterial


#34

Oh! 12345 Looking…

SUCCESS!

SOLUTION:
image
Move load from #107 to #114.

Thankyou Dr.Kosh :sunglasses:

image


#35

BabylonJS Lazy Load by Promise:

var loadBabylon = function() {
    var load = (function() { //https://davidwalsh.name/javascript-loader
      function _load(tag) { // Function returns a function: https://davidwalsh.name/javascript-functions
        return function(url) {
          return new Promise(function(resolve, reject) { //used by Promise.all to determine success or failure
            var element = document.createElement(tag);
            var parent = 'body';
            var attr = 'src';
            element.onload = function() { resolve(url); }; //success and error for the promise
            element.onerror = function() { reject(url); };
            switch(tag) { //different attributes depending on tag type
              case 'script': element.async = true; break;
              case 'link': element.type = 'text/css'; element.rel = 'stylesheet'; attr = 'href'; parent = 'head';
            }
            element[attr] = url; //inject and load
            document[parent].appendChild(element);
          });
        };
      }
      return { js: _load('script')/*, css: _load('link'), img: _load('img')*/ }
    })();
    Promise.all([
        load.js('./lib/babylon/babylon.3.0.min.js'), 
        load.js('./lib/babylon/hand.min-1.2.js') 
        // load.css('lib/.css'),// load.img('images/logo.png')
      ]).then(function() {
        load.js('./lib/babylon/materials/babylon.gridMaterial.min.js')
        console.log('Babylon loaded');
        setTimeout(function(){ createScene(); },1)
      }).catch(function() { console.log('ERROR: loading babylonjs'); });
}

Adapted from: David Walsh Blog

UPDATE: tiny improvement adding a .then() to the load of Grid material - to call createStage()!

    Promise.all([
        load.js('./lib/babylon/babylon.3.0.min.js'), 
        load.js('./lib/babylon/hand.min-1.2.js') 
        // load.css('lib/.css'),// load.img('images/logo.png')
      ]).then(function() {
        load.js('./lib/babylon/materials/babylon.gridMaterial.min.js')
        .then(function(){ createStage(); });  //<-- interesting, check it out!
        setTimeout(function(){ createScene(); },1)
      }).catch(function() { console.log('ERROR: loading babylonjs'); });

Hope to extend that someday. :black_heart:


#36

UPDATE:

Ability to Load Babylon after user interaction (above). :star:


Ability to load (many) babylon scenes after user interaction (below): :star2:

image

Loading scenes dynamically is awesome! In 3DPWAWRAPPSHELL soon.

UPDATE: MESH-REMOVAL below.


CAUTION: uses dynamic import(), unsupported in some places.


#37

Ability to unloadScene: :star:

export var unloadScene = function(){
    for(var i=0;i<sceneMesh.length;i++){
        sceneMesh[i].dispose();
        sceneMesh[i] = null;
    }
}

DESCRIPTION: multiple scenes can be loaded and (then looked up and) unloaded.

Please share if there are other things to consider to fully unload a scene. thx.


#38

Hi.
Yes. If you don’t dispose materials independent then you should use dispose meshes like

export var unloadScene = function(){
  for(var i=0;i<sceneMesh.length;i++){
      sceneMesh[i].dispose(false, true);
      sceneMesh[i] = null;
  }
}

Based on this Mesh - Babylon.js Documentation
But I’m curious, why are you not using directly scene.dispose()?


#39

Awesome! Exactly what I was wondering about. Added the parameters - and it will help with textures thanks.

As for scene.dispose() - adding and removing parts of scenes at the moment, (keeping skybox and ground) will be adding and removing entire scenes shortly. So thanks for tips MarianG! :sunny:


#40

I can imagine the shape of a BSpline path finally. Took forever…