@@ -887,7 +887,7 @@ p5.prototype.shader = function (s) {
887
887
* Get the default shader used with lights, materials,
888
888
* and textures.
889
889
*
890
- * You can call <a href="#/p5.Shader/modify">`materialShader ().modify()`</a>
890
+ * You can call <a href="#/p5.Shader/modify">`baseMaterialShader ().modify()`</a>
891
891
* and change any of the following hooks:
892
892
*
893
893
* <table>
@@ -1032,10 +1032,10 @@ p5.prototype.shader = function (s) {
1032
1032
* Most of the time, you will need to write your hooks in GLSL ES version 300. If you
1033
1033
* are using WebGL 1 instead of 2, write your hooks in GLSL ES 100 instead.
1034
1034
*
1035
- * Call `materialShader ().inspectHooks()` to see all the possible hooks and
1035
+ * Call `baseMaterialShader ().inspectHooks()` to see all the possible hooks and
1036
1036
* their default implementations.
1037
1037
*
1038
- * @method materialShader
1038
+ * @method baseMaterialShader
1039
1039
* @beta
1040
1040
* @returns {p5.Shader } The material shader
1041
1041
*
@@ -1046,7 +1046,7 @@ p5.prototype.shader = function (s) {
1046
1046
*
1047
1047
* function setup() {
1048
1048
* createCanvas(200, 200, WEBGL);
1049
- * myShader = materialShader ().modify({
1049
+ * myShader = baseMaterialShader ().modify({
1050
1050
* uniforms: {
1051
1051
* 'float time': () => millis()
1052
1052
* },
@@ -1075,7 +1075,7 @@ p5.prototype.shader = function (s) {
1075
1075
*
1076
1076
* function setup() {
1077
1077
* createCanvas(200, 200, WEBGL);
1078
- * myShader = materialShader ().modify({
1078
+ * myShader = baseMaterialShader ().modify({
1079
1079
* declarations: 'vec3 myNormal;',
1080
1080
* 'Inputs getPixelInputs': `(Inputs inputs) {
1081
1081
* myNormal = inputs.normal;
@@ -1115,7 +1115,7 @@ p5.prototype.shader = function (s) {
1115
1115
*
1116
1116
* function setup() {
1117
1117
* createCanvas(200, 200, WEBGL);
1118
- * myShader = materialShader ().modify({
1118
+ * myShader = baseMaterialShader ().modify({
1119
1119
* 'Inputs getPixelInputs': `(Inputs inputs) {
1120
1120
* float factor =
1121
1121
* sin(
@@ -1150,7 +1150,7 @@ p5.prototype.shader = function (s) {
1150
1150
*
1151
1151
* function setup() {
1152
1152
* createCanvas(200, 200, WEBGL);
1153
- * myShader = materialShader ().modify({
1153
+ * myShader = baseMaterialShader ().modify({
1154
1154
* 'Inputs getPixelInputs': `(Inputs inputs) {
1155
1155
* vec3 newNormal = inputs.normal;
1156
1156
* // Simple bump mapping: adjust the normal based on position
@@ -1189,15 +1189,15 @@ p5.prototype.shader = function (s) {
1189
1189
* </code>
1190
1190
* </div>
1191
1191
*/
1192
- p5 . prototype . materialShader = function ( ) {
1193
- this . _assert3d ( 'materialShader ' ) ;
1194
- return this . _renderer . materialShader ( ) ;
1192
+ p5 . prototype . baseMaterialShader = function ( ) {
1193
+ this . _assert3d ( 'baseMaterialShader ' ) ;
1194
+ return this . _renderer . baseMaterialShader ( ) ;
1195
1195
} ;
1196
1196
1197
1197
/**
1198
1198
* Get the shader used by <a href="#/p5/normalMaterial">`normalMaterial()`</a>.
1199
1199
*
1200
- * You can call <a href="#/p5.Shader/modify">`normalShader ().modify()`</a>
1200
+ * You can call <a href="#/p5.Shader/modify">`baseNormalShader ().modify()`</a>
1201
1201
* and change any of the following hooks:
1202
1202
*
1203
1203
* Hook | Description
@@ -1217,10 +1217,10 @@ p5.prototype.materialShader = function() {
1217
1217
* Most of the time, you will need to write your hooks in GLSL ES version 300. If you
1218
1218
* are using WebGL 1 instead of 2, write your hooks in GLSL ES 100 instead.
1219
1219
*
1220
- * Call `normalShader ().inspectHooks()` to see all the possible hooks and
1220
+ * Call `baseNormalShader ().inspectHooks()` to see all the possible hooks and
1221
1221
* their default implementations.
1222
1222
*
1223
- * @method normalShader
1223
+ * @method baseNormalShader
1224
1224
* @beta
1225
1225
* @returns {p5.Shader } The `normalMaterial` shader
1226
1226
*
@@ -1231,7 +1231,7 @@ p5.prototype.materialShader = function() {
1231
1231
*
1232
1232
* function setup() {
1233
1233
* createCanvas(200, 200, WEBGL);
1234
- * myShader = normalShader ().modify({
1234
+ * myShader = baseNormalShader ().modify({
1235
1235
* uniforms: {
1236
1236
* 'float time': () => millis()
1237
1237
* },
@@ -1258,7 +1258,7 @@ p5.prototype.materialShader = function() {
1258
1258
*
1259
1259
* function setup() {
1260
1260
* createCanvas(200, 200, WEBGL);
1261
- * myShader = normalShader ().modify({
1261
+ * myShader = baseNormalShader ().modify({
1262
1262
* 'vec3 getWorldNormal': '(vec3 normal) { return abs(normal); }',
1263
1263
* 'vec4 getFinalColor': `(vec4 color) {
1264
1264
* // Map the r, g, and b values of the old normal to new colors
@@ -1284,15 +1284,15 @@ p5.prototype.materialShader = function() {
1284
1284
* </code>
1285
1285
* </div>
1286
1286
*/
1287
- p5 . prototype . normalShader = function ( ) {
1288
- this . _assert3d ( 'materialShader ' ) ;
1289
- return this . _renderer . normalShader ( ) ;
1287
+ p5 . prototype . baseNormalShader = function ( ) {
1288
+ this . _assert3d ( 'baseNormalShader ' ) ;
1289
+ return this . _renderer . baseNormalShader ( ) ;
1290
1290
} ;
1291
1291
1292
1292
/**
1293
1293
* Get the shader used when no lights or materials are applied.
1294
1294
*
1295
- * You can call <a href="#/p5.Shader/modify">`colorShader ().modify()`</a>
1295
+ * You can call <a href="#/p5.Shader/modify">`baseColorShader ().modify()`</a>
1296
1296
* and change any of the following hooks:
1297
1297
*
1298
1298
* Hook | Description
@@ -1312,10 +1312,10 @@ p5.prototype.normalShader = function() {
1312
1312
* Most of the time, you will need to write your hooks in GLSL ES version 300. If you
1313
1313
* are using WebGL 1 instead of 2, write your hooks in GLSL ES 100 instead.
1314
1314
*
1315
- * Call `colorShader ().inspectHooks()` to see all the possible hooks and
1315
+ * Call `baseColorShader ().inspectHooks()` to see all the possible hooks and
1316
1316
* their default implementations.
1317
1317
*
1318
- * @method colorShader
1318
+ * @method baseColorShader
1319
1319
* @beta
1320
1320
* @returns {p5.Shader } The color shader
1321
1321
*
@@ -1326,7 +1326,7 @@ p5.prototype.normalShader = function() {
1326
1326
*
1327
1327
* function setup() {
1328
1328
* createCanvas(200, 200, WEBGL);
1329
- * myShader = colorShader ().modify({
1329
+ * myShader = baseColorShader ().modify({
1330
1330
* uniforms: {
1331
1331
* 'float time': () => millis()
1332
1332
* },
@@ -1347,15 +1347,15 @@ p5.prototype.normalShader = function() {
1347
1347
* </code>
1348
1348
* </div>
1349
1349
*/
1350
- p5 . prototype . colorShader = function ( ) {
1351
- this . _assert3d ( 'colorShader ' ) ;
1352
- return this . _renderer . colorShader ( ) ;
1350
+ p5 . prototype . baseColorShader = function ( ) {
1351
+ this . _assert3d ( 'baseColorShader ' ) ;
1352
+ return this . _renderer . baseColorShader ( ) ;
1353
1353
} ;
1354
1354
1355
1355
/**
1356
1356
* Get the shader used when drawing the strokes of shapes.
1357
1357
*
1358
- * You can call <a href="#/p5.Shader/modify">`strokeShader ().modify()`</a>
1358
+ * You can call <a href="#/p5.Shader/modify">`baseStrokeShader ().modify()`</a>
1359
1359
* and change any of the following hooks:
1360
1360
*
1361
1361
* <table>
@@ -1487,10 +1487,10 @@ p5.prototype.colorShader = function() {
1487
1487
* Most of the time, you will need to write your hooks in GLSL ES version 300. If you
1488
1488
* are using WebGL 1 instead of 2, write your hooks in GLSL ES 100 instead.
1489
1489
*
1490
- * Call `strokeShader ().inspectHooks()` to see all the possible hooks and
1490
+ * Call `baseStrokeShader ().inspectHooks()` to see all the possible hooks and
1491
1491
* their default implementations.
1492
1492
*
1493
- * @method strokeShader
1493
+ * @method baseStrokeShader
1494
1494
* @beta
1495
1495
* @returns {p5.Shader } The stroke shader
1496
1496
*
@@ -1501,7 +1501,7 @@ p5.prototype.colorShader = function() {
1501
1501
*
1502
1502
* function setup() {
1503
1503
* createCanvas(200, 200, WEBGL);
1504
- * myShader = strokeShader ().modify({
1504
+ * myShader = baseStrokeShader ().modify({
1505
1505
* 'Inputs getPixelInputs': `(Inputs inputs) {
1506
1506
* float opacity = 1.0 - smoothstep(
1507
1507
* 0.0,
@@ -1535,7 +1535,7 @@ p5.prototype.colorShader = function() {
1535
1535
*
1536
1536
* function setup() {
1537
1537
* createCanvas(200, 200, WEBGL);
1538
- * myShader = strokeShader ().modify({
1538
+ * myShader = baseStrokeShader ().modify({
1539
1539
* uniforms: {
1540
1540
* 'float time': () => millis()
1541
1541
* },
@@ -1581,7 +1581,7 @@ p5.prototype.colorShader = function() {
1581
1581
*
1582
1582
* function setup() {
1583
1583
* createCanvas(200, 200, WEBGL);
1584
- * myShader = strokeShader ().modify({
1584
+ * myShader = baseStrokeShader ().modify({
1585
1585
* 'float random': `(vec2 p) {
1586
1586
* vec3 p3 = fract(vec3(p.xyx) * .1031);
1587
1587
* p3 += dot(p3, p3.yzx + 33.33);
@@ -1620,9 +1620,9 @@ p5.prototype.colorShader = function() {
1620
1620
* </code>
1621
1621
* </div>
1622
1622
*/
1623
- p5 . prototype . strokeShader = function ( ) {
1624
- this . _assert3d ( 'strokeShader ' ) ;
1625
- return this . _renderer . strokeShader ( ) ;
1623
+ p5 . prototype . baseStrokeShader = function ( ) {
1624
+ this . _assert3d ( 'baseStrokeShader ' ) ;
1625
+ return this . _renderer . baseStrokeShader ( ) ;
1626
1626
} ;
1627
1627
1628
1628
/**
0 commit comments