c-frame / aframe-extras Goto Github PK
View Code? Open in Web Editor NEWAdd-ons and helpers for A-Frame VR.
Home Page: https://c-frame.github.io/aframe-extras/examples/
License: MIT License
Add-ons and helpers for A-Frame VR.
Home Page: https://c-frame.github.io/aframe-extras/examples/
License: MIT License
Looks more robust than the current wireframe generation.
Badges or something? Would be best to be explicit about more FPS-oriented controls.
i'd like for animated objects like platforms to detect collisions and stop, reverse, or something. maybe force-based animations? not sure how this should work. might be a new component or two.
model loading + error indicators (aframevr/aframe#423, aframevr/aframe#424)
would be fun to do a gif showing before/after *-body
components are added. add to readme or the twitters or something.
Proposed API:
<a-entity collada-model="src: url(chair.dae)" dynamic-body="shape: compound; mass= 10;">
<!-- Back -->
<a-body-part shape="box" width="0.1" height="1" depth="1" offset="0.5 0.5 0"></a-body-part>
<!-- Seat -->
<a-body-part shape="box" width="1" height="0.1" depth="1" offset="0 0 0"></a-body-part>
<!-- Legs -->
<a-body-part shape="cylinder" height="1" radius="0.1" offset="0.5 -0.5 0.5"></a-body-part>
<a-body-part shape="cylinder" height="1" radius="0.1" offset="0.5 -0.5 -0.5"></a-body-part>
<a-body-part shape="cylinder" height="1" radius="0.1" offset="-0.5 -0.5 -0.5"></a-body-part>
<a-body-part shape="cylinder" height="1" radius="0.1" offset="-0.5 -0.5 0.5"></a-body-part>
</a-entity>
Might be a pain to publish them all, but worth a try.
Provides a more robust alternative to Trimesh shapes.
THREE.js QuickHull implementation
Also: http://www.bennolan.com/2014/07/24/physics,-hulls-and-cannon.js.html
I have no idea. ๐
any docs, really.
take interpolation points, animate around w/ constant velocity.
bonus: block on collision.
Detects one collision up front, and then never again. :/
not friendly
Global script docs are missing, and the NPM docs assume users already know browserify/webpack. Should fix both of those.
From Erica โ <a-ocean/>
's color
doesn't work in Firefox but density
only works in Firefox. Maybe a bug with the registerPrimitive API... or I'm setting material too late somehow?
order of update, or something?
easy enough, would probably help others to post some examples
fbx-model
(too many issues)all signs point to this being a non-starter, but it'd be interesting (and not too difficult, by the looks of the API) to test that out.
in the monument example, VR camera perspective feels off
too close to the floor, maybe.
Heya, what's the plan with physics body scaling. I'm getting it with an entity that is a box that I'm scaling. It's easy for me to refactor the code to set the width height and depth in this instance, but it'd be nice to support scaling for scenes that are created in the editor. I could write a PR that manually scales elements by calling multiplyScalar on all the vertices? That'll be expensive if the scale is constantly changing, but should be fine for bodies that are scaled on creation but otherwise don't change.
If the player sphere can be offset (will this screw with weight distribution?) we can reduce its radius and have more reasonable collisions.
Or maybe the camera frustum just needs adjustment? Not sure what the issue was here. The offset on every tick is silly though, a shape-wise offset would be better.
It'd be nice to be able to view them and show them as references without having to clone and build them locally first.
w/ separate files for each package, and full package options
In trying out different combinations of the extras, I found that Controls requires Math. Which makes complete sense, but the error 'null defined for v.x' threw me for a bit.
Is there a way of requiring/registering one component from another?
Alternatively, a note or dependency graph (I haven't tried other combinations) could be helpful.
current example
el.components['dynamic-body'].body.addEventListener('collide', function (e) {
// ...
});
Notably, Cannon.js supports cylinders and spheres, so it would be trivial to support these. Heightfields could also be interesting.
At component or system level. Would allow dynamic bodies to be moved, use w/ editor, etc.
I'm putting the attached model in my scene and the physics model is much bigger than the model. I'm guessing I'm doing something wrong? I've enabled physics debugging.
Multiple questions in slack about how to do this / it's dead simple. Bonus points for fade out animation?
not this.extras.*.registerAll()
i have no idea why i didn't do that in the first place
See: aframevr/aframe#819
When using an element like:
<a-entity camera kinematic-body />
And I programmatically set
setAttribute('universal-controls', 'movementEnabled: false')
The player keeps rolling at the speed it was travelling before. You have to stop the player completely before disabling movement. It'd be better if the player rolled to a stop even if you have movementEnabled set to false.
Very yes.
Body components naively assume position
will return absolute world coordinates, which breaks if nested inside another entity with a position.
THREE.js has an API for returning world position. Could enable this by default (if there are no performance implications), or enable an option allowing it on a case-by-case basis. Might by trickier for dynamic-body
than static-body
.
Test at http://anj.fyi/mountains
The manatee falls through the floor, and the mountain mesh isn't walkable.
Link to models:
http://anj.fyi/images/manatee.obj
http://anj.fyi/images/mountains.dae
really cute tutorial here, which should work well for a flat-shaded style
Ex:
<a-water/>
... which automatically creates a plane + custom component that applies sin-wave animation to the vertexes on the geometry.
Post here: http://blog.vizor.io/using-lights-and-shadows/
Suggesting directional and hemisphere lights perform (much) better than point or spot lights, when used with shadows. Also:
"Generally, for best performance : quality ratio, it is recommended to use one directional light and either an Ambient Light or a Hemisphere Light to get a nice lighting effect with shadows."
... @moyicat has weird preferences like wanting to see things while in VR ๐
(monument demo)
Inspiration: http://newtonvr.com โ
Our system allows players to pick up, drop, throw, and use held objects. Items don't pass through other items (rigidbodies), or the environment (non-rigidbodies). Rather, held items interact with other rigidbodies naturally - taking mass into account. For example, if you have two boxes of the same mass they can push each other equally, but a balloon, with considerably less mass, can't push a box. For more information on this style of mass-based interaction, see this post by Nick Abel.
Items can be configured to be picked up at any point, or when grabbed, can rotate and position themselves to match a predefined orientation. This lets you pick up a box from its corner as well as pick up a gun and have it orient to the grip.
was working at v1.0.0, I need to get it updated with all the physics/controls changes.
min/max zoom issue :|
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.