Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
d6e0fb2
Experiment: flatter strands API
davepagurek Dec 2, 2025
9045761
Remove logging
davepagurek Dec 2, 2025
0571ced
Implement auto-return for shader hooks when types match and no value …
vietnguyen2358 Dec 17, 2025
53712b5
Merge branch 'dev-2.0' into flat-strands
davepagurek Dec 23, 2025
9216e8e
Add create* and load* methods
davepagurek Dec 24, 2025
f175035
Update create/loadFilterShader docs
davepagurek Dec 25, 2025
d44c67c
Do material shaders too
davepagurek Dec 26, 2025
154cd4f
Add stroke shaders
davepagurek Dec 27, 2025
5d06815
Update FES typeS
davepagurek Dec 27, 2025
9a64b83
Update loadFilterShader reference
davepagurek Dec 27, 2025
e4044ff
Update load* methods to return the callback's value
davepagurek Dec 27, 2025
c8dab30
Correct some examples
davepagurek Dec 27, 2025
69dd14f
Merge branch 'dev-2.0' into flat-strands
davepagurek Dec 29, 2025
0c0fcb3
Fix typo in filter shader example
davepagurek Dec 29, 2025
d6dfddf
Add more explanation
davepagurek Dec 29, 2025
0123f2e
Fix angle brackets in inline examples
davepagurek Dec 29, 2025
d124dd6
Slightly update stroke shader example to look nicer
davepagurek Dec 29, 2025
5b950f3
Move more methods into the p5.strands submodule
davepagurek Dec 29, 2025
d9c0e43
Allow individual reference items to override the file's module/submodule
davepagurek Dec 29, 2025
1a9c333
Add missing await in example
davepagurek Dec 30, 2025
39051d2
Use syntax for callbacks
davepagurek Dec 30, 2025
c83f4a7
Fix missing beta tags
davepagurek Dec 30, 2025
9775510
Update shader() and createShader() docs
davepagurek Dec 30, 2025
967b14b
Fix typo
davepagurek Dec 30, 2025
c485f5c
Remove shouldDiscard for now, since it's private
davepagurek Dec 30, 2025
ecca5bd
Fix regex preventing loading from working
davepagurek Dec 30, 2025
6658719
Add visual tests for load*
davepagurek Dec 30, 2025
65de9c6
Run load* method shaders in global mode
davepagurek Dec 30, 2025
87c0eac
Allow .set() on hooks to return results
davepagurek Jan 1, 2026
e1817f4
Add manual hook aliases
davepagurek Jan 1, 2026
e428541
Let you still access struct properties when there are other non-struc…
davepagurek Jan 1, 2026
55e65ac
Update tests
davepagurek Jan 1, 2026
e4ed322
Update examples to use named functions
davepagurek Jan 4, 2026
7e5a966
Update reference to use the flat API
davepagurek Jan 4, 2026
e88e671
Fix typos in examples
davepagurek Jan 4, 2026
654c9cd
Add ts types for callback functions again
davepagurek Jan 4, 2026
d921d42
Fix denominator of normal material example
davepagurek Jan 4, 2026
5eb6fff
Merge branch 'dev-2.0' into flat-strands
davepagurek Jan 4, 2026
6b8e46b
Add visual tests for auto-return shader hooks
vietnguyen2358 Jan 5, 2026
82e9997
Merge branch 'dev-2.0' into auto-return-shader-hooks
vietnguyen2358 Jan 6, 2026
5979305
Merge branch 'dev-2.0' into flat-strands
davepagurek Jan 17, 2026
3c180eb
Merge branch 'auto-return-shader-hooks' into flat-strands
davepagurek Jan 22, 2026
f0d1c57
Merge branch 'dev-2.0' into flat-strands
davepagurek Jan 22, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Move more methods into the p5.strands submodule
  • Loading branch information
