Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

tweaks

  • Loading branch information...
commit c57945d88f010a57a903cf8a974a9249be320b8e 1 parent 7f8e4ae
@dgreensp dgreensp authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 packages/webgl/package.js
View
6 packages/webgl/package.js
@@ -26,18 +26,18 @@ Package.register_extension(
// as Shader.foo or Shader.bar.
var sections = source.match(
- /^\/\/![\s\S]*?(?:(?=^\/\/!)|(?![\s\S]))/mg);
+ /^\/\/\/*![\s\S]*?(?:(?=^\/\/\/*!)|(?![\s\S]))/mg);
var jsCode = '';
sections.forEach(function(s) {
var lines = s.split('\n');
var firstLine = lines.shift();
- var stuff = firstLine.match(/^\/\/!\s*(FRAGMENT|VERTEX)\s*(\S.*)$/);
+ var stuff = firstLine.match(/^\/\/\/*!\s*(FRAGMENT|VERTEX)\s*(\S.*)$/);
if (! stuff)
return;
var name = stuff[2];
- var type = stuff[1].toLowerCase();
+ var type = stuff[1].toLowerCase(); // e.g. 'fragment'
jsCode += '_def_shader(' + JSON.stringify(
{ name: name, type: type, code: lines.join('\n') }) + ');';
});
Please sign in to comment.
Something went wrong with that request. Please try again.