Embed JS into PureBasic
Re: HTML5 Video Player with jQuery
Updated:
- TurnJSBook.pb, TurnJSBook_Create.pb
The update brings dynamic resizing to the page turning effect. Taking into consideration aspect ratios to maximize the fit of the book to your screen.
- create a new "Book" folder using the file TurnJSBook_Create.pb, pointing it to the folder TestFiles\FuturesEnd\
- next run the example TurnJSBook.pb pointing it at the newly created file TestFiles\Book1\FlipBook.div
It's worth noting for best results the first and last pages should have an orientation type of portrait, otherwise those images may be cropped or pressed.
----------------------------------------------------------
Updated:
- VideoPlayer.pb, videoplayer.pbi
The update combines a JavaScript listener-event with the PureBasic Maximize / Restore events to remember a videos last position when switch between full-screen and normal view.
Remove window borders (excluding title bar) with the video players "Full screen" button. Optionally the "Zoom in" button will remove the black video borders.
- TurnJSBook.pb, TurnJSBook_Create.pb
The update brings dynamic resizing to the page turning effect. Taking into consideration aspect ratios to maximize the fit of the book to your screen.
- create a new "Book" folder using the file TurnJSBook_Create.pb, pointing it to the folder TestFiles\FuturesEnd\
- next run the example TurnJSBook.pb pointing it at the newly created file TestFiles\Book1\FlipBook.div
It's worth noting for best results the first and last pages should have an orientation type of portrait, otherwise those images may be cropped or pressed.
----------------------------------------------------------
Updated:
- VideoPlayer.pb, videoplayer.pbi
The update combines a JavaScript listener-event with the PureBasic Maximize / Restore events to remember a videos last position when switch between full-screen and normal view.
Remove window borders (excluding title bar) with the video players "Full screen" button. Optionally the "Zoom in" button will remove the black video borders.
Last edited by JHPJHP on Wed Oct 14, 2015 10:27 pm, edited 1 time in total.
Re: JavaScript Frameworks from PureBasic
This is really great work !
Re: Embed JS Framework into PureBasic
Hi Fred,
Thank you for finding the time in your busy schedule to comment, it means a lot.
------------------------------------------------
Updated:
- added another framework: Flot Charts
- added 2 examples
-- FlotPieChart.pb, flotpiechart.pbi
-- FlotThresholdChart.pb, flotthresholdchart.pbi
- renamed the video player examples to better reflect their origin (includes minor improvements)
The new examples FlotPieChart.pb and FlotThresholdChart.pb demonstrate only a couple of the many charts available (see website for details).
Thank you for finding the time in your busy schedule to comment, it means a lot.
------------------------------------------------
Updated:
- added another framework: Flot Charts
- added 2 examples
-- FlotPieChart.pb, flotpiechart.pbi
-- FlotThresholdChart.pb, flotthresholdchart.pbi
- renamed the video player examples to better reflect their origin (includes minor improvements)
The new examples FlotPieChart.pb and FlotThresholdChart.pb demonstrate only a couple of the many charts available (see website for details).
Last edited by JHPJHP on Sat Jan 23, 2016 6:50 pm, edited 2 times in total.
-
- Always Here
- Posts: 6425
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: Embed JS Framework into PureBasic
Hi JHPJHP
...working late but couldn't resist trying out your latest and greatest. I'm doing something wrong though:
1) Run TurnJSBook_Create.pb, Select the folder 'FuturesEnd' - success
2) Run TurnJSBook.pb, Select newly created book FlipBook.div - displays book, but only blank pages.
I'm using Win7 x86, PB5.31 32bit.
...working late but couldn't resist trying out your latest and greatest. I'm doing something wrong though:
1) Run TurnJSBook_Create.pb, Select the folder 'FuturesEnd' - success
2) Run TurnJSBook.pb, Select newly created book FlipBook.div - displays book, but only blank pages.
I'm using Win7 x86, PB5.31 32bit.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
Re: Embed JS Framework into PureBasic
Hi IdeasVacuum,
First let me say thank you for posting your results.
blueb also reported this same problem, but I thought I had it worked out. Can you provide me a link to a compressed copy of the Book1 (TestFiles/Book1/) folder created after running TurnJSBook_Create.pb.
Thank you again.
First let me say thank you for posting your results.
blueb also reported this same problem, but I thought I had it worked out. Can you provide me a link to a compressed copy of the Book1 (TestFiles/Book1/) folder created after running TurnJSBook_Create.pb.
Thank you again.
-
- Always Here
- Posts: 6425
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: Embed JS Framework into PureBasic
Here we go:
Book1.zip
Book1.zip
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
Re: Embed JS Framework into PureBasic
Hi IdeasVacuum,
Thank you for the upload, I now know what the problem was.
- needed quotes when the image path included spaces
Thank you again, without your feedback it would not have been resolved.
----------------------------------------------------
Updated:
- fixed the problem posted by IdeasVacuum
Thank you for the upload, I now know what the problem was.
- needed quotes when the image path included spaces
Thank you again, without your feedback it would not have been resolved.
----------------------------------------------------
Updated:
- fixed the problem posted by IdeasVacuum
-
- Always Here
- Posts: 6425
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: Embed JS Framework into PureBasic
.... I should have thought of that myself
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
Re: Embed JS Framework into PureBasic
Updated:
- renamed all the examples and includes
- added 2 examples
-- Flot_RealTime.pb, flot_realtime.pbi
-- Flot_Stacking.pb, flot_stacking.pbi
Unlike the other Flot examples Flot_RealTime.pb isn't linked to a PureBasic dataset, it's receiving random data from a JavaScript file.
- renamed all the examples and includes
- added 2 examples
-- Flot_RealTime.pb, flot_realtime.pbi
-- Flot_Stacking.pb, flot_stacking.pbi
Unlike the other Flot examples Flot_RealTime.pb isn't linked to a PureBasic dataset, it's receiving random data from a JavaScript file.
Last edited by JHPJHP on Wed Oct 28, 2015 1:00 am, edited 2 times in total.
Re: Embed JS Framework into PureBasic
Updated:
- added 1 example
-- Flot_Selection.pb, flot_selection.pbi
- added 1 example
-- Flot_Selection.pb, flot_selection.pbi
Re: Embed JS Framework into PureBasic
Updated:
- added 1 example
-- AS3_Webcam.pb, as3_webcam.pbi
An example that brings your webcam to the WebGagdget.
- includes a snapshot option
NB*: Currently the getUserMedia function is not supported in IE, so the only way to host a webcam in a WebGadget is using adobe flash.
- added 1 example
-- AS3_Webcam.pb, as3_webcam.pbi
An example that brings your webcam to the WebGagdget.
- includes a snapshot option
NB*: Currently the getUserMedia function is not supported in IE, so the only way to host a webcam in a WebGadget is using adobe flash.
Last edited by JHPJHP on Wed Oct 21, 2015 2:30 pm, edited 3 times in total.
Re: Embed JS Framework into PureBasic
Updated the Flot chart examples.
- added a button to each example to save the charts to a JPEG file
Updated the example AS3_Webcam.pb, as3_webcam.pbi.
- set width / height (no error checking against available settings)
-- BuildCam(WebcamFolder, 320, 240)
- take a snapshot (previous image is replaced)
- save snapshot to a JPEG file
- save snapshot to a base64 encoded file
NB*: Keeping inline with the other examples, the new options are a mix of PureBasic and JavaScript working together.
- added a button to each example to save the charts to a JPEG file
Updated the example AS3_Webcam.pb, as3_webcam.pbi.
- set width / height (no error checking against available settings)
-- BuildCam(WebcamFolder, 320, 240)
- take a snapshot (previous image is replaced)
- save snapshot to a JPEG file
- save snapshot to a base64 encoded file
NB*: Keeping inline with the other examples, the new options are a mix of PureBasic and JavaScript working together.
Re: Embed JS Framework into PureBasic
Hi Hadrianus,Hadrianus wrote:Hi JHPJHP,
I love your JS-magic for Purebasic. Please take a look at ViewerJS.org, it's a fully independent PDF-viewer and free to use. I tried to connect this with PB. Perhaps you will bring this viewer to PB one day.
Thank you, I'm glad you liked it.
While I'm not usually one for taking requests, the PDF viewer demonstrates the extensibility of this project in a new way.
I looked at ViewerJS.org, but it was a bit bloated so I decided to go straight to the source: PDF.js.
----------------------------------------------------------------------
Updated:
- added 1 example
-- PDFJS_Viewer.pb
An embedded PDF viewer with a nice interface in a resizable PureBasic Window / WebGadget: PDF.js Demo
.
Re: Embed JS Framework into PureBasic
Thanks a lot JHPJHP !
Also with window api stuff, I have to study this.
Also with window api stuff, I have to study this.
Re: Embed JS Framework into PureBasic
Hi Hadrianus,
You're very much welcome, I hope it proves useful.
-------------------------------------------
Applied small updates and improvements.
- I noticed when running the examples consecutively, at various times the HTML5 registry update failed
I don't believe this to be more than a locked process due to the examples using the same temp executable; this should not occur in a production environment.
- added a trap to confirm whether or not the registry update was successful
-------------------------------------------
Applied some minor updates to the existing examples, nothing worth documenting.
You're very much welcome, I hope it proves useful.
-------------------------------------------
Applied small updates and improvements.
- I noticed when running the examples consecutively, at various times the HTML5 registry update failed
I don't believe this to be more than a locked process due to the examples using the same temp executable; this should not occur in a production environment.
- added a trap to confirm whether or not the registry update was successful
-------------------------------------------
Applied some minor updates to the existing examples, nothing worth documenting.