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.

dsmooot

Forum Replies Created

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • in reply to: Vue Js & Puzzle editor #28543
    dsmooot
    Participant

    Also, Ivan! I am by no means an expert with Vue, but if there is ever an opportunity to contribute to furthering verge3d/vue integration, let me know if I can help in any way! Or even verge3d overall, for that matter! :)

    I’m fairly familiar with using threejs and vue, so feel free to reach out!

    in reply to: Vue Js & Puzzle editor #28542
    dsmooot
    Participant

    Hi GlifTek. Good to hear you’ve been making progress with your project setup. I work as a front-end dev with a team that uses Vue for most of our projects, so being familiar with the framework was a big motivation for integrating verge3d into a Vue context. There certainly is a lot to learn within Vue, so it’s great to learn by trying things (and failing often) first-hand. As this thread can show, there are areas where I am still learning about the framework (I’m usually working out of projects that have been set up :P, so project build-related stuff is my weak point)… I went ahead and pushed up the change where I’m using UI elements via Puzzles, so you can have that as a reference. I’m planning to finish working through the tutorial series and will continue to update that repo, so feel free to check in for changes. I’m a fan of going through terminal commands, npm, vu-cli, etc. vs. the gui, but it’s all preference. … and to note, I think it’s great that we are some of the first case-studies for user inquiries related to Vue w/verge3d. I hope that in some way our faults and questions provide some meaningful insight for the verge3d devs along the way! Can’t wait to see formal vue-related tutorials for verge3d!

    in reply to: Vue Js & Puzzle editor #28457
    dsmooot
    Participant

    Good news, GlifTek! I did a little testing and it turns out that you can setup your puzzles code in the static project and copy/paste both the visual_logic.js and visual_logic.xml files into the Vue project (replacing the previous ones).

    To test, I setup some UI elements in the V3DApp.vue component, then made identical UI elements in the static project and set click eventListeners through the Puzzles editor. I saved, copy/pasted the files from the static project to the Vue project and everything worked correctly! B-)

    in reply to: Vue Js & Puzzle editor #28456
    dsmooot
    Participant

    ..and Hello, GlifTek!
    Glad you made it into the discussion. It seems you’ve found some answers fairly quickly as well! Always awesome to find helpful forums – especially getting to have a discussion with the lead dev! :yahoo: As Ivan suggested to you, I used the vue template from the Embeddable folder to setup the Vue project and then compared, migrated, and renamed my files from my static project into my Vue project.
    I linked my repo to github in a previous post, so feel free to clone it if it’s helpful to you. Pushed up the fix to my problem, so it should be functional as a template!

    in reply to: Vue Js & Puzzle editor #28454
    dsmooot
    Participant

    Fantasic, Ivan!
    You were correct! I must have overlooked this difference when comparing my file to the template. Made the change, and it works just fine! I’m thankful that it was something you could identify so easily. Kudos!

    And from GlifTek’s latest post, I also am curious to find out an ideal workaround for integrating Puzzles:

    When I migrated the visual_logic.xml file from my static project setup into the Vue project, the puzzles animation performed as it should. When I followed your instructions from earlier in this thread, I was able to access the puzzles editor, yet, it didn’t seem that I could save/overwrite the visual_logic.xml file in the Vue project when pressing “save” in the editor. (missing a connection between the editor and the vue project? ie. ‘Connection Error. Make sure you are running development server’)… Would it work to simply make changes in the static project and then replace the visual_logic.xml file in the Vue project to update the puzzles events, etc.? I’ll find out soon enough after tinkering further! Let me know if you have any insight on this situation.

    Again, can’t thank you enough for taking the time to resolve my issue and to offer such a unique service for Blender users!

    in reply to: Vue Js & Puzzle editor #28397
    dsmooot
    Participant

    Hi, Ivan. Thank you for the prompt response! I really appreciate you for taking the time to investigate this issue.

    “Does this error happen when you open the scene itself or the puzzle editor (or both)?”

    I receive the error when I access the scene in the browser. For context, I’m going through the Swiss Army knife tutorial series and thought I’d attempt to integrate it into a Vue project. In my app.js file (named swiss_army_knife.js, for this project), there are references to the v3d instance that are causing the error. Oddly enough, after tinkering with the project after my previous post, I started to place the v3d.js file in different directories within the project to test that it wasn’t an incorrect path for import. I ended up placing it back into the /public folder root and was able to successfully launch the scene without errors. After a few hours, I tried to launch the project again, without making any changes to the file structure, and the ‘v3d not defined’ error returned.

    Today, I attempted to run the project again and am receiving the same error, yet the scene loads successfully behind the errors overlay! Truly a strange outcome. I am beginning to wonder if I need to setup a Promise for the v3d.js file to import before referencing it in the swiss_army_knife.js file.

    “does it work if you just change the LOAD_LOGIC_FILES variable back to false?”

    Another odd case: Initially, before setting LOAD_LOGIC_FILES to true, I was able to launch the scene successfully without error. After setting to true, I received the error overlay, with the scene running in the background (with the puzzles animation working). I then set LOAD_LOGIC_FILES back to false and continue to receive the error overlay, with the scene running in the background (without puzzles animation working). Note: I’m also hard refreshing and clearing cache between attempts.

    I’ve attached a screenshot of the scene running with the error overlay (error.png), along with the console log from the terminal (console.png). The browser console stopped logging the error, so I wasn’t able to screenshot it before it disappeared.

    Also, I’ve pushed my project to a remote GitHub repo if you would like to see the file structure, test things, etc. Here is the link: https://github.com/dsmooot/verge3d-myFirstProject

    I’m really looking forward to getting things running smooth! Very excited for what’s to come with Verge3D.

    Thanks for your hard work and for your help, Ivan!

    Cheers.

    in reply to: Vue Js & Puzzle editor #28361
    dsmooot
    Participant

    Hello, I found your post recently while I was going through the vue.js setup example and came across an issue with the puzzle editor. I followed the steps you’d suggested above, and I was able to access the puzzle editor by appending the url, but once I changed “var LOAD_LOGIC_FILES” to true, I received an error “v3d is not defined”. I have v3d.js in my public folder, and am importing it within script tags in index.html, as “<script src=”<%= BASE_URL %>v3d.js”></script>”. Do you have any ideas as to what the issue could be? I’m assuming that I’m not importing the v3d.js file correctly. Any help would be greatly appreciated. Thanks for taking time to look into this!

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