Skip to content

Commit 3b6c16a

Browse files
committed
Undid unnecessary changes to these 2 files
1 parent 03df869 commit 3b6c16a

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

src/content/contributor-docs/en/webgl_mode_architecture.mdx

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -233,26 +233,26 @@ It also has the following per-vertex attributes:
233233
title: p5.js WebGL Classes
234234
---
235235
classDiagram
236-
class Base["p5.Renderer"] {
237-
}
238-
class P2D["p5.Renderer2D"] {
239-
}
240-
class WebGL["p5.RendererGL"] {
241-
}
242-
class Geometry["p5.Geometry"] {
243-
}
244-
class Shader["p5.Shader"] {
245-
}
246-
class Texture["p5.Texture"] {
247-
}
248-
class Framebuffer["p5.Framebuffer"] {
249-
}
250-
Base <|-- P2D
251-
Base <|-- WebGL
252-
WebGL "*" o-- "*" Geometry
253-
WebGL "1" *-- "*" Shader
254-
WebGL "1" *-- "*" Texture
255-
WebGL "1" *-- "*" Framebuffer
236+
class Base["p5.Renderer"] {
237+
}
238+
class P2D["p5.Renderer2D"] {
239+
}
240+
class WebGL["p5.RendererGL"] {
241+
}
242+
class Geometry["p5.Geometry"] {
243+
}
244+
class Shader["p5.Shader"] {
245+
}
246+
class Texture["p5.Texture"] {
247+
}
248+
class Framebuffer["p5.Framebuffer"] {
249+
}
250+
Base <|-- P2D
251+
Base <|-- WebGL
252+
WebGL "*" o-- "*" Geometry
253+
WebGL "1" *-- "*" Shader
254+
WebGL "1" *-- "*" Texture
255+
WebGL "1" *-- "*" Framebuffer
256256
```
257257

258258
The entry point to most WebGL code is through **p5.RendererGL**. Top-level p5.js functions are passed to the current renderer. Both 2D and WebGL modes have renderer classes that conform to a common `p5.Renderer` interface. Immediate mode and retained mode functions are split up into `p5.RendererGL.Immediate.js` and `p5.RendererGL.Retained.js`.
@@ -271,4 +271,4 @@ Currently, WebGL mode is functional for a variety of tasks, but many users and l
271271

272272
* **Extend p5.Geometry to support richer content.** Creating geometry is possible, but many tasks a user might want to accomplish are not yet supported with a stable API. One might want to efficiently update geometry, which is necessary to support animated gltf models. One might want to group multiple materials in one object, if they are present in an imported model. One might want to add custom vertex attributes for a shader to work with. These tasks are currently unsupported.
273273
* **Enable less brittle custom shaders.** To create a shader that integrates p5.js's lighting and materials system, a user is currently forced to create shaders from scratch. These shaders often copy and paste parts of default shaders. This may break between versions if internal naming or structure changes. To be less brittle, libraries should be able to import and reuse default pieces. This lets libraries reuse positioning logic or augment positioning logic but reuse shading logic. There is currently [an issue open for this task.](https://github.com/processing/p5.js/issues/6144/)
274-
* **Improve performance.** WebGL mode tries to strike a balance between features and performance. One method is to introduce APIs to tune output quality, like how `curveDetail()` allows faster but lower-quality curves. Line rendering is one of the common performance bottlenecks in its present state, and it could benefit from having lower fidelity but higher performance options. Another method is to introduce new types of objects and rendering methods that are optimized for different usage patterns, like how `endShape(shouldClose, count)` now supports WebGL 2 instanced rendering for more efficient drawing of many shapes.
274+
* **Improve performance.** WebGL mode tries to strike a balance between features and performance. One method is to introduce APIs to tune output quality, like how `curveDetail()` allows faster but lower-quality curves. Line rendering is one of the common performance bottlenecks in its present state, and it could benefit from having lower fidelity but higher performance options. Another method is to introduce new types of objects and rendering methods that are optimized for different usage patterns, like how `endShape(shouldClose, count)` now supports WebGL 2 instanced rendering for more efficient drawing of many shapes.

styles/global.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,13 +301,13 @@ pre.code-box,
301301
.dark-theme & {
302302
color: var(--type-black);
303303
}
304+
304305
& h5 {
305306
font-weight: bold;
306307
margin-bottom: var(--spacing-sm);
307308
}
308309
}
309310

310-
311311
.experimental, .deprecated {
312312
background-color: var(--bg-yellow);
313313
}

0 commit comments

Comments
 (0)