Skip to content

Commit

Permalink
Add IMG_SIZE macro #15
Browse files Browse the repository at this point in the history
  • Loading branch information
msfeldstein committed Jun 11, 2018
1 parent f95d152 commit f731d37
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/ISFParser.js
Expand Up @@ -149,6 +149,12 @@ ISFParser.prototype.replaceSpecialFunctions = function replaceSpecialFunctions(s
const coord = results[1]; const coord = results[1];
return `VVSAMPLER_2DBYNORM(${sampler}, _${sampler}_imgRect, _${sampler}_imgSize, _${sampler}_flip, ${coord})`; return `VVSAMPLER_2DBYNORM(${sampler}, _${sampler}_imgRect, _${sampler}_imgSize, _${sampler}_flip, ${coord})`;
}); });

// IMG_SIZE
regex = /IMG_SIZE\((.+?)\)/g;
source = source.replace(regex, (fullMatch, imgName) => {
return `_${imgName}_imgSize`;
});
return source; return source;
}; };


Expand Down

0 comments on commit f731d37

Please sign in to comment.