Coder Social home page Coder Social logo

samiraatmicrosoft / aframe-teleport-controls Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fernandojsg/aframe-teleport-controls

0.0 1.0 0.0 2.15 MB

A-Frame teleport controls component

Home Page: https://fernandojsg.github.io/aframe-teleport-controls

License: MIT License

JavaScript 100.00%

aframe-teleport-controls's Introduction

aframe-teleport-controls

Teleport component

Screenshot

Properties

Property Description Default Value
type Type of teleport: line or parabolic parabolic
button Button used to launch the teleport trackpad
collisionEntities Selector of the meshes used to check the collisions. If no value provided a plane Y=0 is used
hitEntity Entity used to show at the hitting position. If no value provided a cylinder will be used as default.
hitCylinderColor Color used for the default hitEntity primitives #99ff99
hitCylinderRadius Radius used for the default hitEntity primitives 0.25
hitCylinderHeight Height used for the default hitEntity primitives 0.3
maxLength Max. length for line teleport 10
curveHitColor Color used for the curve when hit the mesh #99ff99
curveMissColor Color used for the curve when it doesn't hit anything #ff0000
curveNumberPoints Number of points used in the curve 30
curveLineWidth Line width of the curve 0.025
curveShootingSpeed Curve shooting speed, as bigger value, farther distance. 5
maxLength Max length of the ray when using type=line teleport 10
landingNormal Normal vector to detect collisions with the collisionEntity (0, 1, 0)
landingMaxAngle Angle threshold (in degrees) used together with landingNormal to detect if the mesh is so steep to jump to it. 45

Usage

Browser Installation

Install and use by directly including the browser files:

<head>
  <title>My A-Frame Scene</title>
  <script src="https://aframe.io/releases/0.4.0/aframe.min.js"></script>
  <script src="https://rawgit.com/fernandojsg/aframe-teleport-controls/master/dist/aframe-teleport-controls.min.js"></script>
</head>

<body>
  <a-scene>
    <a-entity teleport-controls vive-controls="hand: left"></a-entity>
  </a-scene>
</body>

NPM Installation

Install via NPM:

npm install aframe-teleport-controls

Then register and use.

require('aframe-teleport-controls');

aframe-teleport-controls's People

Contributors

banada avatar fernandojsg avatar ngokevin avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.