NodeBuilder.js 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971
  1. /**
  2. * @author sunag / http://www.sunag.com.br/
  3. */
  4. import { NodeUniform } from './NodeUniform.js';
  5. import { NodeUtils } from './NodeUtils.js';
  6. import { NodeLib } from './NodeLib.js';
  7. import { FunctionNode } from './FunctionNode.js';
  8. import { ConstNode } from './ConstNode.js';
  9. import { StructNode } from './StructNode.js';
  10. import { Vector2Node } from '../inputs/Vector2Node.js';
  11. import { Vector3Node } from '../inputs/Vector3Node.js';
  12. import { Vector4Node } from '../inputs/Vector4Node.js';
  13. import { TextureNode } from '../inputs/TextureNode.js';
  14. import { CubeTextureNode } from '../inputs/CubeTextureNode.js';
  15. import { TextureCubeNode } from '../misc/TextureCubeNode.js';
  16. var elements = NodeUtils.elements,
  17. constructors = [ 'float', 'vec2', 'vec3', 'vec4' ],
  18. convertFormatToType = {
  19. float: 'f',
  20. vec2: 'v2',
  21. vec3: 'v3',
  22. vec4: 'v4',
  23. mat4: 'v4',
  24. int: 'i',
  25. bool: 'b'
  26. },
  27. convertTypeToFormat = {
  28. t: 'sampler2D',
  29. tc: 'samplerCube',
  30. b: 'bool',
  31. i: 'int',
  32. f: 'float',
  33. c: 'vec3',
  34. v2: 'vec2',
  35. v3: 'vec3',
  36. v4: 'vec4',
  37. m3: 'mat3',
  38. m4: 'mat4'
  39. };
  40. function NodeBuilder() {
  41. this.slots = [];
  42. this.caches = [];
  43. this.contexts = [];
  44. this.keywords = {};
  45. this.nodeData = {};
  46. this.requires = {
  47. uv: [],
  48. color: [],
  49. lights: false,
  50. fog: false
  51. };
  52. this.includes = {
  53. consts: [],
  54. functions: [],
  55. structs: []
  56. };
  57. this.attributes = {};
  58. this.prefixCode = [
  59. "#ifdef TEXTURE_LOD_EXT",
  60. " #define texCube(a, b) textureCube(a, b)",
  61. " #define texCubeBias(a, b, c) textureCubeLodEXT(a, b, c)",
  62. " #define tex2D(a, b) texture2D(a, b)",
  63. " #define tex2DBias(a, b, c) texture2DLodEXT(a, b, c)",
  64. "#else",
  65. " #define texCube(a, b) textureCube(a, b)",
  66. " #define texCubeBias(a, b, c) textureCube(a, b, c)",
  67. " #define tex2D(a, b) texture2D(a, b)",
  68. " #define tex2DBias(a, b, c) texture2D(a, b, c)",
  69. "#endif",
  70. "#include <packing>",
  71. "#include <common>"
  72. ].join( "\n" );
  73. this.parsCode = {
  74. vertex: '',
  75. fragment: ''
  76. };
  77. this.code = {
  78. vertex: '',
  79. fragment: ''
  80. };
  81. this.nodeCode = {
  82. vertex: '',
  83. fragment: ''
  84. };
  85. this.resultCode = {
  86. vertex: '',
  87. fragment: ''
  88. };
  89. this.finalCode = {
  90. vertex: '',
  91. fragment: ''
  92. };
  93. this.inputs = {
  94. uniforms: {
  95. list: [],
  96. vertex: [],
  97. fragment: []
  98. },
  99. vars: {
  100. varying: [],
  101. vertex: [],
  102. fragment: []
  103. }
  104. };
  105. // send to material
  106. this.defines = {};
  107. this.uniforms = {};
  108. this.extensions = {};
  109. this.updaters = [];
  110. this.nodes = [];
  111. // --
  112. this.analyzing = false;
  113. }
  114. NodeBuilder.prototype = {
  115. constructor: NodeBuilder,
  116. build: function ( vertex, fragment ) {
  117. this.buildShader( 'vertex', vertex );
  118. this.buildShader( 'fragment', fragment );
  119. if ( this.requires.uv[ 0 ] ) {
  120. this.addVaryCode( 'varying vec2 vUv;' );
  121. this.addVertexFinalCode( 'vUv = uv;' );
  122. }
  123. if ( this.requires.uv[ 1 ] ) {
  124. this.addVaryCode( 'varying vec2 vUv2;' );
  125. this.addVertexParsCode( 'attribute vec2 uv2;' );
  126. this.addVertexFinalCode( 'vUv2 = uv2;' );
  127. }
  128. if ( this.requires.color[ 0 ] ) {
  129. this.addVaryCode( 'varying vec4 vColor;' );
  130. this.addVertexParsCode( 'attribute vec4 color;' );
  131. this.addVertexFinalCode( 'vColor = color;' );
  132. }
  133. if ( this.requires.color[ 1 ] ) {
  134. this.addVaryCode( 'varying vec4 vColor2;' );
  135. this.addVertexParsCode( 'attribute vec4 color2;' );
  136. this.addVertexFinalCode( 'vColor2 = color2;' );
  137. }
  138. if ( this.requires.position ) {
  139. this.addVaryCode( 'varying vec3 vPosition;' );
  140. this.addVertexFinalCode( 'vPosition = transformed;' );
  141. }
  142. if ( this.requires.worldPosition ) {
  143. this.addVaryCode( 'varying vec3 vWPosition;' );
  144. this.addVertexFinalCode( 'vWPosition = ( modelMatrix * vec4( transformed, 1.0 ) ).xyz;' );
  145. }
  146. if ( this.requires.normal ) {
  147. this.addVaryCode( 'varying vec3 vObjectNormal;' );
  148. this.addVertexFinalCode( 'vObjectNormal = normal;' );
  149. }
  150. if ( this.requires.worldNormal ) {
  151. this.addVaryCode( 'varying vec3 vWNormal;' );
  152. this.addVertexFinalCode( 'vWNormal = ( modelMatrix * vec4( objectNormal, 0.0 ) ).xyz;' );
  153. }
  154. return this;
  155. },
  156. buildShader: function ( shader, node ) {
  157. this.resultCode[ shader ] = node.build( this.setShader( shader ), 'v4' );
  158. },
  159. setMaterial: function ( material, renderer ) {
  160. this.material = material;
  161. this.renderer = renderer;
  162. this.requires.lights = material.lights;
  163. this.requires.fog = material.fog;
  164. this.mergeDefines( material.defines );
  165. return this;
  166. },
  167. addFlow: function ( slot, cache, context ) {
  168. return this.addSlot( slot ).addCache( cache ).addContext( context );
  169. },
  170. removeFlow: function () {
  171. return this.removeSlot().removeCache().removeContext();
  172. },
  173. addCache: function ( name ) {
  174. this.cache = name || '';
  175. this.caches.push( this.cache );
  176. return this;
  177. },
  178. removeCache: function () {
  179. this.caches.pop();
  180. this.cache = this.caches[ this.caches.length - 1 ] || '';
  181. return this;
  182. },
  183. addContext: function ( context ) {
  184. this.context = Object.assign( {}, this.context, context );
  185. this.context.extra = this.context.extra || {};
  186. this.contexts.push( this.context );
  187. return this;
  188. },
  189. removeContext: function () {
  190. this.contexts.pop();
  191. this.context = this.contexts[ this.contexts.length - 1 ] || {};
  192. return this;
  193. },
  194. addSlot: function ( name ) {
  195. this.slot = name || '';
  196. this.slots.push( this.slot );
  197. return this;
  198. },
  199. removeSlot: function () {
  200. this.slots.pop();
  201. this.slot = this.slots[ this.slots.length - 1 ] || '';
  202. return this;
  203. },
  204. addVertexCode: function ( code ) {
  205. this.addCode( code, 'vertex' );
  206. },
  207. addFragmentCode: function ( code ) {
  208. this.addCode( code, 'fragment' );
  209. },
  210. addCode: function ( code, shader ) {
  211. this.code[ shader || this.shader ] += code + '\n';
  212. },
  213. addVertexNodeCode: function ( code ) {
  214. this.addNodeCode( code, 'vertex' );
  215. },
  216. addFragmentNodeCode: function ( code ) {
  217. this.addNodeCode( code, 'fragment' );
  218. },
  219. addNodeCode: function ( code, shader ) {
  220. this.nodeCode[ shader || this.shader ] += code + '\n';
  221. },
  222. clearNodeCode: function ( shader ) {
  223. shader = shader || this.shader;
  224. var code = this.nodeCode[ shader ];
  225. this.nodeCode[ shader ] = '';
  226. return code;
  227. },
  228. clearVertexNodeCode: function ( ) {
  229. return this.clearNodeCode( 'vertex' );
  230. },
  231. clearFragmentNodeCode: function ( ) {
  232. return this.clearNodeCode( 'fragment' );
  233. },
  234. addVertexFinalCode: function ( code ) {
  235. this.addFinalCode( code, 'vertex' );
  236. },
  237. addFragmentFinalCode: function ( code ) {
  238. this.addFinalCode( code, 'fragment' );
  239. },
  240. addFinalCode: function ( code, shader ) {
  241. this.finalCode[ shader || this.shader ] += code + '\n';
  242. },
  243. addVertexParsCode: function ( code ) {
  244. this.addParsCode( code, 'vertex' );
  245. },
  246. addFragmentParsCode: function ( code ) {
  247. this.addParsCode( code, 'fragment' );
  248. },
  249. addParsCode: function ( code, shader ) {
  250. this.parsCode[ shader || this.shader ] += code + '\n';
  251. },
  252. addVaryCode: function ( code ) {
  253. this.addVertexParsCode( code );
  254. this.addFragmentParsCode( code );
  255. },
  256. isCache: function ( name ) {
  257. return this.caches.indexOf( name ) !== - 1;
  258. },
  259. isSlot: function ( name ) {
  260. return this.slots.indexOf( name ) !== - 1;
  261. },
  262. define: function ( name, value ) {
  263. this.defines[ name ] = value === undefined ? 1 : value;
  264. },
  265. isDefined: function ( name ) {
  266. return this.defines[ name ] !== undefined;
  267. },
  268. getVar: function ( uuid, type, ns, shader = 'varying', prefix = 'V', label = '' ) {
  269. var vars = this.getVars( shader ),
  270. data = vars[ uuid ];
  271. if ( ! data ) {
  272. var index = vars.length,
  273. name = ns ? ns : 'node' + prefix + index + ( label ? '_' + label : '' );
  274. data = { name: name, type: type };
  275. vars.push( data );
  276. vars[ uuid ] = data;
  277. }
  278. return data;
  279. },
  280. getTempVar: function ( uuid, type, ns, label ) {
  281. return this.getVar( uuid, type, ns, this.shader, 'T', label );
  282. },
  283. getAttribute: function ( name, type ) {
  284. if ( ! this.attributes[ name ] ) {
  285. var varying = this.getVar( name, type );
  286. this.addVertexParsCode( 'attribute ' + type + ' ' + name + ';' );
  287. this.addVertexFinalCode( varying.name + ' = ' + name + ';' );
  288. this.attributes[ name ] = { varying: varying, name: name, type: type };
  289. }
  290. return this.attributes[ name ];
  291. },
  292. getCode: function ( shader ) {
  293. return [
  294. this.prefixCode,
  295. this.parsCode[ shader ],
  296. this.getVarListCode( this.getVars( 'varying' ), 'varying' ),
  297. this.getVarListCode( this.inputs.uniforms[ shader ], 'uniform' ),
  298. this.getIncludesCode( 'consts', shader ),
  299. this.getIncludesCode( 'structs', shader ),
  300. this.getIncludesCode( 'functions', shader ),
  301. 'void main() {',
  302. this.getVarListCode( this.getVars( shader ) ),
  303. this.code[ shader ],
  304. this.resultCode[ shader ],
  305. this.finalCode[ shader ],
  306. '}'
  307. ].join( "\n" );
  308. },
  309. getVarListCode: function ( vars, prefix ) {
  310. prefix = prefix || '';
  311. var code = '';
  312. for ( var i = 0, l = vars.length; i < l; ++ i ) {
  313. var nVar = vars[ i ],
  314. type = nVar.type,
  315. name = nVar.name;
  316. var formatType = this.getFormatByType( type );
  317. if ( formatType === undefined ) {
  318. throw new Error( "Node pars " + formatType + " not found." );
  319. }
  320. code += prefix + ' ' + formatType + ' ' + name + ';\n';
  321. }
  322. return code;
  323. },
  324. getVars: function ( shader ) {
  325. return this.inputs.vars[ shader || this.shader ];
  326. },
  327. getNodeData: function ( node ) {
  328. var uuid = node.isNode ? node.uuid : node;
  329. return this.nodeData[ uuid ] = this.nodeData[ uuid ] || {};
  330. },
  331. createUniform: function ( shader, type, node, ns, needsUpdate, label ) {
  332. var uniforms = this.inputs.uniforms,
  333. index = uniforms.list.length;
  334. var uniform = new NodeUniform( {
  335. type: type,
  336. name: ns ? ns : 'nodeU' + index + ( label ? '_' + label : '' ),
  337. node: node,
  338. needsUpdate: needsUpdate
  339. } );
  340. uniforms.list.push( uniform );
  341. uniforms[ shader ].push( uniform );
  342. uniforms[ shader ][ uniform.name ] = uniform;
  343. this.uniforms[ uniform.name ] = uniform;
  344. return uniform;
  345. },
  346. createVertexUniform: function ( type, node, ns, needsUpdate, label ) {
  347. return this.createUniform( 'vertex', type, node, ns, needsUpdate, label );
  348. },
  349. createFragmentUniform: function ( type, node, ns, needsUpdate, label ) {
  350. return this.createUniform( 'fragment', type, node, ns, needsUpdate, label );
  351. },
  352. include: function ( node, parent, source ) {
  353. var includesStruct;
  354. node = typeof node === 'string' ? NodeLib.get( node ) : node;
  355. if ( this.context.include === false ) {
  356. return node.name;
  357. }
  358. if ( node instanceof FunctionNode ) {
  359. includesStruct = this.includes.functions;
  360. } else if ( node instanceof ConstNode ) {
  361. includesStruct = this.includes.consts;
  362. } else if ( node instanceof StructNode ) {
  363. includesStruct = this.includes.structs;
  364. }
  365. var includes = includesStruct[ this.shader ] = includesStruct[ this.shader ] || [];
  366. if ( node ) {
  367. var included = includes[ node.name ];
  368. if ( ! included ) {
  369. included = includes[ node.name ] = {
  370. node: node,
  371. deps: []
  372. };
  373. includes.push( included );
  374. included.src = node.build( this, 'source' );
  375. }
  376. if ( node instanceof FunctionNode && parent && includes[ parent.name ] && includes[ parent.name ].deps.indexOf( node ) == - 1 ) {
  377. includes[ parent.name ].deps.push( node );
  378. if ( node.includes && node.includes.length ) {
  379. var i = 0;
  380. do {
  381. this.include( node.includes[ i ++ ], parent );
  382. } while ( i < node.includes.length );
  383. }
  384. }
  385. if ( source ) {
  386. included.src = source;
  387. }
  388. return node.name;
  389. } else {
  390. throw new Error( "Include not found." );
  391. }
  392. },
  393. colorToVectorProperties: function ( color ) {
  394. return color.replace( 'r', 'x' ).replace( 'g', 'y' ).replace( 'b', 'z' ).replace( 'a', 'w' );
  395. },
  396. colorToVector: function ( color ) {
  397. return color.replace( /c/g, 'v3' );
  398. },
  399. getIncludes: function ( type, shader ) {
  400. return this.includes[ type ][ shader || this.shader ];
  401. },
  402. getIncludesCode: function () {
  403. function sortByPosition( a, b ) {
  404. return a.deps.length - b.deps.length;
  405. }
  406. return function getIncludesCode( type, shader ) {
  407. var includes = this.getIncludes( type, shader );
  408. if ( ! includes ) return '';
  409. var code = '',
  410. includes = includes.sort( sortByPosition );
  411. for ( var i = 0; i < includes.length; i ++ ) {
  412. if ( includes[ i ].src ) code += includes[ i ].src + '\n';
  413. }
  414. return code;
  415. };
  416. }(),
  417. getConstructorFromLength: function ( len ) {
  418. return constructors[ len - 1 ];
  419. },
  420. isTypeMatrix: function ( format ) {
  421. return /^m/.test( format );
  422. },
  423. getTypeLength: function ( type ) {
  424. if ( type === 'f' ) return 1;
  425. return parseInt( this.colorToVector( type ).substr( 1 ) );
  426. },
  427. getTypeFromLength: function ( len ) {
  428. if ( len === 1 ) return 'f';
  429. return 'v' + len;
  430. },
  431. findNode: function () {
  432. for ( var i = 0; i < arguments.length; i ++ ) {
  433. var nodeCandidate = arguments[ i ];
  434. if ( nodeCandidate !== undefined && nodeCandidate.isNode ) {
  435. return nodeCandidate;
  436. }
  437. }
  438. },
  439. resolve: function () {
  440. for ( var i = 0; i < arguments.length; i ++ ) {
  441. var nodeCandidate = arguments[ i ];
  442. if ( nodeCandidate !== undefined ) {
  443. if ( nodeCandidate.isNode ) {
  444. return nodeCandidate;
  445. } else if ( nodeCandidate.isTexture ) {
  446. switch ( nodeCandidate.mapping ) {
  447. case THREE.CubeReflectionMapping:
  448. case THREE.CubeRefractionMapping:
  449. return new CubeTextureNode( nodeCandidate );
  450. break;
  451. case THREE.CubeUVReflectionMapping:
  452. case THREE.CubeUVRefractionMapping:
  453. return new TextureCubeNode( new TextureNode( nodeCandidate ) );
  454. break;
  455. default:
  456. return new TextureNode( nodeCandidate );
  457. }
  458. } else if ( nodeCandidate.isVector2 ) {
  459. return new Vector2Node( nodeCandidate );
  460. } else if ( nodeCandidate.isVector3 ) {
  461. return new Vector3Node( nodeCandidate );
  462. } else if ( nodeCandidate.isVector4 ) {
  463. return new Vector4Node( nodeCandidate );
  464. }
  465. }
  466. }
  467. },
  468. format: function ( code, from, to ) {
  469. var typeToType = this.colorToVector( to + ' <- ' + from );
  470. switch ( typeToType ) {
  471. case 'f <- v2' : return code + '.x';
  472. case 'f <- v3' : return code + '.x';
  473. case 'f <- v4' : return code + '.x';
  474. case 'f <- i' :
  475. case 'f <- b' : return 'float( ' + code + ' )';
  476. case 'v2 <- f' : return 'vec2( ' + code + ' )';
  477. case 'v2 <- v3': return code + '.xy';
  478. case 'v2 <- v4': return code + '.xy';
  479. case 'v2 <- i' :
  480. case 'v2 <- b' : return 'vec2( float( ' + code + ' ) )';
  481. case 'v3 <- f' : return 'vec3( ' + code + ' )';
  482. case 'v3 <- v2': return 'vec3( ' + code + ', 0.0 )';
  483. case 'v3 <- v4': return code + '.xyz';
  484. case 'v3 <- i' :
  485. case 'v3 <- b' : return 'vec2( float( ' + code + ' ) )';
  486. case 'v4 <- f' : return 'vec4( ' + code + ' )';
  487. case 'v4 <- v2': return 'vec4( ' + code + ', 0.0, 1.0 )';
  488. case 'v4 <- v3': return 'vec4( ' + code + ', 1.0 )';
  489. case 'v4 <- i' :
  490. case 'v4 <- b' : return 'vec4( float( ' + code + ' ) )';
  491. case 'i <- f' :
  492. case 'i <- b' : return 'int( ' + code + ' )';
  493. case 'i <- v2' : return 'int( ' + code + '.x )';
  494. case 'i <- v3' : return 'int( ' + code + '.x )';
  495. case 'i <- v4' : return 'int( ' + code + '.x )';
  496. case 'b <- f' : return '( ' + code + ' != 0.0 )';
  497. case 'b <- v2' : return '( ' + code + ' != vec2( 0.0 ) )';
  498. case 'b <- v3' : return '( ' + code + ' != vec3( 0.0 ) )';
  499. case 'b <- v4' : return '( ' + code + ' != vec4( 0.0 ) )';
  500. case 'b <- i' : return '( ' + code + ' != 0 )';
  501. }
  502. return code;
  503. },
  504. getTypeByFormat: function ( format ) {
  505. return convertFormatToType[ format ] || format;
  506. },
  507. getFormatByType: function ( type ) {
  508. return convertTypeToFormat[ type ] || type;
  509. },
  510. getUuid: function ( uuid, useCache ) {
  511. useCache = useCache !== undefined ? useCache : true;
  512. if ( useCache && this.cache ) uuid = this.cache + '-' + uuid;
  513. return uuid;
  514. },
  515. getElementByIndex: function ( index ) {
  516. return elements[ index ];
  517. },
  518. getIndexByElement: function ( elm ) {
  519. return elements.indexOf( elm );
  520. },
  521. isShader: function ( shader ) {
  522. return this.shader === shader;
  523. },
  524. setShader: function ( shader ) {
  525. this.shader = shader;
  526. return this;
  527. },
  528. mergeDefines: function ( defines ) {
  529. for ( var name in defines ) {
  530. this.defines[ name ] = defines[ name ];
  531. }
  532. return this.defines;
  533. },
  534. mergeUniform: function ( uniforms ) {
  535. for ( var name in uniforms ) {
  536. this.uniforms[ name ] = uniforms[ name ];
  537. }
  538. return this.uniforms;
  539. },
  540. getTextureEncodingFromMap: function ( map, gammaOverrideLinear ) {
  541. gammaOverrideLinear = gammaOverrideLinear !== undefined ? gammaOverrideLinear : this.context.gamma && ( this.renderer ? this.renderer.gammaInput : false );
  542. var encoding;
  543. if ( ! map ) {
  544. encoding = THREE.LinearEncoding;
  545. } else if ( map.isTexture ) {
  546. encoding = map.encoding;
  547. } else if ( map.isWebGLRenderTarget ) {
  548. console.warn( "THREE.WebGLPrograms.getTextureEncodingFromMap: don't use render targets as textures. Use their .texture property instead." );
  549. encoding = map.texture.encoding;
  550. }
  551. // add backwards compatibility for WebGLRenderer.gammaInput/gammaOutput parameter, should probably be removed at some point.
  552. if ( encoding === THREE.LinearEncoding && gammaOverrideLinear ) {
  553. encoding = THREE.GammaEncoding;
  554. }
  555. return encoding;
  556. }
  557. };
  558. export { NodeBuilder };