We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

“wait until this happens, then do this” logic

Home Forums General Questions “wait until this happens, then do this” logic

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #85917
    swatchyb
    Customer

    Hi.
    In 4.11, I am trying to wait until a gltf has loaded (load scene/ when loaded do) then applying another material (replace texture from parent doc), then initiating an animation only after everything has loaded.
    For now I have a 2 sec delay, but that isn’t always enough time, and longer is annoying.
    What is the best way to approach this since I am told (by chatGPT) that all of the puzzles like after loading/ do (and variations) have been removed? I don’t see any other puzzles that accomplishes a “wait until this happens, then do this kind of logic” without making a custom procedure.
    with thanks.

    #85920

    Hi,

    If I understand correctly, the actual delay happens when you apply materials to a freshly loaded models? You might greatly speed up the process, if you assign that material on some plane located beyond the visible volume of your scene (as early as possible).

    Soft8Soft Tech Chief
    Want more Verge3D updates? Follow me on X, Facebook, or LinkedIn

    #85938
    swatchyb
    Customer

    Thanks for the reply Alexander,
    Looks like the best approach now is to load a (small) scene with planes with materials assigned and out of sight, then append the primary model(s) using those same materials. Does that sound right?
    Seems a bit of a workaround. Is there a more “built in” approach that, or way to control the sequence of events?
    with thanks again.

    (ps. have really enjoyed using v3d over the years)

    #85945

    In most cases Puzzles do support callbacks for delayed actions (loading, playing animation etc etc). Materials is a different story, however it should not be a problem if the shaders/textures are ready to be applied on the model.

    Soft8Soft Tech Chief
    Want more Verge3D updates? Follow me on X, Facebook, or LinkedIn

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.