Thank you very much. I am new to this and I donāt understand any coding. I was searching for a Babylon WordPress plugin - but I couldnāt find anything that is associated with WordPress or any tutorial that would guide me through this.
With what specific keyword do I have to search under the documentation page to find what I would need to get started?
I can imagine I would need to upload files to my webserver via FTP.
Or, what I am familiar withā¦ maybe a .zip file as a plugin?
Thank you so much for any further help,
I really do appreciate that.
@pryme8 & @JohnK:
first of all, thank you so much for your help. This is awesome and I really do appreciate that.
As a bloody rookie, that gives me now a better understanding. That means, I have to copy the javascript code from babylon into the header and the footer of the WordPress Page.
That makes sense for me - even if I donāt know anything about coding.
Now I need to figure out
what specific code is required
where to download the code
where to copy the individual code (header & footer)
Do I only have to add those two lines in the header?
Personally, Iām not too experienced working with wordpress, but you could possibly include a script that traverses your page for an element that you want to insert a canvas into, and from there you can setup your createScene and render loop and setup the model viewer.
Wordpress will not make this easy for you.
If you had a plain website, you just add a canvas element to the dom and a script to initialize bjs and you are off to the races. With wordpress all of your time is going to be spent figuring out workarounds to add your own custom html/js to the page. It can be done easily if you knew where to go. Just be aware that you are specifically fighting the WordPress cms, not the bjs library or web development as a whole.
Just wanted to provide my two cents -
the first line (the script) should be added to the <head> tag. The <babylon> tag should be added to where you want to show your model. Made sure you set the size of the tag, otherwise it will use its default values.
There is definitely a great need in Babylon plugins for different CMS.
I wrote small function which allows to load and publish gltf, glb and babylon files to Wordpress with help of Babylon viewer.
Need a couple of free hours to make plugin from it. I will publish it as soon as it will be ready. If you need this function urgently - PM me.
There are more interesting problems in this case than just insert some JS into header. For example, Wordpress has MIME checking system (which varies from version to version and has some bugs as well, just to remember legendary CSV upload bug). So if we want to upload 3D files into Wordpress we need to use some tricks.
Also note, that only gltf extension at the moment is valid MIME extensionā¦
Hope, this guide will help you but if you face any issue while adding Script in your WordPress website, then I will suggest you to choose managed WordPress hosting where you can easily configure everything on some clicks due to the managed platform. I am using Babylon on my WordPress website and I configured it through their platform.