親愛なる私は通常の説明を見つけられなかったので、あなたの助けを求めることにしました. html ファイルで paper.js プロジェクトを作成したいと考えています。接続できない問題 使ってみた var scope = new paper.PaperScope();
scope.setup(myCanvas);
しかし、うまくいきませんでした。これは、 Paper.js Web サイトから取得したコードです。
<!DOCTYPE html>
<html>
<head>
<!-- Load the Paper.js library -->
<script type="text/javascript" src="paper.js"></script>
<!-- Define inlined JavaScript -->
<script type="text/javascript">
// Only executed our code once the DOM is ready.
var scope = new paper.PaperScope();
scope.setup(myCanvas);
var myPath = new Path();
myPath.strokeColor = 'black';
// This function is called whenever the user
// clicks the mouse in the view:
function onMouseDown(event) {
// Add a segment to the path at the position of the mouse:
myPath.add(event.point);
}
</script>
</head>
<body>
<canvas id="myCanvas" resize></canvas>
</body>
</html>
しかし、ここでは何もしません... ご清聴ありがとうございました。