Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                   <meta charset="utf-8">
    <style>
      html, body { background: #000; }
      a-scene { transition: 1s opacity ease-in-out, 1s visibility ease-in-out; }
      a-scene:not([data-is-loaded="true"]) { opacity: 0; pointer-events: none; transition: none; visibility: visible; }
      a-scene[data-is-loaded="true"] { opacity: 1; pointer-events: auto; visibility: visible; }
    </style>
    <script src="https://321c4.github.io/aframe-link-demo/sw-load.js" data-service-worker="sw.js" data-service-worker-scope="./"></script>
    <!-- preload is currently supported in only Chrome -->
    <link rel="preload" href="https://321c4.github.io/aframe-link-demo/pages/desert.html">
    <link rel="preload" href="https://321c4.github.io/aframe-link-demo/pages/link-vending-machine.html">
    <link rel="preload" href="https://321c4.github.io/aframe-link-demo/pages/office1-mountain.html">
    <link rel="preload" href="https://321c4.github.io/aframe-link-demo/pages/office2-floating.html">
    <!-- prefetch is currently supported in Chrome, Edge, Firefox -->
    <link rel="prefetch" href="https://321c4.github.io/aframe-link-demo/pages/desert.html">
    <link rel="prefetch" href="https://321c4.github.io/aframe-link-demo/pages/link-vending-machine.html">
    <link rel="prefetch" href="https://321c4.github.io/aframe-link-demo/pages/office1-mountain.html">
    <link rel="prefetch" href="https://321c4.github.io/aframe-link-demo/pages/office2-floating.html">
    <title>Lobby | A-Frame Linkhttps://321c4.github.io/aframe-link-demo/ Demo</title>
    <script src="https://321c4.github.io/aframe-link-demo/js/vendor/aframe.min.js"></script>
    <script src="https://321c4.github.io/aframe-link-demo/js/vendor/aframe-bmfont-text-component.min.js"></script>
    <script src="https://321c4.github.io/aframe-link-demo/js/aframe-hyperlink.js"></script>
  </head>
  <body>
    <a-scene>
    <a-assets>
<!--asset-item can include geometry, models, and materials-->
    <a-asset-item id="lobby-courtyard" src="https://321c4.github.io/aframe-link-demo/models/lobby-courtyard-2.dae"></a-asset-item>
    <a-asset-item id="mesquite-tree" src="https://321c4.github.io/aframe-link-demo/models/mesquite.dae"></a-asset-item>
    <a-mixin id="link-shape" geometry="primitive: sphere"></a-mixin>
    <a-mixin id="hover-color" material="color: blue"></a-mixin>
    <a-mixin id="link-color" material="color: #8A8A8"></a-mixin>
    <img id="desert-orbicon" src="https://321c4.github.io/aframe-link-demo/img/desert-orbicon.png">
    <img id="mt-office-orbicon" src="https://321c4.github.io/aframe-link-demo/img/mt-office-orbicon.png">
    <img id="floating-office-orbicon" src="https://321c4.github.io/aframe-link-demo/img/floating-office-orbicon.png">
    <img id="vending-machine-orbicon" src="https://321c4.github.io/aframe-link-demo/img/vending-machine-orbicon.png">
    <img id="skymap" src="https://321c4.github.io/aframe-link-demo/img/skybox-night1.png">
    </a-assets>

<!--..............................................................-->
      <a-entity>
        <a-camera id="camera" look-controls wasd-controls>
          <!-- <a-cursor color="#4CC3D9"></a-cursor> -->
          <a-ring radius-outer="0.03" radius-inner="0.02"
            position="0 0 -1"
            material="color: cyan; shader: flat"
            cursor="maxDistance: 30; fuse: true;">
            <a-animation begin="click" easing="ease-in" attribute="scale"
              fill="backwards" from="0.1 0.1 0.1" to="1 1 1" dur="150"></a-animation>
            <a-animation begin="fusing" easing="ease-in" attribute="scale"
              fill="forwards" from="1 1 1" to="0.1 0.1 0.1" dur="1500"></a-animation>
          </a-ring>
        </a-camera>
      </a-entity>

<!--..............................................................-->
      <!-- Link orb-on-pedestal! -->
      <a-entity position="-1 1 -1">
        <a-sphere rotation="0 200 0" radius="0.3" material="src: #vending-machine-orbicon; repeat: 1 1; roughness: 2;" color="#ffffff" opacity="1" roughness="0.8" href="https://321c4.github.io/aframe-link-demo/pages/link-vending-machine.html">
        </a-sphere>
        <a-sphere class="highlight" visible="false" radius="0.35" rotation="0 0 0" color="#0000ff" opacity="0.6" roughness="1" metalness="0.5"></a-sphere>
        <a-box id="shadow" position="0 -1 0" color="#000" opacity="1" rotation="0 0 0"
        scale="0.4 1 0.4"></a-box>
      </a-entity>

            <!-- Link orb-on-pedestal! -->
      <a-entity position="1 1 -1">
        <a-sphere rotation="0 180 0" radius="0.3" material="src: #mt-office-orbicon; repeat: 1 1; roughness: 2;" color="#ffffff" opacity="1" roughness="0.8" href="https://321c4.github.io/aframe-link-demo/pages/office1-mountain.html">
        </a-sphere>
        <a-sphere class="highlight" visible="false" radius="0.35" rotation="0 0 0" color="#0000ff" opacity="0.6" roughness="1" metalness="0.5"></a-sphere>
        <a-box id="shadow" position="0 -1 0" color="#000" opacity="1" rotation="0 0 0"
        scale="0.4 1 0.4"></a-box>
      </a-entity>

            <!-- Link orb-on-pedestal! -->
      <a-entity position="-1 1 1">
        <a-sphere radius="0.3" rotation="0 -60 0" material="src: #floating-office-orbicon; repeat: 1 1; roughness: 2;" color="#ffffff" opacity="1" roughness="0.8" href="https://321c4.github.io/aframe-link-demo/pages/office2-floating.html">
        </a-sphere>
        <a-sphere class="highlight" visible="false" radius="0.35" rotation="0 0 0" color="#0000ff" opacity="0.6" roughness="1" metalness="0.5"></a-sphere>
        <a-box id="shadow" position="0 -1 0" color="#000" opacity="1" rotation="0 0 0"
        scale="0.4 1 0.4"></a-box>
      </a-entity>

            <!-- Link orb-on-pedestal! -->
      <a-entity position="1 1 1" >
        <a-sphere radius="0.3" rotation="0 0 0" material="src: #desert-orbicon; repeat: 1 1; roughness: 2;" color="#ffffff" opacity="1" roughness="0.8" href="pages/desert.html">
        </a-sphere>
        <a-sphere class="highlight" visible="false" radius="0.35" rotation="0 0 0" color="#0000ff" opacity="0.6" roughness="1" metalness="0.5"></a-sphere>
        <a-box id="shadow" position="0 -1 0" color="#000" opacity="1" rotation="0 0 0"
        scale="0.4 1 0.4"></a-box>
      </a-entity>

<!--..............................................................-->
        <a-collada-model src="#lobby-courtyard" position="0 0 0" scale="4 4 4"></a-collada-model>

        <a-collada-model src="#mesquite-tree" position="-3 0 -3" scale="1 1.5 1" rotation="0 -90 0"></a-collada-model>
        <a-collada-model src="#mesquite-tree" position="3 0 -3" scale="1 1.5 1" rotation="0 145 0"></a-collada-model>
        <a-collada-model src="#mesquite-tree" position="-3 0 3" scale="1 1.5 1" rotation="0 -90 0"></a-collada-model>
        <a-collada-model src="#mesquite-tree" position="3 0 3" scale="1 1.5 1" rotation="0 -289 0"></a-collada-model>


        <a-light type="directional" position="3 10 5" color="#7AA6FF" intensity="1"></a-light>
        <a-light type="ambient" position="0 2 0" color="#CF9348" intensity="0.4"></a-light>
        <a-light type="point" position="0 -1 0" color="#ffffff" intensity="0.5"></a-light>

      <a-sky color="#0A1633"></a-sky>
      <a-entity position="0 0 0" id="sky" geometry="primitive:sphere; radius:30; phiLength:360; phiStart:0; thetaLength:90" material="shader:flat; side:back; height:2048; src:#skymap; width:2048"></a-entity>
    </a-scene>
  </body>
</html>
              
            
!

CSS

              
                
              
            
!

JS

              
                
              
            
!
999px

Console