Posts: 272
Threads: 24
Joined: Apr 2022
Reputation:
59
Hi All,
The latest version of QBJS (0.7.0) is now available. Here are some highlights for this release:
IDE Enhancements
Numerous enhancements to the IDE have been incorporated into this release. The code, output and console panels can be resized by dragging the panel dividers. There are now keyboard shortcuts for running the current program (F5) and the export/share feature (F11). Users can now customize the look and feel of the IDE by choosing from one of four themes.
Custom Fonts and Printing
Support has been added to allow the use of custom fonts. The following keywords are now available in support of this feature: _Font, _LoadFont, and _FreeFont. The _PrintMode keyword is also now supported to allow text to be printed with transparent background. Numerous updates have been made to the Print method to format the output more closely to QBasic/QB64.
2D Graphics Library
This release includes a new graphics library which provides native support for common graphics methods (e.g. FillTriangle, RotoZoom, FillCircle, FillEllipse). There is also new functionality to allow more control over both new graphics functions and standard QBasic graphics methods (e.g. LineWidth, LineCap, Shadow). The full list of new methods can be found here:
https://github.com/boxgaming/qbjs/wiki/S...d-graphics.
Console Output Library
A new console output library has been added to allow logging messages and simple output to the console window in the IDE. The full list of new methods can be found here:
https://github.com/boxgaming/qbjs/wiki/S...ds#console.
File I/O Extension Library
This library provides the ability to upload and download files to and from the browser from within your application. The full documentation for the library can be found here:
https://github.com/boxgaming/qbjs/wiki/S...filesystem.
See the full release announcement for a complete list of fixes and enhancements.
Check it out online here: https://qbjs.org
Posts: 272
Threads: 24
Joined: Apr 2022
Reputation:
59
Here are some mods from @bplus' excellent collection of proggies that use some of the new graphics methods:
Diamond Spaceship (FillTriangle)
Goldwave (FillTriangle)
Easy Spiral (FillCircle)
X-mas Star (RotoZoom)
Infinite Heart (FillCircle)
Guts (FillCircle)
Celtic Knot (FillCircle, FillEllipse)
The final example also demonstrates how to use the "$If WEB" metacommand to conditionally use the new graphics commands when in QBJS, but still have a version that will compile and run in QB64.
Posts: 272
Threads: 24
Joined: Apr 2022
Reputation:
59
Here is one more example that incorporates nearly all of the new graphics methods:
Code: (Select All) Import G2D From "lib/graphics/2d.bas"
Cls , 15
G2D.RoundRect 10, 10, 200, 200, 5, 9
G2D.Ellipse 110, 110, 50, 30, 0, 2
G2D.Shadow 0, 7, 7, 10
G2D.FillRoundRect 300, 10, 200, 75, 15, 3
G2D.FillCircle 50, 50, 30, 4
G2D.ShadowOff
G2D.FillEllipse 320, 320, 60, 40, 15, 5
G2D.Shadow 5, 0, 0, 15
Line (350, 150)-(450, 250), 0, BF
G2D.FillTriangle 500, 300, 580, 300, 530, 380, 1
G2D.ShadowOff
G2D.LineWidth 10
Line (20, 300)-(200, 380), 0, B
G2D.LineWidth 15
Line (20, 240)-(200, 240), 4
G2D.LineCap G2D.ROUND
Line (20, 260)-(200, 260), 4
G2D.LineCap G2D.SQUARE
Line (20, 280)-(200, 280), 4
G2D.LineWidth 25
G2D.LineCap G2D.ROUND
G2D.Curve 470, 120, 650, 100, 520, 250, 2
G2D.Shadow 0, 7, 7, 10
G2D.LineWidth 3
G2D.Bezier 260, 20, 200, 100, 310, 150, 260, 250, 1
G2D.ShadowOff
View in QBJS
Posts: 3,974
Threads: 177
Joined: Apr 2022
Reputation:
219
05-26-2023, 10:16 PM
(This post was last modified: 05-26-2023, 10:22 PM by bplus.)
Very impressive update! Exceeding QB64pe with LineWidth, RoundRect, Shadow and Curve, well even with FillCircle and Ellipse and FillEllipse
note: links to git hub seem fine but the others go nowhere. Update: Damn! neither are all the QBJS Shared links I posted in past!
b = b + ...
Posts: 272
Threads: 24
Joined: Apr 2022
Reputation:
59
What browser are you using @bplus? All the links work for me.
Posts: 272
Threads: 24
Joined: Apr 2022
Reputation:
59
If you are getting a blank screen when you go to qbjs.org. Hold down SHIFT and click the refresh button to make sure the browser is loading the latest version of the site.
Posts: 3,974
Threads: 177
Joined: Apr 2022
Reputation:
219
(05-26-2023, 10:48 PM)dbox Wrote: If you are getting a blank screen when you go to qbjs.org. Hold down SHIFT and click the refresh button to make sure the browser is loading the latest version of the site.
Ah that fixed it thanks!
b = b + ...
Posts: 272
Threads: 24
Joined: Apr 2022
Reputation:
59
(05-27-2023, 03:12 AM)bplus Wrote: Ah that fixed it thanks!
Excellent!
Posts: 199
Threads: 15
Joined: Apr 2022
Reputation:
4
(05-26-2023, 06:23 PM)dbox Wrote: Hi All,
The latest version of QBJS (0.7.0) is now available. Here are some highlights for this release:
IDE Enhancements
Numerous enhancements to the IDE have been incorporated into this release. The code, output and console panels can be resized by dragging the panel dividers. There are now keyboard shortcuts for running the current program (F5) and the export/share feature (F11). Users can now customize the look and feel of the IDE by choosing from one of four themes.
Custom Fonts and Printing
Support has been added to allow the use of custom fonts. The following keywords are now available in support of this feature: _Font, _LoadFont, and _FreeFont. The _PrintMode keyword is also now supported to allow text to be printed with transparent background. Numerous updates have been made to the Print method to format the output more closely to QBasic/QB64.
2D Graphics Library
This release includes a new graphics library which provides native support for common graphics methods (e.g. FillTriangle, RotoZoom, FillCircle, FillEllipse). There is also new functionality to allow more control over both new graphics functions and standard QBasic graphics methods (e.g. LineWidth, LineCap, Shadow). The full list of new methods can be found here:
https://github.com/boxgaming/qbjs/wiki/S...d-graphics.
Console Output Library
A new console output library has been added to allow logging messages and simple output to the console window in the IDE. The full list of new methods can be found here:
https://github.com/boxgaming/qbjs/wiki/S...ds#console.
File I/O Extension Library
This library provides the ability to upload and download files to and from the browser from within your application. The full documentation for the library can be found here:
https://github.com/boxgaming/qbjs/wiki/S...filesystem.
See the full release announcement for a complete list of fixes and enhancements.
Check it out online here: https://qbjs.org -
on the official website it says:
Electron is an open source project maintained by the OpenJS Foundation. embeds Chromium and Node.js to enable web developers to create desktop applications. Compatible with macOS, Windows, and Linux, Electron apps run on three platforms across all supported architectures.
https://www.electronjs.org
licence MIT.
if you combine your project with Electron to generate stand-alone, cross-platform desktop applications, it will be much more interesting and will surely attract many developers...
Posts: 272
Threads: 24
Joined: Apr 2022
Reputation:
59
(05-29-2023, 11:20 AM)Coolman Wrote: if you combine your project with Electron to generate stand-alone, cross-platform desktop applications, it will be much more interesting and will surely attract many developers...
Hey @Coolman, thanks for the suggestion. There has actually already been a little bit of research into this already. @grymmjack was posting on Discord just recently about some work he did to be able to build electronjs-based standalone executables from VSCode. The concept actually works pretty well, though it does produce some very large executables (since it has to bundle a chromium browser).
At present, however, this isn't a major focus for me. There is already a good way to make multi-platform, standalone executables with QBasic syntax... and that is QB64. I'm not aiming to create a replacement for QB64. For me it is about extending the reach of this fun and approachable syntax to the web and mobile. Perhaps, I'll dedicate a separate thread to expand further on the motivation and goals of the project.
|