rbxts-chrono 2.0.0-experimental.7 → 2.0.0-experimental.8
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.
- package/package.json +1 -1
- package/src/index.d.ts +230 -254
package/package.json
CHANGED
package/src/index.d.ts
CHANGED
|
@@ -4,269 +4,257 @@
|
|
|
4
4
|
* @see https://github.com/Parihsz/Chrono
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
type
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
Once(callback: T, defer?: boolean): Connection;
|
|
58
|
-
Wait(defer?: boolean): LuaTuple<Parameters<T>>;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
// Snapshot types
|
|
62
|
-
interface SnapshotData<Value, Velocity> {
|
|
63
|
-
t: number;
|
|
64
|
-
value: Value;
|
|
65
|
-
velocity: Velocity;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
interface Snapshot<Value, Velocity> {
|
|
69
|
-
Push(timeStamp: number, value: Value, velocity: Velocity): void;
|
|
70
|
-
GetLatest(): SnapshotData<Value, Velocity> | undefined;
|
|
71
|
-
GetAt(at: number, bypassLock?: boolean): Value | undefined;
|
|
72
|
-
Clear(): void;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
// Entity configuration input
|
|
76
|
-
interface EntityConfigInput {
|
|
77
|
-
BUFFER: number;
|
|
78
|
-
TICK_RATE: number;
|
|
79
|
-
FULL_ROTATION?: boolean;
|
|
80
|
-
AUTO_UPDATE_POSITION?: boolean;
|
|
81
|
-
STORE_SNAPSHOTS?: boolean;
|
|
82
|
-
MODEL_REPLICATION_MODE?: ModelReplicationMode;
|
|
83
|
-
NORMAL_TICK_DISTANCE?: number;
|
|
84
|
-
HALF_TICK_DISTANCE?: number;
|
|
85
|
-
CUSTOM_INTERPOLATION?: boolean;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
// Stats interfaces
|
|
89
|
-
interface ClientStats {
|
|
90
|
-
TOTAL_ENTITIES_CULLED: number;
|
|
91
|
-
ENTITIES_MOVED_THIS_FRAME: number;
|
|
92
|
-
TOTAL_CLIENT_ENTITIES_CHECKED_THIS_FRAME: number;
|
|
93
|
-
TOTAL_CLIENT_ENTITIES: number;
|
|
94
|
-
AVG_INTERPOLATION_TIME_MS: number;
|
|
95
|
-
BYTES_RECEIVED_PER_SEC: number;
|
|
96
|
-
NEW_ENTITIES_PER_SEC: number;
|
|
97
|
-
ENTITY_CHANGES_PER_SEC: number;
|
|
98
|
-
ENTITY_REMOVALS_PER_SEC: number;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
interface ServerStats {
|
|
102
|
-
AVG_TICKER_TIME_MS: number;
|
|
103
|
-
ENTITY_GRID_UPDATE_TIME_MS: number;
|
|
104
|
-
GRID_UPDATE_SECTIONS: number;
|
|
105
|
-
NUMBER_OF_ENTITIES: number;
|
|
106
|
-
NON_TICKED: number;
|
|
107
|
-
ENTITIES_FULL_TICKED: number;
|
|
108
|
-
ENTITIES_HALF_TICKED: number;
|
|
109
|
-
REPLICATE_PLAYER_TIME_MS: number;
|
|
110
|
-
BYTES_RECEIVED_PER_SEC: number;
|
|
111
|
-
BYTES_SENT_PER_SEC: number;
|
|
112
|
-
PACKETS_SENT_PER_SEC: number;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
// Entity event names
|
|
116
|
-
type EntityEventName =
|
|
117
|
-
| "Destroying"
|
|
118
|
-
| "NetworkOwnerChanged"
|
|
119
|
-
| "PushedSnapShot"
|
|
120
|
-
| "TickChanged"
|
|
121
|
-
| "DataChanged"
|
|
122
|
-
| "Ticked"
|
|
123
|
-
| "ModelChanged"
|
|
124
|
-
| "LockChanged";
|
|
125
|
-
|
|
126
|
-
// Entity interface (data only - methods are static on EntityConstructor)
|
|
127
|
-
interface Entity {
|
|
128
|
-
/** Unique identifier for this entity */
|
|
129
|
-
readonly id: number;
|
|
130
|
-
|
|
131
|
-
/** Whether this entity is registered with the system */
|
|
132
|
-
readonly registered: boolean;
|
|
133
|
-
|
|
134
|
-
/** Whether this entity has been destroyed */
|
|
135
|
-
readonly destroyed: boolean;
|
|
136
|
-
|
|
137
|
-
/** The player who owns this entity (controls its movement) */
|
|
138
|
-
readonly networkOwner: Player | undefined;
|
|
139
|
-
|
|
140
|
-
/** Whether the current context (client/server) is the network owner */
|
|
141
|
-
readonly isContextOwner: boolean;
|
|
142
|
-
|
|
143
|
-
/** The model associated with this entity */
|
|
144
|
-
readonly model: Model | BasePart | undefined;
|
|
145
|
-
|
|
146
|
-
/** Whether replication is paused for this entity */
|
|
147
|
-
readonly paused: boolean;
|
|
148
|
-
|
|
149
|
-
/** The most recent CFrame value */
|
|
150
|
-
readonly latestCFrame: CFrame | undefined;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
interface EntityConstructor {
|
|
154
|
-
new (
|
|
155
|
-
entityConfig?: string,
|
|
156
|
-
model?: Model | BasePart | string,
|
|
157
|
-
modelReplicationMode?: ModelReplicationMode,
|
|
158
|
-
initCFrame?: CFrame,
|
|
159
|
-
): Entity;
|
|
160
|
-
|
|
161
|
-
/** Sets or changes the model for an entity */
|
|
162
|
-
SetModel: (
|
|
163
|
-
entity: Entity,
|
|
164
|
-
model?: Model | BasePart | string,
|
|
165
|
-
modelReplicationMode?: ModelReplicationMode,
|
|
166
|
-
noDestroy?: boolean,
|
|
167
|
-
) => void;
|
|
168
|
-
|
|
169
|
-
/** Sets the entity configuration type */
|
|
170
|
-
SetConfig: (entity: Entity, entityConfig: string) => void;
|
|
171
|
-
|
|
172
|
-
/** Sets the broad phase collision bounds */
|
|
173
|
-
SetBroadPhase: (entity: Entity, broadPhase?: Vector3) => void;
|
|
174
|
-
|
|
175
|
-
/** Gets custom data associated with an entity */
|
|
176
|
-
GetData: <T = unknown>(entity: Entity) => T;
|
|
177
|
-
|
|
178
|
-
/** Gets the model associated with an entity */
|
|
179
|
-
GetModel: (entity: Entity) => Model | BasePart | undefined;
|
|
180
|
-
|
|
181
|
-
/** Sets custom data for an entity */
|
|
182
|
-
SetData: (entity: Entity, data: unknown) => void;
|
|
7
|
+
declare namespace Chrono {
|
|
8
|
+
// ===== Type Aliases =====
|
|
9
|
+
export type ModelReplicationMode = "NATIVE" | "NATIVE_WITH_LOCK" | "CUSTOM";
|
|
10
|
+
export type PlayerReplicationMode = "AUTOMATIC" | "CUSTOM";
|
|
11
|
+
export type ReplicationFilterMode = "NONE" | "PLAYER_ENTITIES" | "PLAYER_CHARACTERS";
|
|
12
|
+
|
|
13
|
+
export type ConfigName =
|
|
14
|
+
| "MIN_BUFFER"
|
|
15
|
+
| "MAX_BUFFER"
|
|
16
|
+
| "SHOW_WARNINGS"
|
|
17
|
+
| "MAX_SNAPSHOT_COUNT"
|
|
18
|
+
| "CHECK_NEW_VERSION"
|
|
19
|
+
| "DEFAULT_NORMAL_TICK_DISTANCE"
|
|
20
|
+
| "DEFAULT_HALF_TICK_DISTANCE"
|
|
21
|
+
| "DEFAULT_MODEL_REPLICATION_MODE"
|
|
22
|
+
| "PLAYER_REPLICATION"
|
|
23
|
+
| "REPLICATE_DEATHS"
|
|
24
|
+
| "REPLICATE_CFRAME_SETTERS"
|
|
25
|
+
| "MAX_TOTAL_BYTES_PER_FRAME_PER_PLAYER"
|
|
26
|
+
| "SEND_FULL_ROTATION";
|
|
27
|
+
|
|
28
|
+
export type EntityEventName =
|
|
29
|
+
| "Destroying"
|
|
30
|
+
| "NetworkOwnerChanged"
|
|
31
|
+
| "PushedSnapShot"
|
|
32
|
+
| "TickChanged"
|
|
33
|
+
| "DataChanged"
|
|
34
|
+
| "Ticked"
|
|
35
|
+
| "ModelChanged"
|
|
36
|
+
| "LockChanged";
|
|
37
|
+
|
|
38
|
+
export type RuleFn = (entity: Entity, viewer: Player, viewerEntityId?: number) => boolean;
|
|
39
|
+
export type MiddleManFn = (player: Player, entity: Entity, cframe: CFrame, arriveTime: number) => boolean;
|
|
40
|
+
|
|
41
|
+
// ===== Interfaces =====
|
|
42
|
+
export interface ConfigValueMap {
|
|
43
|
+
MIN_BUFFER: number;
|
|
44
|
+
MAX_BUFFER: number;
|
|
45
|
+
SHOW_WARNINGS: boolean;
|
|
46
|
+
MAX_SNAPSHOT_COUNT: number;
|
|
47
|
+
CHECK_NEW_VERSION: boolean;
|
|
48
|
+
DEFAULT_NORMAL_TICK_DISTANCE: number;
|
|
49
|
+
DEFAULT_HALF_TICK_DISTANCE: number;
|
|
50
|
+
DEFAULT_MODEL_REPLICATION_MODE: ModelReplicationMode;
|
|
51
|
+
PLAYER_REPLICATION: PlayerReplicationMode;
|
|
52
|
+
REPLICATE_DEATHS: ReplicationFilterMode;
|
|
53
|
+
REPLICATE_CFRAME_SETTERS: ReplicationFilterMode;
|
|
54
|
+
MAX_TOTAL_BYTES_PER_FRAME_PER_PLAYER: number;
|
|
55
|
+
SEND_FULL_ROTATION: boolean;
|
|
56
|
+
}
|
|
183
57
|
|
|
184
|
-
|
|
185
|
-
|
|
58
|
+
export interface Connection {
|
|
59
|
+
Disconnect(): void;
|
|
60
|
+
Connected: boolean;
|
|
61
|
+
}
|
|
186
62
|
|
|
187
|
-
|
|
188
|
-
|
|
63
|
+
export interface ChronoEvent<T extends Callback = Callback> {
|
|
64
|
+
Connect(callback: T, defer?: boolean): Connection;
|
|
65
|
+
Once(callback: T, defer?: boolean): Connection;
|
|
66
|
+
Wait(defer?: boolean): LuaTuple<Parameters<T>>;
|
|
67
|
+
}
|
|
189
68
|
|
|
190
|
-
|
|
191
|
-
|
|
69
|
+
export interface SnapshotData<Value, Velocity> {
|
|
70
|
+
t: number;
|
|
71
|
+
value: Value;
|
|
72
|
+
velocity: Velocity;
|
|
73
|
+
}
|
|
192
74
|
|
|
193
|
-
|
|
194
|
-
|
|
75
|
+
export interface Snapshot<Value, Velocity> {
|
|
76
|
+
Push(timeStamp: number, value: Value, velocity: Velocity): void;
|
|
77
|
+
GetLatest(): SnapshotData<Value, Velocity> | undefined;
|
|
78
|
+
GetAt(at: number, bypassLock?: boolean): Value | undefined;
|
|
79
|
+
Clear(): void;
|
|
80
|
+
}
|
|
195
81
|
|
|
196
|
-
|
|
197
|
-
|
|
82
|
+
export interface EntityConfigInput {
|
|
83
|
+
BUFFER: number;
|
|
84
|
+
TICK_RATE: number;
|
|
85
|
+
FULL_ROTATION?: boolean;
|
|
86
|
+
AUTO_UPDATE_POSITION?: boolean;
|
|
87
|
+
STORE_SNAPSHOTS?: boolean;
|
|
88
|
+
MODEL_REPLICATION_MODE?: ModelReplicationMode;
|
|
89
|
+
NORMAL_TICK_DISTANCE?: number;
|
|
90
|
+
HALF_TICK_DISTANCE?: number;
|
|
91
|
+
CUSTOM_INTERPOLATION?: boolean;
|
|
92
|
+
}
|
|
198
93
|
|
|
199
|
-
|
|
200
|
-
|
|
94
|
+
export interface ClientStats {
|
|
95
|
+
TOTAL_ENTITIES_CULLED: number;
|
|
96
|
+
ENTITIES_MOVED_THIS_FRAME: number;
|
|
97
|
+
TOTAL_CLIENT_ENTITIES_CHECKED_THIS_FRAME: number;
|
|
98
|
+
TOTAL_CLIENT_ENTITIES: number;
|
|
99
|
+
AVG_INTERPOLATION_TIME_MS: number;
|
|
100
|
+
BYTES_RECEIVED_PER_SEC: number;
|
|
101
|
+
NEW_ENTITIES_PER_SEC: number;
|
|
102
|
+
ENTITY_CHANGES_PER_SEC: number;
|
|
103
|
+
ENTITY_REMOVALS_PER_SEC: number;
|
|
104
|
+
}
|
|
201
105
|
|
|
202
|
-
|
|
203
|
-
|
|
106
|
+
export interface ServerStats {
|
|
107
|
+
AVG_TICKER_TIME_MS: number;
|
|
108
|
+
ENTITY_GRID_UPDATE_TIME_MS: number;
|
|
109
|
+
GRID_UPDATE_SECTIONS: number;
|
|
110
|
+
NUMBER_OF_ENTITIES: number;
|
|
111
|
+
NON_TICKED: number;
|
|
112
|
+
ENTITIES_FULL_TICKED: number;
|
|
113
|
+
ENTITIES_HALF_TICKED: number;
|
|
114
|
+
REPLICATE_PLAYER_TIME_MS: number;
|
|
115
|
+
BYTES_RECEIVED_PER_SEC: number;
|
|
116
|
+
BYTES_SENT_PER_SEC: number;
|
|
117
|
+
PACKETS_SENT_PER_SEC: number;
|
|
118
|
+
}
|
|
204
119
|
|
|
205
|
-
|
|
206
|
-
|
|
120
|
+
export interface Entity {
|
|
121
|
+
/** Unique identifier for this entity */
|
|
122
|
+
readonly id: number;
|
|
207
123
|
|
|
208
|
-
|
|
209
|
-
|
|
124
|
+
/** Whether this entity is registered with the system */
|
|
125
|
+
readonly registered: boolean;
|
|
210
126
|
|
|
211
|
-
|
|
212
|
-
|
|
127
|
+
/** Whether this entity has been destroyed */
|
|
128
|
+
readonly destroyed: boolean;
|
|
213
129
|
|
|
214
|
-
|
|
215
|
-
|
|
130
|
+
/** The player who owns this entity (controls its movement) */
|
|
131
|
+
readonly networkOwner: Player | undefined;
|
|
216
132
|
|
|
217
|
-
|
|
218
|
-
|
|
133
|
+
/** Whether the current context (client/server) is the network owner */
|
|
134
|
+
readonly isContextOwner: boolean;
|
|
219
135
|
|
|
220
|
-
|
|
221
|
-
|
|
136
|
+
/** The model associated with this entity */
|
|
137
|
+
readonly model: Model | BasePart | undefined;
|
|
222
138
|
|
|
223
|
-
|
|
224
|
-
|
|
139
|
+
/** Whether replication is paused for this entity */
|
|
140
|
+
readonly paused: boolean;
|
|
225
141
|
|
|
226
|
-
|
|
227
|
-
|
|
142
|
+
/** The most recent CFrame value */
|
|
143
|
+
readonly latestCFrame: CFrame | undefined;
|
|
144
|
+
}
|
|
228
145
|
|
|
229
|
-
|
|
230
|
-
|
|
146
|
+
export interface EntityConstructor {
|
|
147
|
+
new (
|
|
148
|
+
entityConfig?: string,
|
|
149
|
+
model?: Model | BasePart | string,
|
|
150
|
+
modelReplicationMode?: ModelReplicationMode,
|
|
151
|
+
initCFrame?: CFrame,
|
|
152
|
+
): Entity;
|
|
231
153
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
((
|
|
235
|
-
entity: Entity,
|
|
236
|
-
name: "NetworkOwnerChanged",
|
|
237
|
-
) => ChronoEvent<(entity: Entity, newOwner: Player | undefined, prevOwner: Player | undefined) => void>) &
|
|
238
|
-
((
|
|
154
|
+
/** Sets or changes the model for an entity */
|
|
155
|
+
SetModel: (
|
|
239
156
|
entity: Entity,
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
(
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
157
|
+
model?: Model | BasePart | string,
|
|
158
|
+
modelReplicationMode?: ModelReplicationMode,
|
|
159
|
+
noDestroy?: boolean,
|
|
160
|
+
) => void;
|
|
161
|
+
|
|
162
|
+
/** Sets the entity configuration type */
|
|
163
|
+
SetConfig: (entity: Entity, entityConfig: string) => void;
|
|
164
|
+
|
|
165
|
+
/** Sets the broad phase collision bounds */
|
|
166
|
+
SetBroadPhase: (entity: Entity, broadPhase?: Vector3) => void;
|
|
167
|
+
|
|
168
|
+
/** Gets custom data associated with an entity */
|
|
169
|
+
GetData: <T = unknown>(entity: Entity) => T;
|
|
170
|
+
|
|
171
|
+
/** Gets the model associated with an entity */
|
|
172
|
+
GetModel: (entity: Entity) => Model | BasePart | undefined;
|
|
173
|
+
|
|
174
|
+
/** Sets custom data for an entity */
|
|
175
|
+
SetData: (entity: Entity, data: unknown) => void;
|
|
176
|
+
|
|
177
|
+
/** Clears the mount relationship */
|
|
178
|
+
ClearMount: (entity: Entity) => void;
|
|
179
|
+
|
|
180
|
+
/** Mounts an entity to a parent entity with optional offset */
|
|
181
|
+
SetMount: (entity: Entity, parent?: Entity, offset?: CFrame) => void;
|
|
182
|
+
|
|
183
|
+
/** Sets the network owner (player who controls this entity) */
|
|
184
|
+
SetNetworkOwner: (entity: Entity, player?: Player) => void;
|
|
185
|
+
|
|
186
|
+
/** Clears the entity's snapshot buffer */
|
|
187
|
+
Clear: (entity: Entity) => void;
|
|
188
|
+
|
|
189
|
+
/** Pauses replication for an entity */
|
|
190
|
+
PauseReplication: (entity: Entity) => void;
|
|
191
|
+
|
|
192
|
+
/** Resumes replication for an entity */
|
|
193
|
+
ResumeReplication: (entity: Entity) => void;
|
|
194
|
+
|
|
195
|
+
/** Pushes a new CFrame snapshot at the given time */
|
|
196
|
+
Push: (entity: Entity, time: number, value: CFrame) => boolean;
|
|
197
|
+
|
|
198
|
+
/** Gets the interpolated CFrame at a specific time */
|
|
199
|
+
GetAt: (entity: Entity, time: number) => CFrame | undefined;
|
|
200
|
+
|
|
201
|
+
/** Gets the target render time for interpolation */
|
|
202
|
+
GetTargetRenderTime: (entity: Entity) => number;
|
|
203
|
+
|
|
204
|
+
/** Sets whether position updates automatically */
|
|
205
|
+
SetAutoUpdatePos: (entity: Entity, autoUpdate: boolean) => void;
|
|
206
|
+
|
|
207
|
+
/** Gets the current CFrame */
|
|
208
|
+
GetCFrame: (entity: Entity) => CFrame | undefined;
|
|
209
|
+
|
|
210
|
+
/** Sets the current CFrame */
|
|
211
|
+
SetCFrame: (entity: Entity, cframe: CFrame) => void;
|
|
212
|
+
|
|
213
|
+
/** Gets the primary part of the model */
|
|
214
|
+
GetPrimaryPart: (entity: Entity) => BasePart | undefined;
|
|
215
|
+
|
|
216
|
+
/** Locks native server CFrame replication */
|
|
217
|
+
LockNativeServerCFrameReplication: (entity: Entity) => void;
|
|
218
|
+
|
|
219
|
+
/** Unlocks native server CFrame replication */
|
|
220
|
+
UnlockNativeServerCFrameReplication: (entity: Entity) => void;
|
|
221
|
+
|
|
222
|
+
/** Destroys an entity */
|
|
223
|
+
Destroy: (entity: Entity) => void;
|
|
224
|
+
|
|
225
|
+
/** Gets an event by name */
|
|
226
|
+
GetEvent: ((entity: Entity, name: "Destroying") => ChronoEvent<(entity: Entity) => void>) &
|
|
227
|
+
((
|
|
228
|
+
entity: Entity,
|
|
229
|
+
name: "NetworkOwnerChanged",
|
|
230
|
+
) => ChronoEvent<(entity: Entity, newOwner: Player | undefined, prevOwner: Player | undefined) => void>) &
|
|
231
|
+
((
|
|
232
|
+
entity: Entity,
|
|
233
|
+
name: "PushedSnapShot",
|
|
234
|
+
) => ChronoEvent<(entity: Entity, time: number, value: CFrame, isNewest: boolean) => void>) &
|
|
235
|
+
((
|
|
236
|
+
entity: Entity,
|
|
237
|
+
name: "TickChanged",
|
|
238
|
+
) => ChronoEvent<(entity: Entity, newTickType: "NONE" | "HALF" | "NORMAL") => void>) &
|
|
239
|
+
((entity: Entity, name: "DataChanged") => ChronoEvent<(entity: Entity, data: unknown) => void>) &
|
|
240
|
+
((entity: Entity, name: "Ticked") => ChronoEvent<(entity: Entity, dt: number) => void>) &
|
|
241
|
+
((
|
|
242
|
+
entity: Entity,
|
|
243
|
+
name: "ModelChanged",
|
|
244
|
+
) => ChronoEvent<
|
|
245
|
+
(entity: Entity, newModel: Model | BasePart | undefined, oldModel: Model | BasePart | undefined) => void
|
|
246
|
+
>) &
|
|
247
|
+
((entity: Entity, name: "LockChanged") => ChronoEvent<(entity: Entity, isLocked: boolean) => void>) &
|
|
248
|
+
((entity: Entity, name: EntityEventName) => ChronoEvent);
|
|
249
|
+
}
|
|
260
250
|
|
|
261
|
-
interface ReplicationRule {
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
}
|
|
251
|
+
export interface ReplicationRule {
|
|
252
|
+
filterType: "include" | "exclude";
|
|
253
|
+
filterPlayers?: Player[];
|
|
254
|
+
}
|
|
265
255
|
|
|
266
|
-
//
|
|
267
|
-
type MiddleManFn = (player: Player, entity: Entity, cframe: CFrame, arriveTime: number) => boolean;
|
|
256
|
+
// ===== Functions and Values =====
|
|
268
257
|
|
|
269
|
-
declare namespace Chrono {
|
|
270
258
|
/** Starts the Chrono system */
|
|
271
259
|
function Start(config?: ModuleScript): void;
|
|
272
260
|
|
|
@@ -401,18 +389,6 @@ declare namespace Chrono {
|
|
|
401
389
|
) => Value,
|
|
402
390
|
): Snapshot<Value, Velocity>;
|
|
403
391
|
}
|
|
404
|
-
|
|
405
|
-
// Type exports for external use
|
|
406
|
-
export type Entity = globalThis.Entity;
|
|
407
|
-
export type ChronoEvent<T extends Callback = Callback> = globalThis.ChronoEvent<T>;
|
|
408
|
-
export type Connection = globalThis.Connection;
|
|
409
|
-
export type EntityConfigInput = globalThis.EntityConfigInput;
|
|
410
|
-
export type Snapshot<Value, Velocity> = globalThis.Snapshot<Value, Velocity>;
|
|
411
|
-
export type SnapshotData<Value, Velocity> = globalThis.SnapshotData<Value, Velocity>;
|
|
412
|
-
export type ModelReplicationMode = globalThis.ModelReplicationMode;
|
|
413
|
-
export type PlayerReplicationMode = globalThis.PlayerReplicationMode;
|
|
414
|
-
export type ReplicationFilterMode = globalThis.ReplicationFilterMode;
|
|
415
|
-
export type EntityEventName = globalThis.EntityEventName;
|
|
416
392
|
}
|
|
417
393
|
|
|
418
394
|
export = Chrono;
|