Coder Social home page Coder Social logo

wonderlandengine / community-components Goto Github PK

View Code? Open in Web Editor NEW
7.0 2.0 2.0 45 KB

Custom JavaScript components created by the Community!

License: MIT License

JavaScript 62.73% TypeScript 37.27%
wonderland wonderland-engine webxr web3d webvr webar

community-components's Introduction

wonderland-engine-logo

Community Components

Custom JavaScript components created by the Community!

How to use

Instructions on how to use components from this repository.

NPM package

If you already have a git repository set up for your Wonderland Engine project, this method allows easily updating later.

npm i --save @wonderlandengine/community-components

Documentation

controller

Author: @msub2

Smooth locomotion character controller for VR.

Param Type Description
handedness Enum Handedness for VR cursors to accept input only from respective controller
controlType Enum Whether this controller rotates or moves the character
controlSource Enum Whether to use thumbstick or touchpad for input
player Object Player object which is moved
head Object Head/Left eye object from which to get movement direction
head2 Object Right eye object from which to get movement direction
moveSpeed Float Movement speed, default 1.0
allowFly Bool Allow flying (if false, will not move on the Y axis)
rotationType Enum Whether to rotate smoothly or snap in snapDegrees increments
snapDegrees Int Incremements to snap to when rotationType is "snap", default 45

line-connection

Author: @Squareys

Draw a line between two objects by scaling a mesh (e.g. a cube) and rotating it accordingly.

Param Type Description
targetA Object Object from which to draw the line
targetB Object Object to which to draw the line
lengthPercentage Float How much of the length between the objects to span
thickness Float Thickness of the line, default 0.05

Requirements:

  • Expects a mesh component attached to the same object

waypoint-movement

Author: @Srile

Moves an object along a path made up of multiple points.

Param Type Description
pathObject Object Container of the waypoints. The position of its children indicate the points.
speed Float Movement speed of the object
curveDistance Float Distance in normal space [0, 0.5) after which the objects starts moving on a curve (used for smooth corners)

Callbacks

  • addOnFinalWaypointReachedCallback(f)/removeOnFinalWaypointReachedCallback(f) can be used for function callback registration and are fired when the object reaches the end destination.

Requirements:

  • pathObject's children are sorted by alphebetical ascending naming (e.g. A, B, C, D, E, F, ...)

Notes

  • lookAt will be replaced with a native function in the future.

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.