Search found 230 matches

by falsam
Fri May 15, 2026 9:24 am
Forum: Tricks 'n' Tips
Topic: Load JS library before SB libs
Replies: 4
Views: 389

Re: Load JS library before SB libs

@Danilo, the example you provided is perfect for a full-screen Babylon environment.

Here's another way to use Babylon in a CanvasGadget() with the #PB_Canvas_Transparent flag. To keep the code simple, we'll just display a cube.


EnableExplicit

Enumeration
#myCanvas
EndEnumeration

Global ...
by falsam
Tue Apr 28, 2026 1:35 pm
Forum: Tricks 'n' Tips
Topic: Load JS library before SB libs
Replies: 4
Views: 389

Re: Load JS library before SB libs

Danilo wrote: Sun Apr 26, 2026 11:27 am There is a more direct way of loading Babylon.js and other libs, by hiding define:
Wow, thank you so much! Thank you for this code and for the time you spent writing it. It's great. I love it.
by falsam
Sun Jan 18, 2026 7:24 pm
Forum: Bugs Reports
Topic: [Done] Createimage Spiderbasic 3.20
Replies: 5
Views: 15718

Re: Createimage Spiderbasic 3.20

Use RGBA (The documentation states that RGB works, but apparently it does not 😉)

Code: Select all

OpenWindow(1,0,0,800,600,"Image")

image=CreateImage(#PB_Any,200,200,32,RGBA(220,0,0,255))
gadget=ImageGadget(#PB_Any,10,10,ImageWidth(image),ImageHeight(image),ImageID(image))
by falsam
Thu Jan 15, 2026 6:55 pm
Forum: Coding Questions
Topic: Babylon.js
Replies: 8
Views: 13568

Re: Babylon.js

When I look at the source code with the debug console, I see that the script babylon.js is correctly placed between the <head></head> tags and the canvas is correctly placed between the <body></body> tags.

For me, the HeaderSection & EndHeaderSection functionality works correctly.

However, the ...
by falsam
Thu Jan 15, 2026 6:30 pm
Forum: Coding Questions
Topic: Babylon.js
Replies: 8
Views: 13568

Re: Babylon.js

Thank you for your response to my problem.
However, <HtmlPreprocessor> is a proprietary solution that I cannot use to distribute babylon.pbi.

SpiderBasic allows to easily customize the <header></header> section of the app HTML file. It can be useful when needed to add additional meta tags or to ...
by falsam
Tue Jan 13, 2026 5:13 pm
Forum: Coding Questions
Topic: Babylon.js
Replies: 8
Views: 13568

Babylon.js

Hello,
I am trying to integrate Babylon.js, but I get the following message:
C:\SpiderBasic Project\Babylon\test.sb:7 BABYLON is not defined

■ Small test code to initialize the 3D engine.

HeaderSection
<meta name="description" content="babylon.js">
<script src="https://cdn.babylonjs.com/babylon ...
by falsam
Fri Sep 05, 2025 7:09 pm
Forum: Coding Questions
Topic: Gadget longpress detection
Replies: 2
Views: 54083

Re: Gadget longpress detection

I like this question. Here is one possible answer using a little JavaScript to handle the “mousedown” and “mouseup” events.

The long press is set to 3 seconds, which you can change in the onMouseDown() procedure.

For fun, after pressing and holding for 3 seconds, the code displays a window showing ...
by falsam
Fri Sep 05, 2025 5:58 pm
Forum: Coding Questions
Topic: GetGadgetState() error on the ListIconGadget header.
Replies: 0
Views: 63269

GetGadgetState() error on the ListIconGadget header.

Procedure foo()
Debug "item " + GetGadgetState(0)
EndProcedure

If OpenWindow(0, 100, 100, 300, 150, "ListIcon Example", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ListIconGadget(0, 5, 5, 290, 90, "Name", 100)
AddGadgetColumn(0, 1, "Address", 250)
AddGadgetItem(0, -1, "Harry Rannit"+Chr ...
by falsam
Wed Jun 04, 2025 8:53 am
Forum: Coding Questions
Topic: Identification PIXIJS of a sprite
Replies: 1
Views: 27772

Identification PIXIJS of a sprite

Hello

How can I get the PixiJS object from a sprite?

For example, I'd like to perform a vertical and/or horizontal split, change the anchor point, etc. ...

More generally, I'd like to be able to use PIXIJS functionalities on these sprites.

I hope this is possible. Here's some basic code. For ...
by falsam
Tue Jun 03, 2025 2:59 pm
Forum: General Discussion
Topic: SpiderBasic 3.10 is out !
Replies: 25
Views: 163122

Re: SpiderBasic 3.10 beta 1 is ready !

Fred wrote: Mon Jun 02, 2025 1:52 pm
Peter wrote: Mon Jun 02, 2025 11:43 am Thanks for the new version! 👍

What are the chances that this feature request will also be included in the new version?

Add javascript and CSS scripts in the compilation options.
I will try to add it.
Thanks Fred 👍