Basic html

The following is an example for how to use Needle Engine with vanilla js (without any bundler).

<!DOCTYPE html>
<html lang="en">
    <meta charset="UTF-8" />
    <link rel="icon" href="favicon.ico">
    <meta name="viewport" content="width=device-width, user-scalable=no">
    <title>Made with Needle</title>

    <!-- importmap -->
    <script type="importmap">
          "imports": {
            "three":  "",
            "three/": ""
    <!-- parcel require must currently defined somewhere for peerjs -->
    <script> var parcelRequire; </script>
    <!-- loading the needle engine js file -->
    <script type="module" src=""></script>

        body { margin: 0; }
        needle-engine {
            position: absolute;
            display: block;
            width: 100%;
            height: 100%;
            background: black;



    <!-- load a gltf or glb here as your scene and listen to the finished event to start interacting with it -->
    <needle-engine src="myscene.glb" loadfinished="onLoaded"></needle-engine>


    function onLoaded(ctx) {
        console.log("Loading finished", ctx);