Riccardo Scalco

Results 18 comments of Riccardo Scalco

Please remove the demo website, it redirects not appropriate content.

@patriciogonzalezvivo @giannif thanks for the help. > The project builds an es version now, and perhaps observable hq is using that when you're not in es mode. That's just a...

An update: as described in https://beta.observablehq.com/@tmcw/introduction-to-require, es modules should be imported with `import(glslCanvas)`. Unfortunately, a new error appears: "SyntaxError: The requested module 'https://unpkg.com/xhr@^2.4.0?module' does not provide an export named 'default'...

Thanks @giannif, now `glslCanvas = require('glslCanvas')` works.

@giannif I gave you a wrong feedback sorry, strangely this morning I have the original error.. @patriciogonzalezvivo I think it should be enough to npm publish the latest update. Thanks...

@patriciogonzalezvivo yes, I think it works. I published a test page in observable https://beta.observablehq.com/@riccardoscalco/test with different imports. `import('glslCanvas')` still does not work with the same error, but I am not...

At the moment the library depends on d3 and it cannot be used standalone. Consider that d3 4.x is now a collection of modules, therefore it should be possible to...

No, at the moment the library does not provide methods for linear gradients. I leave this issue open for future investigations, thanks.

@bollwyvl the pattern you are proposing is, I think, the right way to do that kind of thing, and the benefit to having a factory that simplifies the code is...

Well, you are right with the `switch`! As it is, that piece of code is simply a mistake, indeed it can be replaced by a random choice. (It is there...