File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -169,24 +169,20 @@ class Font {
169
169
*
170
170
* async function setup() {
171
171
* createCanvas(200, 200, WEBGL);
172
- * fonts = {
173
- * Anton: await loadFont('https://fonts.gstatic.com/s/anton/v25/1Ptgg87LROyAm0K08i4gS7lu.ttf')
174
- * };
172
+ * font = await loadFont('https://fonts.gstatic.com/s/anton/v25/1Ptgg87LROyAm0K08i4gS7lu.ttf');
175
173
*
176
- * // Create 3D geometry from text using the Anton font
177
- * geom = fonts['Anton'].textToModel("Hello", 50, 0, { sampleFactor: 2 });
174
+ * geom = font.textToModel("Hello", 50, 0, { sampleFactor: 2 });
178
175
* geom.clearColors();
179
176
* geom.normalize();
180
177
* }
181
178
*
182
179
* function draw() {
183
180
* background(255);
184
- * orbitControl(); // Enables mouse control to rotate the 3D text
181
+ * orbitControl();
185
182
* fill("red");
186
183
* strokeWeight(4);
187
184
* scale(min(width, height) / 300);
188
185
* model(geom);
189
- *
190
186
* describe('A red non-extruded "Hello" in Anton on white canvas, rotatable via mouse.');
191
187
* }
192
188
* </code>
You can’t perform that action at this time.
0 commit comments