Socket
Socket
Sign inDemoInstall

aframe

Package Overview
Dependencies
36
Maintainers
5
Versions
36
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    aframe

A web framework for building virtual reality experiences.


Version published
Maintainers
5
Created

Changelog

Source

1.4.0 (Dec 26, 2022)

A-Frame moved to custom elements V1, Oculus Quest Pro support, and tons of fixes and improvements in both A-Frame core and inspector 👏

28 A-Framers contributed to this one! You're awesome 🙇

Sponsor A-Frame to help us move the 3D Web forward.

You can also buy a cool t-shirt 👕

Major Changes

  • Move A-Frame to Custom Elements V1 API from the now deprecated Custom Elements V0 (fix #4262) (#5136) (@dmarcos)
  • Move build system from Browserify to Webpack adding support for ESM (#5116) (@vincentfretin)
  • Update to THREE r147 (@dmarcos @AdaRoseCannon @vincentfretin)

Deprecations

  • Cardboard mode is now disabled by default as a first step towards deprecation. Magic window is now the fallback on mobile when native WebXR API is not available (fix #4814) (@dmarcos)

Enhancements

  • Add support for Meta Quest Touch Pro controllers (fix #5138) (#5139) (@felixtrz @cabanier @dmarcos)
  • Replace targetRaySpace with `gripSpace to position WebXR tracked controllers (#88e8db12) (@felixtrz @dmarcos)
  • Add support for KTX2 texture compression in gltf-model component (#5101) (@jameskane05)
  • Add a default for Draco decoder URL for the gltf model component (#5156) (@kfarr)
  • Hide fullscreen button in desktop mode on iPad. Safari doesn't seem to support fullscreen mode. (fix #4841) (#5191)
  • Detach inactive pool entities from THREE Scene avoiding unnecessary matrix updates and raycaster checks / hits (#5188) (@diarmidmackenzie)
  • Add support for WebXR foveation level. Only WebVR API was previously supported (fix #5108) (#5110) (@mrxz)
  • Events emitted on a cursor entity also pass original MouseEvent and TouchEvent events when applies.
  • Update unit test stack and fix test suite (#5091) (@vincentfretin)
  • Display fullscreen button when AR / VR mode are not available (#ce23027d) (@dmarcos)
  • Add xrselect option to rayOrigin property in cursor component so it can be used in a WebXR AR context (#5065) (@AdaRoseCannon)
  • tracked-controls-webxr reference space is now configurable (#5040) (@msub2)
  • New light component property to enable directional lights to track objects and update shadows automatically (#5025) (@AdaRoseCannon)
  • New toneMapped property on renderer system. Flat materials can now opt out of tone mapping to look like light emitting surfaces. (#5029) (@AdaRoseCannon)
  • Update hand tracking model (fix #5185) (@dmarcos @vincentfretin)
  • Factor out and document throttleLeadingAndTrailing (#5151) (@diarmidmackenzie)
  • Docs improvements (@nikolas @dirkk0 @JGrotex @Kershawj @juunini @andrejsmelnikovs @csxiaoyaojianxian @Kirshach @diarmidmackenzie @Chabloz @vincentfretin @karunstha @janarthnk @Utopiah @daniel-schroeder-dev @Descent098 @oroju1)

Bug fixes

  • Fix triggerchanged event not firing with Oculus Quest 2 controllers (#5149) (@msub2)
  • Fix issue of loading screen displayed indefinitely (#5033) (@diarmidmackenzie)
  • Remove duplicated update shader logic (#6858ed66) (@dmarcos)
  • Fix ray positioning for Oculus Quest 2 controllers (#5141) (@felixtrz)
  • Fix reflection component removal (#5125) (@vincentfretin)
  • Fix Quest 1 controller ray positioning (fix #5183) (#5190) (@vincentfretin)
  • Set default dev port to 8080. Oculus OS / Browser now block port 9000 and it's no longer usable (#0f508ad2) (@dmarcos)
  • Fix Oculus Quest 2 controller button animation and highlights (fix #5067) (#5103) (@kylebakerio)
  • Stop render loop when a-scene is removed from the DOM (#5112) (@vincentfretin)
  • Fix Github CI (#5092) (@vincentfretin)
  • Don't emit granted events if DeviceOrientationEvent permission is not granted (#5079) (@diarmidmackenzie)
  • Fix removal of components with the name pattern component-name__sufix. Used on multiple instances of a single component (fix #5080) (#5081) (@diarmidmackenzie)
  • Exclude a-mixins when camera system tries to retrieve camera entities (fix #5023) (@mattrossman)
  • Reset wasd-controls velocity when axis properties change (#5050) (@vulture-boy)
  • Match screenshot component and scene encoding (#5157) (@diarmidmackenzie)
  • Fix VR/AR buttons positioning in embedded mode (fix #5158) (@dmarcos)
  • Remove examples warning messages (fix #5184) (@dmarcos @vincentfretin)

Readme

Source

A-Frame

A-Frame

A web framework for building virtual reality experiences.

Coverage Status Downloads Version License

SiteDocsSchoolSlackBlogNewsletter

Examples

Supercraft A-Painter Supermedium A-Blast A-Saturday-Night Musical Forest by @googlecreativelab

Find more examples on the homepage, A Week of A-Frame, and WebVR Directory.

Features

:eyeglasses: Virtual Reality Made Simple: A-Frame handles the 3D and WebVR boilerplate required to get running across platforms including mobile, desktop, Vive, and Rift just by dropping in <a-scene>.

:heart: Declarative HTML: HTML is easy to read and copy-and-paste. Since A-Frame can be used from HTML, A-Frame is accessible to everyone: web developers, VR enthusiasts, educators, artists, makers, kids.

:electric_plug: Entity-Component Architecture: A-Frame is a powerful framework on top of three.js, providing a declarative, composable, reusable entity-component structure for three.js. While A-Frame can be used from HTML, developers have unlimited access to JavaScript, DOM APIs, three.js, WebVR, and WebGL.

:zap: Performance: A-Frame is a thin framework on top of three.js. Although A-Frame uses the DOM, A-Frame does not touch the browser layout engine. Performance is a top priority, being battle-tested on highly interactive WebVR experiences.

:globe_with_meridians: Cross-Platform: Build VR applications for Vive, Rift, Daydream, GearVR, and Cardboard. Don't have a headset or controllers? No problem! A-Frame still works on standard desktop and smartphones.

:mag: Visual Inspector: A-Frame provides a built-in visual 3D inspector with a workflow similar to a browser's developer tools and interface similar to Unity. Open up any A-Frame scene and hit <ctrl> + <alt> + i.

:runner: Features: Hit the ground running with A-Frame's built-in components such as geometries, materials, lights, animations, models, raycasters, shadows, positional audio, tracked controllers. Get even further with community components such as particle systems, physics, multiuser, oceans, mountains, speech recognition, or teleportation!

Usage

Example

Build VR scenes in the browser with just a few lines of HTML! To start playing and publishing now, remix the starter example on:

Remix Fork

<html>
  <head>
    <script src="https://aframe.io/releases/1.4.0/aframe.min.js"></script>
  </head>
  <body>
    <a-scene>
      <a-box position="-1 0.5 -3" rotation="0 45 0" color="#4CC3D9"></a-box>
      <a-sphere position="0 1.25 -5" radius="1.25" color="#EF2D5E"></a-sphere>
      <a-cylinder position="1 0.75 -3" radius="0.5" height="1.5" color="#FFC65D"></a-cylinder>
      <a-plane position="0 0 -4" rotation="-90 0 0" width="4" height="4" color="#7BC8A4"></a-plane>
      <a-sky color="#ECECEC"></a-sky>
    </a-scene>
  </body>
</html>

With A-Frame's entity-component architecture, we can drop in community components from the ecosystem (e.g., ocean, physics) and plug them into our objects straight from HTML:

Remix Fork

<html>
  <head>
    <script src="https://aframe.io/releases/1.4.0/aframe.min.js"></script>
    <script src="https://unpkg.com/aframe-particle-system-component@1.0.x/dist/aframe-particle-system-component.min.js"></script>
    <script src="https://unpkg.com/aframe-extras.ocean@%5E3.5.x/dist/aframe-extras.ocean.min.js"></script>
    <script src="https://unpkg.com/aframe-gradient-sky@1.4.0/dist/gradientsky.min.js"></script>
  </head>
  <body>
    <a-scene>
      <a-entity id="rain" particle-system="preset: rain; color: #24CAFF; particleCount: 5000"></a-entity>

      <a-entity id="sphere" geometry="primitive: sphere"
                material="color: #EFEFEF; shader: flat"
                position="0 0.15 -5"
                light="type: point; intensity: 5"
                animation="property: position; easing: easeInOutQuad; dir: alternate; dur: 1000; to: 0 -0.10 -5; loop: true"></a-entity>

      <a-entity id="ocean" ocean="density: 20; width: 50; depth: 50; speed: 4"
                material="color: #9CE3F9; opacity: 0.75; metalness: 0; roughness: 1"
                rotation="-90 0 0"></a-entity>

      <a-entity id="sky" geometry="primitive: sphere; radius: 5000"
                material="shader: gradient; topColor: 235 235 245; bottomColor: 185 185 210"
                scale="-1 1 1"></a-entity>

      <a-entity id="light" light="type: ambient; color: #888"></a-entity>
    </a-scene>
  </body>
</html>

Builds

To use the latest stable build of A-Frame, include aframe.min.js:

<head>
  <script src="https://aframe.io/releases/1.4.0/aframe.min.js"></script>
</head>

To check out the stable and master builds, see the dist/ folder.

npm

npm install --save aframe
# Or yarn add aframe
require('aframe')  // e.g., with Browserify or Webpack.

Local Development

git clone https://github.com/aframevr/aframe.git  # Clone the repository.
cd aframe && npm install  # Install dependencies.
npm start  # Start the local development server.

And open in your browser http://localhost:9000.

Generating Builds

npm run dist

Questions

For questions and support, ask on StackOverflow.

Stay in Touch

And get in touch with the maintainers!

Contributing

Get involved! Check out the Contributing Guide for how to get started.

You can also support development by buying a gorgeous A-Frame t-shirt with exclusive designs

License

This program is free software and is distributed under an MIT License.

Keywords

FAQs

Last updated on 26 Dec 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc