@playcanvas/web-components 0.2.6 → 0.2.7

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 (49) hide show
  1. package/README.md +1 -1
  2. package/dist/app.d.ts +14 -3
  3. package/dist/asset.d.ts +1 -1
  4. package/dist/components/camera-component.d.ts +1 -1
  5. package/dist/components/collision-component.d.ts +1 -1
  6. package/dist/components/element-component.d.ts +1 -1
  7. package/dist/components/light-component.d.ts +1 -1
  8. package/dist/components/listener-component.d.ts +1 -1
  9. package/dist/components/particlesystem-component.d.ts +1 -1
  10. package/dist/components/render-component.d.ts +1 -1
  11. package/dist/components/rigidbody-component.d.ts +1 -1
  12. package/dist/components/screen-component.d.ts +1 -1
  13. package/dist/components/script-component.d.ts +1 -1
  14. package/dist/components/sound-component.d.ts +1 -1
  15. package/dist/components/splat-component.d.ts +1 -1
  16. package/dist/entity.d.ts +4 -4
  17. package/dist/material.d.ts +1 -1
  18. package/dist/model.d.ts +1 -1
  19. package/dist/module.d.ts +1 -1
  20. package/dist/pwc.cjs +120 -31
  21. package/dist/pwc.cjs.map +1 -1
  22. package/dist/pwc.js +120 -31
  23. package/dist/pwc.js.map +1 -1
  24. package/dist/pwc.min.js +1 -1
  25. package/dist/pwc.min.js.map +1 -1
  26. package/dist/pwc.mjs +121 -32
  27. package/dist/pwc.mjs.map +1 -1
  28. package/dist/scene.d.ts +1 -1
  29. package/package.json +14 -14
  30. package/src/app.ts +170 -15
  31. package/src/asset.ts +1 -1
  32. package/src/components/camera-component.ts +1 -1
  33. package/src/components/collision-component.ts +1 -1
  34. package/src/components/element-component.ts +1 -1
  35. package/src/components/light-component.ts +1 -1
  36. package/src/components/listener-component.ts +1 -1
  37. package/src/components/particlesystem-component.ts +1 -1
  38. package/src/components/render-component.ts +1 -1
  39. package/src/components/rigidbody-component.ts +1 -1
  40. package/src/components/screen-component.ts +1 -1
  41. package/src/components/script-component.ts +1 -1
  42. package/src/components/sound-component.ts +1 -1
  43. package/src/components/sound-slot.ts +3 -0
  44. package/src/components/splat-component.ts +1 -1
  45. package/src/entity.ts +4 -4
  46. package/src/material.ts +1 -1
  47. package/src/model.ts +1 -1
  48. package/src/module.ts +1 -1
  49. package/src/scene.ts +1 -1
package/dist/scene.d.ts CHANGED
@@ -2,7 +2,7 @@ import { Color, Scene, Vec3 } from 'playcanvas';
2
2
  import { AsyncElement } from './async-element';
