- This topic has 76 replies, 10 voices, and was last updated 5 years, 7 months ago by Yuri Kovelenov.
-
AuthorPosts
-
2018-11-08 at 5:42 pm #8781littleeiffelCustomer
Thanks Yuri, this looks interesting. I will try it out and get you an update.
2018-11-08 at 11:25 pm #8782littleeiffelCustomerHi Yuri, it does seem to work clumsily! It appears that I managed to get something of a 2D canvas to place a piece of graphic onto the mesh, although the external call crashes in Puzzle with an error. See attached.
In parent document, I have a canvas element containing Fabric.js for processing graphics. Currently, when the app is running on local server, the initial loading of the image appears on V3D canvas. But further interaction with the image such as scale, rotate, transform do not get update on V3D but is fully functional on Fabric canvas. According to my research, the console error could be associated with incomplete canvas loading when my external function is called within V3D.
I have tried a few basic things. First of all, I doubled check the order of execution of scripts in the parent html document. Secondly, I tried running similar codes in the RunCode function, but that seemed to not work at all.
2018-11-09 at 7:29 am #8789Yuri KovelenovStaff2018-11-09 at 5:17 pm #8799littleeiffelCustomerCool. Please see attached.
2018-11-10 at 8:37 am #8814Yuri KovelenovStaffWell I launched the app and it’s working for me. I suggest that you trigger your dynaTexture function upon user click and not upon loading – this way you’ll be able to test your 2d editor right away.
Cool idea by the way, we too were thinking about adding a similar feature in Verge3D core.
Attachments:
You must be logged in to view attached files.2018-11-13 at 4:19 pm #8885littleeiffelCustomerthanks for testing Yuri. I took your advice and edited the codes, and was pleasantly surprised to see it working.
your software is fantastic and fairly painless to use. i will make a purchase after a few more experimentation. Please let me know if you are planning on a upcoming Black Friday sales.
Cheers,
2018-11-14 at 7:10 am #8900Yuri KovelenovStaff2019-02-11 at 8:18 pm #11280HoboCatCustomerHello again, it is very nice that verge3d is so well supported and we can get help any time! I just found out an easy way of transfering an image from user input to verge3d enviroment. I made it so that the image from user input is stored in javascript variable as a base64 string, and so it can be transfered as a link to verge3d. But the project that I am building will take user image file and text inputs, these inputs will change an svg content(text, pictures) and finally when the svg is modified by the inputs it should be transfered to the verge3d. It works fine, but I noticed that when there is text with special letters(ru, pl, ltu) in svg, the script does not manage to convert this svg to base64. Maybe there is a way to pass the svg image to verge3d without converting it to base64?
2019-02-12 at 7:51 am #11296Yuri KovelenovStaffwhen there is text with special letters(ru, pl, ltu) in svg
looks like encoding issue https://stackoverflow.com/questions/19134995/how-to-display-unicode-in-svg
2019-02-20 at 9:29 pm #11596HoboCatCustomerThanks for advice. I also found out that svg’s from inkscape must be exported in plain svg format, then you can simply pass its html code to verge3d without any conversion to base64. My problem was that svg’s that i used was ‘Inkscape svg’ format.
2019-02-21 at 7:17 am #11602Yuri KovelenovStaff2019-02-21 at 10:29 pm #11650HoboCatCustomerHmmm as soon as I acomplished to make fully functional mechanism I started to try if it would work in my project that I am building(product customizator). After publishing to Verge3d network it somehow stopped to work the way I had made it. If I pass an image link, verge3d replace_texture puzzle does not make changes in image. But if I pass the image that is in app dir (./svgexample.svg) then it works. Also works with base64 input, but does not work with svg anymore. Could it be that when publishing to v3d network it modifies something in my v3d app?
Here is my app:
https://cdn.soft8soft.com/AROAJSY2GOEHMOFUVPIOE:f91957cd7f/applications/my_product/index.htmledit:
I found that the <image> part in svg is the part that started to block it to be passed to verge, if I take it out it works. Thats why image change from app dir works(it is without img).2019-02-22 at 9:01 am #11665Yuri KovelenovStaffHi,
your app seems to load images from a different domain which is forbidden by the same origin policy. Images must be loaded from the same domain (website). Alternatively, the backend must allow cross-domain requests – basically the server must respond with
Access-Control-Allow-Origin: *
headers enabled.BTW, have you tried the new puzzles for selecting images that we added in 2.11pre1?
2019-02-22 at 9:43 pm #11679HoboCatCustomerHey thanks! those puzzles seems to be usefull in my project! I noticed that there is a puzzle element ‘opened file’, but it says that it retrieves image from ‘upload image’ puzzle, but I dont see such puzzle. Is it the “Open file>do” puzzle?
Also I managed to make my last link to work. But it does not work on chrome:
the part that takes svg from input in text form of “data:image/svg+xml;utf8,<svg>…” and uses that svg as a texture doesn’t seem to work in chrome. Is there something I could do wih this?My project is related with laser engraving and cnc cutting production, and in these areas we use svg files for production. The svg file that is shown in v3d would be also sent directly to production.
By the way if I put 3d iframe from v3d network directly to my web page the buttons dont interact with v3d iframe. Is this problem also related to ‘same origin policy’ issue?
It would be very handy to use v3d network as 3d content storage for my automated web store.2019-02-23 at 9:51 am #11703Yuri KovelenovStaff‘opened file’, but it says that it retrieves image from ‘upload image’
There is an error in the description. The puzzles open file and opened file are supposed to work together.
Is there something I could do wih this?
Can you attach a sample project for us to look into?
Is this problem also related to ‘same origin policy’ issue?
Yep. The Verge3D app and the page in which the app is embedded must be served from the same domain.
-
AuthorPosts
- You must be logged in to reply to this topic.