GithubHelp home page GithubHelp logo

Comments (4)

Markyparky56 avatar Markyparky56 commented on June 14, 2024 1

No worries, compiling from source can be a lot of work. I'd like to set up a nice script which sets up the build pipeline, but I don't have that much time to work on it right now.

If you could post the code you're working with that would make troubleshooting a lot easier.

I've uploaded an updated version of the autoloader and a new v0.4.3 binary (which is working for me in Chrome 69.0.3497.100).

Are you using the wasmnoise.autoloader.js script? It handles all the setup and creates a nice WasmNoise object which you can call the functions through (plus it has lots of lovely helper functions which grab the values generated by the bulk functions out of memory for you). If that's not working for you then we've got a problem.

I'd recommend cloning the repository just so you can get a copy of the test html files, or at least try running the autoloadertest.html page:

<html>
  <head>
    <script type="text/javascript" src="./wasmnoise.autoloader.js"></script>
    <script type="text/javascript">
      // Optional onLoaded function callback
      WasmNoise.onLoaded = function()
      {
        document.getElementById("loaded").innerText = "Loaded!";
      }
    </script>
  </head>
  <body>
    <span id="loaded">Loading...</span>
    <script>
      function update()
      {
        if(WasmNoise) 
          if(WasmNoise.loaded) 
            console.log(WasmNoise.GetSimplex2(Math.random(), Math.random()));
      }
      setInterval(() => {update()}, 1000);
    </script>
  </body>
</html>

from wasmnoise.

Markyparky56 avatar Markyparky56 commented on June 14, 2024

Hi, can you tell me a little more about how you're working with WasmNoise? Did you use the release zip or compioe from source? Are you using the autoloader.js script?

From what I can tell right now, that kind of compile error occurs when you try and compile a text file rather than the wasm binary.

from wasmnoise.

eranimo avatar eranimo commented on June 14, 2024

I used the v0.4.2 release .wasm file. I didn't try compiling it from source because it looked quite complicated and I'm new to WebAssembly.

from wasmnoise.

Markyparky56 avatar Markyparky56 commented on June 14, 2024

Closing as you haven't raised any further problems.

from wasmnoise.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.