3
3
  /**
4
4
  * The SceneElement interface provides properties and methods for manipulating
5
- * {@link https://developer.playcanvas.com/user-manual/engine/web-components/tags/pc-scene/ | `<pc-scene>`} elements.
5
+ * {@link https://developer.playcanvas.com/user-manual/web-components/tags/pc-scene/ | `<pc-scene>`} elements.
6
6
  * The SceneElement interface also inherits the properties and methods of the
7
7
  * {@link HTMLElement} interface.
8
8
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@playcanvas/web-components",
3
- "version": "0.2.6",
3
+ "version": "0.2.7",
4
4
  "author": "PlayCanvas <support@playcanvas.com>",
5
5
  "homepage": "https://playcanvas.com",
6
6
  "description": "Web Components for the PlayCanvas Engine",
@@ -38,27 +38,27 @@
38
38
  },
39
39
  "devDependencies": {
40
40
  "@mediapipe/tasks-vision": "0.10.21",
41
- "@playcanvas/eslint-config": "2.0.9",
42
- "@rollup/plugin-commonjs": "28.0.3",
41
+ "@playcanvas/eslint-config": "2.1.0",
42
+ "@rollup/plugin-commonjs": "28.0.6",
43
43
  "@rollup/plugin-node-resolve": "16.0.1",
44
44
  "@rollup/plugin-terser": "0.4.4",
45
- "@rollup/plugin-typescript": "12.1.2",
45
+ "@rollup/plugin-typescript": "12.1.3",
46
46
  "@tweenjs/tween.js": "25.0.0",
47
- "@typescript-eslint/eslint-plugin": "8.31.0",
48
- "@typescript-eslint/parser": "8.31.0",
49
- "concurrently": "9.1.2",
47
+ "@typescript-eslint/eslint-plugin": "8.35.0",
48
+ "@typescript-eslint/parser": "8.35.0",
49
+ "concurrently": "9.2.0",
50
50
  "earcut": "3.0.1",
51
- "eslint": "9.25.1",
52
- "eslint-import-resolver-typescript": "4.3.4",
53
- "globals": "16.0.0",
51
+ "eslint": "9.29.0",
52
+ "eslint-import-resolver-typescript": "4.4.4",
53
+ "globals": "16.2.0",
54
54
  "mp4-muxer": "5.2.1",
55
55
  "opentype.js": "1.3.4",
56
- "playcanvas": "2.7.1",
57
- "rollup": "4.40.0",
56
+ "playcanvas": "2.8.2",
57
+ "rollup": "4.44.0",
58
58
  "serve": "14.2.4",
59
59
  "tslib": "2.8.1",
60
- "typedoc": "0.28.3",
61
- "typedoc-plugin-mdn-links": "5.0.1",
60
+ "typedoc": "0.28.5",
61
+ "typedoc-plugin-mdn-links": "5.0.2",
62
62
  "typescript": "5.8.3"
63
63
  }
64
64
  }
package/src/app.ts CHANGED
@@ -1,4 +1,67 @@
1
- import { Application, CameraComponent, FILLMODE_FILL_WINDOW, GraphNode, Keyboard, Mouse, Picker, RESOLUTION_AUTO } from 'playcanvas';
1
+ import {
2
+ AppBase,
3
+ AppOptions,
4
+ CameraComponent,
5
+ createGraphicsDevice,
6
+ FILLMODE_FILL_WINDOW,
7
+ GraphNode,
8
+ Keyboard,
9
+ Mouse,
10
+ Picker,
11
+ RESOLUTION_AUTO,
12
+ AnimComponentSystem,
13
+ AnimationComponentSystem,
14
+ AudioListenerComponentSystem,
15
+ ButtonComponentSystem,
16
+ CameraComponentSystem,
17
+ CollisionComponentSystem,
18
+ ElementComponentSystem,
19
+ GSplatComponentSystem,
20
+ JointComponentSystem,
21
+ LayoutChildComponentSystem,
22
+ LayoutGroupComponentSystem,
23
+ LightComponentSystem,
24
+ ModelComponentSystem,
25
+ ParticleSystemComponentSystem,
26
+ RenderComponentSystem,
27
+ RigidBodyComponentSystem,
28
+ ScriptComponentSystem,
29
+ ScreenComponentSystem,
30
+ ScrollbarComponentSystem,
31
+ ScrollViewComponentSystem,
32
+ SoundComponentSystem,
33
+ SpriteComponentSystem,
34
+ ZoneComponentSystem,
35
+ RenderHandler,
36
+ AnimationHandler,
37
+ AnimClipHandler,
38
+ AnimStateGraphHandler,
39
+ AudioHandler,
40
+ BinaryHandler,
41
+ ContainerHandler,
42
+ CssHandler,
43
+ CubemapHandler,
44
+ FolderHandler,
45
+ FontHandler,
46
+ GSplatHandler,
47
+ HierarchyHandler,
48
+ HtmlHandler,
49
+ JsonHandler,
50
+ MaterialHandler,
51
+ ModelHandler,
52
+ SceneHandler,
53
+ ScriptHandler,
54
+ ShaderHandler,
55
+ SpriteHandler,
56
+ TemplateHandler,
57
+ TextHandler,
58
+ TextureHandler,
59
+ TextureAtlasHandler,
60
+ BatchManager,
61
+ SoundManager,
62
+ Lightmapper,
63
+ XrManager
64
+ } from 'playcanvas';
2
65
 
3
66
  import { AssetElement } from './asset';
4
67
  import { AsyncElement } from './async-element';
@@ -8,7 +71,7 @@ import { ModuleElement } from './module';
8
71
 
9
72
  /**
10
73
  * The AppElement interface provides properties and methods for manipulating
11
- * {@link https://developer.playcanvas.com/user-manual/engine/web-components/tags/pc-app/ | `<pc-app>`} elements.
74
+ * {@link https://developer.playcanvas.com/user-manual/web-components/tags/pc-app/ | `<pc-app>`} elements.
12
75
  * The AppElement interface also inherits the properties and methods of the
13
76
  * {@link HTMLElement} interface.
14
77
  */
