File tree Expand file tree Collapse file tree 1 file changed +14
-7
lines changed
Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -110,12 +110,6 @@ class TSLEncoder {
110110
111111 let code ;
112112
113- /*@TODO : else if ( node.isVarying ) {
114-
115- code = this.emitVarying( node );
116-
117- }*/
118-
119113 if ( node . isAccessor ) {
120114
121115 this . addImport ( node . property ) ;
@@ -243,6 +237,10 @@ class TSLEncoder {
243237
244238 code = this . emitUniform ( node ) ;
245239
240+ } else if ( node . isVarying ) {
241+
242+ code = this . emitVarying ( node ) ;
243+
246244 } else if ( node . isTernary ) {
247245
248246 code = this . emitTernary ( node ) ;
@@ -500,7 +498,16 @@ ${ this.tab }} )`;
500498
501499 }
502500
503- /*emitVarying( node ) { }*/
501+ emitVarying ( node ) {
502+
503+ const { name, type } = node ;
504+
505+ this . addImport ( 'varying' ) ;
506+ this . addImport ( type ) ;
507+
508+ return `const ${ name } = varying( ${ type } (), '${ name } ' )` ;
509+
510+ }
504511
505512 emitOverloadingFunction ( nodes ) {
506513
You can’t perform that action at this time.
0 commit comments