MCPcopy Index your code
hub / github.com/processing/p5.js / structType

Function structType

src/strands/ir_types.js:77–92  ·  view source on GitHub ↗
(hookType)

Source from the content-addressed store, hash-verified

75 sampler: { fnName: "sampler", baseType: BaseType.SAMPLER, dimension: 1, priority: -11 },
76}
77export const structType = function (hookType) {
78 let T = hookType.type === undefined ? hookType : hookType.type;
79 const structType = {
80 name: hookType.name,
81 properties: [],
82 typeName: T.typeName,
83 };
84 // TODO: handle struct properties that are themselves structs
85 for (const prop of T.properties) {
86 const propType = prop.type.dataType;
87 structType.properties.push(
88 {name: prop.name, dataType: propType }
89 );
90 }
91 return structType;
92};
93export function isStructType(typeInfo) {
94 return !!(typeInfo && typeInfo.properties);
95}

Callers 3

createHookArgumentsFunction · 0.90
handleRetValFunction · 0.90
generateShaderCodeFunction · 0.90

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected