@react-three/viverse 0.2.19 → 0.2.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -19,10 +19,14 @@
19
19
 
20
20
  > Build character-based XR, Desktop, or Mobile web games, the easy way.
21
21
 
22
+ ## Quickstart
23
+
22
24
  ```bash
23
- npm install three @react-three/fiber @react-three/viverse
25
+ npx skills add pmndrs/viverse
24
26
  ```
25
27
 
28
+ > Use $pmndrs-viverse to build a simple VIVERSE game.
29
+
26
30
  ### What does it look like?
27
31
 
28
32
  | A prototype map with the `<SimpleCharacter/>` component and its default model. | ![render of the code below](./docs/getting-started/basic-example.gif) |
@@ -54,7 +58,13 @@ createRoot(document.getElementById('root')!).render(
54
58
  > Some familiarity with
55
59
  > react, threejs, and @react-three/fiber, is recommended.
56
60
 
57
- Get started with **[building a simple game](https://pmndrs.github.io/viverse/tutorials/simple-game)**, take a look at our **[examples](https://pmndrs.github.io/viverse/getting-started/examples)**, or follow one of our **tutorials**:
61
+ Prefer doing it manually? Install the package:
62
+
63
+ ```bash
64
+ npm install three @react-three/fiber @react-three/viverse
65
+ ```
66
+
67
+ Then get started with **[building a simple game](https://pmndrs.github.io/viverse/tutorials/simple-game)**, take a look at our **[examples](https://pmndrs.github.io/viverse/getting-started/examples)**, or follow one of our **tutorials**:
58
68
 
59
69
  - [First person controls](https://pmndrs.github.io/viverse/tutorials/first-person)
60
70
  - [Augmented and virtual reality](https://pmndrs.github.io/viverse/tutorials/augmented-and-virtual-reality)
@@ -78,4 +88,4 @@ This project would not be possible without the default model and default animati
78
88
 
79
89
  ## Sponsoring
80
90
 
81
- The development of this library was sponsored by HTC Viverse.
91
+ The development of this library was sponsored by HTC Viverse.
package/dist/bone.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { VRM } from '@pixiv/three-vrm';
2
+ import { getBone } from '@pmndrs/viverse';
3
3
  import { createPortal } from '@react-three/fiber';
4
4
  import { useMemo } from 'react';
5
5
  import { Fragment } from 'react/jsx-runtime';
6
6
  import { useCharacterModel } from './model.js';
7
7
  export function CharacterModelBone({ bone, children }) {
8
8
  const model = useCharacterModel();
9
- const boneObject = useMemo(() => (model instanceof VRM ? model.humanoid.getRawBoneNode(bone) : model.scene.getObjectByName(bone)), [model, bone]);
9
+ const boneObject = useMemo(() => getBone(model, bone), [model, bone]);
10
10
  if (boneObject == null) {
11
11
  return null;
12
12
  }
package/package.json CHANGED
@@ -29,7 +29,7 @@
29
29
  "@pixiv/three-vrm": "^3.4.2",
30
30
  "zustand": "^5.0.6",
31
31
  "@react-three/xr": "^6.6.20",
32
- "@pmndrs/viverse": "^0.2.19"
32
+ "@pmndrs/viverse": "^0.2.23"
33
33
  },
34
34
  "peerDependencies": {
35
35
  "@react-three/fiber": "*"
@@ -40,7 +40,7 @@
40
40
  "@types/react": "^19.1.8",
41
41
  "react": "^19.1.0"
42
42
  },
43
- "version": "0.2.19",
43
+ "version": "0.2.23",
44
44
  "scripts": {
45
45
  "build": "tsc",
46
46
  "check:prettier": "prettier --check src",