Skip to content

Commit 988f697

Browse files
update the intro to p5.strands file
1 parent a9900df commit 988f697

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/content/tutorials/en/intro-to-p5-strands.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -167,25 +167,25 @@ function instancingCallback() {
167167
getWorldInputs((inputs) => {
168168
// Offset each instance by its ID
169169
inputs.position.x += instanceID() * 20;
170-
// Move the particles left on the screen
171-
inputs.position.x -= 150;
170+
// Move the particles left on the screen
171+
inputs.position.x -= 150;
172172
return inputs;
173173
});
174174
}
175175
176176
async function setup() {
177177
createCanvas(300, 300, WEBGL);
178-
pixelDensity(1);
179-
particleModel = buildGeometry(() => sphere(10, 10, 2));
178+
pixelDensity(1);
179+
particleModel = buildGeometry(() => sphere(10, 10, 2));
180180
instancingShader = baseColorShader().modify(instancingCallback);
181-
instancingStrokeShader = baseStrokeShader().modify(instancingCallback);
181+
instancingStrokeShader = baseStrokeShader().modify(instancingCallback);
182182
}
183183
184184
function draw() {
185185
background(0);
186186
orbitControl();
187187
shader(instancingShader)
188-
strokeShader(instancingStrokeShader)
188+
strokeShader(instancingStrokeShader)
189189
model(particleModel, 16);
190190
}
191191
`} />

0 commit comments

Comments
 (0)