Jump to content

Use a picture as a dynamic texture


Recommended Posts

Alright, cool, good luck then! Don't forget to let us see what you created when you are done! :D


Hint: if the playground in the other thread doesn't work, just click "Run" again. It should work, I think it's just how the fabric.js is referenced in the playground might be a little problematic.

Link to comment
Share on other sites

i use the code in example to recreate the same scene. So i took the code and i develop the script but in my localhost that doesn't work. So i put the code in the playground and suprise ! it's works. I think there are something missing  in my html or js file. Here the playground link 





Here the html code 

<!DOCTYPE html><html lang="en"><head>    <meta charset="UTF-8">    <title>Babylon Cube</title>    <link rel="stylesheet" href="css/style.css">    <script src="js/lib/fabric.js"></script></head><body>    <canvas id="renderCanvas" class="turtle">    <canvas id="paintCanvas" style="visibility:hidden" width="1024" height="1024"></canvas>    <script src="js/lib/jquery-1.10.2.min.js"></script>    <script src="js/lib/babylon.2.2.js"></script>    <script src="js/index2.js"></script></body></html>

for the Js file, i just remove this lines 

$('#fabricjs').remove();$('#paintCanvas').remove();$(".canvas-container").remove();$('body').append('<script id="fabricjs" src="https://cdnjs.cloudflare.com/ajax/libs/fabric.js/1.5.0/fabric.js"></script>');$("#canvasZone").append('<canvas id="paintCanvas" style="visibility:hidden" width="1024" height="1024"></canvas>');
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...