Choc
-
@d-healey It's a helper class that seamlessly integrates with Juce based projects (if I understand it well)
-
@d-healey Ohh I've just seen the webview helper so I understand your question better now...
-
Ah damn it, I was extra sneaky with the commit message... stay tuned :)
-
@Christoph-Hart said in Choc:
Ah damn it, I was extra sneaky with the commit message... stay tuned :)
Its vagueness made me curious
-
Best commit ever - https://github.com/christophhart/HISE/commit/f7bd5ce550fc6d58f270f16712c2faf4a5ed764f :p
-
Alrighty, I think it's ready now for you all to play around:
HISE features now an embedded web browser that allows you to render parts of your UI using the native browser on the OS. The amount of possiblilities that this is unlocking is completely ridiculous, but I've added a project to the repository that contains two interesting use cases (using the newest fancy 3D rendering powered by the OS browser and implement a custom preset browser using your web design skills):
https://github.com/christophhart/hise_tutorial/tree/master/WebViewTests
The communication between HiseScript and the WebView component is as straightforward as it can get - you can call JS functions from HiseScript and bind callable HiseScript objects to JS callbacks.
I'll write a reference documentation later, but the examples should provide enough information for you to dig yourself into that rabbit hole.
It currently works on macOS and Windows, but I don't know how to add the browser handle to the Linux UI, so David has to wait inside while the other kids have fun on the new playground :)
-
-
I think you have a typo
https://github.com/christophhart/HISE/blob/develop/hi_tools/hi_standalone_components/ChocWebView.cpp#L34Should be lowercase, no? Maybe my compiler is just picky.
Is there a preprocessor definition I can use to prevent it trying to compile the choc webview stuff on Linux? because I'm getting a few errors related to it and since it's not implemented I rather just not have it bother me.
-
@d-healey what are the errors (besides the typo)?
-
../../../../../HISE/hi_tools/hi_standalone_components/choc/gui/choc_webview.h:157:10: fatal error: ../platform/choc_DisableAllWarnings.h: No such file or directory 157 | #include "../platform/choc_DisableAllWarnings.h"
If I comment that and line 160 out I get:
In file included from ../../../../../HISE/hi_tools/hi_standalone_components/ChocWebView.cpp:34, from ../../../../../HISE/hi_tools/hi_tools.cpp:79, from ../../JuceLibraryCode/include_hi_tools.cpp:9: ../../../../../HISE/hi_tools/hi_standalone_components/choc/gui/choc_webview.h:158:10: fatal error: JavaScriptCore/JavaScript.h: No such file or directory 158 | #include <JavaScriptCore/JavaScript.h> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. make: *** [Makefile:891: build/intermediate/Release/include_hi_tools_3ba2cabd.o] Error 1 make: *** Waiting for unfinished jobs.... In file included from ../../../../../HISE/hi_snex/snex_mir/snex_Mir.cpp:15, from ../../../../../HISE/hi_snex/hi_snex_62.cpp:4, from ../../JuceLibraryCode/include_hi_snex_62.cpp:9: ../../../../../HISE/hi_snex/snex_mir/snex_MirInstructions.cpp: In static member function ‘static juce::Result snex::mir::InstructionParsers::SyntaxTree(snex::mir::State*)’: ../../../../../HISE/hi_snex/snex_mir/snex_MirInstructions.cpp:63:45: error: converting to ‘std::allocator_arg_t’ from initializer list would use explicit constructor ‘constexpr std::allocator_arg_t::allocator_arg_t()’ 63 | staticSignatures.add({ {}, "int PolyHandler::getVoiceIndexStatic(void* voiceIndex)" }); | ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../../../../HISE/hi_snex/snex_mir/snex_MirInstructions.cpp:64:45: error: converting to ‘std::allocator_arg_t’ from initializer list would use explicit constructor ‘constexpr std::allocator_arg_t::allocator_arg_t()’ 64 | staticSignatures.add({ {}, "int PolyHandler::getSizeStatic(void* voiceIndex)" }); | ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../../../../HISE/hi_snex/snex_mir/snex_MirInstructions.cpp: In lambda function: ../../../../../HISE/hi_snex/snex_mir/snex_MirInstructions.cpp:77:78: error: conversion from ‘<brace-enclosed initializer list>’ to ‘const std::tuple<snex::NamespacedIdentifier, juce::String>’ is ambiguous 77 | staticSignatures.addIfNotAlreadyThere({ {}, sig }); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
And:
../../../../../HISE/hi_snex/snex_mir/snex_MirInstructions.cpp:93:86: error: conversion from ‘<brace-enclosed initializer list>’ to ‘const std::tuple<snex::NamespacedIdentifier, juce::String>’ is ambiguous 93 | staticSignatures.addIfNotAlreadyThere({ {}, sig });
-
@d-healey Alright, I've booted up Linux and removed those errors. Most of those errors were actually related to the new SNEX MIR Backend, but I've also just deactivated the choc header on Linux.
Unfortunately the integration on Linux seems to be more complicated than I thought (which is annoying because juce actually has a webview component that is already using almost the same API as the choc header, but I need a few special methods to call javascript etc which is not available for the juce web component.
-
@Christoph-Hart I wonder if that's because Linux doesn't have a standard web browser, like Edge or Safari?
-
@d-healey no it uses the webkit framework that you have to link with your binary (but JUCE does that already for the existing web component).
It's frustrating because the parts are all there but I lack the overview on Linux to put it all together...
-
@Christoph-Hart Ah I understand now. Just tried building and no errors this time :) thanks
-
Seeing this message in the console with the latest build, not sure what it's referring to.
Master Chain:! DLL Library version mismatch: 0.1.0 vs. 0.2.0
-
@d-healey haha, no that's the Loris DLL library version mismatch error (I bumped the version counter and included a few more features), but now that you mention it, I might want to make it more verbose so that you don't need to guess what version number it's talking about...
Oh and to get rid of it, pull and recompile the loris toolbox library.
-
@Christoph-Hart Hey Legend,
Any tip on how to get started here?
In Three.js, Nothing makes sense to me LOL
Where and How to Download another example from Three.js?
Contacting Images and s, and Index?Appreciate your help