Hello falsam,
Good News! Your test-code works for me.
Will you change your Demos to the new call-syntax?
For understanding: Does spiderbasic supprts 'require' itself? I does not find it in the docs.
Does requre supports an Event when the engine-loading is finished (for large extensions like Babylon.js)
Regards
Babylon.js : Problem with the latest release
Re: Babylon.js : Problem with the latest release
Anything starting with ! is inline javascript in SpiderBasic, so require is a js command, not a SB command.
Re: Babylon.js : Problem with the latest release
Hello,
Thanks for the info.
Regards
Thanks for the info.
But where does it come from. One of the used JavaScript Frameworks/extensions? Where can I find a doku about it?....so require is a js command
Regards
Re: Babylon.js : Problem with the latest release
SpiderBasic is based on Dojo / Dojit (don't know which version), which has its own require implementation.HPW wrote:But where does it come from. One of the used JavaScript Frameworks/extensions? Where can I find a doku about it?
Greetings ... Peter
Re: Babylon.js : Problem with the latest release
That's what I thought! Look at your browser consoleHPW wrote:Good News! Your test-code works for me.
Unfortunately noHPW wrote:Will you change your Demos to the new call-syntax?
➽ Windows 11 - JDK 1.8 - SB 2.40 - Android 13
➽ http://falsam.com
Sorry for my poor english
Re: Babylon.js : Problem with the latest release
Hlelo falsam,
Regards
But will you further work/support on it ?Unfortunately no
Regards
Re: Babylon.js : Problem with the latest release
Hello Peter,
Regards
Thanks for the info. I will look there for the doku.SpiderBasic is based on Dojo / Dojit (don't know which version), which has its own require implementation.
Regards
Re: Babylon.js : Problem with the latest release
same version, but no more need for $&#§$ require
(yes, i want to promote my tool )
Greetings ... Peter
Code: Select all
;! <HtmlPreprocessor>
;! [
;! {
;! "search": "</title>",
;! "replace": "</title>\n\n<script src='https://cdnjs.cloudflare.com/ajax/libs/babylonjs/3.2.0/babylon.js'></script>"
;! }
;! ]
;! </HtmlPreprocessor>
Enumeration
#mf
#mfRender
EndEnumeration
Global BJSEngine, BJSCanvas, Scene
Declare InitEngine(Callback, CanvasGadget = #PB_Ignore)
Declare Start()
Declare InitGame()
Declare CreateScene()
Procedure InitEngine(Callback, CanvasGadget = #PB_Ignore)
! 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
Start()
Procedure Start()
OpenWindow(#mf, 0, 0, 800, 600, "Test", #PB_Window_ScreenCentered)
CanvasGadget(#mfRender, 0, 0, 800, 600, #PB_Canvas_Transparent)
InitEngine(@InitGame(), #mfRender)
EndProcedure
Procedure InitGame()
Scene = CreateScene()
!v_bjsengine.runRenderLoop(f_renderscene)
EndProcedure
Procedure CreateScene()
!var scene = new BABYLON.Scene(v_bjsengine);
!var camera = new BABYLON.ArcRotateCamera("Camera", 3 * Math.PI / 4, Math.PI / 4, 4, BABYLON.Vector3.Zero(), scene);
!camera.attachControl(v_bjscanvas, true);
!var light = new BABYLON.HemisphericLight("light", new BABYLON.Vector3(1, 1, 0), scene);
!var box = BABYLON.MeshBuilder.CreateBox("box", {}, scene);
!return scene
EndProcedure
Procedure RenderScene()
!v_scene.render();
EndProcedure
Greetings ... Peter
Re: Babylon.js : Problem with the latest release
Hello Peter,
I do not get it. Do I Need a tool from you to get it work?
This snippet only open an empty page.
And falsam was right, with his snippet the consoe show Errors.
Still interested how to load big js-frameworks correctly into sb.
Regards
I do not get it. Do I Need a tool from you to get it work?
This snippet only open an empty page.
And falsam was right, with his snippet the consoe show Errors.
Still interested how to load big js-frameworks correctly into sb.
Regards
Re: Babylon.js : Problem with the latest release
yes. This one: viewtopic.php?f=9&t=1543HPW wrote:Do I Need a tool from you to get it work?
Greetings ... Peter