Skip to content

Commit 0082cab

Browse files
committed
added properties for all hooks
1 parent 946b1b8 commit 0082cab

1 file changed

Lines changed: 63 additions & 6 deletions

File tree

src/strands/p5.strands.js

Lines changed: 63 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,14 @@ if (typeof p5 !== "undefined") {
215215
/* ------------------------------------------------------------- */
216216
/**
217217
* @typedef {Object} WorldInputsHook
218-
*/
218+
* @property {any} position
219+
* @property {any} normal
220+
* @property {any} texCoord
221+
* @property {any} color
222+
* @property {function(): undefined} begin
223+
* @property {function(): undefined} end
224+
*/
225+
219226
/**
220227
* @property {WorldInputsHook} worldInputs
221228
* @beta
@@ -263,7 +270,19 @@ if (typeof p5 !== "undefined") {
263270

264271
/**
265272
* @typedef {Object} CombineColorsHook
266-
*/
273+
* @property {any} baseColor
274+
* @property {any} diffuse
275+
* @property {any} ambientColor
276+
* @property {any} ambient
277+
* @property {any} specularColor
278+
* @property {any} specular
279+
* @property {any} emissive
280+
* @property {any} opacity
281+
* @property {function(): undefined} begin
282+
* @property {function(): undefined} end
283+
* @property {function(color: any): void} set
284+
*/
285+
267286
/**
268287
* @property {CombineColorsHook} combineColors
269288
* @beta
@@ -599,7 +618,23 @@ if (typeof p5 !== "undefined") {
599618

600619
/**
601620
* @typedef {Object} PixelInputsHook
602-
*/
621+
* @property {any} normal
622+
* @property {any} texCoord
623+
* @property {any} ambientLight
624+
* @property {any} ambientMaterial
625+
* @property {any} specularMaterial
626+
* @property {any} emissiveMaterial
627+
* @property {any} color
628+
* @property {any} shininess
629+
* @property {any} metalness
630+
* @property {any} tangent
631+
* @property {any} center
632+
* @property {any} position
633+
* @property {any} strokeWeight
634+
* @property {function(): undefined} begin
635+
* @property {function(): undefined} end
636+
*/
637+
603638
/**
604639
* @property {PixelInputsHook} pixelInputs
605640
* @beta
@@ -689,7 +724,15 @@ if (typeof p5 !== "undefined") {
689724
*/
690725

691726
/**
692-
* @property finalColor
727+
* @typedef {Object} FinalColorHook
728+
* @property {any} color
729+
* @property {function(): undefined} begin
730+
* @property {function(): undefined} end
731+
* @property {function(color: any): void} set
732+
*/
733+
734+
/**
735+
* @property {FinalColorHook} finalColor
693736
* @beta
694737
* @description
695738
* A shader hook block that modifies the final color of each pixel after all lighting is applied. This hook can be used inside <a href="#/p5/buildMaterialShader">`buildMaterialShader()`</a> and similar shader <a href="#/p5.Shader/modify">`modify()`</a> calls to adjust the color before it appears on the screen. Modifications happen between the `.begin()` and `.end()` methods of the hook.
@@ -828,7 +871,14 @@ if (typeof p5 !== "undefined") {
828871

829872
/**
830873
* @typedef {Object} ObjectInputsHook
831-
*/
874+
* @property {any} position
875+
* @property {any} normal
876+
* @property {any} texCoord
877+
* @property {any} color
878+
* @property {function(): undefined} begin
879+
* @property {function(): undefined} end
880+
*/
881+
832882
/**
833883
* @property {ObjectInputsHook} objectInputs
834884
* @beta
@@ -873,7 +923,14 @@ if (typeof p5 !== "undefined") {
873923

874924
/**
875925
* @typedef {Object} CameraInputsHook
876-
*/
926+
* @property {any} position
927+
* @property {any} normal
928+
* @property {any} texCoord
929+
* @property {any} color
930+
* @property {function(): undefined} begin
931+
* @property {function(): undefined} end
932+
*/
933+
877934
/**
878935
* @property {CameraInputsHook} cameraInputs
879936
* @beta

0 commit comments

Comments
 (0)