Scripting

With built-in behaviors, Mattercraft makes it possible to build sophisticated projects without having to write any lines of code. That said, with script you can bring another dimension of interactivity to your experiences, including (but not limited to!):

  • More complex, stateful content, including gameplay
  • Interaction with APIs or third-party services
  • The wrapping of content from other ecosystems, examples or libraries
  • Leveraging additional functionality provided by web browsers

To make it easy to manage larger immersive projects, and to help Mattercraft parse and understand your files, script in Mattercraft is written in the TypeScript programming language. It’s based on JavaScript, and so if you’re already familiar with JavaScript then you’ll be able to jump straight into TypeScript.

While Mattercraft comes with a ton of components, behaviors and contexts, the rest of this section outlines how you can build your own.

zapcode branded_zapcode i