Skip to content

Commit 8700908

Browse files
HongchengZhaoRuthySheffi
authored andcommitted
StorageBufferNode: Add getMemberType (mrdoob#31139)
1 parent eb98269 commit 8700908

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/nodes/accessors/StorageBufferNode.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,25 @@ class StorageBufferNode extends BufferNode {
335335

336336
}
337337

338+
/**
339+
* Returns the type of a member of the struct.
340+
*
341+
* @param {NodeBuilder} builder - The current node builder.
342+
* @param {string} name - The name of the member.
343+
* @return {string} The type of the member.
344+
*/
345+
getMemberType( builder, name ) {
346+
347+
if ( this.structTypeNode !== null ) {
348+
349+
return this.structTypeNode.getMemberType( builder, name );
350+
351+
}
352+
353+
return 'void';
354+
355+
}
356+
338357
/**
339358
* Generates the code snippet of the storage buffer node.
340359
*

0 commit comments

Comments
 (0)