dir.by  
  Search  
Programming, development, testing
p5.js - JavaScript library for drawing graphics 2D (drawing pictures, lines, movements), 3D graphics (Drawing materials, light, texture)
image
  Looked at 2817 times    
<html>
     <head>
          <script src="http://dir.by/example_lib/p5_js/p5.min.js"></script> <!-- !!!!!!!!!!!!!! -->
          <script src="https://dir.by/example_lib/p5_js/p5.min.js"></script>
     </head>

     <script>
          let img;
          function preload() {
               img = loadImage("1.png");
          }

          // function setup() Required. It is used by the library p5.js
          function setup() {

               // create canvas
//               createCanvas(320, 280); // function is declared in p5.js

               image(img, 0, 0);
          }

          // function draw() Required. It is used by the library p5.js
          function draw() {

               // fill canvas by gray color
               background("#EEEEEE"); // function is declared in p5.js

               // draw ellipse (function from p5.js)
               ellipse(50, 50, 80, 80); // function is declared in p5.js
          }
     </script>

     <body>
     </body>

</html>
 
← Previous topic
Пример "рисуем эллипс" | p5.js
 
 
Your feedback ... Comments ...
   
Your Name
Your comment (www links can only be added by a logged-in user)

  Объявления  
  Объявления  
 
What the p5.js ?
p5.js where to download and how to connect?
Пример "рисуем эллипс" | p5.js
image

  Ваши вопросы присылайте по почте: info@dir.by  
Яндекс.Метрика