You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: whats-new/index.html
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -66,7 +66,7 @@ <h1>What's New</h1>
66
66
<divclass="wn-tag changed">Changed</div>
67
67
<divclass="wn-card-title">_mousePressed and _keyPressed</div>
68
68
<divclass="wn-card-body">
69
-
<p>In Processing Java, <code>mousePressed</code> is both a boolean variable (is the mouse held right now?) and an event callback function (called once on click). C++ does not allow a variable and a function to share the same name in the same scope, so the boolean variables are renamed with an underscore prefix to avoid the collision.</p>
69
+
<p>In Processing Java, <code>mousePressed</code> is both a boolean variable that tells you if the mouse is held right now, and an event callback function that fires once on click. C++ does not allow a variable and a function to share the same name in the same scope, so the boolean variables are renamed with an underscore prefix to avoid the collision.</p>
70
70
<p>The event callbacks keep their original names unchanged. Only the state variables change.</p>
<p>Processing Java's typed list classes — <code>IntList</code>, <code>FloatList</code>, <code>StringList</code>, and <code>ArrayList</code>— are not available in C++ Mode. Use <code>std::vector</code> from the C++ Standard Library instead. It is faster, more flexible, works with any type including your own classes, and requires no imports.</p>
89
+
<p>Processing Java's typed list classes <code>IntList</code>, <code>FloatList</code>, <code>StringList</code>, and <code>ArrayList</code> are not available in C++ Mode. Use <code>std::vector</code> from the C++ Standard Library instead. It is faster, more flexible, works with any type including your own classes, and you do not need to import anything.</p>
<p>Processing Java's typed dictionary classes — <code>IntDict</code>, <code>FloatDict</code>, <code>StringDict</code>— are replaced by <code>std::map</code>. Keys are kept in sorted order. Works with any combination of key and value types.</p>
110
+
<p>Processing Java's typed dictionary classes <code>IntDict</code>, <code>FloatDict</code>, <code>StringDict</code> are replaced by <code>std::map</code>. Keys are kept in sorted order and it works with any combination of key and value types.</p>
111
111
<pre>// Java Processing:
112
112
StringDict d = new StringDict();
113
113
d.set("name", "Pep");
@@ -127,8 +127,8 @@ <h1>What's New</h1>
127
127
<divclass="wn-tag new">New</div>
128
128
<divclass="wn-card-title">captureMouse() and releaseMouse()</div>
129
129
<divclass="wn-card-body">
130
-
<p><code>captureMouse()</code> locks the cursor to the window and enables raw mouse input, completely bypassing OS acceleration and cursor boundaries. This is the standard approach for first-person and shooter games where the mouse needs to rotate a camera freely without hitting the edge of the screen.</p>
131
-
<p><code>releaseMouse()</code> restores normal cursor behavior. Call it when opening a menu, showing a dialog, or pausing the game.</p>
130
+
<p><code>captureMouse()</code> locks the cursor to the window and enables raw mouse input, completely bypassing OS acceleration and cursor boundaries. This is the right approach for first-person and shooter games where the mouse needs to rotate a camera freely without hitting the edge of the screen.</p>
131
+
<p><code>releaseMouse()</code> restores normal cursor behavior. Call it when you open a menu, show a dialog, or pause the game.</p>
132
132
<pre>void setup() {
133
133
size(640, 360, P3D);
134
134
captureMouse();
@@ -148,8 +148,8 @@ <h1>What's New</h1>
148
148
<divclass="wn-tag new">New</div>
149
149
<divclass="wn-card-title">mouseDX and mouseDY</div>
150
150
<divclass="wn-card-body">
151
-
<p>Two new variables that accumulate raw mouse movement between frames. Unlike <code>mouseX - pmouseX</code>, these capture every cursor event that occurs between frames — so fast mouse movement is never dropped or lost at high frame rates.</p>
152
-
<p>They reset to <code>0</code> automatically after each <code>draw()</code> call. Use them for FPS camera rotation, turret aiming, or any input that needs to be frame-rate independent.</p>
151
+
<p>Two new variables that accumulate raw mouse movement between frames. Unlike <code>mouseX - pmouseX</code>, these capture every cursor event that occurs between frames so fast mouse movement is never dropped or lost at high frame rates.</p>
152
+
<p>They reset to <code>0</code> automatically after each <code>draw()</code> call. Use them for FPS camera rotation, turret aiming, or any other input that needs to be frame-rate independent.</p>
153
153
<pre>float yaw = 0, pitch = 0;
154
154
155
155
void setup() {
@@ -178,7 +178,7 @@ <h1>What's New</h1>
178
178
<divclass="wn-tag new">New</div>
179
179
<divclass="wn-card-title">Full C++ Standard Library included</div>
180
180
<divclass="wn-card-body">
181
-
<p>Every C++ standard library header is included automatically. No <code>#include</code>is needed anywhere in your sketch. Use threads, algorithms, containers, and all modern C++ features directly.</p>
181
+
<p>Every C++ standard library header is included automatically. You do not need a single <code>#include</code> anywhere in your sketch. Threads, algorithms, containers, all of modern C++ is just there.</p>
0 commit comments