Home › Forums › Official Announcements › Verge3D 3.3 pre3 available!
- This topic has 52 replies, 12 voices, and was last updated 4 years, 3 months ago by GLiFTeK.
-
AuthorPosts
-
2020-07-29 at 10:25 am #30853Yuri KovelenovStaff2020-08-14 at 1:22 am #31522GLiFTeKCustomer
specific loaded image on the canvas puzzle texture replacement, not a happy face doodle?
sure you can do that! https://www.w3schools.com/tags/canvas_drawimage.asp
hey Yuri,
So i’m just now getting back to trying this out.i’ve got
function runCode(app) { //from verge var canvasTex = v3d.puzzles.canvasTextures['my_canvas']; var canvas = canvasTex.image; var ctx = canvas.getContext("2d"); //from W3 // var c = document.getElementById("my_canvas"); // var ctx = c.getContext("2d"); var img = document.getElementById("SVGimage"); ctx.drawImage(img, 200, 200); canvasTex.needsUpdate = true;
};
so that’s the starting point, just from the user manual and from w3..
my dimensions and image id.
the image is in the html also.
how am i to merge the two sample code without getting the“KHR_parallel_shader_compile extension not supported.” error?
my puzzle
thnxVisit 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-08-14 at 7:57 am #31537Yuri KovelenovStaffHi,
“KHR_parallel_shader_compile extension not supported.” error?
this is just a warning which can be safely ignored. Otherwise does it work as intended?
2020-08-14 at 5:33 pm #31559GLiFTeKCustomerHi,
“KHR_parallel_shader_compile extension not supported.” error?
this is just a warning which can be safely ignored. Otherwise does it work as intended?
no. not even with a png.
i can get the w3 example working just fine.. Even with an SVG, or pngi can also reproduce the smiley face from the user guide.
i cannot, however, get the w3 instructions on drawing images on canvas COMBINED into the example on the user guide with the puzzle to replace the texture from the blender material.
have you got it working?
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-08-15 at 12:54 am #31563GLiFTeKCustomerReally need to get this working. Not to be a nag…
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-08-15 at 7:21 am #31576GLiFTeKCustomerI need to know if this works or not as to decide the path the dev is going to take on a major project that depends on svg in 3d.
it’s either drawn to canvas on textures in verge blender materials
or it’s drawn to css3d matched over the verge scenario.
i need to know NOW which way this is going to develop.
if we cannot draw referenced IMAGES straight to the canvas texture from the verge puzzle then i need to know NOW.
major shift going on that is TIME dependent..
i appreciate the effort.
not to be an ass, but i need to be on point.
thanks.
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-08-15 at 10:54 am #31577Yuri KovelenovStaff2020-08-16 at 7:12 am #31600GLiFTeKCustomerHi,
I really want to help but having troubles to understand what’s wrong with that code. Can you isolate the issue in a simple project and attach here?sorry if i’m being was harsh.
this has been complicated by erroneous VSC add ons that are fussing with liveserver….grrr…
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-08-16 at 1:46 pm #31602Yuri KovelenovStaff2020-08-17 at 12:15 am #31624GLiFTeKCustomerglad you got it working!
Hi yuri,
Sorry bout that.
Got it working in the run your code here section as shown in the user manual.Thing is, if I want to make img.src = myVar how would I reference myVar that FROM a var in puzzles?
Do I have to pass to parent.window etc?
I know how to do that in the Call JS method, but using the code that way won’t work.
Any way to pass a puzzles variable to the run code here section?
Thanks!
P.S.: does this have to do with using .document
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-08-17 at 4:56 am #31635Yuri KovelenovStaffHi,
I want to make img.src = myVar how would I reference myVar that FROM a var in puzzles?
You might create a procedure (with return value) in the Puzzles, say getMyVar, with the only purpose of retrieving the value of your variable.
Then you can call this procedure from JS as follows:var myVar = v3d.puzzles.procedures.getMyVar();
2020-08-17 at 6:20 am #31638GLiFTeKCustomerHi,
I want to make img.src = myVar how would I reference myVar that FROM a var in puzzles?
You might create a procedure (with return value) in the Puzzles, say getMyVar, with the only purpose of retrieving the value of your variable. Then you can call this procedure from JS as follows:
var myVar = v3d.puzzles.procedures.getMyVar();
because “run here” always follows puzzles..
but wouldn’t a “return” be asking for puzzles to get a var from the js?as opposed to what i’m intersted in which is sending a puzzles var to the js in order to be used in the “run here” canvas img.src value?
..
Trying to PUT a puzzles variable. INTO the “run your code here” area.
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-08-17 at 7:15 am #31639Yuri KovelenovStaffsending a puzzles var to the js in order to be used in the “run here” canvas img.src value?
Yep, my suggestion should work for this case.
2020-08-17 at 7:30 am #31641GLiFTeKCustomersending a puzzles var to the js in order to be used in the “run here” canvas img.src value?
Yep, my suggestion should work for this case.
Ok. Will take a stab at it, thanks.
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-08-17 at 9:50 am #31644GLiFTeKCustomersending a puzzles var to the js in order to be used in the “run here” canvas img.src value?
Yep, my suggestion should work for this case.
wait so .. the “return” version of procedures don’t return anything unless you make the plug in puzzle version of them that fills a slot.
how would that version be able to work with the “run code here” area of my js?
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! -
AuthorPosts
- You must be logged in to reply to this topic.