Babylon.js

Using Javascript from SpiderBasic
User avatar
T4r4ntul4
Posts: 132
Joined: Wed May 21, 2014 1:57 pm
Location: Netherlands
Contact:

Re: Babylon.js

Post by T4r4ntul4 »

This is very nice!
Fred
Site Admin
Posts: 1506
Joined: Mon Feb 24, 2014 10:51 am

Re: Babylon.js

Post by Fred »

This is very good stuff !
falsam
Posts: 280
Joined: Mon May 05, 2014 9:49 pm
Location: France
Contact:

Re: Babylon.js

Post by falsam »

Thank you for your support and comments.

■ Here is a new demonstration in which gadgets will be the basis of a user interface (GUI).

-Click with the right mouse button to create some basic meshs.
-Resize the window, the render is automatically resized.
:arrow: http://falsam.com/sbbjs/canvasgui.html

■ New release 0.87 Beta
- Bug fix
-Add example : 15-Gadgets in a canvas rendering.sb
:arrow: https://github.com/falsam/BJS/archive/master.zip

Works with FireFox, Chrome and Edge. Not with IE.

➽ Windows 11 - JDK 1.8 - SB 2.40 - Android 13
http://falsam.com

Sorry for my poor english
HPW
Posts: 35
Joined: Thu May 04, 2017 4:25 pm

Re: Babylon.js

Post by HPW »

Hello,

Indeed very nice, getting better and better.
Spiderbasic and BabylonJs seems to be a powerfull enviroment for 3D-web-apps.

Regards,
Hans-Peter
falsam
Posts: 280
Joined: Mon May 05, 2014 9:49 pm
Location: France
Contact:

Re: Babylon.js

Post by falsam »

Add function CreateTube()

CreateTube(Name.s, Array VectorsArray.NewVector(1), Radius.f, Tessellation = 32, RadiusFunction = #PB_Ignore)

This new feature allows to create tubular shapes by passing in parameter a table of 3D vectors.
- Demo http://falsam.com/sbbjs/tube.html
- Source https://github.com/falsam/BJS/blob/master/01-Tube.sb


It is also possible to pass in parameter a procedure name whose objective is to calculate a new diameter for each of these 3D vectors.
- Demo http://falsam.com/sbbjs/tuberadiusfunction.html
- Source https://github.com/falsam/BJS/blob/mast ... unction.sb

Enjoy ;)

➽ Windows 11 - JDK 1.8 - SB 2.40 - Android 13
http://falsam.com

Sorry for my poor english
HPW
Posts: 35
Joined: Thu May 04, 2017 4:25 pm

Re: Babylon.js

Post by HPW »

Hello,

After downloading latest zip, some Demos throw this error, here 01-Tube.sb :

Code: Select all

[17:11:48] [COMPILER] Line 91: Structure not found: NewVector.
in Babylon.sbi

Regards
Hans-Peter
falsam
Posts: 280
Joined: Mon May 05, 2014 9:49 pm
Location: France
Contact:

Re: Babylon.js

Post by falsam »

Thanks for your feedback HPW. I have forgotten to upload constant.sbi. Update completed.

I will test the set of examples with the package located on Github.

➽ Windows 11 - JDK 1.8 - SB 2.40 - Android 13
http://falsam.com

Sorry for my poor english
jamirokwai
Posts: 40
Joined: Fri Sep 25, 2015 12:00 pm

Re: Babylon.js

Post by jamirokwai »

Wow. Nice!

Do you think, you could add the Cardboard, and other VR-things to the Camera-functions?
That would be a great addition :-)
falsam
Posts: 280
Joined: Mon May 05, 2014 9:49 pm
Location: France
Contact:

Re: Babylon.js

Post by falsam »

Do you think, you could add the Cardboard, and other VR-things to the Camera-functions?
Why not. This is possible.

■ This minimum code is experimental. I need testers.

Huawei P9 Android 7.0
- Android and Opera => Works
- Android and Chrome => Does not work

:arrow: Demo with your mobile : http://falsam.com/sbbjs/vrcamera.html

■ Code example

Code: Select all

;Babylon.sbi - VR Camera (Experimental)

EnableExplicit

IncludeFile "babylon/babylon.sbi"

Global Scene, Camera, Light, RedMat, RedBox, BlueMat, BlueBox

Declare LoadGame()
Declare RenderGame()

UseModule BJS

InitEngine(@LoadGame())

Procedure LoadGame()    
  Scene = CreateScene()
  
  If Scene
    
    ;This creates and positions a device orientation camera  (0, 0, 0)
    Camera = CreateCamera("VR Cam", 0, 0, 0, #VR)
    
    ;This targets the camera to scene origin
    CameraLookAt(Camera, 0, 0, 0)
    
    ;Light
    Light = CreateLight("light", 0, 1, 0, 1)
    
    ;Red Box
    RedMat = CreateMaterial("Red Color", "")
    SetMaterialColor(RedMat, #Diffuse, RGB(255, 0, 0))
    
    RedBox = CreateBox("box", 5)
    SetMaterial(RedBox, RedMat)
    
    MoveMesh(RedBox, 0, 0, 10)
    
    ;Create Blue Box
    BlueMat = CreateMaterial("blue color", "")
    SetMaterialColor(BlueMat, #Diffuse, RGB(0, 0, 255))
    
    BlueBox = CreateBox("blue box", 5)
    SetMaterial(BlueBox, BlueMat)
    
    MoveMesh(BlueBox, 0, 0, -10)
   
    RenderLoop(@RenderGame())
  EndIf
EndProcedure

Procedure RenderGame()
  RenderWorld() 
EndProcedure

➽ Windows 11 - JDK 1.8 - SB 2.40 - Android 13
http://falsam.com

Sorry for my poor english
falsam
Posts: 280
Joined: Mon May 05, 2014 9:49 pm
Location: France
Contact:

Re: Babylon.js

Post by falsam »

Babylon.sbi 0.91 is done
- Bug fix.
- Add Virtual Camera.

■ Download https://github.com/falsam/BJS

➽ Windows 11 - JDK 1.8 - SB 2.40 - Android 13
http://falsam.com

Sorry for my poor english
Post Reply