Using a dynamic config file
29 June 2017 00:38
Hey everyone, nice to meet you.
After looking for various methods to deploy a client's idea, I found B4W last Thursday. I'm really glad I did as it represents a much shallower learning curve than Unity.
My client wants to create a product configurator for office furniture and asked me to explore the possibilities.
I found the 'product template' online which looks pretty decent, although I didn't really have time to learn another SDK, so I made a rudimentary proof-of-concept, based on the 'ring tutorial'.
Here's my first effort (be gentle)
link
So, he seems pretty happy that I can achieve something close to his requirements, but he's now asking me if I can use a webform (hosted on his site) to post variables (like RGB values or texture node options) to something akin to a config file, so when the web player opens up, it displays 'those' variables instead of the defaults.
I'm thinking I might be able to get close using a JS entry point, but I've only been working with B4W for a couple of days, and delivering something useable is quite time-sensitive.
So I wondered if you guys might be able to point me to a resource or set of pertinent tutorials, that will get me going in the right direction.
Thanks in advance
Charlie
After looking for various methods to deploy a client's idea, I found B4W last Thursday. I'm really glad I did as it represents a much shallower learning curve than Unity.
My client wants to create a product configurator for office furniture and asked me to explore the possibilities.
I found the 'product template' online which looks pretty decent, although I didn't really have time to learn another SDK, so I made a rudimentary proof-of-concept, based on the 'ring tutorial'.
Here's my first effort (be gentle)
link
So, he seems pretty happy that I can achieve something close to his requirements, but he's now asking me if I can use a webform (hosted on his site) to post variables (like RGB values or texture node options) to something akin to a config file, so when the web player opens up, it displays 'those' variables instead of the defaults.
I'm thinking I might be able to get close using a JS entry point, but I've only been working with B4W for a couple of days, and delivering something useable is quite time-sensitive.
So I wondered if you guys might be able to point me to a resource or set of pertinent tutorials, that will get me going in the right direction.
Thanks in advance
Charlie
29 June 2017 06:53
Hi Charlie, Welcome tot he forum.
Your project is very nice. It make me embarrassed when I think of some of my first projects lol.
Since you are basically just using Javascript in a web page, reading and writing to a database is no different.
So your client probably already has a database. MySQL maybe?
Client side JavaScript to MySQL is sort of a pain but if you have other options like using JSON, it is easer.
Here is a link on doing it with JSON.
The Page Param node might interest you as well. This node captures parameters passed in the URL. So if the clients existing database structure allowed you to append custom parameters in the link to your application, you could then capture those variables and apply them accordingly.
Or you could do GET requests with nodes.
Your project is very nice. It make me embarrassed when I think of some of my first projects lol.
Since you are basically just using Javascript in a web page, reading and writing to a database is no different.
So your client probably already has a database. MySQL maybe?
Client side JavaScript to MySQL is sort of a pain but if you have other options like using JSON, it is easer.
Here is a link on doing it with JSON.
The Page Param node might interest you as well. This node captures parameters passed in the URL. So if the clients existing database structure allowed you to append custom parameters in the link to your application, you could then capture those variables and apply them accordingly.
Or you could do GET requests with nodes.
29 June 2017 11:08