@@ -20,6 +83,8 @@ class AppElement extends AsyncElement {
20
83
 
21
84
  private _alpha = true;
22
85
 
86
+ private _backend: 'webgpu' | 'webgl2' | 'null' = 'webgl2';
87
+
23
88
  private _antialias = true;
24
89
 
25
90
  private _depth = true;
@@ -51,7 +116,7 @@ class AppElement extends AsyncElement {
51
116
  /**
52
117
  * The PlayCanvas application instance.
53
118
  */
54
- app: Application | null = null;
119
+ app: AppBase | null = null;
55
120
 
56
121
  /**
57
122
  * Creates a new AppElement instance.
@@ -76,18 +141,87 @@ class AppElement extends AsyncElement {
76
141
  this._canvas = document.createElement('canvas');
77
142
  this.appendChild(this._canvas);
78
143
 
79
- // Initialize the PlayCanvas application
80
- this.app = new Application(this._canvas, {
81
- graphicsDeviceOptions: {
82
- alpha: this._alpha,
83
- antialias: this._antialias,
84
- depth: this._depth,
85
- stencil: this._stencil
86
- },
87
- keyboard: new Keyboard(window),
88
- mouse: new Mouse(this._canvas)
144
+ // Configure device types based on backend selection
145
+ const backendToDeviceTypes: { [key: string]: string[] } = {
146
+ webgpu: ['webgpu', 'webgl2'], // fallback to webgl2 if webgpu not available
147
+ webgl2: ['webgl2'],
148
+ null: ['null']
149
+ };
150
+ const deviceTypes = backendToDeviceTypes[this._backend] || [];
151
+
152
+ const device = await createGraphicsDevice(this._canvas, {
153
+ // @ts-ignore - alpha needs to be documented
154
+ alpha: this._alpha,
155
+ antialias: this._antialias,
156
+ depth: this._depth,
157
+ deviceTypes: deviceTypes,
158
+ stencil: this._stencil
89
159
  });
90
- this.app.graphicsDevice.maxPixelRatio = this._highResolution ? window.devicePixelRatio : 1;
160
+ device.maxPixelRatio = this._highResolution ? window.devicePixelRatio : 1;
161
+
162
+ const createOptions = new AppOptions();
163
+ createOptions.graphicsDevice = device;
164
+ createOptions.keyboard = new Keyboard(window);
165
+ createOptions.mouse = new Mouse(this._canvas);
166
+ createOptions.componentSystems = [
167
+ AnimComponentSystem,
168
+ AnimationComponentSystem,
169
+ AudioListenerComponentSystem,
170
+ ButtonComponentSystem,
171
+ CameraComponentSystem,
172
+ CollisionComponentSystem,
173
+ ElementComponentSystem,
174
+ GSplatComponentSystem,
175
+ JointComponentSystem,
176
+ LayoutChildComponentSystem,
177
+ LayoutGroupComponentSystem,
178
+ LightComponentSystem,
179
+ ModelComponentSystem,
180
+ ParticleSystemComponentSystem,
181
+ RenderComponentSystem,
182
+ RigidBodyComponentSystem,
183
+ ScreenComponentSystem,
184
+ ScriptComponentSystem,
185
+ ScrollbarComponentSystem,
186
+ ScrollViewComponentSystem,
187
+ SoundComponentSystem,
188
+ SpriteComponentSystem,
189
+ ZoneComponentSystem
190
+ ];
191
+ createOptions.resourceHandlers = [
192
+ AnimClipHandler,
193
+ AnimationHandler,
194
+ AnimStateGraphHandler,
195
+ AudioHandler,
196
+ BinaryHandler,
197
+ CssHandler,
198
+ ContainerHandler,
199
+ CubemapHandler,
200
+ FolderHandler,
201
+ FontHandler,
202
+ GSplatHandler,
203
+ HierarchyHandler,
204
+ HtmlHandler,
205
+ JsonHandler,
206
+ MaterialHandler,
207
+ ModelHandler,
208
+ RenderHandler,
209
+ ScriptHandler,
210
+ SceneHandler,
211
+ ShaderHandler,
212
+ SpriteHandler,
213
+ TemplateHandler,
214
+ TextHandler,
215
+ TextureAtlasHandler,
216
+ TextureHandler
217
+ ];
218
+ createOptions.soundManager = new SoundManager();
219
+ createOptions.lightmapper = Lightmapper;
220
+ createOptions.batchManager = BatchManager;
221
+ createOptions.xr = XrManager;
222
+
223
+ this.app = new AppBase(this._canvas);
224
+ this.app.init(createOptions);
91
225
 
92
226
  this.app.setCanvasFillMode(FILLMODE_FILL_WINDOW);
93
227
  this.app.setCanvasResolution(RESOLUTION_AUTO);
@@ -360,6 +494,22 @@ class AppElement extends AsyncElement {
360
494
  return this._antialias;
361
495
  }
362
496
 
497
+ /**
498
+ * Sets the graphics backend.
499
+ * @param value - The graphics backend ('webgpu', 'webgl2', or 'null').
500
+ */
501
+ set backend(value: 'webgpu' | 'webgl2' | 'null') {
502
+ this._backend = value;
503
+ }
504
+
505
+ /**
506
+ * Gets the graphics backend.
507
+ * @returns The graphics backend.
508
+ */
509
+ get backend() {
510
+ return this._backend;
511
+ }
512
+
363
513
  /**
364
514
  * Sets the depth flag.
365
515
  * @param value - The depth flag.
@@ -422,7 +572,7 @@ class AppElement extends AsyncElement {
422
572
  }
423
573
 
424
574
  static get observedAttributes() {
425
- return ['alpha', 'antialias', 'depth', 'stencil', 'high-resolution'];
575
+ return ['alpha', 'antialias', 'backend', 'depth', 'stencil', 'high-resolution'];
426
576
  }
427
577
 
428
578
  attributeChangedCallback(name: string, _oldValue: string, newValue: string) {
@@ -433,6 +583,11 @@ class AppElement extends AsyncElement {
433
583
  case 'antialias':
434
584
  this.antialias = newValue !== 'false';
435
585
  break;
586
+ case 'backend':
587
+ if (newValue === 'webgpu' || newValue === 'webgl2' || newValue === 'null') {
588
+ this.backend = newValue;
589
+ }
590
+ break;
436
591
  case 'depth':
437
592
  this.depth = newValue !== 'false';
438
593
  break;
package/src/asset.ts CHANGED
@@ -63,7 +63,7 @@ const processBufferView = (
63
63
 
64
64
  /**
65
65
  * The AssetElement interface provides properties and methods for manipulating
66
- * {@link https://developer.playcanvas.com/user-manual/engine/web-components/tags/pc-asset/ | `<pc-asset>`} elements.
66
+ * {@link https://developer.playcanvas.com/user-manual/web-components/tags/pc-asset/ | `<pc-asset>`} elements.
67
67
  * The AssetElement interface also inherits the properties and methods of the
68
68
  * {@link HTMLElement} interface.
69
69
  */
@@ -15,7 +15,7 @@ const tonemaps = new Map([
15
15
 
16
16
  /**
17
17
  * The CameraComponentElement interface provides properties and methods for manipulating
18
- * {@link https://developer.playcanvas.com/user-manual/engine/web-components/tags/pc-camera/ | `<pc-camera>`} elements.
18
+ * {@link https://developer.playcanvas.com/user-manual/web-components/tags/pc-camera/ | `<pc-camera>`} elements.
19
19
  * The CameraComponentElement interface also inherits the properties and methods of the
20
20
  * {@link HTMLElement} interface.
21
21
  *
@@ -5,7 +5,7 @@ import { parseQuat, parseVec3 } from '../utils';
5
5
 
6
6
  /**
7
7
  * The CollisionComponentElement interface provides properties and methods for manipulating
8
- * {@link https://developer.playcanvas.com/user-manual/engine/web-components/tags/pc-collision/ | `<pc-collision>`} elements.
8
+ * {@link https://developer.playcanvas.com/user-manual/web-components/tags/pc-collision/ | `<pc-collision>`} elements.
9
9
  * The CollisionComponentElement interface also inherits the properties and methods of the
10
10
  * {@link HTMLElement} interface.
11
11
  *
@@ -6,7 +6,7 @@ import { parseColor, parseVec2, parseVec4 } from '../utils';
6
6
 
7
7
  /**
8
8
  * The ElementComponentElement interface provides properties and methods for manipulating
9
- * {@link https://developer.playcanvas.com/user-manual/engine/web-components/tags/pc-element/ | `<pc-element>`} elements.
9
+ * {@link https://developer.playcanvas.com/user-manual/web-components/tags/pc-element/ | `<pc-element>`} elements.
10
10
  * The ElementComponentElement interface also inherits the properties and methods of the
11
11
  * {@link HTMLElement} interface.
12
12
  *
@@ -17,7 +17,7 @@ const shadowTypes = new Map([
17
17
 
18
18
  /**
19
19
  * The LightComponentElement interface provides properties and methods for manipulating
20
- * {@link https://developer.playcanvas.com/user-manual/engine/web-components/tags/pc-light/ | `<pc-light>`} elements.
20
+ * {@link https://developer.playcanvas.com/user-manual/web-components/tags/pc-light/ | `<pc-light>`} elements.
21
21
  * The LightComponentElement interface also inherits the properties and methods of the
22
22
  * {@link HTMLElement} interface.
23
23
  *
@@ -4,7 +4,7 @@ import { ComponentElement } from './component';
4
4
 
5
5
  /**
6
6
  * The ListenerComponentElement interface provides properties and methods for manipulating
7
- * {@link https://developer.playcanvas.com/user-manual/engine/web-components/tags/pc-listener/ | `<pc-listener>`} elements.
7
+ * {@link https://developer.playcanvas.com/user-manual/web-components/tags/pc-listener/ | `<pc-listener>`} elements.
8
8
  * The ListenerComponentElement interface also inherits the properties and methods of the
9
9
  * {@link HTMLElement} interface.
10
10
  *
@@ -5,7 +5,7 @@ import { AssetElement } from '../asset';
5
5
 
6
6
  /**
7
7
  * The ParticleSystemComponentElement interface provides properties and methods for manipulating
8
- * {@link https://developer.playcanvas.com/user-manual/engine/web-components/tags/pc-particles/ | `<pc-particles>`} elements.
8
+ * {@link https://developer.playcanvas.com/user-manual/web-components/tags/pc-particles/ | `<pc-particles>`} elements.
9
9
  * The ParticleSystemComponentElement interface also inherits the properties and methods of the
10
10
  * {@link HTMLElement} interface.
11
11
  *
@@ -5,7 +5,7 @@ import { MaterialElement } from '../material';
5
5
 
6
6
  /**
7
7
  * The RenderComponentElement interface provides properties and methods for manipulating
8
- * {@link https://developer.playcanvas.com/user-manual/engine/web-components/tags/pc-render/ | `<pc-render>`} elements.
8
+ * {@link https://developer.playcanvas.com/user-manual/web-components/tags/pc-render/ | `<pc-render>`} elements.
9
9
  * The RenderComponentElement interface also inherits the properties and methods of the
10
10
  * {@link HTMLElement} interface.
11
11
  *
@@ -5,7 +5,7 @@ import { parseVec3 } from '../utils';
5
5
 
6
6
  /**
7
7
  * The RigidBodyComponentElement interface provides properties and methods for manipulating
8
- * {@link https://developer.playcanvas.com/user-manual/engine/web-components/tags/pc-rigidbody/ | `<pc-rigidbody>`} elements.
8
+ * {@link https://developer.playcanvas.com/user-manual/web-components/tags/pc-rigidbody/ | `<pc-rigidbody>`} elements.
9
9
  * The RigidBodyComponentElement interface also inherits the properties and methods of the
10
10
  * {@link HTMLElement} interface.
11
11
  *
@@ -5,7 +5,7 @@ import { parseVec2 } from '../utils';
5
5
 
6
6
  /**
7
7
  * The ScreenComponentElement interface provides properties and methods for manipulating
8
- * {@link https://developer.playcanvas.com/user-manual/engine/web-components/tags/pc-screen/ | `<pc-screen>`} elements.
8
+ * {@link https://developer.playcanvas.com/user-manual/web-components/tags/pc-screen/ | `<pc-screen>`} elements.
9
9
  * The ScreenComponentElement interface also inherits the properties and methods of the
10
10
  * {@link HTMLElement} interface.
11
11
  *
@@ -24,7 +24,7 @@ declare global {
24
24
 
25
25
  /**
26
26
  * The ScriptComponentElement interface provides properties and methods for manipulating
27
- * {@link https://developer.playcanvas.com/user-manual/engine/web-components/tags/pc-scripts/ | `<pc-scripts>`} elements.
27
+ * {@link https://developer.playcanvas.com/user-manual/web-components/tags/pc-scripts/ | `<pc-scripts>`} elements.
28
28
  * The ScriptComponentElement interface also inherits the properties and methods of the
29
29
  * {@link HTMLElement} interface.
30
30
  *
@@ -4,7 +4,7 @@ import { ComponentElement } from './component';
4
4
 
5
5
  /**
6
6
  * The SoundComponentElement interface provides properties and methods for manipulating
7
- * {@link https://developer.playcanvas.com/user-manual/engine/web-components/tags/pc-sounds/ | `<pc-sounds>`} elements.
7
+ * {@link https://developer.playcanvas.com/user-manual/web-components/tags/pc-sounds/ | `<pc-sounds>`} elements.
8
8
  * The SoundComponentElement interface also inherits the properties and methods of the
9
9
  * {@link HTMLElement} interface.
10
10
  *
@@ -50,6 +50,9 @@ class SoundSlotElement extends AsyncElement {
50
50
 
51
51
  this.soundSlot = this.soundElement!.component!.addSlot(this._name, options);
52
52
  this.asset = this._asset;
53
+ if (this._autoPlay) {
54
+ this.soundSlot!.play();
55
+ }
53
56
 
54
57
  this._onReady();
55
58
  }
@@ -5,7 +5,7 @@ import { AssetElement } from '../asset';
5
5
 
6
6
  /**
7
7
  * The SplatComponentElement interface provides properties and methods for manipulating
8
- * {@link https://developer.playcanvas.com/user-manual/engine/web-components/tags/pc-splat/ | `<pc-splat>`} elements.
8
+ * {@link https://developer.playcanvas.com/user-manual/web-components/tags/pc-splat/ | `<pc-splat>`} elements.
9
9
  * The SplatComponentElement interface also inherits the properties and methods of the
10
10
  * {@link HTMLElement} interface.
11
11
  *
package/src/entity.ts CHANGED
@@ -1,11 +1,11 @@
1
- import { Application, Entity, Vec3 } from 'playcanvas';
1
+ import { AppBase, Entity, Vec3 } from 'playcanvas';
2
2
 
3
3
  import { AsyncElement } from './async-element';
4
4
  import { parseVec3 } from './utils';
5
5
 
6
6
  /**
7
7
  * The EntityElement interface provides properties and methods for manipulating
8
- * {@link https://developer.playcanvas.com/user-manual/engine/web-components/tags/pc-entity/ | `<pc-entity>`} elements.
8
+ * {@link https://developer.playcanvas.com/user-manual/web-components/tags/pc-entity/ | `<pc-entity>`} elements.
9
9
  * The EntityElement interface also inherits the properties and methods of the
10
10
  * {@link HTMLElement} interface.
11
11
  */
@@ -50,7 +50,7 @@ class EntityElement extends AsyncElement {
50
50
  */
51
51
  entity: Entity | null = null;
52
52
 
53
- createEntity(app: Application) {
53
+ createEntity(app: AppBase) {
54
54
  // Create a new entity
55
55
  this.entity = new Entity(this.getAttribute('name') || this._name, app);
56
56
 
@@ -105,7 +105,7 @@ class EntityElement extends AsyncElement {
105
105
  });
106
106
  }
107
107
 
108
- buildHierarchy(app: Application) {
108
+ buildHierarchy(app: AppBase) {
109
109
  if (!this.entity) return;
110
110
 
111
111
  const closestEntity = this.closestEntity;
package/src/material.ts CHANGED
@@ -5,7 +5,7 @@ import { parseColor } from './utils';
5
5
 
6
6
  /**
7
7
  * The MaterialElement interface provides properties and methods for manipulating
8
- * {@link https://developer.playcanvas.com/user-manual/engine/web-components/tags/pc-material/ | `<pc-material>`} elements.
8
+ * {@link https://developer.playcanvas.com/user-manual/web-components/tags/pc-material/ | `<pc-material>`} elements.
9
9
  * The MaterialElement interface also inherits the properties and methods of the
10
10
  * {@link HTMLElement} interface.
11
11
  */
package/src/model.ts CHANGED
@@ -5,7 +5,7 @@ import { AsyncElement } from './async-element';
5
5
 
6
6
  /**
7
7
  * The ModelElement interface provides properties and methods for manipulating
8
- * {@link https://developer.playcanvas.com/user-manual/engine/web-components/tags/pc-model/ | `<pc-model>`} elements.
8
+ * {@link https://developer.playcanvas.com/user-manual/web-components/tags/pc-model/ | `<pc-model>`} elements.
9
9
  * The ModelElement interface also inherits the properties and methods of the
10
10
  * {@link HTMLElement} interface.
11
11
  */
package/src/module.ts CHANGED
@@ -2,7 +2,7 @@ import { basisInitialize, WasmModule } from 'playcanvas';
2
2
 
3
3
  /**
4
4
  * The ModuleElement interface provides properties and methods for manipulating
5
- * {@link https://developer.playcanvas.com/user-manual/engine/web-components/tags/pc-module/ | `<pc-module>`} elements.
5
+ * {@link https://developer.playcanvas.com/user-manual/web-components/tags/pc-module/ | `<pc-module>`} elements.
6
6
  * The ModuleElement interface also inherits the properties and methods of the
7
7
  * {@link HTMLElement} interface.
8
8
  */
package/src/scene.ts CHANGED
@@ -6,7 +6,7 @@ import { parseColor, parseVec3 } from './utils';
6
6
 
7
7
  /**
8
8
  * The SceneElement interface provides properties and methods for manipulating
9
- * {@link https://developer.playcanvas.com/user-manual/engine/web-components/tags/pc-scene/ | `<pc-scene>`} elements.
9
+ * {@link https://developer.playcanvas.com/user-manual/web-components/tags/pc-scene/ | `<pc-scene>`} elements.
10
10
  * The SceneElement interface also inherits the properties and methods of the
11
11
  * {@link HTMLElement} interface.
12
12
  */