Forum Replies Created
-
AuthorPosts
-
kubuzCustomer
Thanks Xeon and Alexander.
Looking forward to the puzzle, and in the meanwhile I try out the javascript.kubuzCustomerOk, Seems like I can’t delete this noob question.
I found out i didn’t add a material to the font shapes.
Anyway Its fixed. Hope someone ever has any use to this.kubuzCustomerYo Yuri,
But I really like figure it out myself.
I do think that part is the most fun and interesting in development.
A hint or some good recourses might come in handy.Thanks for the suggestion.
kubuzCustomerThe resources of high quality textures are so big online, i wouldn’t worry about that. Tools like substance designer make it even more accesable to create them from scratch with not that much effort. If they want it. they take it, so its better to see you product as a whole in my oppinion
kubuzCustomerWhoaah,
Another great update.
Is it possible to share the complete demo of the Scroll transition effect please.kubuzCustomerHey Yuri,
One other thing that would be really usefull is to be able to search trought the list of puzzles. You guys add so many usefull new features every month, that its hard to track where everything is.
A bit like blender has the F3 button.
Keep up the great work!kubuzCustomerKeeping myself in the loop for further development on this topic.
kubuzCustomerdid you include a “load font” puzzle in your initialization tab in your puzzles editor for your specific font?
Jeah, i did. I am Beginning to understand how the whole canvas stuff works.
Got a nice big project for it in the near futurekubuzCustomerHi Yuri,
Thanks a lot pal, sometimes the answer is so plain simple that I can’t see it anymore. I use the Canvas TXT library to center and multiline texts.
I keep this tread updated for later reference.Thanks again. You guys are awesome.
kubuzCustomerHi Yuri,
Its just a placholder with the parameters as a comments. 2 Lines up we have the one that executes.kubuzCustomerHi Guys,
Looks like every milestone has some issues
Now, i have my font in place, but for some odd reason it doesnt update after changing the text….First i tought, I need to update in the script. like on How-to-update-things.html but that doesn’t change anything. The string is passed to the script correct.
Does anyone have a clue what i miss ? It must be something simple.function prepareExternalInterface(app) { app.ExternalInterface.myJSFunction = function(myText) { //window.addEventListener("load", function(){ var canvasTxt = window.canvasTxt.default; var canvasTex = v3d.puzzles.canvasTextures['my_canvas']; var canvas = canvasTex.image; var ctx = canvas.getContext("2d"); var txt = myText; console.log(txt); ctx.clearRect(0, 0, canvas.width, canvas.height); ctx.restore(); canvasTxt.fontSize = 80; ctx.fillStyle = '#0234d6' canvasTxt.font = 'BacktoBlack' canvasTxt.drawText(ctx,txt,100,100,800,800); ctx.save(); ctx.needsUpdate = true; //canvasTxt.drawText(ctx,txt,x,y,width,height); //}); }; };
kubuzCustomerIt must be some cache issue. Thanks a lot!
kubuzCustomerHi Guys,
@Gliftek, many thanks for your solution earlier. You helped me a lot.
By the time I figured this out myself, I would be grey.
Thanks.So I managed to draw text on a canvas. Struggled a bit with the custom font part. And then I noticed there was a piece of puzzle for that.
Now I have some strange behaviour.
If I preview the app local, it works like a charm. But, when i upload it to the Verge CDN, it doesn’t load the font.Does anyone have a clue ?
kubuzCustomerAwesome news! what plugin are you using for custom price?
I was lucky that a good friend came to help me with this.
Its a small piece of custom code in functions.php and a piece in MyAwesomeApp.jsBasicly its pretty simple, I use a small custom script to create and update a cookie in the MyAwesomeApp.js
function prepareExternalInterface(app) { app.ExternalInterface.setCookie = function setCookie(numericArg) { var d = new Date(); d.setTime(d.getTime() + (5*24*60*60*1000)); var expires = "expires="+ d.toUTCString(); document.cookie = "Price" + "=" + numericArg + ";" + expires + ";path=/"; }
This cookie is being picked up by the script when entering the woocommerce cart page
// PART 1, CHANGE PRICE OR CUSTOM PRODUCT ON THE CHECKOUT PAGE // ADD TO FUNCTIONS.PHP function custom_shop_price( $cart ) { $customshop_product_ids = 1360; if ( is_admin() && ! defined( 'DOING_AJAX' ) ) return; // LOOP THROUGH CART ITEMS, FIND CUSTOM MADE PRODUCT, GET THE PRICE foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) { $product = $cart_item['data']; // CHECK IF PRODUCT IS CUSTOM SHOP ITEM if($product->id == $customshop_product_id && isset($_COOKIE['Price'])){ $cart_item['data']->set_price( $_COOKIE['Price'] ); // SET PRICE TO CUSTOM PRODUCT PRICE // TODO: FIND THE STORED PRICE: SESSION, COOKIE, URL VARIABLE, ...?? $cart_item['data']->set_price( $_COOKIE['Price'] ); } } }; add_action( 'woocommerce_before_calculate_totals', 'custom_shop_price' ); // Clear Cart URL command function woocommerce_clear_cart_url() { if ( isset( $_GET['add-to-cart'] ) ) { WC()->cart->empty_cart(); } } add_action( 'init', 'woocommerce_clear_cart_url' );
Now I still needs an update to handle multiple products.
So we need to make this piece looping trough multiple products.kubuzCustomerYep, that has been fixed now.
Thanks Alexander! -
AuthorPosts