update,
This commit is contained in:
@@ -0,0 +1 @@
|
||||
1
|
BIN
_resources/_ref/background-p5js/background_test/helloworld.jpeg
Normal file
BIN
_resources/_ref/background-p5js/background_test/helloworld.jpeg
Normal file
Binary file not shown.
After Width: | Height: | Size: 68 KiB |
25
_resources/_ref/background-p5js/background_test/index.html
Normal file
25
_resources/_ref/background-p5js/background_test/index.html
Normal file
@@ -0,0 +1,25 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
|
||||
<!-- local resources -->
|
||||
<link rel="stylesheet" href="/index.css"/>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id='canvas'></div>
|
||||
|
||||
<!-- public resources -->
|
||||
<script
|
||||
src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js"
|
||||
integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM"
|
||||
crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.2.0/p5.js"></script>
|
||||
|
||||
<!-- local resources -->
|
||||
<script src="/index.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
16
_resources/_ref/background-p5js/background_test/index.js
Normal file
16
_resources/_ref/background-p5js/background_test/index.js
Normal file
@@ -0,0 +1,16 @@
|
||||
let img;
|
||||
|
||||
function preload() {
|
||||
img = loadImage("python.jpg");
|
||||
}
|
||||
|
||||
function setup() {
|
||||
const canvas = createCanvas(windowWidth - 20, windowHeight - 200);
|
||||
canvas.parent(document.querySelector("#canvas"));
|
||||
|
||||
for (let i = 0; i < 100; i += 50) {
|
||||
for (let j = 0; j < 100; j += 50) {
|
||||
image(img, i, j, 45, 45);
|
||||
}
|
||||
}
|
||||
}
|
BIN
_resources/_ref/background-p5js/background_test/python.jpg
(Stored with Git LFS)
Normal file
BIN
_resources/_ref/background-p5js/background_test/python.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
Reference in New Issue
Block a user