MagicScript Explained

What is MagicScript?

MagicScript is a technology for developing native mixed reality applications with JavaScript to run on Lumin OS and Magic Leap devices.

Why is MagicScript important?

MagicScript enables rapid application development for Landscape and Immersive experiences with built-in support for remote content and Web APIs.

This combination of features enables a variety of applications for Enterprise and Social.

Why JavaScript?

JavaScript was the top programming language of 2018, with more than 9 million software developers around the globe using JavaScript.

Is MagicScript performant?

Yes. MagicScript relies on the industry-grade JavaScript runtime V8 from Google with JIT (just-in-time compilation) enabled.

The Lumin OS API as exposed by JavaScript provides native-level execution performance for rendering, networking, and file operations.

Why NPM?

Node.js and NPM (Node Package Manager) are a de facto standard for a cross-platform development environment using JavaScript.

MagicScript uses NPM to assemble applications from multiple components (NPM packages). This allows the use of many external NPM packages and frameworks in MagicScript applications.

Can external JavaScript libraries be used with MagicScript?

Yes. MagicScript applications can be extended using many open source JavaScript libraries such as Matrix.js for transform math, Lodash for vector operations, Xeogl and Three.js for 3D rendering.

How can MagicScript be extended?

You can create your own components and frameworks and share them on NPM and GitHub with other developers.

There are also several packages available through NPM that were written by the MagicScript development team that can be used to simplify and accelerate application development. For more details, look on the MagicScript GitHub page:

What can be done with MagicScript today?

  • Landscape and Immersive
  • Lumin Runtime API
  • HTTP/HTTPS Fetch
  • File System
  • WebGL
  • WebSockets
  • Firebase
  • JavaScript 3rd party libraries
  • MagicScript Components

MagicScript has the Lumin Runtime API available to it and can create both Landscape and Immersive applications. It supports the HTTP/HTTPS Fetch API and File System API out of the box. Additionally, Lumin OS 0.96 MagicScript provides WebGL rendering support. Many JavaScript 3rd party libraries can be used together with MagicScript. We have recently rolled out the MagicScript Components framework.

Can WebGL be used with MagicScript?

Yes. Lumin OS 0.96 MagicScript enables support for WebGL for rendering Quad nodes using Planar resources in Landscape and Immersive applications.

MagicScript supports the most commonly used APIs of WebGL 1.0 and a limited set of functions from WebGL 2.0.

Further WebGL functionality can be rolled out in upcoming releases.

What is MagicScript Components?

MagicScript Components is a framework to build Landscape and Immersive mixed reality apps with React.js, declarative elements, and JavaScript.

MagicScript Components gives developers a declarative “HTML alike” language to create specialized application front ends for mixed reality with built-in state management and extensibility provided by React.js.

Why is MagicScript Components important?

MagicScript Components simplifies application development and makes code more structured and readable.

Developers write less code to achieve more.

The code also “looks more familiar” for people coming from web development.

How to get started with MagicScript? is a one-stop shop for any information related to MagicScript. Read our getting started guide, check our samples, install our CLI tool, create your application, and share you experience with us! Also file bugs, fork our repos, and contribute your changes!