@npcify/react 0.4.0 → 0.5.0
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 +4 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -76,6 +76,10 @@ export default function App() {
|
|
|
76
76
|
- Voice input: call `bindPushToTalk({ element })` on the ready SDK to talk while
|
|
77
77
|
the player holds a button or Space; the release sends the speech. See the
|
|
78
78
|
`@npcify/web` README (Voice input and input modes).
|
|
79
|
+
- Sight: call `startSight()` on the ready SDK after the conversation starts to
|
|
80
|
+
let the character see the player's camera, and `stopSight()` to close it.
|
|
81
|
+
`sightState` is `'unavailable'` until the owner turns sight on in the Sight
|
|
82
|
+
tab. See the `@npcify/web` README (Sight).
|
|
79
83
|
- `onReady(npcify)` and `onError(error)` callbacks expose the SDK and errors.
|
|
80
84
|
- `class`/`style` (React: `className`/`style`) customize the outer div. It defaults
|
|
81
85
|
to 100% width and 480px height. Give it a nonzero height.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactElement } from 'react';
|
|
2
2
|
import { Npcify, MountNpcifyOptions } from '@npcify/web';
|
|
3
|
-
export { Character, CharacterAnimation, CharacterAnimationPlayOptions, CharacterAudio, CharacterDisposeOptions, CharacterExpressions, CharacterOptions, CharacterShadowOptions, CharacterSpeechState, CharacterTransformOptions, InputMode, InputModeError, ListeningOptions, ListeningState, LoadCharacterOptions, Npcify, NpcifyCharacter, NpcifyView, PushToTalkOptions, SpeechInputError, SpeechInputResult, TranscriptEvent, bindPushToTalk, createCharacter, loadCharacter } from '@npcify/web';
|
|
3
|
+
export { Character, CharacterAnimation, CharacterAnimationPlayOptions, CharacterAudio, CharacterDisposeOptions, CharacterExpressions, CharacterOptions, CharacterShadowOptions, CharacterSpeechState, CharacterTransformOptions, InputMode, InputModeError, ListeningOptions, ListeningState, LoadCharacterOptions, Npcify, NpcifyCharacter, NpcifyView, PushToTalkOptions, SightError, SightObservationEvent, SightOptions, SightState, SpeechInputError, SpeechInputResult, TranscriptEvent, bindPushToTalk, createCharacter, loadCharacter } from '@npcify/web';
|
|
4
4
|
|
|
5
5
|
type NpcifyOptions = Omit<MountNpcifyOptions, 'canvas' | 'onError'>;
|
|
6
6
|
interface NpcifyCallbacks {
|
package/dist/index.js
CHANGED
|
@@ -50,6 +50,7 @@ import {
|
|
|
50
50
|
createCharacter,
|
|
51
51
|
loadCharacter,
|
|
52
52
|
InputModeError,
|
|
53
|
+
SightError,
|
|
53
54
|
SpeechInputError,
|
|
54
55
|
bindPushToTalk
|
|
55
56
|
} from "@npcify/web";
|
|
@@ -105,6 +106,7 @@ export {
|
|
|
105
106
|
Npcify,
|
|
106
107
|
NpcifyCanvas,
|
|
107
108
|
NpcifyCharacter,
|
|
109
|
+
SightError,
|
|
108
110
|
SpeechInputError,
|
|
109
111
|
bindPushToTalk,
|
|
110
112
|
createCharacter,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@npcify/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "React components for Npcify characters and conversations",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"registry": "https://registry.npmjs.org/"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@npcify/web": "^0.
|
|
26
|
+
"@npcify/web": "^0.5.0"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"react": "^18.3.0 || ^19.0.0"
|