Using Javascript from SpiderBasic
HPW
 
Posts: 34
Joined: Thu May 04, 2017 4:25 pm

Re: Babylon.js : Problem with the latest release

by HPW Sat Aug 25, 2018 7:29 am

Hello falsam and Peter,

falsam wrote:
Unfortunately no


So I give it a try and copied Peters Header with the cdn3.2 loadr to every demo of Bjs-master.

In engine.sbi I outcomment this 4 lines:
Code: Select all
Procedure InitEngine(Callback, CanvasGadget = #PB_Ignore)   
;  !require([bjs$v_bjsenginepath + "/babylon.custom.js"],
;  ! function(t) {
  !   if (BABYLON.Engine.isSupported()) {
 
        If CanvasGadget = #PB_Ignore   
          !$('<canvas>').attr('id', 'renderCanvas')
          ! .css({ width : '100%', height : '100%' })
          ! .appendTo('body');
        Else
          !var selector = $(spider_GadgetID(v_canvasgadget))[0].gadget
          !selector.id = "renderCanvas"
          !selector.style.width = '100%'
          !selector.style.height = '100%'
        EndIf
 
  !     v_bjscanvas = document.getElementById('renderCanvas');
  !     v_bjsengine = new BABYLON.Engine(v_bjscanvas, true, { preserveDrawingBuffer: true, stencil: true }); 
  !     window.addEventListener('resize', function(){v_bjsengine.resize(); }); 
  !     v_callback()
  !   } else {return false}
;  ! }
;  !);   
EndProcedure 


Each demo compiles but a few did not Show as expected. (water,terrain etc.)
I guess incompatibiitys between last used custom-build and 3.2

So I do a find and replace on all bfs-examples sb to
Code: Select all
;!        "replace": "</title>\n\n<script src='/sbbjs/babylon.custom.js'></script>"


Now the Demos work again like last original release.

Regards
Return to Javascript

Who is online

Users browsing this forum: No registered users and 2 guests