We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

kubuz

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 48 total)
  • Author
    Posts
  • in reply to: Get X, Y, Z dimensions of a generated text object #53812
    kubuz
    Customer

    Thanks Xeon and Alexander.
    Looking forward to the puzzle, and in the meanwhile I try out the javascript.

    in reply to: Ambient Occlusion with generated text #53640
    kubuz
    Customer

    Ok, 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.

    in reply to: Obj Loader #35964
    kubuz
    Customer

    Yo 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.

    in reply to: Protect content being downloaded to the user. #34059
    kubuz
    Customer

    The 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

    in reply to: Verge3D 3.4 pre3 available! #32531
    kubuz
    Customer

    Whoaah,
    Another great update.
    Is it possible to share the complete demo of the Scroll transition effect please.

    in reply to: Few Feature requests #32402
    kubuz
    Customer

    Hey 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!

    in reply to: Scripting with conda + blender (bpy) + verge3D #32331
    kubuz
    Customer

    Keeping myself in the loop for further development on this topic.

    in reply to: draw text to canvas #32242
    kubuz
    Customer

    did 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 future

    in reply to: draw text to canvas #32234
    kubuz
    Customer

    Hi 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. B-)

    in reply to: draw text to canvas #32203
    kubuz
    Customer

    Hi Yuri,
    Its just a placholder with the parameters as a comments. 2 Lines up we have the one that executes.

    in reply to: draw text to canvas #32199
    kubuz
    Customer

    Hi 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.

    Puzzle

    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);
            //});
        };
    };
    in reply to: draw text to canvas #32149
    kubuz
    Customer

    It must be some cache issue. Thanks a lot! :bye:

    in reply to: draw text to canvas #32139
    kubuz
    Customer

    Hi 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.

    Image of the working app

    The link to the app on CDN

    Does anyone have a clue ?

    in reply to: Puzzle Order Button same TAB #31771
    kubuz
    Customer

    Awesome 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.js

    Basicly 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.

    in reply to: Woocommerce Order form email problem #31259
    kubuz
    Customer

    Yep, that has been fixed now.
    Thanks Alexander!

Viewing 15 posts - 1 through 15 (of 48 total)