You can already rotate a sprite with
RotateSprite(#Sprite, Angle.f, Mode)
This is very limited for game. It is nice if we can do anything in SpriteOutput like on openscreen
Openscreen and the sprite commands are designed for speed/games.
Spiderbasic has inline javascript so maybe you can ...
Search found 40 matches
- Sun Apr 02, 2023 2:08 pm
- Forum: Coding Questions
- Topic: Rotate Image
- Replies: 1
- Views: 2301
- Thu Mar 16, 2023 7:57 am
- Forum: Javascript
- Topic: More library loading problems
- Replies: 0
- Views: 24200
More library loading problems
This time, i am trying to load the Tuna library but i get a "Tuna is not defined error"
! $("<script src='https://cdnjs.cloudflare.com/ajax/libs/tunajs/1.0.4/tuna-min.js'></script>").appendTo("head");
Procedure ButtonHandler()
! var context = new AudioContext()
! var tuna = new Tuna(context ...
! $("<script src='https://cdnjs.cloudflare.com/ajax/libs/tunajs/1.0.4/tuna-min.js'></script>").appendTo("head");
Procedure ButtonHandler()
! var context = new AudioContext()
! var tuna = new Tuna(context ...
- Wed Mar 15, 2023 8:28 pm
- Forum: Coding Questions
- Topic: Static keyword confusion
- Replies: 5
- Views: 5134
Re: Static keyword confusion
Looks like arrays are also missing
- Tue Mar 14, 2023 2:08 pm
- Forum: Coding Questions
- Topic: Static keyword confusion
- Replies: 5
- Views: 5134
Re: Static keyword confusion
Thanks Peter. Is this stuff documented anywhere?
- Tue Mar 14, 2023 6:58 am
- Forum: Coding Questions
- Topic: Static keyword confusion
- Replies: 5
- Views: 5134
Static keyword confusion
Procedure ButtonHandler()
Static value
If value = 0
value = 20
EndIf
! console.log(v_value)
EndProcedure
If OpenWindow(0, 0, 0, 300, 440, "Test", #PB_Window_ScreenCentered)
ButtonGadget(0, 10, 10, 280, 30, "Click Me")
BindGadgetEvent(0, @ButtonHandler())
EndIf
When I use the Static ...
Static value
If value = 0
value = 20
EndIf
! console.log(v_value)
EndProcedure
If OpenWindow(0, 0, 0, 300, 440, "Test", #PB_Window_ScreenCentered)
ButtonGadget(0, 10, 10, 280, 30, "Click Me")
BindGadgetEvent(0, @ButtonHandler())
EndIf
When I use the Static ...
- Wed Mar 08, 2023 5:41 am
- Forum: Javascript
- Topic: Javascript script not loading
- Replies: 2
- Views: 18676
Re: Javascript script not loading
Hi Peter, thanks for the solution. Can you tell me how you figured that out?
Regards.
Regards.
- Tue Mar 07, 2023 7:06 pm
- Forum: Javascript
- Topic: Javascript script not loading
- Replies: 2
- Views: 18676
Javascript script not loading
Hi all
I am trying to use the Tonejs audio framework but it does not seem to load. I get an error telling me Tone is not defined. Can anyone help?
! require(["https://cdnjs.cloudflare.com/ajax/libs/tone/14.8.49/Tone.min.js"]);
Procedure ButtonHandler()
! Tone.start();
EndProcedure ...
I am trying to use the Tonejs audio framework but it does not seem to load. I get an error telling me Tone is not defined. Can anyone help?
! require(["https://cdnjs.cloudflare.com/ajax/libs/tone/14.8.49/Tone.min.js"]);
Procedure ButtonHandler()
! Tone.start();
EndProcedure ...
- Sat Jan 22, 2022 10:44 am
- Forum: Coding Questions
- Topic: Strange problem with storing javascript buffer pointers in a list
- Replies: 0
- Views: 4790
Strange problem with storing javascript buffer pointers in a list
see code comments for details
Structure samples
buffer.l
EndStructure
Global NewList sample.samples(), audioctx
Procedure ButtonHandler()
Static audioinit
If audioinit = 0
audioinit = 1
! const AudioContext = window.AudioContext || window.webkitAudioContext
! v_audioctx = new ...
Structure samples
buffer.l
EndStructure
Global NewList sample.samples(), audioctx
Procedure ButtonHandler()
Static audioinit
If audioinit = 0
audioinit = 1
! const AudioContext = window.AudioContext || window.webkitAudioContext
! v_audioctx = new ...
- Thu Jan 20, 2022 4:52 pm
- Forum: Javascript
- Topic: The File System Access API
- Replies: 1
- Views: 17576
The File System Access API
Can anyone point me in the right direction? I tried a couple of things but it wont work.
Procedure ButtonHandler()
gid = GadgetID(0)
!let directory
!document.getElementById(v_gid.gadget.id).addEventListener('click', async () => {
! try {
! directory = await window.showDirectoryPicker ...
Procedure ButtonHandler()
gid = GadgetID(0)
!let directory
!document.getElementById(v_gid.gadget.id).addEventListener('click', async () => {
! try {
! directory = await window.showDirectoryPicker ...
- Sat Jan 16, 2021 10:41 am
- Forum: Javascript
- Topic: SVG Dropshadow
- Replies: 0
- Views: 16454
SVG Dropshadow
Does anyone know how to apply a drop shadow to vector drawings?
Procedure GadgetEvents()
Select EventGadget()
Case 0
If EventType() = #PB_EventType_LeftButtonDown
EndIf
If EventType() = #PB_EventType_MouseMove; And GetGadgetAttribute(0, #PB_Canvas_Buttons) & #PB_Canvas_LeftButton ...
Procedure GadgetEvents()
Select EventGadget()
Case 0
If EventType() = #PB_EventType_LeftButtonDown
EndIf
If EventType() = #PB_EventType_MouseMove; And GetGadgetAttribute(0, #PB_Canvas_Buttons) & #PB_Canvas_LeftButton ...