Skip to content

Unexpected string in JSON at position... #20

@cheako

Description

@cheako

glm-js uses a lot of voodoo function templating that doesn't work in duktape. https://jsfiddle.net/9ssb6tko/ When I try JSONfn.parse() on this after turning it into a template (`) I get this error at 303.

I'm more reporting this so the bug I've encountered can be corrected, but my ultimate goal of having glm-js load in duktape still exists. I had planned to export the result of said voodoo, but it seems glm-js is using some other magic to have objects also be functions. I was able to restore the glm object using the output as raw javascript. Doing that, JSONfn creates glm.vec3 as an object, but ignores glm.vec3().

Prescribed glm-js example.

  console.log('loaded glm-js version: ', glm.version);
  console.log('vec3 example: ', glm.vec3(1,2,3));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions