Forum Replies Created
-
AuthorPosts
-
David DuperronCustomer
Hi!
Thanks for the answers.
I juste tried the “Locked Track” constraints, whch again works well within Blender but does not in Verge3D…
see capture below:
The x axis of the piston is the “locked axis”, but then when I rotate the crane around its z axis, the piston x axis remains the same and does not rotate together with the crane as it should be…
Any idea?? please help!!David
David DuperronCustomerHi Mikhail,
I use the exact example scene as it comes with the bundle (there is one blender file per material). No tweaking at all.
Thanks Xeon, I’ll try your solution!
CheersDavid
David DuperronCustomerThanks a lot for the answer!
Indeed it works perfectly as expected.
However, I found a little “issue”: I would like to have a ruler tool that the user can activate/desactivate whenn needed (by clicking on a button for example), which works perfectly as long as you are not in the middle of the definition of a distance.
I mean if you have already clicked on the first end of your ruler, and remove the ruler (button, or keyboard input) before the definition of the second point, there is a remaining line in the interface, that you cannot hide or remove…
Is there a way to know if you are in the middle of the distance definition? a variable that could be used for that? or can we remove all the objects created when “killing” the ruler?
Thanks for the help!David
David DuperronCustomerDavid DuperronCustomerOne quick question as it’s not clear to me yet: can you measure distances between separated objects (and therefore meshes), or is it measuring within a single object only?? On the video on Gumroad there are only measures within a single object, and I would need “inter-objects” measuring capability for my needs.
Thanks a lot!David
David DuperronCustomerHi Yuri!
Thanks for the answer. Indeed this seems to answer perfectly my needs… however, the html source is not present in the repository (here: https://github.com/Soft8Soft/verge3d-code-examples). Has the file been removed? I found some workarounds in the meantime, which involve vertical scaling of a simple cylinder, to match the required length.
But now I am struggling with the constraints (for some reason they do not work the same way within Blender and in the exported GLTF… are there some kind of limitations or cavehats with the constraints in V3D puzzles?
ThanksDavid
David DuperronCustomerOk thank you for your answer! I’ll find another way to represent what I need in that case…
When you say “requires coding”… what does it mean exactly? is it a big amount of coding? where? in the puzzle editor??
Thanks againDavid
David DuperronCustomerBasically I think that the migration from Vue2 to Vue3 completely lost me… :(
David DuperronCustomerHello!
I’m pulling this old thread up, as I am struggling to update my limited knowledge to the latest developments…
Ivan,
I’ve followed the latest instructions to create a Vue App and integrate Verge3D app. Everything works fine and I manage to get your example vue page (with the four V3D apps instances) in my Quasar application. Now I would like to be able to run the same kind of dialogs between the verge3D app integrated into the vue page, with the quasar app itself… and that’s where I find my limits…
I had this code in the previous versions:mounted: function () { v3d.PL = v3d.PL || {}; v3d.PL._vueEventBus = eventBus; eventBus.$on("Object-clicked", (data) => { this.infoModals[data.id] = true; }); eventBus.$on("showNotif", (data) => { this.showNotif(data.id); }); V3DApp.createApp("scene01.gltf", "scene01_logic.js"); //V3DApp; },
“Object-clicked” and “showNotif” are procedure defined in the puzzles.
It seems that in the latest template, this “mounted()” hook is replaced by a “created()” hook, and the “mounted()” hook is only containing this.loadApp().
Any help would be greatly appreciated!
ThanksDavid
David DuperronCustomerHi!
Here is a simple setup I made for one of my Projects. The material alpha changes depending on the distance between the camera and the object (far = alpha0; close = alpha1).
You have to plug a value node to the alpha channel of your material, that you can then control in the Verge3D puzzles. I also put a screenshot of the material settings (alpha blend).
Hope it will help!
CheersDavid
Attachments:
You must be logged in to view attached files.David DuperronCustomerThanks GlifTek but I am not loading/unloading assets, but displaying different pages (Vue files) that load different Verge3D gltf files. And each time a new gltf is loaded, the memory usage increases and I cannot find a way to stop this behaviour…
David DuperronCustomerI think I found a solution myself…
I simply removed the listener associated to the scene by adding the following:beforeDestroy: function () { eventBus.$off(); },
It seems to work fine!
David DuperronCustomerOk, I finally found out where was the problem in the logic.js file. For some reason, the VARS object is only defined once (in the first procedure, acting on the triggerAnim group Objects). see below:
registerOnClick(getObjectsFrom(['GROUP', 'triggerAnim'], 'ALL'), function () { setHTMLElemStyle('cursor', 'default', ['BODY'], false); console.log(['Trigger ', _pGlob.pickedObject, ' has been clicked'].join('')); pickedObject = _pGlob.pickedObject; var VARS = Object.defineProperties({}, { "animObject": { get: function () { return animObject; }, set: function (val) { animObject = val; } }, "animObjectState": { get: function () { return animObjectState; }, set: function (val) { animObjectState = val; } }, "hoveredObject": { get: function () { return hoveredObject; }, set: function (val) { hoveredObject = val; } }, "pickedObject": { get: function () { return pickedObject; }, set: function (val) { pickedObject = val; } }, }); Function('app', 'v3d', 'VARS', 'PROC', (('// Built-in variables: app, v3d, VARS, PROC' + '\n' + 'v3d.PL._vueEventBus.$emit(\'Object-clicked\', { id: VARS[\'pickedObject\']});')))(appInstance, v3d, VARS, PROC); }, function () { }); registerOnClick(getObjectsFrom(['GROUP', 'modules'], 'ALL'), function () { setHTMLElemStyle('cursor', 'default', ['BODY'], false); console.log(['Module ', _pGlob.pickedObject, ' has been clicked'].join('')); pickedObject = _pGlob.pickedObject; Function('app', 'v3d', 'VARS', 'PROC', (('// Built-in variables: app, v3d, VARS, PROC' + '\n' + 'v3d.PL._vueEventBus.$emit(\'Object-clicked\', { id: VARS[\'pickedObject\']});')))(appInstance, v3d, VARS, PROC); }, function () { });
if I simply copy/paste the VARS definition in the second “registerOnClick” (acting on the Modules group objects) it works… the problem is that I will have to do it again each time I regenerate the js fil from my puzzles… is it a bug??
registerOnClick(getObjectsFrom(['GROUP', 'triggerAnim'], 'ALL'), function () { setHTMLElemStyle('cursor', 'default', ['BODY'], false); console.log(['Trigger ', _pGlob.pickedObject, ' has been clicked'].join('')); pickedObject = _pGlob.pickedObject; var VARS = Object.defineProperties({}, { "animObject": { get: function () { return animObject; }, set: function (val) { animObject = val; } }, "animObjectState": { get: function () { return animObjectState; }, set: function (val) { animObjectState = val; } }, "hoveredObject": { get: function () { return hoveredObject; }, set: function (val) { hoveredObject = val; } }, "pickedObject": { get: function () { return pickedObject; }, set: function (val) { pickedObject = val; } }, }); Function('app', 'v3d', 'VARS', 'PROC', (('// Built-in variables: app, v3d, VARS, PROC' + '\n' + 'v3d.PL._vueEventBus.$emit(\'Object-clicked\', { id: VARS[\'pickedObject\']});')))(appInstance, v3d, VARS, PROC); }, function () { }); registerOnClick(getObjectsFrom(['GROUP', 'modules'], 'ALL'), function () { setHTMLElemStyle('cursor', 'default', ['BODY'], false); console.log(['Module ', _pGlob.pickedObject, ' has been clicked'].join('')); pickedObject = _pGlob.pickedObject; var VARS = Object.defineProperties({}, { "animObject": { get: function () { return animObject; }, set: function (val) { animObject = val; } }, "animObjectState": { get: function () { return animObjectState; }, set: function (val) { animObjectState = val; } }, "hoveredObject": { get: function () { return hoveredObject; }, set: function (val) { hoveredObject = val; } }, "pickedObject": { get: function () { return pickedObject; }, set: function (val) { pickedObject = val; } }, }); Function('app', 'v3d', 'VARS', 'PROC', (('// Built-in variables: app, v3d, VARS, PROC' + '\n' + 'v3d.PL._vueEventBus.$emit(\'Object-clicked\', { id: VARS[\'pickedObject\']});')))(appInstance, v3d, VARS, PROC); }, function () { });
David DuperronCustomerHi!
I continue to work on this subject. As you suggested Ivan I started to call v3d procedures directly from the Quasar/Vue interface and it works like a charm.
However, I encounter a strange behaviour… I don’t know if it’s a bug or a mistake somewhere, but as soon as I have two active “exec script” blocks in my puzzles, I have an error popping:
Uncaught ReferenceError: VARS is not defined
It’s like I can use the VARS[‘myVar’] only once…
Any idea how to solve this??
David DuperronCustomerHi Ivan! Simple as that… :) I will try it ASAP!
Thank you very muchAnd Thanks GlifTek! In fact I discovered this framework on one of your posts here! ;) As you said the fact that you can deploy to any platform with one single code is just perfect… The other things is the great number of built-in components and functions, that look just great out of the box and are so easy to integrate in your app!!
I’ll keep my Github updated as I progress with this exercise, and try to document it… do not hesitate to clone it and come discuss it here!
CheersDavid
-
AuthorPosts