- This topic has 11 replies, 3 voices, and was last updated 9 months, 3 weeks ago by Brameister.
-
AuthorPosts
-
2024-01-17 at 8:09 pm #69770BrameisterParticipant
Is it possible to set a variable in one app that can be changed in a different app?
For example:
Let’s say I have 3 different apps (apps “a”, “b”, “c”) and all of them have the same variable “material price” set as the number “300”.
Is it possible to create a separate app (called “master”) through which I can change the value “300” to “400” in all “material price” variables (in apps a, b and c) simultaneously?
2024-01-18 at 1:06 am #69773xeonCustomerWell…generically speaking yes.
But this is a Verge3D forum so I am guessing you are really talking about Verge3D correct?
Then when you say apps? Are you meaning full application builds, completely different loaders and and new V3D.JS file? or are you meaning you need to load in another GLTF and control it with its materials based on the settings of varialbles based on the prior scene.
All of this can be handled but I am guessing…at this point what you are really wanting to do.
In situations where you have configurators you might want to load in new SKUs but the material in the prior SKU needs to carry over.If this is the case…consider starting with a Master App. This app will house all your materials and variables and all of your puzzles. Then just load in the GLTFs as needed.
On the other hand if you are really creating separate apps on a website and have need to communicate between pages…you can use variables in your url string to send information to the next page.
If you are doing this as an EXE then you can write and save your data locally without issue. You could do this for the web but its not a great option.
Xeon
Route 66 Digital
Interactive Solutions - https://www.r66d.com
Tutorials - https://www.xeons3dlab.com2024-01-18 at 2:35 pm #69788BrameisterParticipantHi, Xeon.
Thanks so much for answering!
I did in fact mean completely separate Verge3D applications (e.g. creating a “Master” app in Verge3D to control variables in the “Farmers Journey”, “Furniture Configurator” and “Jewelry Configurator” apps (just to exemplify what I meant by “app”)). The idea is to be able to control specific variables in multiple separate and completely independent apps locally on my computer (either by creating a “master” app or in any other way that can change the variables in all other apps simultaneously.
2024-01-18 at 4:08 pm #69789xeonCustomerJavaScript and J-query may be your solution depending on security needs and data length.
Xeon
Route 66 Digital
Interactive Solutions - https://www.r66d.com
Tutorials - https://www.xeons3dlab.com2024-01-18 at 4:24 pm #69790kdvParticipantI did in fact mean completely separate Verge3D applications (e.g. creating a “Master” app in Verge3D to control variables in the “Farmers Journey”, “Furniture Configurator” and “Jewelry Configurator”
Are the supposed to be active at the same time? Or you want to change some values via the Master app and when one of those apps is launched it will take and apply those changes?
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2024-01-18 at 5:00 pm #69791BrameisterParticipantAre the supposed to be active at the same time? Or you want to change some values via the Master app and when one of those apps is launched it will take and apply those changes?
There is no need to apply the changes in real time. If the other apps apply the changes made via the Master app upon launching either the html file or the puzzles, that would work perfectly.
The initial end-goal is to be able to change specific variable numbers in bulk (all of my apps have the same price list of materials. Whenever these material prices change, I have to update them one by one in each separate app. What I’d like to do is update these prices in a “master” app and automatically update the prices in all “child” apps.
Then, if that works, it would be great to be able to change other kinds of variables in bulk. I believe this would be a great feature for managing product configurators.
2024-01-18 at 5:24 pm #69792kdvParticipantUse LocalStorage to save/read values.
all of my apps have the same price list of materials.
Instead of asking a hypothetical question you should have been tell this )))
People, be more clear in your questions!
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2024-01-18 at 5:37 pm #69793BrameisterParticipantPeople, be more clear in your questions!
The hypothetical question has a purpose. I realize there may be simpler ways to save specific values, but the ultimate goal is to change more complex puzzles and variables, which I believe may only be able to be achieved by answering the original question, hence its “hypothetical” nature. The goal was not to solve this particular issue regarding material prices, I ultimately came to it in an attempt to clarify the question. But the goal is a bit more ambitious, so the “hypothetical” question sparks insight and thought into whether that would be a possibility or not.
But I really appreciate your answer and help on the matter, as always!
2024-01-18 at 6:27 pm #69794kdvParticipantHypothetical answer: Yes, it’s quite possible. There are several variants. Depends on what you want to get.
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2024-01-30 at 2:00 pm #70029BrameisterParticipantJavaScript and J-query may be your solution depending on security needs and data length.
Let me try to clarify what I’m trying to achieve.
Hypothetical answer: Yes, it’s quite possible. There are several variants. Depends on what you want to get.
Alright! That’s awesome to know that at least it is possible. Sorry if the question was initially confusing, but I have very limited coding and overall tech knowledge. I’ll try to make it clearer based on a specific use case I’d like to achieve:
I have several apps on my Verge3D App Manager (each related to a configurator of a specific product). In each of these apps, I created a tab called LISTS, where I assign lists of material names and prices to specific variables (e.g. Variable1 = Material1, Material2, Material3, and so forth). I use these lists within the Puzzles to calculate prices, assign materials to objects, etc. Each product app has this same list of materials and prices.
However, sometimes the materials I use in the products change, and material prices from suppliers also change from time to time. So, when this happens, I need to manually open the Puzzles in each App and manually change the respective names or prices in the lists under each LISTS tab.
What I’d like to do is to have a MASTER app (or a master visual_logic.js file), containing these lists, and whenever I change this visual_logic.js file (for example, changing specific material names or prices), it would automatically change the visual_logic.js files of all other apps, reflecting these new material names and prices, without me having to open the Puzzles in each app and making these changes one by one.
The idea is basically to be able to automate bulk changes in Puzzles (JS code) shared by completely separate and independent Verge3D Apps.
2024-01-30 at 2:49 pm #70032kdvParticipantYou don’t need a master app (it’s hardly possible this way). You just need to read prices from some external link (from .csv or .json file). It will be enough to change values in just one file to make prices actual in all apps.
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2024-01-30 at 3:05 pm #70033BrameisterParticipantAwesome, that makes a lot of sense. I’ll look into how to make that work. Thanks again for the help!
-
AuthorPosts
- You must be logged in to reply to this topic.