No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    How can i use rive-canvas in vue + quasar?

    Help
    2
    2
    284
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • G
      Guilherme M O last edited by

      Is there any way to add rive-canvas to a vue.js + quasar project? I’m doing something wrong.

      I’m trying to integrate rive animations in a project, but I’m having problems doing it, more specifically when using the Rive function to render the animation, the error that returns is the declaration of the Rive variable, which I call in this excerpt:

           Rive ({                                                                                    
             locateFile: (file) => 'https://unpkg.com/rive-canvas@0.6.10/' + file, 
           }). then ((rive) => {
           ...
           ...
           ...
      

      And the error that returns:

      [Vue warn]: Error in mounted hook: “ReferenceError: Rive is not defined”

      Has anyone messed with this, or know how to help me?

      Thanks!

      dobbel 1 Reply Last reply Reply Quote 0
      • dobbel
        dobbel @Guilherme M O last edited by dobbel

        @guilherme-m-o

        1. yarn add install rive-canvas

        2. the code below

        import Rive from "rive-canvas"
        ....
        mounted() {
            console.log("############ mounted #############")
            Rive({
              locateFile: file => "https://unpkg.com/rive-canvas@0.6.10/" + file,
            }).then(rive=> {
              console.log(rive)
              // output: "some rive promise!"
            })
        },
        

        That looks like a really interesting animation repo. If you create something with Quasar and Rive would you be so kind to share what you did here on the forum?

        1 Reply Last reply Reply Quote 0
        • First post
          Last post