Access to render function, Composer Passes

Home Forums General Questions Access to render function, Composer Passes

This topic contains 5 replies, has 2 voices, and was last updated by Yuri Kovelenov Yuri Kovelenov 1 week, 3 days ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #13699
    Avatar
    mikeparisi
    Customer

    Hello again,

    I would like to add composer passes to the renderer. Also, I would like to call different functions before the renderer.render method is called. Do I have access to this?

    Thank you,
    Michael

    #13707

    Hi,

    The render method can be accessed via the app variable in your application js file.

    Founder & CEO at Soft8Soft
    LinkedIn | FB | Twitter | VK | 新浪微博

    #13722
    Avatar
    mikeparisi
    Customer

    Hey Yuri thanks for your reply. I assume that verge has its own requestanimframe function in which app.renderer.render is called. Is there a hook available to call functions before this render call?

    #13772

    Yes, you can add your own functions to the loop using:

    app.renderCallbacks.push(your_function);

    Founder & CEO at Soft8Soft
    LinkedIn | FB | Twitter | VK | 新浪微博

    #13931
    Avatar
    mikeparisi
    Customer

    great, is there documentation for this?
    is there a windowresize callback also?

    Thank you

    #13963

    here you go https://www.soft8soft.com/docs/api/en/extras/App.html
    The callback is called .onResize()

    Founder & CEO at Soft8Soft
    LinkedIn | FB | Twitter | VK | 新浪微博

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

You must be logged in to reply to this topic.