davepagurek committed Dec 29, 2025
commit 5b950f37fc52545eb658871e4acc4fd6d3a5636a
2 changes: 1 addition & 1 deletion src/strands/p5.strands.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* @module 3D
* @submodule strands
* @submodule p5.strands
* @for p5
* @requires core
*/
Expand Down
15 changes: 15 additions & 0 deletions src/webgl/material.js
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,7 @@ function material(p5, fn){
* `loadFilterShader('myShader.js', onLoaded)`.
*
* @method loadFilterShader
* @submodule p5.strands
* @param {String} filename path to a p5.strands JavaScript file or a GLSL fragment shader file
* @param {Function} [successCallback] callback to be called once the shader is
* loaded. Will be passed the
Expand Down Expand Up @@ -746,6 +747,7 @@ function material(p5, fn){
* or the <a href="https://p5js.org/learn/getting-started-in-webgl-shaders.html">Introduction to Shaders</a> tutorial.
*
* @method createFilterShader
* @submodule p5.strands
* @param {Function} callback A function building a p5.strands shader.
* @returns {p5.Shader} The material shader
*/
Expand Down Expand Up @@ -1500,6 +1502,7 @@ function material(p5, fn){
* for more info.
*
* @method createMaterialShader
* @submodule p5.strands
* @beta
* @param {Function} callback A function building a p5.strands shader.
* @returns {p5.Shader} The material shader.
Expand Down Expand Up @@ -1563,6 +1566,7 @@ function material(p5, fn){
* `loadMaterialShader('myShader.js', onLoaded)`.
*
* @method loadMaterialShader
* @submodule p5.strands
* @beta
* @param {String} url The URL of your p5.strands JavaScript file.
* @param {Function} [onSuccess] A callback function to run when loading completes.
Expand Down Expand Up @@ -1595,6 +1599,7 @@ function material(p5, fn){
* the base material shader.
*
* @method baseMaterialShader
* @submodule p5.strands
* @beta
* @returns {p5.Shader} The base material shader.
*/
Expand All @@ -1614,6 +1619,7 @@ function material(p5, fn){
* the base filter shader.
*
* @method baseFilterShader
* @submodule p5.strands
* @beta
* @returns {p5.Shader} The base filter shader.
*/
Expand Down Expand Up @@ -1708,6 +1714,7 @@ function material(p5, fn){
* for more info.
*
* @method createNormalShader
* @submodule p5.strands
* @beta
* @param {Function} callback A function building a p5.strands shader.
* @returns {p5.Shader} The normal shader.
Expand Down Expand Up @@ -1772,6 +1779,7 @@ function material(p5, fn){
* `loadNormalShader('myShader.js', onLoaded)`.
*
* @method loadNormalShader
* @submodule p5.strands
* @beta
* @param {String} url The URL of your p5.strands JavaScript file.
* @param {Function} [onSuccess] A callback function to run when loading completes.
Expand Down Expand Up @@ -1805,6 +1813,7 @@ function material(p5, fn){
* the base normal shader.
*
* @method baseNormalShader
* @submodule p5.strands
* @beta
* @returns {p5.Shader} The base material shader.
*/
Expand Down Expand Up @@ -1864,6 +1873,7 @@ function material(p5, fn){
* for more info.
*
* @method createColorShader
* @submodule p5.strands
* @beta
* @param {Function} callback A function building a p5.strands shader.
* @returns {p5.Shader} The color shader.
Expand Down Expand Up @@ -1928,6 +1938,7 @@ function material(p5, fn){
* `loadColorShader('myShader.js', onLoaded)`.
*
* @method loadColorShader
* @submodule p5.strands
* @beta
* @param {String} url The URL of your p5.strands JavaScript file.
* @param {Function} [onSuccess] A callback function to run when loading completes.
Expand Down Expand Up @@ -1960,6 +1971,7 @@ function material(p5, fn){
* the base color shader.
*
* @method baseColorShader
* @submodule p5.strands
* @beta
* @returns {p5.Shader} The base color shader.
*/
Expand Down Expand Up @@ -2113,6 +2125,7 @@ function material(p5, fn){
* for more info.
*
* @method createStrokeShader
* @submodule p5.strands
* @beta
* @param {Function} callback A function building a p5.strands shader.
* @returns {p5.Shader} The stroke shader.
Expand Down Expand Up @@ -2182,6 +2195,7 @@ function material(p5, fn){
* `loadStrokeShader('myShader.js', onLoaded)`.
*
* @method loadStrokeShader
* @submodule p5.strands
* @beta
* @param {String} url The URL of your p5.strands JavaScript file.
* @param {Function} [onSuccess] A callback function to run when loading completes.
Expand Down Expand Up @@ -2214,6 +2228,7 @@ function material(p5, fn){
* the base material shader.
*
* @method baseStrokeShader
* @submodule p5.strands
* @beta
* @returns {p5.Shader} The base material shader.
*/
Expand Down
Loading