MCPcopy Create free account
hub / github.com/processing/p5.js / withGlobalStrands

Function withGlobalStrands

src/webgl/material.js:18–26  ·  view source on GitHub ↗
(p5, cb)

Source from the content-addressed store, hash-verified

16}
17
18function withGlobalStrands(p5, cb) {
19 const prevGlobalStrands = p5._runStrandsInGlobalMode;
20 p5._runStrandsInGlobalMode = true;
21 try {
22 return cb();
23 } finally {
24 p5._runStrandsInGlobalMode = prevGlobalStrands;
25 }
26}
27
28function material(p5, fn) {
29 /**

Callers 1

materialFunction · 0.85

Calls 1

cbFunction · 0.70

Tested by

no test coverage detected