Page 1 of 1

Running ThreeJS (3D JS library) in the WebGadget

Posted: Mon Jul 05, 2021 3:46 pm
by firace
Quick example below, Windows only.
Tested with ThreeJS r71. (More recent versions may or may not not work)

Code: Select all


dwLabel.s   = GetFilePart(ProgramFilename())  
dwValue.i   = 11001

rPath.s       = "SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION"
RegCreateKeyEx_(#HKEY_CURRENT_USER, rPath.s, 0, #Null, #REG_OPTION_VOLATILE, #KEY_ALL_ACCESS, #Null, @phkResult, @Disposition)
RegSetValueEx_(phkResult, @dwLabel, 0, #REG_DWORD, @dwValue, SizeOf(Long))


OpenWindow(0, 432, 42, 900, 500, "Window_0", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget)

WebGadget(0, 10, 10, 880, 450, "https://codepen.io/nicolasdnl/full/zxedvW")

webView.IWebBrowser2=GetWindowLongPtr_(GadgetID(0),#GWL_USERDATA)
webView\put_Silent(#True) 

Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow 

Re: Running ThreeJS (3D JS library) in the WebGadget

Posted: Mon Jul 05, 2021 7:33 pm
by Kwai chang caine
Works here !!!! :D

Image

Thanks for sharing 8) and learning to me the existence of the powerfull "ThreeJS" :shock: