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

chore: add more descriptions for virtual entity API #307

Merged
merged 1 commit into from
Mar 14, 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
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
Loading