Closed ngokevin closed 7 years ago
I would turn url
into urls
and make it an array
Also, I think it might be nicer to turn this into an array of objects and have slug
be a key. Or at the very least duplicate slug
?
Possible syntax:
aframe-physics
- name: physics-body
versions:
0.3.0:
version: <version>
path: <path>.min.js
- name: physics-world
versions:
0.3.0:
version: <version>
path: <path>.min.js
Array of objects has the advantage that the name of each component is specified.
But just bundling components may not be enough, similar cases could also include a system. leap-hands
and aframe-extras.physics
, for example.
That'd make sense. It'd still allow a one component per file, and we can perhaps in the future allow component packs depending on how things go.
This is the format I used for Holodeck Club's manifest.json
s.
I would suggest using the unpkg (née npmcdn) syntax (e.g., https://unpkg.com/package@version/file
). You can read these notes on the syntax.
{
"components": [
"/common/assets/js/voice-controls.js",
"aframe-href-component@0.5.1",
"annyang",
"donmccurdy/aframe-extras@master/src/primitives/a-ocean.js"
"github:bryik/aframe-vive-cursor-component@master/aframe-vive-cursor-component.min.js",
"github:nylki/aframe-lsystem-component",
"https://holodeck.club/common/assets/js/lib/voice-nav.js",
"maxkrieger/aframe-draw-component",
"npm:mayognaise/aframe-video-shader@20.1.8"
]
}
Just some thoughts.
@donmccurdy your format looks good, i'm gonna start implementing it
Great! That would be enough for me to pull a few components in from aframe-extras. Maybe three-model
and ply-model
. Can figure out systems another day. 🙂
For like the ocean
component, you can either give it its own package.json
+ directory...or just build a dist within aframe-extras
. Either way currently, needs a separate dist. Separate directory is preferred so we can give it its own README/preview image.
Yeah, need to think about systems since your physics isn't 1:1...(physics system <- body, joint, etc). It'd be awesome just to checkbox physics.
👍 i just extended my build script to create dists for whitelisted components, that should fine work for ocean.
Will probably export physics to a repo, but still at least a couple components + a system involved yeah.
Need to figure out a way to match a component nested in github repo with a GitHub README hmm
@donmccurdy This seems doable:
aframe-physics:
names: body, dynamic-body, static-body, joint
versions:
0.3.0:
version: ^1.0.0
path: dist/aframe-physics.min.js
@ngokevin I'm late on this but what about changing names
to components
? Then, if/when we're ready to support systems
, primitives
, etc., the naming and distinction would be explicit?
That sounds good...I'll file an issue.
https://github.com/ngokevin/aframe-physics-components/blob/master/dist/aframe-physics-components.js
This physics component is bundled up with
physics-body
andphysics-world
. They are coupled and are bundled with cannon.js.