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.

Home Forums Official Announcements Verge3D 3.3 pre3 available!

Viewing 8 posts - 46 through 53 (of 53 total)
  • Author
    Posts
  • #31646
    Yuri KovelenovYuri Kovelenov
    Developer

    Isn’t that what you’d like to achieve?

    Attachments:
    You must be logged in to view attached files.

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

    #31658
    GlifTekGlifTek
    Licensee

    46 post (of 46 total)←1234

    Yes figured it out last night.
    …over complicating things again…

    My bad.

    Have it working for simple svg

    But…

    Previously, using a div w the svg in it, I was able to load my svg and append the <use> (“./mysvg.svg#mySvgShape01”)
    Using the innerHTML and text puzzles.
    To designate which shape in the svg file (a large library of designs that use many shared shapes)

    Trying to figure out how to apply this to the canvas method.

    EDIT: figured out that…
    BUT…

    • This reply was modified 2 months ago by GlifTekGlifTek.
    #31662
    GlifTekGlifTek
    Licensee

    runCode(app) is somehow firing BEFORE puzzles are completed.

    ( which i thought was the reason for the runCode… to fire after puzzles.)

    i have this to return the image name variable from puzzles…

    the console is printing imgName: undefined BEFORE my print to console puzzles are printing my concatenated imgName var, puzzles prepare to deliver.

    :scratch:

    my puzzles:
    s

    • This reply was modified 2 months ago by GlifTekGlifTek.
    Attachments:
    You must be logged in to view attached files.
    #31671
    Yuri KovelenovYuri Kovelenov
    Developer

    In Puzzles, you have an asynchronous procedure call (load data – once ready do). So you should initiate communication with your code only after your SVG file is loaded.

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

    #31673
    GlifTekGlifTek
    Licensee

    In Puzzles, you have an asynchronous procedure call (load data – once ready do). So you should initiate communication with your code only after your SVG file is loaded.

    right but that leads us back to the fact that i can’t tell runCode(app) WHEN to run (that’s for call js right?)

    the canvas texture code has to be in the runCodeapp not the external interface as shown in the user manual.

    so putting anything in the when finished … etc.. would have to be a call js.. not the runcodeapp.. where.. the canvas code works…

    #31674
    Yuri KovelenovYuri Kovelenov
    Developer

    Right, the sequence is that you load data first, and only after that you can use it in your code.

    So in your code, you have to perform the call for getting your variable value only after the data are loaded.

    A convenient way to do this is to use this method:

    https://www.soft8soft.com/docs/manual/en/introduction/Using-JavaScript.html#From_Puzzles_to_JavaScript

    If you use the variant of call js function with return value, then you can pass your variable to the code at the same time.

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

    #31675
    Yuri KovelenovYuri Kovelenov
    Developer

    Perhaps you can create a new topic for this question? We keep updating the 3.3 pre3 update which may be misleading for somebody. :)

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

    #31720
    GlifTekGlifTek
    Licensee

    Yes no problem.
    Don’t want to dirty the premiere thread with my quandries. I’ll make another thread.
    Sorry bout the frustrations.
    Feel free to delete earlier posts.

    (Also seems firefox has a BIG BUG with using canvas’ drawImage with SVGs. I’ll post that on the other thread I make)

    Thanks for the support and patience, Yuri! :good:

    link – https://www.soft8soft.com/topic/svg-method-in-javascript-problems/

    • This reply was modified 2 months ago by GlifTekGlifTek.
Viewing 8 posts - 46 through 53 (of 53 total)
  • You must be logged in to reply to this topic.