Tyler Hallada
4d1ef84568
Unfortunately, all of the train data has to be copied from the train web worker to the main thread on every tick so it knows the new positions of the trains to render. So every few ticks, the GC causes a little lag as it collects ~90+MB of obsolete train arrays. There's no way for the two threads to share the same data thanks to Spectre.
18 lines
313 B
TypeScript
18 lines
313 B
TypeScript
declare module '*.png';
|
|
|
|
declare module 'worker-loader!*' {
|
|
class WebpackWorker extends Worker {
|
|
constructor();
|
|
}
|
|
|
|
export default WebpackWorker;
|
|
}
|
|
|
|
declare module 'pixi.js/lib/core/math/Point' {
|
|
export default PIXI.Point;
|
|
}
|
|
|
|
declare module 'pixi.js/lib/core/text/Text' {
|
|
export default PIXI.Text;
|
|
}
|