Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eliminate all imports in JSDoc blocks #7212

Merged
merged 2 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions src/framework/asset/asset-reference.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/**
* @import { Asset } from './asset.js'
* @import { AssetRegistry } from './asset-registry.js'
* @import { EventHandle } from '../../core/event-handle.js'
*/

/**
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/framework/asset/asset-registry.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ class AssetRegistry extends EventHandler {
_assets = new Set();

/**
* @type {import('../handlers/loader.js').ResourceLoader}
* @type {ResourceLoader}
* @private
*/
_loader;
Expand Down
1 change: 0 additions & 1 deletion src/framework/components/anim/component-layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
*/

/**
Expand Down
7 changes: 4 additions & 3 deletions src/framework/components/camera/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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;
Expand Down
7 changes: 4 additions & 3 deletions src/framework/components/element/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion src/framework/components/element/image-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -264,7 +265,7 @@ class ImageRenderable {

class ImageElement {
/**
* @type {import('../../../core/event-handle.js').EventHandle|null}
* @type {EventHandle|null}
* @private
*/
_evtSetMeshes = null;
Expand Down
7 changes: 4 additions & 3 deletions src/framework/components/gsplat/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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;
Expand Down
7 changes: 4 additions & 3 deletions src/framework/components/light/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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;
Expand Down
7 changes: 4 additions & 3 deletions src/framework/components/model/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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;
Expand Down
9 changes: 5 additions & 4 deletions src/framework/components/particle-system/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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;
Expand Down
9 changes: 5 additions & 4 deletions src/framework/components/render/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
*/
Expand Down Expand Up @@ -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;
Expand Down
7 changes: 4 additions & 3 deletions src/framework/components/sprite/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
*/
Expand Down Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion src/framework/components/sprite/sprite-animation-clip.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
*/
Expand Down Expand Up @@ -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;
Expand Down
11 changes: 7 additions & 4 deletions src/framework/script/script-type.js
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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);
Expand Down
Loading
Loading