-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapi.html
More file actions
49 lines (40 loc) · 1.05 KB
/
api.html
File metadata and controls
49 lines (40 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>API Reference - PyLove2D</title>
<link rel="stylesheet" href="assets/style.css">
</head>
<body>
<header>
<h1>API Reference</h1>
</header>
<nav>
<a href="index.html">Home</a>
<a href="getting_started.html">Getting Started</a>
<a href="api.html">API Reference</a>
<a href="examples.html">Examples</a>
</nav>
<main>
<h2>Graphics Module</h2>
<pre><code>import pylove2d as love
love.graphics.set_color(1, 0, 0)
love.graphics.rectangle('fill', 100, 100, 50, 50)</code></pre>
<h2>Input Module</h2>
<pre><code>if love.input.key_down('left'):
print('Moving left') </code></pre>
<h2>Audio Module</h2>
<pre><code>sound = love.audio.Source('sound.wav')
sound.play()</code></pre>
<h2>Timer Module</h2>
<pre><code>love.timer.after(2, lambda: print('2 seconds passed'))
love.timer.every(1, lambda: print('Every 1 second'))</code></pre>
<h2>Window Module</h2>
<pre><code>love.window.set_title('My Game')
w, h = love.window.get_size()</code></pre>
</main>
<footer>
© 2025 PyLove2D
</footer>
</body>
</html>