diff --git a/src/framework/asset/asset-reference.js b/src/framework/asset/asset-reference.js index 7ece47c005e..a40bff51efe 100644 --- a/src/framework/asset/asset-reference.js +++ b/src/framework/asset/asset-reference.js @@ -1,6 +1,7 @@ /** * @import { Asset } from './asset.js' * @import { AssetRegistry } from './asset-registry.js' + * @import { EventHandle } from '../../core/event-handle.js' */ /** @@ -12,43 +13,43 @@ */ class AssetReference { /** - * @type {import('../../core/event-handle.js').EventHandle|null} + * @type {EventHandle|null} * @private */ _evtLoadById = null; /** - * @type {import('../../core/event-handle.js').EventHandle|null} + * @type {EventHandle|null} * @private */ _evtUnloadById = null; /** - * @type {import('../../core/event-handle.js').EventHandle|null} + * @type {EventHandle|null} * @private */ _evtAddById = null; /** - * @type {import('../../core/event-handle.js').EventHandle|null} + * @type {EventHandle|null} * @private */ _evtRemoveById = null; /** - * @type {import('../../core/event-handle.js').EventHandle|null} + * @type {EventHandle|null} * @private */ _evtLoadByUrl = null; /** - * @type {import('../../core/event-handle.js').EventHandle|null} + * @type {EventHandle|null} * @private */ _evtAddByUrl = null; /** - * @type {import('../../core/event-handle.js').EventHandle|null} + * @type {EventHandle|null} * @private */ _evtRemoveByUrl = null; diff --git a/src/framework/asset/asset-registry.js b/src/framework/asset/asset-registry.js index 94d51130b26..fff0d14f6c7 100644 --- a/src/framework/asset/asset-registry.js +++ b/src/framework/asset/asset-registry.js @@ -167,7 +167,7 @@ class AssetRegistry extends EventHandler { _assets = new Set(); /** - * @type {import('../handlers/loader.js').ResourceLoader} + * @type {ResourceLoader} * @private */ _loader; diff --git a/src/framework/components/anim/component-layer.js b/src/framework/components/anim/component-layer.js index b724b45604d..2297d9ad9ab 100644 --- a/src/framework/components/anim/component-layer.js +++ b/src/framework/components/anim/component-layer.js @@ -7,7 +7,6 @@ import { ANIM_LAYER_OVERWRITE } from '../../anim/controller/constants.js'; /** * @import { AnimComponent } from './component.js' * @import { AnimController } from '../../anim/controller/anim-controller.js' - * @import { Asset } from '../../asset/asset.js' */ /** diff --git a/src/framework/components/camera/component.js b/src/framework/components/camera/component.js index 8d70aaf2339..74538895550 100644 --- a/src/framework/components/camera/component.js +++ b/src/framework/components/camera/component.js @@ -9,6 +9,7 @@ import { PostEffectQueue } from './post-effect-queue.js'; * @import { CameraComponentSystem } from './system.js' * @import { Color } from '../../../core/math/color.js' * @import { Entity } from '../../entity.js' + * @import { EventHandle } from '../../../core/event-handle.js' * @import { Frustum } from '../../../core/shape/frustum.js' * @import { LayerComposition } from '../../../scene/composition/layer-composition.js' * @import { Layer } from '../../../scene/layer.js' @@ -99,19 +100,19 @@ class CameraComponent extends Component { _camera = new Camera(); /** - * @type {import('../../../core/event-handle.js').EventHandle|null} + * @type {EventHandle|null} * @private */ _evtLayersChanged = null; /** - * @type {import('../../../core/event-handle.js').EventHandle|null} + * @type {EventHandle|null} * @private */ _evtLayerAdded = null; /** - * @type {import('../../../core/event-handle.js').EventHandle|null} + * @type {EventHandle|null} * @private */ _evtLayerRemoved = null; diff --git a/src/framework/components/element/component.js b/src/framework/components/element/component.js index c8862102f85..7795455b261 100644 --- a/src/framework/components/element/component.js +++ b/src/framework/components/element/component.js @@ -20,6 +20,7 @@ import { TextElement } from './text-element.js'; * @import { Color } from '../../../core/math/color.js' * @import { ElementComponentData } from './data.js' * @import { ElementComponentSystem } from './system.js' + * @import { EventHandle } from '../../../core/event-handle.js' * @import { Font } from '../../../framework/font/font.js' * @import { Material } from '../../../scene/materials/material.js' * @import { Sprite } from '../../../scene/sprite.js' @@ -220,19 +221,19 @@ class ElementComponent extends Component { static EVENT_TOUCHCANCEL = 'touchcancel'; /** - * @type {import('../../../core/event-handle.js').EventHandle|null} + * @type {EventHandle|null} * @private */ _evtLayersChanged = null; /** - * @type {import('../../../core/event-handle.js').EventHandle|null} + * @type {EventHandle|null} * @private */ _evtLayerAdded = null; /** - * @type {import('../../../core/event-handle.js').EventHandle|null} + * @type {EventHandle|null} * @private */ _evtLayerRemoved = null; diff --git a/src/framework/components/element/image-element.js b/src/framework/components/element/image-element.js index 0abfc1badbb..935fee8f8ca 100644 --- a/src/framework/components/element/image-element.js +++ b/src/framework/components/element/image-element.js @@ -29,6 +29,7 @@ import { Asset } from '../../asset/asset.js'; /** * @import { BoundingBox } from '../../../core/shape/bounding-box.js' + * @import { EventHandle } from '../../../core/event-handle.js' * @import { Material } from '../../../scene/materials/material.js' * @import { Sprite } from '../../../scene/sprite.js' * @import { Texture } from '../../../platform/graphics/texture.js' @@ -264,7 +265,7 @@ class ImageRenderable { class ImageElement { /** - * @type {import('../../../core/event-handle.js').EventHandle|null} + * @type {EventHandle|null} * @private */ _evtSetMeshes = null; diff --git a/src/framework/components/gsplat/component.js b/src/framework/components/gsplat/component.js index 1116261e1d6..48878b099e7 100644 --- a/src/framework/components/gsplat/component.js +++ b/src/framework/components/gsplat/component.js @@ -6,6 +6,7 @@ import { Component } from '../component.js'; /** * @import { BoundingBox } from '../../../core/shape/bounding-box.js' * @import { Entity } from '../../entity.js' + * @import { EventHandle } from '../../../core/event-handle.js' * @import { GSplatComponentSystem } from './system.js' * @import { GSplatInstance } from '../../../scene/gsplat/gsplat-instance.js' * @import { Material } from '../../../scene/materials/material.js' @@ -54,19 +55,19 @@ class GSplatComponent extends Component { _materialOptions = null; /** - * @type {import('../../../core/event-handle.js').EventHandle|null} + * @type {EventHandle|null} * @private */ _evtLayersChanged = null; /** - * @type {import('../../../core/event-handle.js').EventHandle|null} + * @type {EventHandle|null} * @private */ _evtLayerAdded = null; /** - * @type {import('../../../core/event-handle.js').EventHandle|null} + * @type {EventHandle|null} * @private */ _evtLayerRemoved = null; diff --git a/src/framework/components/light/component.js b/src/framework/components/light/component.js index 01b5658a32a..c571c55b57b 100644 --- a/src/framework/components/light/component.js +++ b/src/framework/components/light/component.js @@ -7,6 +7,7 @@ import { properties } from './data.js'; /** * @import { Color } from '../../../core/math/color.js' + * @import { EventHandle } from '../../../core/event-handle.js' * @import { LightComponentData } from './data.js' * @import { Light } from '../../../scene/light.js' * @import { Texture } from '../../../platform/graphics/texture.js' @@ -42,19 +43,19 @@ import { properties } from './data.js'; */ class LightComponent extends Component { /** - * @type {import('../../../core/event-handle.js').EventHandle|null} + * @type {EventHandle|null} * @private */ _evtLayersChanged = null; /** - * @type {import('../../../core/event-handle.js').EventHandle|null} + * @type {EventHandle|null} * @private */ _evtLayerAdded = null; /** - * @type {import('../../../core/event-handle.js').EventHandle|null} + * @type {EventHandle|null} * @private */ _evtLayerRemoved = null; diff --git a/src/framework/components/model/component.js b/src/framework/components/model/component.js index d77134d76f7..5f65adf2581 100644 --- a/src/framework/components/model/component.js +++ b/src/framework/components/model/component.js @@ -11,6 +11,7 @@ import { Component } from '../component.js'; /** * @import { BoundingBox } from '../../../core/shape/bounding-box.js' * @import { Entity } from '../../entity.js' + * @import { EventHandle } from '../../../core/event-handle.js' * @import { LayerComposition } from '../../../scene/composition/layer-composition.js' * @import { Layer } from '../../../scene/layer.js' * @import { Material } from '../../../scene/materials/material.js' @@ -131,19 +132,19 @@ class ModelComponent extends Component { // #endif /** - * @type {import('../../../core/event-handle.js').EventHandle|null} + * @type {EventHandle|null} * @private */ _evtLayersChanged = null; /** - * @type {import('../../../core/event-handle.js').EventHandle|null} + * @type {EventHandle|null} * @private */ _evtLayerAdded = null; /** - * @type {import('../../../core/event-handle.js').EventHandle|null} + * @type {EventHandle|null} * @private */ _evtLayerRemoved = null; diff --git a/src/framework/components/particle-system/component.js b/src/framework/components/particle-system/component.js index 997ff04648b..f5572774a48 100644 --- a/src/framework/components/particle-system/component.js +++ b/src/framework/components/particle-system/component.js @@ -8,6 +8,7 @@ import { Component } from '../component.js'; * @import { CurveSet } from '../../../core/math/curve-set.js' * @import { Curve } from '../../../core/math/curve.js' * @import { Entity } from '../../entity.js' + * @import { EventHandle } from '../../../core/event-handle.js' * @import { ParticleSystemComponentData } from './data.js' * @import { ParticleSystemComponentSystem } from './system.js' * @import { Texture } from '../../../platform/graphics/texture.js' @@ -114,25 +115,25 @@ class ParticleSystemComponent extends Component { _drawOrder = 0; /** - * @type {import('../../../core/event-handle.js').EventHandle|null} + * @type {EventHandle|null} * @private */ _evtLayersChanged = null; /** - * @type {import('../../../core/event-handle.js').EventHandle|null} + * @type {EventHandle|null} * @private */ _evtLayerAdded = null; /** - * @type {import('../../../core/event-handle.js').EventHandle|null} + * @type {EventHandle|null} * @private */ _evtLayerRemoved = null; /** - * @type {import('../../../core/event-handle.js').EventHandle|null} + * @type {EventHandle|null} * @private */ _evtSetMeshes = null; diff --git a/src/framework/components/render/component.js b/src/framework/components/render/component.js index 8ae1fc7bb09..a32b30d2bfe 100644 --- a/src/framework/components/render/component.js +++ b/src/framework/components/render/component.js @@ -14,6 +14,7 @@ import { EntityReference } from '../../utils/entity-reference.js'; /** * @import { BoundingBox } from '../../../core/shape/bounding-box.js' * @import { Entity } from '../../entity.js' + * @import { EventHandle } from '../../../core/event-handle.js' * @import { Material } from '../../../scene/materials/material.js' * @import { RenderComponentSystem } from './system.js' */ @@ -147,25 +148,25 @@ class RenderComponent extends Component { _rootBone; /** - * @type {import('../../../core/event-handle.js').EventHandle|null} + * @type {EventHandle|null} * @private */ _evtLayersChanged = null; /** - * @type {import('../../../core/event-handle.js').EventHandle|null} + * @type {EventHandle|null} * @private */ _evtLayerAdded = null; /** - * @type {import('../../../core/event-handle.js').EventHandle|null} + * @type {EventHandle|null} * @private */ _evtLayerRemoved = null; /** - * @type {import('../../../core/event-handle.js').EventHandle|null} + * @type {EventHandle|null} * @private */ _evtSetMeshes = null; diff --git a/src/framework/components/sprite/component.js b/src/framework/components/sprite/component.js index 7abd8ebab76..ab3ba7fcc87 100644 --- a/src/framework/components/sprite/component.js +++ b/src/framework/components/sprite/component.js @@ -18,6 +18,7 @@ import { SpriteAnimationClip } from './sprite-animation-clip.js'; /** * @import { Asset } from '../../asset/asset.js' * @import { Entity } from '../../entity.js' + * @import { EventHandle } from '../../../core/event-handle.js' * @import { SpriteComponentSystem } from './system.js' * @import { Sprite } from '../../../scene/sprite.js' */ @@ -110,19 +111,19 @@ class SpriteComponent extends Component { static EVENT_LOOP = 'loop'; /** - * @type {import('../../../core/event-handle.js').EventHandle|null} + * @type {EventHandle|null} * @private */ _evtLayersChanged = null; /** - * @type {import('../../../core/event-handle.js').EventHandle|null} + * @type {EventHandle|null} * @private */ _evtLayerAdded = null; /** - * @type {import('../../../core/event-handle.js').EventHandle|null} + * @type {EventHandle|null} * @private */ _evtLayerRemoved = null; diff --git a/src/framework/components/sprite/sprite-animation-clip.js b/src/framework/components/sprite/sprite-animation-clip.js index af7e9c134fe..63c473cc3a0 100644 --- a/src/framework/components/sprite/sprite-animation-clip.js +++ b/src/framework/components/sprite/sprite-animation-clip.js @@ -4,6 +4,7 @@ import { Asset } from '../../asset/asset.js'; import { SPRITE_RENDERMODE_SIMPLE } from '../../../scene/constants.js'; /** + * @import { EventHandle } from '../../../core/event-handle.js' * @import { SpriteComponent } from './component.js' * @import { Sprite } from '../../../scene/sprite.js' */ @@ -81,7 +82,7 @@ class SpriteAnimationClip extends EventHandler { static EVENT_LOOP = 'loop'; /** - * @type {import('../../../core/event-handle.js').EventHandle|null} + * @type {EventHandle|null} * @private */ _evtSetMeshes = null; diff --git a/src/framework/script/script-type.js b/src/framework/script/script-type.js index 75b43f0a4ea..8a6e21bd903 100644 --- a/src/framework/script/script-type.js +++ b/src/framework/script/script-type.js @@ -1,6 +1,11 @@ import { ScriptAttributes } from './script-attributes.js'; import { Script } from './script.js'; +/** + * @import { AppBase } from '../app-base.js' + * @import { Entity } from '../entity.js' + */ + /** * This is the legacy format for creating PlayCanvas script returned when calling `pc.createScript()`. * You should not use this inherit from this class directly. @@ -19,10 +24,8 @@ class ScriptType extends Script { * Create a new ScriptType instance. * * @param {object} args - The input arguments object. - * @param {import('../app-base.js').AppBase} args.app - The {@link AppBase} that is running the - * script. - * @param {import('../entity.js').Entity} args.entity - The {@link Entity} that the script is - * attached to. + * @param {AppBase} args.app - The {@link AppBase} that is running the script. + * @param {Entity} args.entity - The {@link Entity} that the script is attached to. */ constructor(args) { super(args); diff --git a/src/platform/graphics/webgpu/webgpu-render-target.js b/src/platform/graphics/webgpu/webgpu-render-target.js index 090bab5a01b..2df159881f2 100644 --- a/src/platform/graphics/webgpu/webgpu-render-target.js +++ b/src/platform/graphics/webgpu/webgpu-render-target.js @@ -190,8 +190,7 @@ class WebgpuRenderTarget { * Assign a color buffer. This allows the color buffer of the main framebuffer * to be swapped each frame to a buffer provided by the context. * - * @param {import('./webgpu-graphics-device.js').WebgpuGraphicsDevice} device - The WebGPU - * graphics device. + * @param {WebgpuGraphicsDevice} device - The WebGPU graphics device. * @param {any} gpuTexture - The color buffer. */ assignColorTexture(device, gpuTexture) { diff --git a/src/scene/gsplat/gsplat.js b/src/scene/gsplat/gsplat.js index e919b454784..9fd1d5143ab 100644 --- a/src/scene/gsplat/gsplat.js +++ b/src/scene/gsplat/gsplat.js @@ -280,7 +280,7 @@ class GSplat { } /** - * @param {import('./gsplat-data.js').GSplatData} gsplatData - The source data + * @param {GSplatData} gsplatData - The source data */ updateSHData(gsplatData) { const sh1to3Data = this.sh1to3Texture.lock();