Skip to content

Commit

Permalink
chore: add more descriptions for virtual entity API
Browse files Browse the repository at this point in the history
  • Loading branch information
xxshady committed Mar 14, 2024
1 parent 1a3baf2 commit 07b45fa
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
13 changes: 11 additions & 2 deletions client/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -594,17 +594,26 @@ declare module "alt-client" {
public setMeta<V extends any, K extends string = string>(key: K, value: shared.InterfaceValueByKey<ICustomBaseObjectMeta, K, V>): void;
}

/** [Documentation](https://docs.altv.mp/articles/virtualentity.html) */
export class VirtualEntityGroup extends BaseObject {
/** Creates a new Virtual Entity Group */
/**
* Creates a new Virtual Entity Group
*
* @param maxEntitiesInStream Max number of entities per player stream. [More info](https://docs.altv.mp/articles/virtualentity.html#what-is-max-number-of-entities-per-player-stream).
*/
public constructor(maxEntitiesInStream: number);

/** Returns all Virtual Entity Group instances */
public static readonly all: readonly VirtualEntityGroup[];

/** Maximum streaming range of the Virtual Entity Group */
/**
* Max number of entities per player stream.
* [More info](https://docs.altv.mp/articles/virtualentity.html#what-is-max-number-of-entities-per-player-stream).
*/
public readonly maxEntitiesInStream: number;
}

/** [Documentation](https://docs.altv.mp/articles/virtualentity.html) */
export class VirtualEntity extends WorldObject {
/** Creates a new Virtual Entity */
public constructor(group: VirtualEntityGroup, position: shared.Vector3, streamingDistance: number, data?: Record<string, any>);
Expand Down
11 changes: 8 additions & 3 deletions server/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -727,21 +727,26 @@ declare module "alt-server" {
public pos: shared.Vector3;
}

/** https://docs.altv.mp/articles/virtualentity.html */
/** [Documentation](https://docs.altv.mp/articles/virtualentity.html) */
export class VirtualEntityGroup extends BaseObject {
/** Creates a new Virtual Entity Group */
/**
* Creates a new Virtual Entity Group
*
* @param maxEntitiesInStream Max number of entities per player stream. [More info](https://docs.altv.mp/articles/virtualentity.html#what-is-max-number-of-entities-per-player-stream).
*/
public constructor(maxEntitiesInStream: number);

/** Returns all Virtual Entity Group instances */
public static readonly all: readonly VirtualEntityGroup[];

/**
* Max number of entities per player stream.
* More info: https://docs.altv.mp/articles/virtualentity.html#what-is-max-number-of-entities-per-player-stream
* [More info](https://docs.altv.mp/articles/virtualentity.html#what-is-max-number-of-entities-per-player-stream).
*/
public readonly maxEntitiesInStream: number;
}

/** [Documentation](https://docs.altv.mp/articles/virtualentity.html) */
export class VirtualEntity extends WorldObject {
/** Creates a new Virtual Entity */
public constructor(group: VirtualEntityGroup, position: shared.Vector3, streamingDistance: number, data?: Record<string, any>);
Expand Down

0 comments on commit 07b45fa

Please sign in to comment.