Brain.js Не уд.подкл.к проектуhtmlНЕ вкл.библ.Подскажиет как и где править код ? Как экспортировать функцию и на доли?

DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>НС</title>

    <script src="http://brain.js/browser.min.js"></script>
    <!--<script src=”https://raw.githubusercontent.com/harthur-org/brain.js/master/browser.js"></script>-->

    <style>
        body {
            background-color: #333;
        }

        #canv {
            position: absolute;
            top: 0;right: 0;bottom: 0;left: 0;
            margin: auto;
            background-color: white;
        }
    </style>
</head>
<body>

    <canvas id="canv" style="display: block;">Ваш браузер устарел, обновитесь.</canvas>

    <script>
        function DCanvas(el)
        {
            const ctx = el.getContext('2d');
            const pixel = 20;

            let is_mouse_down = false;

            canv.width = 500;
            canv.height = 500;

            this.drawLine = function(x1, y1, x2, y2, color = 'gray') {
                ctx.beginPath();
                ctx.strokeStyle = color;
                ctx.lineJoin = 'miter';
                ctx.lineWidth = 1;
                ctx.moveTo(x1, y1);
                ctx.lineTo(x2, y2);
                ctx.stroke();
            }

Ответы (0 шт):