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.

noname

Forum Replies Created

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • in reply to: create canvas texture #57438
    noname
    Participant

    Ah yes thanks for the hint. Now it works like intended. Thanks a lot.

    https://v3d.net/clp

    Attachments:
    You must be logged in to view attached files.
    in reply to: create canvas texture #57434
    noname
    Participant

    Okay when using the setInterval as Puzzleblock and not in the Code-Block it seems to work doing animations.

    https://v3d.net/clp

    Attachments:
    You must be logged in to view attached files.
    in reply to: create canvas texture #57373
    noname
    Participant

    @kdv77kdv
    It’s more like a javaScript manipulated drawing.

    Example JsFiddle:
    https://jsfiddle.net/7mvq29xa/1/

    var canvas = document.getElementById("myCanvas");
        var c = canvas.getContext("2d");
        var startX = 50;
        var startY = 50;
        var endX = 100;
        var endY = 100;
        var amount = 0;
        setInterval(function() {
            amount += 0.05; 
            c.clearRect(0, 0, canvas.width, canvas.height);
            c.strokeStyle = "black";
            c.moveTo(startX, startY);
            c.lineTo(startX + (endX - startX) * amount, startY + (endY - startY) * amount);
            c.stroke();
        }, 30);
    in reply to: create canvas texture #57265
    noname
    Participant

    Sorry for having to ask again here @kdv77kdv

    I was playing around with it but im not able to draw animations to the textures. Replacing the texture with a new static image is okay but how do I create an animation on it, using setInterval?

    in reply to: create canvas texture #57065
    noname
    Participant

    This works. Thank you much, sir!

    in reply to: create canvas texture #57054
    noname
    Participant

    Wow this is awsome. I tried your code and it works. However after testing a little I was not able to manipulate the canvas after the initial setup.

    Lets say i want to clear the canvas and draw another Rect on it. Is that possible? My goal is to build like a little gameboy that runs with a html/javascript canvas and that you can also control with the real buttons on the 3d model.

    Attachments:
    You must be logged in to view attached files.
    in reply to: detect ctrlKey #56213
    noname
    Participant

    oh okay thanks i’ll solve it with javascript then. Do you know how to use ‘in parent docs’ in javascript? I need to control a html-element in parent docs inside my listener.

Viewing 7 posts - 1 through 7 (of 7 total)