Replace texture puzzle with dynamic texture name (not texture file name)

Home Forums Bug Reports and Feature Requests Replace texture puzzle with dynamic texture name (not texture file name)

This topic contains 3 replies, has 2 voices, and was last updated by Yuri Kovelenov Yuri Kovelenov 4 months, 2 weeks ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #17028
    Avatar
    scalare
    Licensee

    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!

    #17062
    Yuri Kovelenov
    Yuri Kovelenov
    Developer

    Hi,

    We’ll consider making a corresponding option in the replace texture puzzle. Meanwhile you can check JavaScript generated by that puzzle and may be use it in your app code.

    3D Verger, the CEO
    LinkedIn | FB | Twitter | VK | 新浪微博

    #17119
    Avatar
    scalare
    Licensee

    Because 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!

    #17124
    Yuri Kovelenov
    Yuri Kovelenov
    Developer

    instead 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.

    3D Verger, the CEO
    LinkedIn | FB | Twitter | VK | 新浪微博

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.