dcl-npc-toolkit 1.6.0 → 1.6.1-20251229150951.commit-1329ff8

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.
Files changed (2) hide show
  1. package/README.md +11 -12
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -77,21 +77,15 @@ export let ILoveCats: Dialog[] = [
77
77
  npm i dcl-npc-toolkit
78
78
  ```
79
79
 
80
- 2. Install the dependent sdk utils library as an npm bundle. Run this command in your scene's project folder:
80
+ 2. Run `dcl start` or `dcl build` so the dependencies are correctly installed.
81
81
 
82
- ```
83
- npm i @dcl-sdk/utils -B
84
- ```
85
-
86
- 3. Run `dcl start` or `dcl build` so the dependencies are correctly installed.
87
-
88
- 4. Import the library into the scene's script. Add this line at the start of your `index.ts` file, or any other TypeScript files that require it:
82
+ 3. Import the library into the scene's script. Add this line at the start of your `index.ts` file, or any other TypeScript files that require it:
89
83
 
90
84
  ```ts
91
85
  import * as npc from 'dcl-npc-toolkit'
92
86
  ```
93
87
 
94
- 5. In your TypeScript file, call the `create` function passing it a `TransformType` and a `NPCData` object. The `NPCData` object requires a minimum of a `NPCType` and a function to trigger when the NPC is activated:
88
+ 4. In your TypeScript file, call the `create` function passing it a `TransformType` and a `NPCData` object. The `NPCData` object requires a minimum of a `NPCType` and a function to trigger when the NPC is activated:
95
89
 
96
90
  ```ts
97
91
  export let myNPC = npc.create(
@@ -111,7 +105,7 @@ export let myNPC = npc.create(
111
105
  )
112
106
  ```
113
107
 
114
- 6. Write a dialog script for your character, preferably on a separate file, making it of type `Dialog[]`.
108
+ 5. Write a dialog script for your character, preferably on a separate file, making it of type `Dialog[]`.
115
109
 
116
110
  ```ts
117
111
  import { Dialog } from 'dcl-npc-toolkit'
@@ -197,9 +191,14 @@ createFromEntity(npcEntity, {
197
191
  onActivate: () => {
198
192
  // ...
199
193
  },
200
- textBubble: true,
201
- bubbleHeight: 2
194
+ volume: {
195
+ radius: 4,
196
+ shape: 'sphere'
197
+ }
202
198
  })
199
+
200
+
201
+
203
202
  ```
204
203
 
205
204
  ## SDK7 UI
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dcl-npc-toolkit",
3
- "version": "1.6.0",
3
+ "version": "1.6.1-20251229150951.commit-1329ff8",
4
4
  "description": "A collection of tools for creating Non-Player-Characters (NPCs). These are capable of having conversations with the player, and play different animations.",
5
5
  "main": "./dist/index.js",
6
6
  "typings": "./dist/index.d.ts",
@@ -36,5 +36,5 @@
36
36
  "dependencies": {
37
37
  "@dcl/js-runtime": "latest"
38
38
  },
39
- "commit": "4a0a1552ffd7da70d417612d7d640a441e152b0b"
39
+ "commit": "1329ff8cb1a7ba423691de7f9d71aee9be6dc9f7"
40
40
  }