Home › Forums › Bug Reports and Feature Requests › Replace texture puzzle with dynamic texture name (not texture file name)
- This topic has 3 replies, 2 voices, and was last updated 5 years, 3 months ago by Yuri Kovelenov.
-
AuthorPosts
-
2019-07-15 at 11:22 pm #17028scalareCustomer
Hello Verge3D Team!
Here is something I’ve been trying to solve for some time, but I could not. Maybe there is a way to do it with the current puzzles functionality, but I could not figure it out.
For a product configurator we’re working on, we need to be able to replace textures on the fly. We’re using the “replace texture” puzzle for this. We’re doing everything dynamically making calls to puzzle functions from the containing HTML page via javascript, and passing text parameters for both the material name and the texture file name to apply. The problem we have is that “replace texture” puzzle first parameter is a select field, and because of the complex materials we have, we need this first parameter to accept texts as well (like the other two parameters). The explanation about why we need that is too complex, and too long to write down, and I’m not sure if it makes sense to explain all that here.
My question is, is there a way to have the first parameter work as a dynamic text-based field? If so, how? And if there is no way to do it, would you be willing to consider adding that functionality to the puzzle? I honestly don’t know how complex that would be, but it would be a really nice addition.
Please let me know. Thanks a lot!
2019-07-16 at 9:20 am #17062Yuri KovelenovStaff2019-07-18 at 4:21 pm #17119scalareCustomerBecause of how our app is coded, and how it makes several calls to puzzle-based functions in an iterative way to reflect all the changes that have to be done to the 3D viewport based on a product component change, it would not be practical/desirable to have a modified copy of the puzzle function into our app.
How about the addition of a “raw javascript” puzzle where we could add the modified copy of the function, and have it added to the visual logic file automatically, instead of adding it to the js file manually, which would get overwritten with each new puzzle save in the App manager?
Thank you!
2019-07-19 at 6:31 am #17124Yuri KovelenovStaffinstead of adding it to the js file manually, which would get overwritten with each new puzzle save in the App manager?
You might add your JavaScript to your_app.js file, not visual_logic.js file. This way it won’t be overridden.
-
AuthorPosts
- You must be logged in to reply to this topic.