This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

aframe-mirror

1.0.0 • Public • Published

aframe-mirror

sample image

Introduce

The mirror component for A-Frame.
You can use it to create a reflective object.

Support aframe@1.3.0

API

Property Description type Default Value
color Mixed with given color color(string) #7f7f7f
textureWidth Width of video (in pixels), if defining a video texture width number window.innerWidth * window.devicePixelRatio
textureHeight Height of video (in pixels), if defining a video texture height number window.innerHeight * window.devicePixelRatio

Install

# npm
$ npm install aframe-mirror

# yarn
$ yarn add aframe-mirror

# pnpm
$ pnpm install aframe-mirror

or

<script src="https://cdn.jsdelivr.net/npm/aframe-mirror@latest/index.js"></script>

Usage

import 'aframe';
import 'aframe-mirror';
import { Scene, Box, Plane } from '@belivvr/aframe-react';

export default function App() {
  return (
    <Scene>
      <Box
        position={{ x: -1, y: 0.5, z: -3 }}
        rotation={{ x: 0, y: 45, z: 0 }}
        color="blue"
      />

      <Plane
        position={{ x: -1, y: 0.5, z: -8 }}
        scale={{ x: 10, y: 10, z: 10 }}
        mirror
      />
    </Scene>
  );
}

or

<script src="https://aframe.io/releases/1.3.0/aframe.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/aframe-mirror@latest/index.js"></script>

<a-scene>
  <a-box position="-1 0.5 -3" rotation="0 45 0" color="blue"></a-box>
  <a-plane position="-1 0.5 -8" scale="10 10 10" mirror></a-plane>
</a-scene>

Dependents (0)

Package Sidebar

Install

npm i aframe-mirror

Weekly Downloads

3

Version

1.0.0

License

MIT

Unpacked Size

7.47 kB

Total Files

4

Last publish

Collaborators

  • juunini