diff --git a/.metaversefile b/.metaversefile index 66a6ea0..9850ef7 100644 --- a/.metaversefile +++ b/.metaversefile @@ -1,5 +1,6 @@ { "name": "sword", + "description": "sword: A melee weapon", "start_url": "sword.glb", "components": [ { @@ -9,6 +10,22 @@ "position": [0.4, 0.7, -0.2], "quaternion": [0, 0, 0.9510565162951535, 0.30901699437494745] } + }, + { + "key": "use", + "value": { + "animationCombo": [ + "swordSideSlash", + "swordSideSlashStep", + "swordTopDownSlash", + "swordTopDownSlashStep" + ], + "behavior": "sword", + "boneAttachment": "leftHand", + "position": [-0.07, -0.03, 0], + "quaternion": [0.7071067811865475, 0, 0, 0.7071067811865476], + "scale": [1, 1, 1] + } } ] } diff --git a/README.md b/README.md new file mode 100644 index 0000000..aa7f356 --- /dev/null +++ b/README.md @@ -0,0 +1,47 @@ +# sword + +Swords are items that you can wield to do damage on objects and NPCs in the world. + + + +## `.metaversefile` Wearable + +![](https://i.imgur.com/f1cjF55.png) + +![](https://i.imgur.com/0sJXsd2.png) + +The `.metaversefile` goes in the directory with the GLB file in order to create the XRpackage. + + +``` +{ + "name": "sword", + "description": "Sword XRPackage", + "start_url": "sword.glb", + "components": [ + { + "type": "wear", + "position": [0, 0, 0] + } + ] +} +``` + +## `.metaversefile` Wield + +![](https://i.imgur.com/SaXNpC6.png) + +``` +{ + "name": "saber", + "description": "Saber XRPackage", + "start_url": "index.js", + "components": [ + { + "type": "use", + "subtype": "swing", + "useAnimation": "slash" + } + ] +} +``` diff --git a/manifest.json b/manifest.json deleted file mode 100644 index bfd79fe..0000000 --- a/manifest.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "sword", - "description": "Sword XRPackage", - "xr_type": "webxr-site@0.0.1", - "start_url": "sword.glb", - "components": [ - { - "type": "wear", - "position": [0, 0, 0] - } - ] -}