Home › Forums › Programming › Vue Js & Puzzle editor
- This topic has 33 replies, 6 voices, and was last updated 3 years, 12 months ago by yasse.
-
AuthorPosts
-
2020-06-06 at 5:24 am #28457dsmoootParticipant
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!
2020-06-06 at 8:01 am #28458GLiFTeKCustomer..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! 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!
cool yeah!
i got mine working earlier.. but no puzzle icon link in the manager, so i tried yours and moving mine around to your arrangement.
now it’s not working at all.i was moving files around then also saving them in VSC.
i’ll redo it tho.i’m currently trying to learn Vue in general, and get some github user example components working.
working on trying to get this accordion image menu working now…
vue-accordion
demo – vue-accordion live demojust having issues with which file i should be registering them in.. i’ll get it .. checking tuts now.
i’ll take a look at your newest version to get mine back to par.
yeah the devs here are just great.
speaking of which..Ivan,
do we NEED to do the CLI to get the bare bones of vue/v3d up and running?IF SO, what initial installation settings do you reccommend?
Visit the GLIFTEK Verge3D Plugins Store!
GLIFTEK.com for Plugin Documentation & LIVE DEMOS!
LIKE The GLIFTEK Facebook Page for updates!
Join the Verge 3D Discord Server!
plz share Discord link & on your signature!2020-06-06 at 8:02 am #28460GLiFTeKCustomerGood 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!oh awesome! .. i have a my old working version of my own setup back again now.
now i want to try what you did.Could you push what you just described to your git please and post here if/when you do so I can check it out if I run into any issues?
Thanks!Hopefully with this technique the guys can streamline the process!
Oh yeah!Visit the GLIFTEK Verge3D Plugins Store!
GLIFTEK.com for Plugin Documentation & LIVE DEMOS!
LIKE The GLIFTEK Facebook Page for updates!
Join the Verge 3D Discord Server!
plz share Discord link & on your signature!2020-06-06 at 10:50 pm #28474GLiFTeKCustomerok i got it working now too!
changes i made with puzzles transferred over by simply copying only my
“app.gltf” and visual_logic.js files into the src/v3dApp folder of the Vue project.To initially simplify things, I made a new Verge3D app called “app” because of the naming conventions used in the Vue project tutorial.
any renaming can be done from there. (or before hand if you know where all the file calls are in the project to change)
Ivan,
i might be missing something, but i think the instructions might need to change to have the folder that ends up being copied as the public/v3dApp folder should have it’s contents go to the scr/v3dApp folder to resolve the confusion about that.then possibly add something to the App Manager where you can choose if you want to create a Vue app…
like…if the user has already done the CLI to create a project in the verge3D/applications folder, then app manager could have an option to recognize that, and ask if they want to make that vue project into a vue/verge3d project, thus eliminating all the extra steps in the tutorial through the install, then have vue projects always look for the visual_logic.xml files in their proper vue structure place.
also i don’t think the CLI project creation may be necessary for this if you want a bare bones vue project, (just have vue installed npm obviously).
…exciting!
Visit the GLIFTEK Verge3D Plugins Store!
GLIFTEK.com for Plugin Documentation & LIVE DEMOS!
LIKE The GLIFTEK Facebook Page for updates!
Join the Verge 3D Discord Server!
plz share Discord link & on your signature!2020-06-07 at 10:59 pm #28506GLiFTeKCustomeralso
I’d like to mention the awesome new Vue graphical interface where you can install plug-ins and dependencies as you wish.
possibly Verge3D could be one of them and you can add it to your Vue site from there…you get to it by cd to your project dir in bash/terminal and the command is just “vue ui”.
it opens on port 8000 and opens a browser window.
to start a project in an already existing vue folder you use import option on top menu.Visit the GLIFTEK Verge3D Plugins Store!
GLIFTEK.com for Plugin Documentation & LIVE DEMOS!
LIKE The GLIFTEK Facebook Page for updates!
Join the Verge 3D Discord Server!
plz share Discord link & on your signature!2020-06-09 at 12:38 am #28542dsmoootParticipantHi 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!
2020-06-09 at 12:43 am #28543dsmoootParticipantAlso, 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!
2020-06-09 at 2:02 am #28545GLiFTeKCustomerRight on, dsmoot.
Very good to know I’ve got a similar mind on this journey of discovery!As I’m learning Vue to be my primary project framework because of its relative simplicity and organizational aspects, I’m ALSO looking into Quasar as a dev/deployment package. With our main project, I want to nip as much redundancy at the bud.
Quasar is based on Vue.js, and uses packages like Electron.js to deploy across all platforms simultaneously.
Ie: a smoother way to get your Verge3D protect out to a mobile app format. (Or desktop app if desired).
I’m currently learning VueX to get all useable data in one spot.
Do you have experience in Quasar or VueX? I will message you on Git.
Visit the GLIFTEK Verge3D Plugins Store!
GLIFTEK.com for Plugin Documentation & LIVE DEMOS!
LIKE The GLIFTEK Facebook Page for updates!
Join the Verge 3D Discord Server!
plz share Discord link & on your signature!2020-09-30 at 10:06 am #33619David DuperronCustomerHi there!
I was playing with Electron framework, and then discovered Quasar, which seams really powerful!
I managed to run a simple Quasar application by following the tutorial here without any issue (https://www.soft8soft.com/docs/manual/en/introduction/Using-JavaScript.html).
Now I would like to run a “custom” project instead of the simple V3D cube, i.e. a web app that I would set up using V3D puzzles and js to interact with the rest of the user interface.
Could any of you guys give me a hand or point me in the right direction?? (like how to set-up the index.vue and/or V3DApp.vue to correctly import the visual_logic.js file…).
Any help would be greatly appreciated!
CheersDavid
2020-09-30 at 12:09 pm #33624Yuri KovelenovStaffHi David,
Please take a look at this guide:
https://www.soft8soft.com/docs/manual/en/programmers_guide/Integration-with-Reactjs-Vuejs.html#Verge3D_Vue2020-09-30 at 12:15 pm #33626David DuperronCustomerHi Yuri!
Thanks for your reply! That’s the guide I followed to get the sample project working inside the Quasar framework. Now as I said I would like to integrate a more complex V3D project, which uses puzzles and therefore its own visual_logic.js file… I will try harder on my own, but if there is a quick help somewhere it’s always welcome! :p
CheersDavid
2020-09-30 at 1:13 pm #33634Ivan LyubovnikovStaffHi David,
I will try harder on my own, but if there is a quick help somewhere it’s always welcome!
There’s no direct integration between Vue.js and the Puzzles Editor, but you can try the approach described here: https://www.soft8soft.com/topic/vue-js-puzzle-editor/#post-27426
Co-founder and lead developer at Soft8Soft.
2020-09-30 at 1:55 pm #33639David DuperronCustomerThanks Ivan!
I already saw your post, but I must confess that I am far from an expert in Vue.js and actually I have troubles loading the visual_logic.js resource file… I don’t know how to import, or declare or whatever in the .vue or template files to load it properly… I suspect I need to properly import the visual_logic.js resource inside the <script> section of the V3DApp.vue file (similarly to what is done with the app.js file), but I don’t know how…EDIT: I managed to get the file loaded by adding the following line to the V3DApp.vue file:
import * as LOGIC from '../v3dApp/visual_logic.js';
But now I get a message saying that createApp is not a function… So it’s another issue. I probably need to add something else in the “export” section?EDIT2: Ok I just found that there is no createApp function in the app.js file when using the puzzles version… I then called V3DApp; instead of V3DApp.createApp(); once mounted, and got rid of the error… But this is just to go one more step! Now the scene does not load. Must be something to do with path…?
2020-10-01 at 3:47 pm #33701Ivan LyubovnikovStaffI have troubles loading the visual_logic.js resource file… I don’t know how to import, or declare or whatever in the .vue or template files to load it properly… I suspect I need to properly import the visual_logic.js resource inside the <script> section of the V3DApp.vue file (similarly to what is done with the app.js file), but I don’t know how…
For standard applications the visual_logic.js file is usually loaded automatically from your application’s main js file via a <script> tag.
But in the vue.js example it’s disabled by default, because the integration with puzzles is not supported out of the box. In order to enable it you need to open the app.js file and search for the line:
var LOAD_LOGIC_FILES = false;
and change it to:
var LOAD_LOGIC_FILES = true;
EDIT2: Ok I just found that there is no createApp function in the app.js file when using the puzzles version… I then called V3DApp; instead of V3DApp.createApp(); once mounted, and got rid of the error… But this is just to go one more step! Now the scene does not load. Must be something to do with path…?
How do you open the puzzles version of the app? I can only recommend the way I described here https://www.soft8soft.com/topic/vue-js-puzzle-editor/#post-27426 in the sections 1) and 2). It should work if you just open the scene’s .gltf file separately via the Application Manager, i.e. without loading the whole Vue.js application. Otherwise, there will most likely be crashes due to some path issues.
Co-founder and lead developer at Soft8Soft.
2020-10-01 at 11:42 pm #33709GLiFTeKCustomerHi guys,
Been reading and keeping up with discussion here.
Would like to add this link here to a github project someone has going on.
Using Qt5 (as opposed to electron) to bring Vue native scripted apps to the desktop.
Very interesting, I hope to play with it when project schedule allows.
Link…
https://github.com/nodegui/vue-nodeguiVisit the GLIFTEK Verge3D Plugins Store!
GLIFTEK.com for Plugin Documentation & LIVE DEMOS!
LIKE The GLIFTEK Facebook Page for updates!
Join the Verge 3D Discord Server!
plz share Discord link & on your signature! -
AuthorPosts
- You must be logged in to reply to this topic.