sec commit
This commit is contained in:
186
node_modules/framesync/CHANGELOG.md
generated
vendored
Normal file
186
node_modules/framesync/CHANGELOG.md
generated
vendored
Normal file
@@ -0,0 +1,186 @@
|
||||
# Changelog
|
||||
|
||||
Framesync adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
## [6.1.2] 2022-08-15
|
||||
|
||||
### Update
|
||||
|
||||
- `tslib` and `typescript`.
|
||||
|
||||
## [6.1.1] 2022-08-10
|
||||
|
||||
### Update
|
||||
|
||||
- Adding `types` to `exports` field.
|
||||
|
||||
## [6.1.0] 2021-11-24
|
||||
|
||||
### Update
|
||||
|
||||
- Updating `tslib`.
|
||||
|
||||
## [6.0.1] 2021-10-22
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixing bug where `flushSync` being called from an existing process would boot keep-alive processes off the thread.
|
||||
|
||||
## [6.0.0] 2021-09-23
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixing `exports` and `module` in `package.json`. This will break (unsupported) direct file imports.
|
||||
|
||||
## [5.3.0] 2021-03-30
|
||||
|
||||
### Added
|
||||
|
||||
- Adding `flushSync` API for manual flushing of job queues.
|
||||
|
||||
## [5.2.3] 2021-03-19
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixing `main` entry point.
|
||||
|
||||
## [5.2.2] 2021-03-19
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixing `main` entry point.
|
||||
|
||||
## [5.2.1] 2021-03-19
|
||||
|
||||
### Added
|
||||
|
||||
- Adding `exports` to `package.json`.
|
||||
|
||||
### Updated
|
||||
|
||||
- `tslib` to latest.
|
||||
|
||||
## [5.2.0] 2021-03-01
|
||||
|
||||
### Fixed
|
||||
|
||||
- Unbundling ES code to facilitate code-splitting in Webpack.
|
||||
|
||||
## [5.1.0] 2021-02-22
|
||||
|
||||
### Fixed
|
||||
|
||||
- Adding polyfill for `performance.now` for better compatibility with Node environments.
|
||||
|
||||
## [5.0.0] 2021-01-01
|
||||
|
||||
### Changed
|
||||
|
||||
- Using `performance.now` to measure polyfilled elapsed time.
|
||||
|
||||
## [4.1.0] 2020-8-24
|
||||
|
||||
### Added
|
||||
|
||||
- `preRender` step.
|
||||
|
||||
## [4.0.2] 2019-02-05
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixing rescheduling keepAlive method.
|
||||
|
||||
## [4.0.1] 2018-09-24
|
||||
|
||||
### Changed
|
||||
|
||||
- Updated README.
|
||||
|
||||
## [4.0.0] 2018-09-24
|
||||
|
||||
### Changed
|
||||
|
||||
- New API.
|
||||
- `onFrameUpdate(callback, immediate)` -> `sync.update(callback, keepAlive, immediate)`
|
||||
- `cancelOnFrameUpdate(callback)` -> `cancelSync.update(callback)`
|
||||
|
||||
### Added
|
||||
|
||||
- `keepAlive` parameter.
|
||||
|
||||
## [3.1.9] 2018-05-16
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixing Rollup config.
|
||||
|
||||
## [3.1.8] 2018-05-13
|
||||
|
||||
### Added
|
||||
|
||||
- Rollup support for outputting ES modules and UMD bundles.
|
||||
|
||||
## [3.1.7] 2018-01-04
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixing illegal invocation errors.
|
||||
|
||||
## [3.1.6] 2018-01-04
|
||||
|
||||
### Changed
|
||||
|
||||
- Using previous frame duration as default duration (for instance between active cycles).
|
||||
|
||||
## [3.1.5] 2018-01-04
|
||||
|
||||
### Changed
|
||||
|
||||
- Cleaning polyfill.
|
||||
|
||||
## [3.1.4] 2018-01-04
|
||||
|
||||
### Changed
|
||||
|
||||
- Max permitted time elapsed is now 40ms to permit 30fps max.
|
||||
- When `startRenderLoop` is fired, and the loop is not active, we set a new `currentTime`.
|
||||
|
||||
## [3.1.3] 2017-11-08
|
||||
|
||||
### Fixed
|
||||
|
||||
- Actually pointing to new declaration file.
|
||||
|
||||
## [3.1.2] 2017-11-08
|
||||
|
||||
### Fixed
|
||||
|
||||
- Pointing to new declaration file.
|
||||
|
||||
## [3.1.1] 2017-11-08
|
||||
|
||||
### Fixed
|
||||
|
||||
- Automatically exporting declaration file.
|
||||
|
||||
## [3.1.0] 2017-11-08
|
||||
|
||||
### Added
|
||||
|
||||
- Added optional `true` flag to `schedule`. This will schedule a job to run at the end of the current frame step.
|
||||
|
||||
## [3.0.0] 2017-08-28
|
||||
|
||||
- `currentFrameTimestamp` becomes `currentFrameTime` for symmetry with `currentTime`.
|
||||
|
||||
## [2.0.1] 2017-08-26
|
||||
|
||||
### Added
|
||||
|
||||
- Changelog and Readme.
|
||||
|
||||
## [2.0.0] 2017-08-26
|
||||
|
||||
### Added
|
||||
|
||||
- First publish.
|
||||
21
node_modules/framesync/LICENSE.md
generated
vendored
Normal file
21
node_modules/framesync/LICENSE.md
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright © 2019 Framer BV
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
97
node_modules/framesync/README.md
generated
vendored
Normal file
97
node_modules/framesync/README.md
generated
vendored
Normal file
@@ -0,0 +1,97 @@
|
||||
# Framesync
|
||||
|
||||
A tiny frame scheduler for performantly batching reads, updates and renders.
|
||||
|
||||
Segregating actions that read and write to the DOM will avoid [layout thrashing](https://developers.google.com/web/fundamentals/performance/rendering/avoid-large-complex-layouts-and-layout-thrashing).
|
||||
|
||||
It's also a way of ensuring order of execution across a frame. For instance, [Framer Motion](https://github.com/framer/motion) batches animations on the `update` step, and renders on the `render` step, allowing independent animation of `transform` properties.
|
||||
|
||||
## Install
|
||||
|
||||
```bash
|
||||
npm install framesync
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Framesync splits a frame into discrete `read`, `update`, `preRender`, `render` and `postRender` steps.
|
||||
|
||||
### Scheduling functions
|
||||
|
||||
Functions can be scheduled to different parts of the render loop with `sync`.
|
||||
|
||||
```javascript
|
||||
import sync from 'framesync';
|
||||
```
|
||||
|
||||
It provides four functions, one for scheduling a function to run on each part of the frame:
|
||||
|
||||
```javascript
|
||||
sync.update(() => {});
|
||||
```
|
||||
|
||||
### Frame data
|
||||
|
||||
Each function is provided data about the current frame:
|
||||
|
||||
```javascript
|
||||
sync.update(({ delta, timestamp }) => {});
|
||||
```
|
||||
|
||||
- `delta`: Time since last frame (in milliseconds)
|
||||
- `timestamp`: Timestamp of the current frame.
|
||||
|
||||
This object is recycled across frames, so values should be destructured if intended to be used asynchronously.
|
||||
|
||||
### Keep alive
|
||||
|
||||
We can run a function as an ongoing process by passing `true` as the second parameter:
|
||||
|
||||
```javascript
|
||||
let count = 0;
|
||||
|
||||
sync.update(() => count++, true);
|
||||
```
|
||||
|
||||
This will keep the process running until it's actively cancelled.
|
||||
|
||||
### Run immediately
|
||||
|
||||
The third parameter, `immediate`, can be used to sync a function on the **current frame step**.
|
||||
|
||||
By default, Framesync will schedule functions to run the next time that frame step is fired:
|
||||
|
||||
```javascript
|
||||
sync.update(({ timestamp }) => {
|
||||
// The following function will run on the subsequent frame:
|
||||
sync.update((frame) => frame.timestamp !== timestamp);
|
||||
});
|
||||
```
|
||||
|
||||
By setting `immediate` to `true`, we can add this at the end of the current step:
|
||||
|
||||
```javascript
|
||||
sync.update(({ timestamp }) => {
|
||||
// The following function will run on the **current** frame:
|
||||
sync.update(
|
||||
(frame) => frame.timestamp === timestamp,
|
||||
false,
|
||||
true
|
||||
);
|
||||
});
|
||||
```
|
||||
|
||||
### Cancelling
|
||||
|
||||
Synced processes can be cancelled with the `cancelSync` function:
|
||||
|
||||
```javascript
|
||||
import sync, { cancelSync } from 'framesync';
|
||||
|
||||
let count = 0;
|
||||
|
||||
const process = sync.render(() => {
|
||||
count++;
|
||||
if (count >= 10) cancelSync.render(process);
|
||||
}, true);
|
||||
```
|
||||
56
node_modules/framesync/dist/es/create-render-step.mjs
generated
vendored
Normal file
56
node_modules/framesync/dist/es/create-render-step.mjs
generated
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
function createRenderStep(runNextFrame) {
|
||||
let toRun = [];
|
||||
let toRunNextFrame = [];
|
||||
let numToRun = 0;
|
||||
let isProcessing = false;
|
||||
let flushNextFrame = false;
|
||||
const toKeepAlive = new WeakSet();
|
||||
const step = {
|
||||
schedule: (callback, keepAlive = false, immediate = false) => {
|
||||
const addToCurrentFrame = immediate && isProcessing;
|
||||
const buffer = addToCurrentFrame ? toRun : toRunNextFrame;
|
||||
if (keepAlive)
|
||||
toKeepAlive.add(callback);
|
||||
if (buffer.indexOf(callback) === -1) {
|
||||
buffer.push(callback);
|
||||
if (addToCurrentFrame && isProcessing)
|
||||
numToRun = toRun.length;
|
||||
}
|
||||
return callback;
|
||||
},
|
||||
cancel: (callback) => {
|
||||
const index = toRunNextFrame.indexOf(callback);
|
||||
if (index !== -1)
|
||||
toRunNextFrame.splice(index, 1);
|
||||
toKeepAlive.delete(callback);
|
||||
},
|
||||
process: (frameData) => {
|
||||
if (isProcessing) {
|
||||
flushNextFrame = true;
|
||||
return;
|
||||
}
|
||||
isProcessing = true;
|
||||
[toRun, toRunNextFrame] = [toRunNextFrame, toRun];
|
||||
toRunNextFrame.length = 0;
|
||||
numToRun = toRun.length;
|
||||
if (numToRun) {
|
||||
for (let i = 0; i < numToRun; i++) {
|
||||
const callback = toRun[i];
|
||||
callback(frameData);
|
||||
if (toKeepAlive.has(callback)) {
|
||||
step.schedule(callback);
|
||||
runNextFrame();
|
||||
}
|
||||
}
|
||||
}
|
||||
isProcessing = false;
|
||||
if (flushNextFrame) {
|
||||
flushNextFrame = false;
|
||||
step.process(frameData);
|
||||
}
|
||||
},
|
||||
};
|
||||
return step;
|
||||
}
|
||||
|
||||
export { createRenderStep };
|
||||
64
node_modules/framesync/dist/es/index.mjs
generated
vendored
Normal file
64
node_modules/framesync/dist/es/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
import { onNextFrame, defaultTimestep } from './on-next-frame.mjs';
|
||||
import { createRenderStep } from './create-render-step.mjs';
|
||||
|
||||
const maxElapsed = 40;
|
||||
let useDefaultElapsed = true;
|
||||
let runNextFrame = false;
|
||||
let isProcessing = false;
|
||||
const frame = {
|
||||
delta: 0,
|
||||
timestamp: 0,
|
||||
};
|
||||
const stepsOrder = [
|
||||
"read",
|
||||
"update",
|
||||
"preRender",
|
||||
"render",
|
||||
"postRender",
|
||||
];
|
||||
const steps = stepsOrder.reduce((acc, key) => {
|
||||
acc[key] = createRenderStep(() => (runNextFrame = true));
|
||||
return acc;
|
||||
}, {});
|
||||
const sync = stepsOrder.reduce((acc, key) => {
|
||||
const step = steps[key];
|
||||
acc[key] = (process, keepAlive = false, immediate = false) => {
|
||||
if (!runNextFrame)
|
||||
startLoop();
|
||||
return step.schedule(process, keepAlive, immediate);
|
||||
};
|
||||
return acc;
|
||||
}, {});
|
||||
const cancelSync = stepsOrder.reduce((acc, key) => {
|
||||
acc[key] = steps[key].cancel;
|
||||
return acc;
|
||||
}, {});
|
||||
const flushSync = stepsOrder.reduce((acc, key) => {
|
||||
acc[key] = () => steps[key].process(frame);
|
||||
return acc;
|
||||
}, {});
|
||||
const processStep = (stepId) => steps[stepId].process(frame);
|
||||
const processFrame = (timestamp) => {
|
||||
runNextFrame = false;
|
||||
frame.delta = useDefaultElapsed
|
||||
? defaultTimestep
|
||||
: Math.max(Math.min(timestamp - frame.timestamp, maxElapsed), 1);
|
||||
frame.timestamp = timestamp;
|
||||
isProcessing = true;
|
||||
stepsOrder.forEach(processStep);
|
||||
isProcessing = false;
|
||||
if (runNextFrame) {
|
||||
useDefaultElapsed = false;
|
||||
onNextFrame(processFrame);
|
||||
}
|
||||
};
|
||||
const startLoop = () => {
|
||||
runNextFrame = true;
|
||||
useDefaultElapsed = true;
|
||||
if (!isProcessing)
|
||||
onNextFrame(processFrame);
|
||||
};
|
||||
const getFrameData = () => frame;
|
||||
|
||||
export default sync;
|
||||
export { cancelSync, flushSync, getFrameData };
|
||||
9
node_modules/framesync/dist/es/on-next-frame.mjs
generated
vendored
Normal file
9
node_modules/framesync/dist/es/on-next-frame.mjs
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
const defaultTimestep = (1 / 60) * 1000;
|
||||
const getCurrentTime = typeof performance !== "undefined"
|
||||
? () => performance.now()
|
||||
: () => Date.now();
|
||||
const onNextFrame = typeof window !== "undefined"
|
||||
? (callback) => window.requestAnimationFrame(callback)
|
||||
: (callback) => setTimeout(() => callback(getCurrentTime()), defaultTimestep);
|
||||
|
||||
export { defaultTimestep, onNextFrame };
|
||||
130
node_modules/framesync/dist/framesync.cjs.js
generated
vendored
Normal file
130
node_modules/framesync/dist/framesync.cjs.js
generated
vendored
Normal file
@@ -0,0 +1,130 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
const defaultTimestep = (1 / 60) * 1000;
|
||||
const getCurrentTime = typeof performance !== "undefined"
|
||||
? () => performance.now()
|
||||
: () => Date.now();
|
||||
const onNextFrame = typeof window !== "undefined"
|
||||
? (callback) => window.requestAnimationFrame(callback)
|
||||
: (callback) => setTimeout(() => callback(getCurrentTime()), defaultTimestep);
|
||||
|
||||
function createRenderStep(runNextFrame) {
|
||||
let toRun = [];
|
||||
let toRunNextFrame = [];
|
||||
let numToRun = 0;
|
||||
let isProcessing = false;
|
||||
let flushNextFrame = false;
|
||||
const toKeepAlive = new WeakSet();
|
||||
const step = {
|
||||
schedule: (callback, keepAlive = false, immediate = false) => {
|
||||
const addToCurrentFrame = immediate && isProcessing;
|
||||
const buffer = addToCurrentFrame ? toRun : toRunNextFrame;
|
||||
if (keepAlive)
|
||||
toKeepAlive.add(callback);
|
||||
if (buffer.indexOf(callback) === -1) {
|
||||
buffer.push(callback);
|
||||
if (addToCurrentFrame && isProcessing)
|
||||
numToRun = toRun.length;
|
||||
}
|
||||
return callback;
|
||||
},
|
||||
cancel: (callback) => {
|
||||
const index = toRunNextFrame.indexOf(callback);
|
||||
if (index !== -1)
|
||||
toRunNextFrame.splice(index, 1);
|
||||
toKeepAlive.delete(callback);
|
||||
},
|
||||
process: (frameData) => {
|
||||
if (isProcessing) {
|
||||
flushNextFrame = true;
|
||||
return;
|
||||
}
|
||||
isProcessing = true;
|
||||
[toRun, toRunNextFrame] = [toRunNextFrame, toRun];
|
||||
toRunNextFrame.length = 0;
|
||||
numToRun = toRun.length;
|
||||
if (numToRun) {
|
||||
for (let i = 0; i < numToRun; i++) {
|
||||
const callback = toRun[i];
|
||||
callback(frameData);
|
||||
if (toKeepAlive.has(callback)) {
|
||||
step.schedule(callback);
|
||||
runNextFrame();
|
||||
}
|
||||
}
|
||||
}
|
||||
isProcessing = false;
|
||||
if (flushNextFrame) {
|
||||
flushNextFrame = false;
|
||||
step.process(frameData);
|
||||
}
|
||||
},
|
||||
};
|
||||
return step;
|
||||
}
|
||||
|
||||
const maxElapsed = 40;
|
||||
let useDefaultElapsed = true;
|
||||
let runNextFrame = false;
|
||||
let isProcessing = false;
|
||||
const frame = {
|
||||
delta: 0,
|
||||
timestamp: 0,
|
||||
};
|
||||
const stepsOrder = [
|
||||
"read",
|
||||
"update",
|
||||
"preRender",
|
||||
"render",
|
||||
"postRender",
|
||||
];
|
||||
const steps = stepsOrder.reduce((acc, key) => {
|
||||
acc[key] = createRenderStep(() => (runNextFrame = true));
|
||||
return acc;
|
||||
}, {});
|
||||
const sync = stepsOrder.reduce((acc, key) => {
|
||||
const step = steps[key];
|
||||
acc[key] = (process, keepAlive = false, immediate = false) => {
|
||||
if (!runNextFrame)
|
||||
startLoop();
|
||||
return step.schedule(process, keepAlive, immediate);
|
||||
};
|
||||
return acc;
|
||||
}, {});
|
||||
const cancelSync = stepsOrder.reduce((acc, key) => {
|
||||
acc[key] = steps[key].cancel;
|
||||
return acc;
|
||||
}, {});
|
||||
const flushSync = stepsOrder.reduce((acc, key) => {
|
||||
acc[key] = () => steps[key].process(frame);
|
||||
return acc;
|
||||
}, {});
|
||||
const processStep = (stepId) => steps[stepId].process(frame);
|
||||
const processFrame = (timestamp) => {
|
||||
runNextFrame = false;
|
||||
frame.delta = useDefaultElapsed
|
||||
? defaultTimestep
|
||||
: Math.max(Math.min(timestamp - frame.timestamp, maxElapsed), 1);
|
||||
frame.timestamp = timestamp;
|
||||
isProcessing = true;
|
||||
stepsOrder.forEach(processStep);
|
||||
isProcessing = false;
|
||||
if (runNextFrame) {
|
||||
useDefaultElapsed = false;
|
||||
onNextFrame(processFrame);
|
||||
}
|
||||
};
|
||||
const startLoop = () => {
|
||||
runNextFrame = true;
|
||||
useDefaultElapsed = true;
|
||||
if (!isProcessing)
|
||||
onNextFrame(processFrame);
|
||||
};
|
||||
const getFrameData = () => frame;
|
||||
|
||||
exports.cancelSync = cancelSync;
|
||||
exports.default = sync;
|
||||
exports.flushSync = flushSync;
|
||||
exports.getFrameData = getFrameData;
|
||||
136
node_modules/framesync/dist/framesync.js
generated
vendored
Normal file
136
node_modules/framesync/dist/framesync.js
generated
vendored
Normal file
@@ -0,0 +1,136 @@
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
||||
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.framesync = {}));
|
||||
}(this, (function (exports) { 'use strict';
|
||||
|
||||
const defaultTimestep = (1 / 60) * 1000;
|
||||
const getCurrentTime = typeof performance !== "undefined"
|
||||
? () => performance.now()
|
||||
: () => Date.now();
|
||||
const onNextFrame = typeof window !== "undefined"
|
||||
? (callback) => window.requestAnimationFrame(callback)
|
||||
: (callback) => setTimeout(() => callback(getCurrentTime()), defaultTimestep);
|
||||
|
||||
function createRenderStep(runNextFrame) {
|
||||
let toRun = [];
|
||||
let toRunNextFrame = [];
|
||||
let numToRun = 0;
|
||||
let isProcessing = false;
|
||||
let flushNextFrame = false;
|
||||
const toKeepAlive = new WeakSet();
|
||||
const step = {
|
||||
schedule: (callback, keepAlive = false, immediate = false) => {
|
||||
const addToCurrentFrame = immediate && isProcessing;
|
||||
const buffer = addToCurrentFrame ? toRun : toRunNextFrame;
|
||||
if (keepAlive)
|
||||
toKeepAlive.add(callback);
|
||||
if (buffer.indexOf(callback) === -1) {
|
||||
buffer.push(callback);
|
||||
if (addToCurrentFrame && isProcessing)
|
||||
numToRun = toRun.length;
|
||||
}
|
||||
return callback;
|
||||
},
|
||||
cancel: (callback) => {
|
||||
const index = toRunNextFrame.indexOf(callback);
|
||||
if (index !== -1)
|
||||
toRunNextFrame.splice(index, 1);
|
||||
toKeepAlive.delete(callback);
|
||||
},
|
||||
process: (frameData) => {
|
||||
if (isProcessing) {
|
||||
flushNextFrame = true;
|
||||
return;
|
||||
}
|
||||
isProcessing = true;
|
||||
[toRun, toRunNextFrame] = [toRunNextFrame, toRun];
|
||||
toRunNextFrame.length = 0;
|
||||
numToRun = toRun.length;
|
||||
if (numToRun) {
|
||||
for (let i = 0; i < numToRun; i++) {
|
||||
const callback = toRun[i];
|
||||
callback(frameData);
|
||||
if (toKeepAlive.has(callback)) {
|
||||
step.schedule(callback);
|
||||
runNextFrame();
|
||||
}
|
||||
}
|
||||
}
|
||||
isProcessing = false;
|
||||
if (flushNextFrame) {
|
||||
flushNextFrame = false;
|
||||
step.process(frameData);
|
||||
}
|
||||
},
|
||||
};
|
||||
return step;
|
||||
}
|
||||
|
||||
const maxElapsed = 40;
|
||||
let useDefaultElapsed = true;
|
||||
let runNextFrame = false;
|
||||
let isProcessing = false;
|
||||
const frame = {
|
||||
delta: 0,
|
||||
timestamp: 0,
|
||||
};
|
||||
const stepsOrder = [
|
||||
"read",
|
||||
"update",
|
||||
"preRender",
|
||||
"render",
|
||||
"postRender",
|
||||
];
|
||||
const steps = stepsOrder.reduce((acc, key) => {
|
||||
acc[key] = createRenderStep(() => (runNextFrame = true));
|
||||
return acc;
|
||||
}, {});
|
||||
const sync = stepsOrder.reduce((acc, key) => {
|
||||
const step = steps[key];
|
||||
acc[key] = (process, keepAlive = false, immediate = false) => {
|
||||
if (!runNextFrame)
|
||||
startLoop();
|
||||
return step.schedule(process, keepAlive, immediate);
|
||||
};
|
||||
return acc;
|
||||
}, {});
|
||||
const cancelSync = stepsOrder.reduce((acc, key) => {
|
||||
acc[key] = steps[key].cancel;
|
||||
return acc;
|
||||
}, {});
|
||||
const flushSync = stepsOrder.reduce((acc, key) => {
|
||||
acc[key] = () => steps[key].process(frame);
|
||||
return acc;
|
||||
}, {});
|
||||
const processStep = (stepId) => steps[stepId].process(frame);
|
||||
const processFrame = (timestamp) => {
|
||||
runNextFrame = false;
|
||||
frame.delta = useDefaultElapsed
|
||||
? defaultTimestep
|
||||
: Math.max(Math.min(timestamp - frame.timestamp, maxElapsed), 1);
|
||||
frame.timestamp = timestamp;
|
||||
isProcessing = true;
|
||||
stepsOrder.forEach(processStep);
|
||||
isProcessing = false;
|
||||
if (runNextFrame) {
|
||||
useDefaultElapsed = false;
|
||||
onNextFrame(processFrame);
|
||||
}
|
||||
};
|
||||
const startLoop = () => {
|
||||
runNextFrame = true;
|
||||
useDefaultElapsed = true;
|
||||
if (!isProcessing)
|
||||
onNextFrame(processFrame);
|
||||
};
|
||||
const getFrameData = () => frame;
|
||||
|
||||
exports.cancelSync = cancelSync;
|
||||
exports.default = sync;
|
||||
exports.flushSync = flushSync;
|
||||
exports.getFrameData = getFrameData;
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
})));
|
||||
1
node_modules/framesync/dist/framesync.min.js
generated
vendored
Normal file
1
node_modules/framesync/dist/framesync.min.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).framesync={})}(this,(function(e){"use strict";const t=1/60*1e3,n="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),o="undefined"!=typeof window?e=>window.requestAnimationFrame(e):e=>setTimeout((()=>e(n())),t);let s=!0,c=!1,d=!1;const r={delta:0,timestamp:0},a=["read","update","preRender","render","postRender"],f=a.reduce(((e,t)=>(e[t]=function(e){let t=[],n=[],o=0,s=!1,c=!1;const d=new WeakSet,r={schedule:(e,c=!1,r=!1)=>{const a=r&&s,f=a?t:n;return c&&d.add(e),-1===f.indexOf(e)&&(f.push(e),a&&s&&(o=t.length)),e},cancel:e=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1),d.delete(e)},process:a=>{if(s)c=!0;else{if(s=!0,[t,n]=[n,t],n.length=0,o=t.length,o)for(let n=0;n<o;n++){const o=t[n];o(a),d.has(o)&&(r.schedule(o),e())}s=!1,c&&(c=!1,r.process(a))}}};return r}((()=>c=!0)),e)),{}),i=a.reduce(((e,t)=>{const n=f[t];return e[t]=(e,t=!1,o=!1)=>(c||h(),n.schedule(e,t,o)),e}),{}),u=a.reduce(((e,t)=>(e[t]=f[t].cancel,e)),{}),l=a.reduce(((e,t)=>(e[t]=()=>f[t].process(r),e)),{}),p=e=>f[e].process(r),m=e=>{c=!1,r.delta=s?t:Math.max(Math.min(e-r.timestamp,40),1),r.timestamp=e,d=!0,a.forEach(p),d=!1,c&&(s=!1,o(m))},h=()=>{c=!0,s=!0,d||o(m)};e.cancelSync=u,e.default=i,e.flushSync=l,e.getFrameData=()=>r,Object.defineProperty(e,"__esModule",{value:!0})}));
|
||||
1
node_modules/framesync/lib/_tests/test.d.ts
generated
vendored
Normal file
1
node_modules/framesync/lib/_tests/test.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export {};
|
||||
126
node_modules/framesync/lib/_tests/test.js
generated
vendored
Normal file
126
node_modules/framesync/lib/_tests/test.js
generated
vendored
Normal file
@@ -0,0 +1,126 @@
|
||||
import { __awaiter } from "tslib";
|
||||
import sync, { cancelSync, flushSync } from "../";
|
||||
import { onNextFrame } from "../on-next-frame";
|
||||
describe("onNextFrame", () => {
|
||||
it("fires callback on following frame", () => {
|
||||
return new Promise((resolve) => onNextFrame(resolve));
|
||||
});
|
||||
});
|
||||
describe("sync", () => {
|
||||
it("fires callbacks in the correct order", () => {
|
||||
return new Promise((resolve, reject) => {
|
||||
const order = [];
|
||||
sync.read(() => order.push(0));
|
||||
sync.update(() => order.push(1));
|
||||
sync.preRender(() => order.push(2));
|
||||
sync.render(() => order.push(3));
|
||||
sync.postRender(() => {
|
||||
order.push(4);
|
||||
if (order[0] === 0 &&
|
||||
order[1] === 1 &&
|
||||
order[2] === 2 &&
|
||||
order[3] === 3 &&
|
||||
order[4] === 4) {
|
||||
resolve();
|
||||
}
|
||||
else {
|
||||
reject(order);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
it("cancels callbacks", () => {
|
||||
return new Promise((resolve, reject) => {
|
||||
let hasFired = false;
|
||||
const process = sync.render(() => (hasFired = true));
|
||||
sync.update(() => cancelSync.render(process));
|
||||
sync.postRender(() => (hasFired ? reject(hasFired) : resolve()));
|
||||
});
|
||||
});
|
||||
it("fires callback on current frame if scheduled with `true` within the same step", () => {
|
||||
return new Promise((resolve, reject) => {
|
||||
let v = 0;
|
||||
sync.update(({ timestamp: prevTimestamp }) => {
|
||||
v++;
|
||||
sync.update(({ timestamp }) => {
|
||||
v++;
|
||||
if (timestamp !== prevTimestamp) {
|
||||
reject(`${timestamp} ${prevTimestamp}`);
|
||||
}
|
||||
}, false, true);
|
||||
});
|
||||
sync.render(() => (v === 2 ? resolve() : reject(v)));
|
||||
});
|
||||
});
|
||||
it("fires callback on next frame if scheduled with `true` outside the same step", () => {
|
||||
return new Promise((resolve, reject) => {
|
||||
let v = 0;
|
||||
sync.update(() => v++);
|
||||
sync.update(() => v++, false, true);
|
||||
sync.render(() => (v === 2 ? resolve() : reject()));
|
||||
});
|
||||
});
|
||||
it("uses default elapsed time if first fire", () => {
|
||||
return new Promise((resolve, reject) => {
|
||||
sync.update(({ delta: defaultElapsed }) => {
|
||||
setTimeout(() => sync.update(({ delta }) => delta === defaultElapsed
|
||||
? resolve()
|
||||
: reject(defaultElapsed, delta)), 50);
|
||||
});
|
||||
});
|
||||
});
|
||||
it("correctly cancels", () => {
|
||||
return new Promise((resolve, reject) => {
|
||||
const callback = () => reject();
|
||||
sync.read(() => cancelSync.update(callback));
|
||||
sync.update(callback);
|
||||
sync.render(() => resolve());
|
||||
});
|
||||
});
|
||||
it("correctly keeps alive", () => {
|
||||
return new Promise((resolve) => {
|
||||
let v = 0;
|
||||
sync.update(() => v++, true);
|
||||
sync.render(() => v === 2 && resolve(), true);
|
||||
});
|
||||
});
|
||||
it("correctly cancels a keepAlive process", () => {
|
||||
return new Promise((resolve, reject) => {
|
||||
let updateCount = 0;
|
||||
let renderCount = 0;
|
||||
const update = sync.update(() => {
|
||||
updateCount++;
|
||||
if (updateCount === 4)
|
||||
cancelSync.update(update);
|
||||
}, true);
|
||||
sync.render(() => {
|
||||
renderCount++;
|
||||
if (renderCount === 6) {
|
||||
if (renderCount !== updateCount) {
|
||||
resolve();
|
||||
}
|
||||
else {
|
||||
reject([renderCount, updateCount]);
|
||||
}
|
||||
}
|
||||
}, true);
|
||||
});
|
||||
});
|
||||
it("correctly keeps alive after a flush", () => __awaiter(void 0, void 0, void 0, function* () {
|
||||
const promise = new Promise((resolve) => {
|
||||
let v = 0;
|
||||
sync.update(() => {
|
||||
if (v === 2)
|
||||
flushSync.update();
|
||||
}, true);
|
||||
sync.update(() => {
|
||||
v++;
|
||||
if (v > 6)
|
||||
resolve(true);
|
||||
}, true);
|
||||
});
|
||||
flushSync.update();
|
||||
return expect(promise).resolves.toBe(true);
|
||||
}));
|
||||
});
|
||||
//# sourceMappingURL=test.js.map
|
||||
1
node_modules/framesync/lib/_tests/test.js.map
generated
vendored
Normal file
1
node_modules/framesync/lib/_tests/test.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
2
node_modules/framesync/lib/create-render-step.d.ts
generated
vendored
Normal file
2
node_modules/framesync/lib/create-render-step.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import { Step } from "./types";
|
||||
export declare function createRenderStep(runNextFrame: () => void): Step;
|
||||
55
node_modules/framesync/lib/create-render-step.js
generated
vendored
Normal file
55
node_modules/framesync/lib/create-render-step.js
generated
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
export function createRenderStep(runNextFrame) {
|
||||
let toRun = [];
|
||||
let toRunNextFrame = [];
|
||||
let numToRun = 0;
|
||||
let isProcessing = false;
|
||||
let flushNextFrame = false;
|
||||
const toKeepAlive = new WeakSet();
|
||||
const step = {
|
||||
schedule: (callback, keepAlive = false, immediate = false) => {
|
||||
const addToCurrentFrame = immediate && isProcessing;
|
||||
const buffer = addToCurrentFrame ? toRun : toRunNextFrame;
|
||||
if (keepAlive)
|
||||
toKeepAlive.add(callback);
|
||||
if (buffer.indexOf(callback) === -1) {
|
||||
buffer.push(callback);
|
||||
if (addToCurrentFrame && isProcessing)
|
||||
numToRun = toRun.length;
|
||||
}
|
||||
return callback;
|
||||
},
|
||||
cancel: (callback) => {
|
||||
const index = toRunNextFrame.indexOf(callback);
|
||||
if (index !== -1)
|
||||
toRunNextFrame.splice(index, 1);
|
||||
toKeepAlive.delete(callback);
|
||||
},
|
||||
process: (frameData) => {
|
||||
if (isProcessing) {
|
||||
flushNextFrame = true;
|
||||
return;
|
||||
}
|
||||
isProcessing = true;
|
||||
[toRun, toRunNextFrame] = [toRunNextFrame, toRun];
|
||||
toRunNextFrame.length = 0;
|
||||
numToRun = toRun.length;
|
||||
if (numToRun) {
|
||||
for (let i = 0; i < numToRun; i++) {
|
||||
const callback = toRun[i];
|
||||
callback(frameData);
|
||||
if (toKeepAlive.has(callback)) {
|
||||
step.schedule(callback);
|
||||
runNextFrame();
|
||||
}
|
||||
}
|
||||
}
|
||||
isProcessing = false;
|
||||
if (flushNextFrame) {
|
||||
flushNextFrame = false;
|
||||
step.process(frameData);
|
||||
}
|
||||
},
|
||||
};
|
||||
return step;
|
||||
}
|
||||
//# sourceMappingURL=create-render-step.js.map
|
||||
1
node_modules/framesync/lib/create-render-step.js.map
generated
vendored
Normal file
1
node_modules/framesync/lib/create-render-step.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"create-render-step.js","sourceRoot":"","sources":["../src/create-render-step.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,gBAAgB,CAAC,YAAwB;IAKrD,IAAI,KAAK,GAAc,EAAE,CAAA;IACzB,IAAI,cAAc,GAAc,EAAE,CAAA;IAKlC,IAAI,QAAQ,GAAG,CAAC,CAAA;IAMhB,IAAI,YAAY,GAAG,KAAK,CAAA;IAExB,IAAI,cAAc,GAAG,KAAK,CAAA;IAK1B,MAAM,WAAW,GAAG,IAAI,OAAO,EAAW,CAAA;IAE1C,MAAM,IAAI,GAAS;QAIf,QAAQ,EAAE,CAAC,QAAQ,EAAE,SAAS,GAAG,KAAK,EAAE,SAAS,GAAG,KAAK,EAAE,EAAE;YACzD,MAAM,iBAAiB,GAAG,SAAS,IAAI,YAAY,CAAA;YACnD,MAAM,MAAM,GAAG,iBAAiB,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,cAAc,CAAA;YAEzD,IAAI,SAAS;gBAAE,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;YAGxC,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE;gBACjC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;gBAGrB,IAAI,iBAAiB,IAAI,YAAY;oBAAE,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAA;aACjE;YAED,OAAO,QAAQ,CAAA;QACnB,CAAC;QAKD,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE;YACjB,MAAM,KAAK,GAAG,cAAc,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;YAC9C,IAAI,KAAK,KAAK,CAAC,CAAC;gBAAE,cAAc,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;YAEjD,WAAW,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;QAChC,CAAC;QAKD,OAAO,EAAE,CAAC,SAAS,EAAE,EAAE;YAMnB,IAAI,YAAY,EAAE;gBACd,cAAc,GAAG,IAAI,CAAA;gBACrB,OAAM;aACT;YAED,YAAY,GAAG,IAAI,CAGlB;YAAA,CAAC,KAAK,EAAE,cAAc,CAAC,GAAG,CAAC,cAAc,EAAE,KAAK,CAAC,CAAA;YAGlD,cAAc,CAAC,MAAM,GAAG,CAAC,CAAA;YAGzB,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAA;YAEvB,IAAI,QAAQ,EAAE;gBACV,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,EAAE,CAAC,EAAE,EAAE;oBAC/B,MAAM,QAAQ,GAAG,KAAK,CAAC,CAAC,CAAC,CAAA;oBAEzB,QAAQ,CAAC,SAAS,CAAC,CAAA;oBAEnB,IAAI,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE;wBAC3B,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAA;wBACvB,YAAY,EAAE,CAAA;qBACjB;iBACJ;aACJ;YAED,YAAY,GAAG,KAAK,CAAA;YAEpB,IAAI,cAAc,EAAE;gBAChB,cAAc,GAAG,KAAK,CAAA;gBACtB,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAA;aAC1B;QACL,CAAC;KACJ,CAAA;IAED,OAAO,IAAI,CAAA;AACf,CAAC"}
|
||||
10
node_modules/framesync/lib/index.d.ts
generated
vendored
Normal file
10
node_modules/framesync/lib/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import { Process, FrameData, CancelSync, FlushSync, Sync } from "./types";
|
||||
declare const sync: Sync;
|
||||
declare const cancelSync: CancelSync;
|
||||
declare const flushSync: FlushSync;
|
||||
declare const getFrameData: () => {
|
||||
delta: number;
|
||||
timestamp: number;
|
||||
};
|
||||
export default sync;
|
||||
export { cancelSync, flushSync, getFrameData, FrameData, Process };
|
||||
63
node_modules/framesync/lib/index.js
generated
vendored
Normal file
63
node_modules/framesync/lib/index.js
generated
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
import { onNextFrame, defaultTimestep } from "./on-next-frame";
|
||||
import { createRenderStep } from "./create-render-step";
|
||||
const maxElapsed = 40;
|
||||
let useDefaultElapsed = true;
|
||||
let runNextFrame = false;
|
||||
let isProcessing = false;
|
||||
const frame = {
|
||||
delta: 0,
|
||||
timestamp: 0,
|
||||
};
|
||||
const stepsOrder = [
|
||||
"read",
|
||||
"update",
|
||||
"preRender",
|
||||
"render",
|
||||
"postRender",
|
||||
];
|
||||
const steps = stepsOrder.reduce((acc, key) => {
|
||||
acc[key] = createRenderStep(() => (runNextFrame = true));
|
||||
return acc;
|
||||
}, {});
|
||||
const sync = stepsOrder.reduce((acc, key) => {
|
||||
const step = steps[key];
|
||||
acc[key] = (process, keepAlive = false, immediate = false) => {
|
||||
if (!runNextFrame)
|
||||
startLoop();
|
||||
return step.schedule(process, keepAlive, immediate);
|
||||
};
|
||||
return acc;
|
||||
}, {});
|
||||
const cancelSync = stepsOrder.reduce((acc, key) => {
|
||||
acc[key] = steps[key].cancel;
|
||||
return acc;
|
||||
}, {});
|
||||
const flushSync = stepsOrder.reduce((acc, key) => {
|
||||
acc[key] = () => steps[key].process(frame);
|
||||
return acc;
|
||||
}, {});
|
||||
const processStep = (stepId) => steps[stepId].process(frame);
|
||||
const processFrame = (timestamp) => {
|
||||
runNextFrame = false;
|
||||
frame.delta = useDefaultElapsed
|
||||
? defaultTimestep
|
||||
: Math.max(Math.min(timestamp - frame.timestamp, maxElapsed), 1);
|
||||
frame.timestamp = timestamp;
|
||||
isProcessing = true;
|
||||
stepsOrder.forEach(processStep);
|
||||
isProcessing = false;
|
||||
if (runNextFrame) {
|
||||
useDefaultElapsed = false;
|
||||
onNextFrame(processFrame);
|
||||
}
|
||||
};
|
||||
const startLoop = () => {
|
||||
runNextFrame = true;
|
||||
useDefaultElapsed = true;
|
||||
if (!isProcessing)
|
||||
onNextFrame(processFrame);
|
||||
};
|
||||
const getFrameData = () => frame;
|
||||
export default sync;
|
||||
export { cancelSync, flushSync, getFrameData };
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
node_modules/framesync/lib/index.js.map
generated
vendored
Normal file
1
node_modules/framesync/lib/index.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAWvD,MAAM,UAAU,GAAG,EAAE,CAAA;AACrB,IAAI,iBAAiB,GAAG,IAAI,CAAA;AAC5B,IAAI,YAAY,GAAG,KAAK,CAAA;AACxB,IAAI,YAAY,GAAG,KAAK,CAAA;AAExB,MAAM,KAAK,GAAG;IACV,KAAK,EAAE,CAAC;IACR,SAAS,EAAE,CAAC;CACf,CAAA;AAED,MAAM,UAAU,GAAa;IACzB,MAAM;IACN,QAAQ;IACR,WAAW;IACX,QAAQ;IACR,YAAY;CACf,CAAA;AAED,MAAM,KAAK,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;IACzC,GAAG,CAAC,GAAG,CAAC,GAAG,gBAAgB,CAAC,GAAG,EAAE,CAAC,CAAC,YAAY,GAAG,IAAI,CAAC,CAAC,CAAA;IACxD,OAAO,GAAG,CAAA;AACd,CAAC,EAAE,EAAW,CAAC,CAAA;AAEf,MAAM,IAAI,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;IACxC,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,CAAA;IACvB,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,OAAgB,EAAE,SAAS,GAAG,KAAK,EAAE,SAAS,GAAG,KAAK,EAAE,EAAE;QAClE,IAAI,CAAC,YAAY;YAAE,SAAS,EAAE,CAAA;QAC9B,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,SAAS,EAAE,SAAS,CAAC,CAAA;IACvD,CAAC,CAAA;IACD,OAAO,GAAG,CAAA;AACd,CAAC,EAAE,EAAU,CAAC,CAAA;AAEd,MAAM,UAAU,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;IAC9C,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAA;IAC5B,OAAO,GAAG,CAAA;AACd,CAAC,EAAE,EAAgB,CAAC,CAAA;AAEpB,MAAM,SAAS,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;IAC7C,GAAG,CAAC,GAAG,CAAC,GAAG,GAAG,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IAC1C,OAAO,GAAG,CAAA;AACd,CAAC,EAAE,EAAe,CAAC,CAAA;AAEnB,MAAM,WAAW,GAAG,CAAC,MAAc,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;AAEpE,MAAM,YAAY,GAAG,CAAC,SAAiB,EAAE,EAAE;IACvC,YAAY,GAAG,KAAK,CAAA;IAEpB,KAAK,CAAC,KAAK,GAAG,iBAAiB;QAC3B,CAAC,CAAC,eAAe;QACjB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,EAAE,UAAU,CAAC,EAAE,CAAC,CAAC,CAAA;IAEpE,KAAK,CAAC,SAAS,GAAG,SAAS,CAAA;IAE3B,YAAY,GAAG,IAAI,CAAA;IACnB,UAAU,CAAC,OAAO,CAAC,WAAW,CAAC,CAAA;IAC/B,YAAY,GAAG,KAAK,CAAA;IAEpB,IAAI,YAAY,EAAE;QACd,iBAAiB,GAAG,KAAK,CAAA;QACzB,WAAW,CAAC,YAAY,CAAC,CAAA;KAC5B;AACL,CAAC,CAAA;AAED,MAAM,SAAS,GAAG,GAAG,EAAE;IACnB,YAAY,GAAG,IAAI,CAAA;IACnB,iBAAiB,GAAG,IAAI,CAAA;IAExB,IAAI,CAAC,YAAY;QAAE,WAAW,CAAC,YAAY,CAAC,CAAA;AAChD,CAAC,CAAA;AAED,MAAM,YAAY,GAAG,GAAG,EAAE,CAAC,KAAK,CAAA;AAEhC,eAAe,IAAI,CAAA;AACnB,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAsB,CAAA"}
|
||||
3
node_modules/framesync/lib/on-next-frame.d.ts
generated
vendored
Normal file
3
node_modules/framesync/lib/on-next-frame.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
export declare const defaultTimestep: number;
|
||||
export declare const onNextFrame: ((callback: FrameRequestCallback) => number) | ((callback: FrameRequestCallback) => NodeJS.Timeout);
|
||||
8
node_modules/framesync/lib/on-next-frame.js
generated
vendored
Normal file
8
node_modules/framesync/lib/on-next-frame.js
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
export const defaultTimestep = (1 / 60) * 1000;
|
||||
const getCurrentTime = typeof performance !== "undefined"
|
||||
? () => performance.now()
|
||||
: () => Date.now();
|
||||
export const onNextFrame = typeof window !== "undefined"
|
||||
? (callback) => window.requestAnimationFrame(callback)
|
||||
: (callback) => setTimeout(() => callback(getCurrentTime()), defaultTimestep);
|
||||
//# sourceMappingURL=on-next-frame.js.map
|
||||
1
node_modules/framesync/lib/on-next-frame.js.map
generated
vendored
Normal file
1
node_modules/framesync/lib/on-next-frame.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"on-next-frame.js","sourceRoot":"","sources":["../src/on-next-frame.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,IAAI,CAAA;AAE9C,MAAM,cAAc,GAChB,OAAO,WAAW,KAAK,WAAW;IAC9B,CAAC,CAAC,GAAG,EAAE,CAAC,WAAW,CAAC,GAAG,EAAE;IACzB,CAAC,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,CAAA;AAE1B,MAAM,CAAC,MAAM,WAAW,GACpB,OAAO,MAAM,KAAK,WAAW;IACzB,CAAC,CAAC,CAAC,QAA8B,EAAE,EAAE,CAC/B,MAAM,CAAC,qBAAqB,CAAC,QAAQ,CAAC;IAC5C,CAAC,CAAC,CAAC,QAA8B,EAAE,EAAE,CAC/B,UAAU,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,cAAc,EAAE,CAAC,EAAE,eAAe,CAAC,CAAA"}
|
||||
24
node_modules/framesync/lib/types.d.ts
generated
vendored
Normal file
24
node_modules/framesync/lib/types.d.ts
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
export declare type FrameData = {
|
||||
delta: number;
|
||||
timestamp: number;
|
||||
};
|
||||
export declare type Process = (data: FrameData) => void;
|
||||
export declare type Schedule = (process: Process, keepAlive?: boolean, immediate?: boolean) => Process;
|
||||
export interface Step {
|
||||
schedule: Schedule;
|
||||
cancel: (process: Process) => void;
|
||||
process: (frame: FrameData) => void;
|
||||
}
|
||||
export declare type StepId = "read" | "update" | "postUpdate" | "preRender" | "render" | "postRender";
|
||||
export declare type Sync = {
|
||||
[key in StepId]: Schedule;
|
||||
};
|
||||
export declare type Steps = {
|
||||
[key in StepId]: Step;
|
||||
};
|
||||
export declare type CancelSync = {
|
||||
[key in StepId]: (process: Process) => void;
|
||||
};
|
||||
export declare type FlushSync = {
|
||||
[key in StepId]: () => void;
|
||||
};
|
||||
1
node_modules/framesync/lib/types.js
generated
vendored
Normal file
1
node_modules/framesync/lib/types.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
//# sourceMappingURL=types.js.map
|
||||
1
node_modules/framesync/lib/types.js.map
generated
vendored
Normal file
1
node_modules/framesync/lib/types.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|
||||
15
node_modules/framesync/node_modules/tslib/CopyrightNotice.txt
generated
vendored
Normal file
15
node_modules/framesync/node_modules/tslib/CopyrightNotice.txt
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
/******************************************************************************
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
PERFORMANCE OF THIS SOFTWARE.
|
||||
***************************************************************************** */
|
||||
|
||||
12
node_modules/framesync/node_modules/tslib/LICENSE.txt
generated
vendored
Normal file
12
node_modules/framesync/node_modules/tslib/LICENSE.txt
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
PERFORMANCE OF THIS SOFTWARE.
|
||||
164
node_modules/framesync/node_modules/tslib/README.md
generated
vendored
Normal file
164
node_modules/framesync/node_modules/tslib/README.md
generated
vendored
Normal file
@@ -0,0 +1,164 @@
|
||||
# tslib
|
||||
|
||||
This is a runtime library for [TypeScript](http://www.typescriptlang.org/) that contains all of the TypeScript helper functions.
|
||||
|
||||
This library is primarily used by the `--importHelpers` flag in TypeScript.
|
||||
When using `--importHelpers`, a module that uses helper functions like `__extends` and `__assign` in the following emitted file:
|
||||
|
||||
```ts
|
||||
var __assign = (this && this.__assign) || Object.assign || function(t) {
|
||||
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
||||
s = arguments[i];
|
||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
||||
t[p] = s[p];
|
||||
}
|
||||
return t;
|
||||
};
|
||||
exports.x = {};
|
||||
exports.y = __assign({}, exports.x);
|
||||
|
||||
```
|
||||
|
||||
will instead be emitted as something like the following:
|
||||
|
||||
```ts
|
||||
var tslib_1 = require("tslib");
|
||||
exports.x = {};
|
||||
exports.y = tslib_1.__assign({}, exports.x);
|
||||
```
|
||||
|
||||
Because this can avoid duplicate declarations of things like `__extends`, `__assign`, etc., this means delivering users smaller files on average, as well as less runtime overhead.
|
||||
For optimized bundles with TypeScript, you should absolutely consider using `tslib` and `--importHelpers`.
|
||||
|
||||
# Installing
|
||||
|
||||
For the latest stable version, run:
|
||||
|
||||
## npm
|
||||
|
||||
```sh
|
||||
# TypeScript 3.9.2 or later
|
||||
npm install tslib
|
||||
|
||||
# TypeScript 3.8.4 or earlier
|
||||
npm install tslib@^1
|
||||
|
||||
# TypeScript 2.3.2 or earlier
|
||||
npm install tslib@1.6.1
|
||||
```
|
||||
|
||||
## yarn
|
||||
|
||||
```sh
|
||||
# TypeScript 3.9.2 or later
|
||||
yarn add tslib
|
||||
|
||||
# TypeScript 3.8.4 or earlier
|
||||
yarn add tslib@^1
|
||||
|
||||
# TypeScript 2.3.2 or earlier
|
||||
yarn add tslib@1.6.1
|
||||
```
|
||||
|
||||
## bower
|
||||
|
||||
```sh
|
||||
# TypeScript 3.9.2 or later
|
||||
bower install tslib
|
||||
|
||||
# TypeScript 3.8.4 or earlier
|
||||
bower install tslib@^1
|
||||
|
||||
# TypeScript 2.3.2 or earlier
|
||||
bower install tslib@1.6.1
|
||||
```
|
||||
|
||||
## JSPM
|
||||
|
||||
```sh
|
||||
# TypeScript 3.9.2 or later
|
||||
jspm install tslib
|
||||
|
||||
# TypeScript 3.8.4 or earlier
|
||||
jspm install tslib@^1
|
||||
|
||||
# TypeScript 2.3.2 or earlier
|
||||
jspm install tslib@1.6.1
|
||||
```
|
||||
|
||||
# Usage
|
||||
|
||||
Set the `importHelpers` compiler option on the command line:
|
||||
|
||||
```
|
||||
tsc --importHelpers file.ts
|
||||
```
|
||||
|
||||
or in your tsconfig.json:
|
||||
|
||||
```json
|
||||
{
|
||||
"compilerOptions": {
|
||||
"importHelpers": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### For bower and JSPM users
|
||||
|
||||
You will need to add a `paths` mapping for `tslib`, e.g. For Bower users:
|
||||
|
||||
```json
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "amd",
|
||||
"importHelpers": true,
|
||||
"baseUrl": "./",
|
||||
"paths": {
|
||||
"tslib" : ["bower_components/tslib/tslib.d.ts"]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
For JSPM users:
|
||||
|
||||
```json
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "system",
|
||||
"importHelpers": true,
|
||||
"baseUrl": "./",
|
||||
"paths": {
|
||||
"tslib" : ["jspm_packages/npm/tslib@2.x.y/tslib.d.ts"]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Deployment
|
||||
|
||||
- Choose your new version number
|
||||
- Set it in `package.json` and `bower.json`
|
||||
- Create a tag: `git tag [version]`
|
||||
- Push the tag: `git push --tags`
|
||||
- Create a [release in GitHub](https://github.com/microsoft/tslib/releases)
|
||||
- Run the [publish to npm](https://github.com/microsoft/tslib/actions?query=workflow%3A%22Publish+to+NPM%22) workflow
|
||||
|
||||
Done.
|
||||
|
||||
# Contribute
|
||||
|
||||
There are many ways to [contribute](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md) to TypeScript.
|
||||
|
||||
* [Submit bugs](https://github.com/Microsoft/TypeScript/issues) and help us verify fixes as they are checked in.
|
||||
* Review the [source code changes](https://github.com/Microsoft/TypeScript/pulls).
|
||||
* Engage with other TypeScript users and developers on [StackOverflow](http://stackoverflow.com/questions/tagged/typescript).
|
||||
* Join the [#typescript](http://twitter.com/#!/search/realtime/%23typescript) discussion on Twitter.
|
||||
* [Contribute bug fixes](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md).
|
||||
|
||||
# Documentation
|
||||
|
||||
* [Quick tutorial](http://www.typescriptlang.org/Tutorial)
|
||||
* [Programming handbook](http://www.typescriptlang.org/Handbook)
|
||||
* [Homepage](http://www.typescriptlang.org/)
|
||||
55
node_modules/framesync/node_modules/tslib/modules/index.js
generated
vendored
Normal file
55
node_modules/framesync/node_modules/tslib/modules/index.js
generated
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
import tslib from '../tslib.js';
|
||||
const {
|
||||
__extends,
|
||||
__assign,
|
||||
__rest,
|
||||
__decorate,
|
||||
__param,
|
||||
__metadata,
|
||||
__awaiter,
|
||||
__generator,
|
||||
__exportStar,
|
||||
__createBinding,
|
||||
__values,
|
||||
__read,
|
||||
__spread,
|
||||
__spreadArrays,
|
||||
__spreadArray,
|
||||
__await,
|
||||
__asyncGenerator,
|
||||
__asyncDelegator,
|
||||
__asyncValues,
|
||||
__makeTemplateObject,
|
||||
__importStar,
|
||||
__importDefault,
|
||||
__classPrivateFieldGet,
|
||||
__classPrivateFieldSet,
|
||||
__classPrivateFieldIn,
|
||||
} = tslib;
|
||||
export {
|
||||
__extends,
|
||||
__assign,
|
||||
__rest,
|
||||
__decorate,
|
||||
__param,
|
||||
__metadata,
|
||||
__awaiter,
|
||||
__generator,
|
||||
__exportStar,
|
||||
__createBinding,
|
||||
__values,
|
||||
__read,
|
||||
__spread,
|
||||
__spreadArrays,
|
||||
__spreadArray,
|
||||
__await,
|
||||
__asyncGenerator,
|
||||
__asyncDelegator,
|
||||
__asyncValues,
|
||||
__makeTemplateObject,
|
||||
__importStar,
|
||||
__importDefault,
|
||||
__classPrivateFieldGet,
|
||||
__classPrivateFieldSet,
|
||||
__classPrivateFieldIn,
|
||||
};
|
||||
3
node_modules/framesync/node_modules/tslib/modules/package.json
generated
vendored
Normal file
3
node_modules/framesync/node_modules/tslib/modules/package.json
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"type": "module"
|
||||
}
|
||||
38
node_modules/framesync/node_modules/tslib/package.json
generated
vendored
Normal file
38
node_modules/framesync/node_modules/tslib/package.json
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"name": "tslib",
|
||||
"author": "Microsoft Corp.",
|
||||
"homepage": "https://www.typescriptlang.org/",
|
||||
"version": "2.4.0",
|
||||
"license": "0BSD",
|
||||
"description": "Runtime library for TypeScript helper functions",
|
||||
"keywords": [
|
||||
"TypeScript",
|
||||
"Microsoft",
|
||||
"compiler",
|
||||
"language",
|
||||
"javascript",
|
||||
"tslib",
|
||||
"runtime"
|
||||
],
|
||||
"bugs": {
|
||||
"url": "https://github.com/Microsoft/TypeScript/issues"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Microsoft/tslib.git"
|
||||
},
|
||||
"main": "tslib.js",
|
||||
"module": "tslib.es6.js",
|
||||
"jsnext:main": "tslib.es6.js",
|
||||
"typings": "tslib.d.ts",
|
||||
"sideEffects": false,
|
||||
"exports": {
|
||||
".": {
|
||||
"module": "./tslib.es6.js",
|
||||
"import": "./modules/index.js",
|
||||
"default": "./tslib.js"
|
||||
},
|
||||
"./*": "./*",
|
||||
"./": "./"
|
||||
}
|
||||
}
|
||||
398
node_modules/framesync/node_modules/tslib/tslib.d.ts
generated
vendored
Normal file
398
node_modules/framesync/node_modules/tslib/tslib.d.ts
generated
vendored
Normal file
@@ -0,0 +1,398 @@
|
||||
/******************************************************************************
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
PERFORMANCE OF THIS SOFTWARE.
|
||||
***************************************************************************** */
|
||||
|
||||
/**
|
||||
* Used to shim class extends.
|
||||
*
|
||||
* @param d The derived class.
|
||||
* @param b The base class.
|
||||
*/
|
||||
export declare function __extends(d: Function, b: Function): void;
|
||||
|
||||
/**
|
||||
* Copy the values of all of the enumerable own properties from one or more source objects to a
|
||||
* target object. Returns the target object.
|
||||
*
|
||||
* @param t The target object to copy to.
|
||||
* @param sources One or more source objects from which to copy properties
|
||||
*/
|
||||
export declare function __assign(t: any, ...sources: any[]): any;
|
||||
|
||||
/**
|
||||
* Performs a rest spread on an object.
|
||||
*
|
||||
* @param t The source value.
|
||||
* @param propertyNames The property names excluded from the rest spread.
|
||||
*/
|
||||
export declare function __rest(t: any, propertyNames: (string | symbol)[]): any;
|
||||
|
||||
/**
|
||||
* Applies decorators to a target object
|
||||
*
|
||||
* @param decorators The set of decorators to apply.
|
||||
* @param target The target object.
|
||||
* @param key If specified, the own property to apply the decorators to.
|
||||
* @param desc The property descriptor, defaults to fetching the descriptor from the target object.
|
||||
* @experimental
|
||||
*/
|
||||
export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any;
|
||||
|
||||
/**
|
||||
* Creates an observing function decorator from a parameter decorator.
|
||||
*
|
||||
* @param paramIndex The parameter index to apply the decorator to.
|
||||
* @param decorator The parameter decorator to apply. Note that the return value is ignored.
|
||||
* @experimental
|
||||
*/
|
||||
export declare function __param(paramIndex: number, decorator: Function): Function;
|
||||
|
||||
/**
|
||||
* Creates a decorator that sets metadata.
|
||||
*
|
||||
* @param metadataKey The metadata key
|
||||
* @param metadataValue The metadata value
|
||||
* @experimental
|
||||
*/
|
||||
export declare function __metadata(metadataKey: any, metadataValue: any): Function;
|
||||
|
||||
/**
|
||||
* Converts a generator function into a pseudo-async function, by treating each `yield` as an `await`.
|
||||
*
|
||||
* @param thisArg The reference to use as the `this` value in the generator function
|
||||
* @param _arguments The optional arguments array
|
||||
* @param P The optional promise constructor argument, defaults to the `Promise` property of the global object.
|
||||
* @param generator The generator function
|
||||
*/
|
||||
export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any;
|
||||
|
||||
/**
|
||||
* Creates an Iterator object using the body as the implementation.
|
||||
*
|
||||
* @param thisArg The reference to use as the `this` value in the function
|
||||
* @param body The generator state-machine based implementation.
|
||||
*
|
||||
* @see [./docs/generator.md]
|
||||
*/
|
||||
export declare function __generator(thisArg: any, body: Function): any;
|
||||
|
||||
/**
|
||||
* Creates bindings for all enumerable properties of `m` on `exports`
|
||||
*
|
||||
* @param m The source object
|
||||
* @param exports The `exports` object.
|
||||
*/
|
||||
export declare function __exportStar(m: any, o: any): void;
|
||||
|
||||
/**
|
||||
* Creates a value iterator from an `Iterable` or `ArrayLike` object.
|
||||
*
|
||||
* @param o The object.
|
||||
* @throws {TypeError} If `o` is neither `Iterable`, nor an `ArrayLike`.
|
||||
*/
|
||||
export declare function __values(o: any): any;
|
||||
|
||||
/**
|
||||
* Reads values from an `Iterable` or `ArrayLike` object and returns the resulting array.
|
||||
*
|
||||
* @param o The object to read from.
|
||||
* @param n The maximum number of arguments to read, defaults to `Infinity`.
|
||||
*/
|
||||
export declare function __read(o: any, n?: number): any[];
|
||||
|
||||
/**
|
||||
* Creates an array from iterable spread.
|
||||
*
|
||||
* @param args The Iterable objects to spread.
|
||||
* @deprecated since TypeScript 4.2 - Use `__spreadArray`
|
||||
*/
|
||||
export declare function __spread(...args: any[][]): any[];
|
||||
|
||||
/**
|
||||
* Creates an array from array spread.
|
||||
*
|
||||
* @param args The ArrayLikes to spread into the resulting array.
|
||||
* @deprecated since TypeScript 4.2 - Use `__spreadArray`
|
||||
*/
|
||||
export declare function __spreadArrays(...args: any[][]): any[];
|
||||
|
||||
/**
|
||||
* Spreads the `from` array into the `to` array.
|
||||
*
|
||||
* @param pack Replace empty elements with `undefined`.
|
||||
*/
|
||||
export declare function __spreadArray(to: any[], from: any[], pack?: boolean): any[];
|
||||
|
||||
/**
|
||||
* Creates an object that signals to `__asyncGenerator` that it shouldn't be yielded,
|
||||
* and instead should be awaited and the resulting value passed back to the generator.
|
||||
*
|
||||
* @param v The value to await.
|
||||
*/
|
||||
export declare function __await(v: any): any;
|
||||
|
||||
/**
|
||||
* Converts a generator function into an async generator function, by using `yield __await`
|
||||
* in place of normal `await`.
|
||||
*
|
||||
* @param thisArg The reference to use as the `this` value in the generator function
|
||||
* @param _arguments The optional arguments array
|
||||
* @param generator The generator function
|
||||
*/
|
||||
export declare function __asyncGenerator(thisArg: any, _arguments: any, generator: Function): any;
|
||||
|
||||
/**
|
||||
* Used to wrap a potentially async iterator in such a way so that it wraps the result
|
||||
* of calling iterator methods of `o` in `__await` instances, and then yields the awaited values.
|
||||
*
|
||||
* @param o The potentially async iterator.
|
||||
* @returns A synchronous iterator yielding `__await` instances on every odd invocation
|
||||
* and returning the awaited `IteratorResult` passed to `next` every even invocation.
|
||||
*/
|
||||
export declare function __asyncDelegator(o: any): any;
|
||||
|
||||
/**
|
||||
* Creates a value async iterator from an `AsyncIterable`, `Iterable` or `ArrayLike` object.
|
||||
*
|
||||
* @param o The object.
|
||||
* @throws {TypeError} If `o` is neither `AsyncIterable`, `Iterable`, nor an `ArrayLike`.
|
||||
*/
|
||||
export declare function __asyncValues(o: any): any;
|
||||
|
||||
/**
|
||||
* Creates a `TemplateStringsArray` frozen object from the `cooked` and `raw` arrays.
|
||||
*
|
||||
* @param cooked The cooked possibly-sparse array.
|
||||
* @param raw The raw string content.
|
||||
*/
|
||||
export declare function __makeTemplateObject(cooked: string[], raw: string[]): TemplateStringsArray;
|
||||
|
||||
/**
|
||||
* Used to shim default and named imports in ECMAScript Modules transpiled to CommonJS.
|
||||
*
|
||||
* ```js
|
||||
* import Default, { Named, Other } from "mod";
|
||||
* // or
|
||||
* import { default as Default, Named, Other } from "mod";
|
||||
* ```
|
||||
*
|
||||
* @param mod The CommonJS module exports object.
|
||||
*/
|
||||
export declare function __importStar<T>(mod: T): T;
|
||||
|
||||
/**
|
||||
* Used to shim default imports in ECMAScript Modules transpiled to CommonJS.
|
||||
*
|
||||
* ```js
|
||||
* import Default from "mod";
|
||||
* ```
|
||||
*
|
||||
* @param mod The CommonJS module exports object.
|
||||
*/
|
||||
export declare function __importDefault<T>(mod: T): T | { default: T };
|
||||
|
||||
/**
|
||||
* Emulates reading a private instance field.
|
||||
*
|
||||
* @param receiver The instance from which to read the private field.
|
||||
* @param state A WeakMap containing the private field value for an instance.
|
||||
* @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
|
||||
*
|
||||
* @throws {TypeError} If `state` doesn't have an entry for `receiver`.
|
||||
*/
|
||||
export declare function __classPrivateFieldGet<T extends object, V>(
|
||||
receiver: T,
|
||||
state: { has(o: T): boolean, get(o: T): V | undefined },
|
||||
kind?: "f"
|
||||
): V;
|
||||
|
||||
/**
|
||||
* Emulates reading a private static field.
|
||||
*
|
||||
* @param receiver The object from which to read the private static field.
|
||||
* @param state The class constructor containing the definition of the static field.
|
||||
* @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
|
||||
* @param f The descriptor that holds the static field value.
|
||||
*
|
||||
* @throws {TypeError} If `receiver` is not `state`.
|
||||
*/
|
||||
export declare function __classPrivateFieldGet<T extends new (...args: any[]) => unknown, V>(
|
||||
receiver: T,
|
||||
state: T,
|
||||
kind: "f",
|
||||
f: { value: V }
|
||||
): V;
|
||||
|
||||
/**
|
||||
* Emulates evaluating a private instance "get" accessor.
|
||||
*
|
||||
* @param receiver The instance on which to evaluate the private "get" accessor.
|
||||
* @param state A WeakSet used to verify an instance supports the private "get" accessor.
|
||||
* @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
|
||||
* @param f The "get" accessor function to evaluate.
|
||||
*
|
||||
* @throws {TypeError} If `state` doesn't have an entry for `receiver`.
|
||||
*/
|
||||
export declare function __classPrivateFieldGet<T extends object, V>(
|
||||
receiver: T,
|
||||
state: { has(o: T): boolean },
|
||||
kind: "a",
|
||||
f: () => V
|
||||
): V;
|
||||
|
||||
/**
|
||||
* Emulates evaluating a private static "get" accessor.
|
||||
*
|
||||
* @param receiver The object on which to evaluate the private static "get" accessor.
|
||||
* @param state The class constructor containing the definition of the static "get" accessor.
|
||||
* @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
|
||||
* @param f The "get" accessor function to evaluate.
|
||||
*
|
||||
* @throws {TypeError} If `receiver` is not `state`.
|
||||
*/
|
||||
export declare function __classPrivateFieldGet<T extends new (...args: any[]) => unknown, V>(
|
||||
receiver: T,
|
||||
state: T,
|
||||
kind: "a",
|
||||
f: () => V
|
||||
): V;
|
||||
|
||||
/**
|
||||
* Emulates reading a private instance method.
|
||||
*
|
||||
* @param receiver The instance from which to read a private method.
|
||||
* @param state A WeakSet used to verify an instance supports the private method.
|
||||
* @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
|
||||
* @param f The function to return as the private instance method.
|
||||
*
|
||||
* @throws {TypeError} If `state` doesn't have an entry for `receiver`.
|
||||
*/
|
||||
export declare function __classPrivateFieldGet<T extends object, V extends (...args: any[]) => unknown>(
|
||||
receiver: T,
|
||||
state: { has(o: T): boolean },
|
||||
kind: "m",
|
||||
f: V
|
||||
): V;
|
||||
|
||||
/**
|
||||
* Emulates reading a private static method.
|
||||
*
|
||||
* @param receiver The object from which to read the private static method.
|
||||
* @param state The class constructor containing the definition of the static method.
|
||||
* @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
|
||||
* @param f The function to return as the private static method.
|
||||
*
|
||||
* @throws {TypeError} If `receiver` is not `state`.
|
||||
*/
|
||||
export declare function __classPrivateFieldGet<T extends new (...args: any[]) => unknown, V extends (...args: any[]) => unknown>(
|
||||
receiver: T,
|
||||
state: T,
|
||||
kind: "m",
|
||||
f: V
|
||||
): V;
|
||||
|
||||
/**
|
||||
* Emulates writing to a private instance field.
|
||||
*
|
||||
* @param receiver The instance on which to set a private field value.
|
||||
* @param state A WeakMap used to store the private field value for an instance.
|
||||
* @param value The value to store in the private field.
|
||||
* @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
|
||||
*
|
||||
* @throws {TypeError} If `state` doesn't have an entry for `receiver`.
|
||||
*/
|
||||
export declare function __classPrivateFieldSet<T extends object, V>(
|
||||
receiver: T,
|
||||
state: { has(o: T): boolean, set(o: T, value: V): unknown },
|
||||
value: V,
|
||||
kind?: "f"
|
||||
): V;
|
||||
|
||||
/**
|
||||
* Emulates writing to a private static field.
|
||||
*
|
||||
* @param receiver The object on which to set the private static field.
|
||||
* @param state The class constructor containing the definition of the private static field.
|
||||
* @param value The value to store in the private field.
|
||||
* @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
|
||||
* @param f The descriptor that holds the static field value.
|
||||
*
|
||||
* @throws {TypeError} If `receiver` is not `state`.
|
||||
*/
|
||||
export declare function __classPrivateFieldSet<T extends new (...args: any[]) => unknown, V>(
|
||||
receiver: T,
|
||||
state: T,
|
||||
value: V,
|
||||
kind: "f",
|
||||
f: { value: V }
|
||||
): V;
|
||||
|
||||
/**
|
||||
* Emulates writing to a private instance "set" accessor.
|
||||
*
|
||||
* @param receiver The instance on which to evaluate the private instance "set" accessor.
|
||||
* @param state A WeakSet used to verify an instance supports the private "set" accessor.
|
||||
* @param value The value to store in the private accessor.
|
||||
* @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
|
||||
* @param f The "set" accessor function to evaluate.
|
||||
*
|
||||
* @throws {TypeError} If `state` doesn't have an entry for `receiver`.
|
||||
*/
|
||||
export declare function __classPrivateFieldSet<T extends object, V>(
|
||||
receiver: T,
|
||||
state: { has(o: T): boolean },
|
||||
value: V,
|
||||
kind: "a",
|
||||
f: (v: V) => void
|
||||
): V;
|
||||
|
||||
/**
|
||||
* Emulates writing to a private static "set" accessor.
|
||||
*
|
||||
* @param receiver The object on which to evaluate the private static "set" accessor.
|
||||
* @param state The class constructor containing the definition of the static "set" accessor.
|
||||
* @param value The value to store in the private field.
|
||||
* @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
|
||||
* @param f The "set" accessor function to evaluate.
|
||||
*
|
||||
* @throws {TypeError} If `receiver` is not `state`.
|
||||
*/
|
||||
export declare function __classPrivateFieldSet<T extends new (...args: any[]) => unknown, V>(
|
||||
receiver: T,
|
||||
state: T,
|
||||
value: V,
|
||||
kind: "a",
|
||||
f: (v: V) => void
|
||||
): V;
|
||||
|
||||
/**
|
||||
* Checks for the existence of a private field/method/accessor.
|
||||
*
|
||||
* @param state The class constructor containing the static member, or the WeakMap or WeakSet associated with a private instance member.
|
||||
* @param receiver The object for which to test the presence of the private member.
|
||||
*/
|
||||
export declare function __classPrivateFieldIn(
|
||||
state: (new (...args: any[]) => unknown) | { has(o: any): boolean },
|
||||
receiver: unknown,
|
||||
): boolean;
|
||||
|
||||
/**
|
||||
* Creates a re-export binding on `object` with key `objectKey` that references `target[key]`.
|
||||
*
|
||||
* @param object The local `exports` object.
|
||||
* @param target The object to re-export from.
|
||||
* @param key The property key of `target` to re-export.
|
||||
* @param objectKey The property key to re-export as. Defaults to `key`.
|
||||
*/
|
||||
export declare function __createBinding(object: object, target: object, key: PropertyKey, objectKey?: PropertyKey): void;
|
||||
1
node_modules/framesync/node_modules/tslib/tslib.es6.html
generated
vendored
Normal file
1
node_modules/framesync/node_modules/tslib/tslib.es6.html
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<script src="tslib.es6.js"></script>
|
||||
248
node_modules/framesync/node_modules/tslib/tslib.es6.js
generated
vendored
Normal file
248
node_modules/framesync/node_modules/tslib/tslib.es6.js
generated
vendored
Normal file
@@ -0,0 +1,248 @@
|
||||
/******************************************************************************
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
PERFORMANCE OF THIS SOFTWARE.
|
||||
***************************************************************************** */
|
||||
/* global Reflect, Promise */
|
||||
|
||||
var extendStatics = function(d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
|
||||
export function __extends(d, b) {
|
||||
if (typeof b !== "function" && b !== null)
|
||||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
}
|
||||
|
||||
export var __assign = function() {
|
||||
__assign = Object.assign || function __assign(t) {
|
||||
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
||||
s = arguments[i];
|
||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
||||
}
|
||||
return t;
|
||||
}
|
||||
return __assign.apply(this, arguments);
|
||||
}
|
||||
|
||||
export function __rest(s, e) {
|
||||
var t = {};
|
||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
||||
t[p] = s[p];
|
||||
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
||||
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
||||
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
||||
t[p[i]] = s[p[i]];
|
||||
}
|
||||
return t;
|
||||
}
|
||||
|
||||
export function __decorate(decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
}
|
||||
|
||||
export function __param(paramIndex, decorator) {
|
||||
return function (target, key) { decorator(target, key, paramIndex); }
|
||||
}
|
||||
|
||||
export function __metadata(metadataKey, metadataValue) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
|
||||
}
|
||||
|
||||
export function __awaiter(thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
}
|
||||
|
||||
export function __generator(thisArg, body) {
|
||||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
||||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||
function step(op) {
|
||||
if (f) throw new TypeError("Generator is already executing.");
|
||||
while (_) try {
|
||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||
switch (op[0]) {
|
||||
case 0: case 1: t = op; break;
|
||||
case 4: _.label++; return { value: op[1], done: false };
|
||||
case 5: _.label++; y = op[1]; op = [0]; continue;
|
||||
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
||||
default:
|
||||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
||||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
||||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
||||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
||||
if (t[2]) _.ops.pop();
|
||||
_.trys.pop(); continue;
|
||||
}
|
||||
op = body.call(thisArg, _);
|
||||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
||||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
||||
}
|
||||
}
|
||||
|
||||
export var __createBinding = Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
});
|
||||
|
||||
export function __exportStar(m, o) {
|
||||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
|
||||
}
|
||||
|
||||
export function __values(o) {
|
||||
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
||||
if (m) return m.call(o);
|
||||
if (o && typeof o.length === "number") return {
|
||||
next: function () {
|
||||
if (o && i >= o.length) o = void 0;
|
||||
return { value: o && o[i++], done: !o };
|
||||
}
|
||||
};
|
||||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
||||
}
|
||||
|
||||
export function __read(o, n) {
|
||||
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
||||
if (!m) return o;
|
||||
var i = m.call(o), r, ar = [], e;
|
||||
try {
|
||||
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
||||
}
|
||||
catch (error) { e = { error: error }; }
|
||||
finally {
|
||||
try {
|
||||
if (r && !r.done && (m = i["return"])) m.call(i);
|
||||
}
|
||||
finally { if (e) throw e.error; }
|
||||
}
|
||||
return ar;
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
export function __spread() {
|
||||
for (var ar = [], i = 0; i < arguments.length; i++)
|
||||
ar = ar.concat(__read(arguments[i]));
|
||||
return ar;
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
export function __spreadArrays() {
|
||||
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
||||
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
||||
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
||||
r[k] = a[j];
|
||||
return r;
|
||||
}
|
||||
|
||||
export function __spreadArray(to, from, pack) {
|
||||
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
||||
if (ar || !(i in from)) {
|
||||
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
||||
ar[i] = from[i];
|
||||
}
|
||||
}
|
||||
return to.concat(ar || Array.prototype.slice.call(from));
|
||||
}
|
||||
|
||||
export function __await(v) {
|
||||
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
||||
}
|
||||
|
||||
export function __asyncGenerator(thisArg, _arguments, generator) {
|
||||
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
||||
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
||||
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
||||
function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
||||
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
|
||||
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
||||
function fulfill(value) { resume("next", value); }
|
||||
function reject(value) { resume("throw", value); }
|
||||
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
|
||||
}
|
||||
|
||||
export function __asyncDelegator(o) {
|
||||
var i, p;
|
||||
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
||||
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
||||
}
|
||||
|
||||
export function __asyncValues(o) {
|
||||
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
||||
var m = o[Symbol.asyncIterator], i;
|
||||
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
||||
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
||||
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
||||
}
|
||||
|
||||
export function __makeTemplateObject(cooked, raw) {
|
||||
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
||||
return cooked;
|
||||
};
|
||||
|
||||
var __setModuleDefault = Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
};
|
||||
|
||||
export function __importStar(mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
}
|
||||
|
||||
export function __importDefault(mod) {
|
||||
return (mod && mod.__esModule) ? mod : { default: mod };
|
||||
}
|
||||
|
||||
export function __classPrivateFieldGet(receiver, state, kind, f) {
|
||||
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
||||
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
||||
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
||||
}
|
||||
|
||||
export function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
||||
if (kind === "m") throw new TypeError("Private method is not writable");
|
||||
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
||||
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
||||
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
||||
}
|
||||
|
||||
export function __classPrivateFieldIn(state, receiver) {
|
||||
if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object");
|
||||
return typeof state === "function" ? receiver === state : state.has(receiver);
|
||||
}
|
||||
1
node_modules/framesync/node_modules/tslib/tslib.html
generated
vendored
Normal file
1
node_modules/framesync/node_modules/tslib/tslib.html
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<script src="tslib.js"></script>
|
||||
317
node_modules/framesync/node_modules/tslib/tslib.js
generated
vendored
Normal file
317
node_modules/framesync/node_modules/tslib/tslib.js
generated
vendored
Normal file
@@ -0,0 +1,317 @@
|
||||
/******************************************************************************
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
PERFORMANCE OF THIS SOFTWARE.
|
||||
***************************************************************************** */
|
||||
/* global global, define, System, Reflect, Promise */
|
||||
var __extends;
|
||||
var __assign;
|
||||
var __rest;
|
||||
var __decorate;
|
||||
var __param;
|
||||
var __metadata;
|
||||
var __awaiter;
|
||||
var __generator;
|
||||
var __exportStar;
|
||||
var __values;
|
||||
var __read;
|
||||
var __spread;
|
||||
var __spreadArrays;
|
||||
var __spreadArray;
|
||||
var __await;
|
||||
var __asyncGenerator;
|
||||
var __asyncDelegator;
|
||||
var __asyncValues;
|
||||
var __makeTemplateObject;
|
||||
var __importStar;
|
||||
var __importDefault;
|
||||
var __classPrivateFieldGet;
|
||||
var __classPrivateFieldSet;
|
||||
var __classPrivateFieldIn;
|
||||
var __createBinding;
|
||||
(function (factory) {
|
||||
var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {};
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); });
|
||||
}
|
||||
else if (typeof module === "object" && typeof module.exports === "object") {
|
||||
factory(createExporter(root, createExporter(module.exports)));
|
||||
}
|
||||
else {
|
||||
factory(createExporter(root));
|
||||
}
|
||||
function createExporter(exports, previous) {
|
||||
if (exports !== root) {
|
||||
if (typeof Object.create === "function") {
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
}
|
||||
else {
|
||||
exports.__esModule = true;
|
||||
}
|
||||
}
|
||||
return function (id, v) { return exports[id] = previous ? previous(id, v) : v; };
|
||||
}
|
||||
})
|
||||
(function (exporter) {
|
||||
var extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
||||
|
||||
__extends = function (d, b) {
|
||||
if (typeof b !== "function" && b !== null)
|
||||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
__assign = Object.assign || function (t) {
|
||||
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
||||
s = arguments[i];
|
||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
||||
}
|
||||
return t;
|
||||
};
|
||||
|
||||
__rest = function (s, e) {
|
||||
var t = {};
|
||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
||||
t[p] = s[p];
|
||||
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
||||
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
||||
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
||||
t[p[i]] = s[p[i]];
|
||||
}
|
||||
return t;
|
||||
};
|
||||
|
||||
__decorate = function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
|
||||
__param = function (paramIndex, decorator) {
|
||||
return function (target, key) { decorator(target, key, paramIndex); }
|
||||
};
|
||||
|
||||
__metadata = function (metadataKey, metadataValue) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
|
||||
};
|
||||
|
||||
__awaiter = function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
|
||||
__generator = function (thisArg, body) {
|
||||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
||||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||
function step(op) {
|
||||
if (f) throw new TypeError("Generator is already executing.");
|
||||
while (_) try {
|
||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||
switch (op[0]) {
|
||||
case 0: case 1: t = op; break;
|
||||
case 4: _.label++; return { value: op[1], done: false };
|
||||
case 5: _.label++; y = op[1]; op = [0]; continue;
|
||||
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
||||
default:
|
||||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
||||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
||||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
||||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
||||
if (t[2]) _.ops.pop();
|
||||
_.trys.pop(); continue;
|
||||
}
|
||||
op = body.call(thisArg, _);
|
||||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
||||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
||||
}
|
||||
};
|
||||
|
||||
__exportStar = function(m, o) {
|
||||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
|
||||
};
|
||||
|
||||
__createBinding = Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
});
|
||||
|
||||
__values = function (o) {
|
||||
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
||||
if (m) return m.call(o);
|
||||
if (o && typeof o.length === "number") return {
|
||||
next: function () {
|
||||
if (o && i >= o.length) o = void 0;
|
||||
return { value: o && o[i++], done: !o };
|
||||
}
|
||||
};
|
||||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
||||
};
|
||||
|
||||
__read = function (o, n) {
|
||||
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
||||
if (!m) return o;
|
||||
var i = m.call(o), r, ar = [], e;
|
||||
try {
|
||||
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
||||
}
|
||||
catch (error) { e = { error: error }; }
|
||||
finally {
|
||||
try {
|
||||
if (r && !r.done && (m = i["return"])) m.call(i);
|
||||
}
|
||||
finally { if (e) throw e.error; }
|
||||
}
|
||||
return ar;
|
||||
};
|
||||
|
||||
/** @deprecated */
|
||||
__spread = function () {
|
||||
for (var ar = [], i = 0; i < arguments.length; i++)
|
||||
ar = ar.concat(__read(arguments[i]));
|
||||
return ar;
|
||||
};
|
||||
|
||||
/** @deprecated */
|
||||
__spreadArrays = function () {
|
||||
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
||||
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
||||
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
||||
r[k] = a[j];
|
||||
return r;
|
||||
};
|
||||
|
||||
__spreadArray = function (to, from, pack) {
|
||||
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
||||
if (ar || !(i in from)) {
|
||||
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
||||
ar[i] = from[i];
|
||||
}
|
||||
}
|
||||
return to.concat(ar || Array.prototype.slice.call(from));
|
||||
};
|
||||
|
||||
__await = function (v) {
|
||||
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
||||
};
|
||||
|
||||
__asyncGenerator = function (thisArg, _arguments, generator) {
|
||||
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
||||
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
||||
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
||||
function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
||||
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
|
||||
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
||||
function fulfill(value) { resume("next", value); }
|
||||
function reject(value) { resume("throw", value); }
|
||||
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
|
||||
};
|
||||
|
||||
__asyncDelegator = function (o) {
|
||||
var i, p;
|
||||
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
||||
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
||||
};
|
||||
|
||||
__asyncValues = function (o) {
|
||||
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
||||
var m = o[Symbol.asyncIterator], i;
|
||||
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
||||
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
||||
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
||||
};
|
||||
|
||||
__makeTemplateObject = function (cooked, raw) {
|
||||
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
||||
return cooked;
|
||||
};
|
||||
|
||||
var __setModuleDefault = Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
};
|
||||
|
||||
__importStar = function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
|
||||
__importDefault = function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
|
||||
__classPrivateFieldGet = function (receiver, state, kind, f) {
|
||||
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
||||
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
||||
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
||||
};
|
||||
|
||||
__classPrivateFieldSet = function (receiver, state, value, kind, f) {
|
||||
if (kind === "m") throw new TypeError("Private method is not writable");
|
||||
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
||||
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
||||
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
||||
};
|
||||
|
||||
__classPrivateFieldIn = function (state, receiver) {
|
||||
if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object");
|
||||
return typeof state === "function" ? receiver === state : state.has(receiver);
|
||||
};
|
||||
|
||||
exporter("__extends", __extends);
|
||||
exporter("__assign", __assign);
|
||||
exporter("__rest", __rest);
|
||||
exporter("__decorate", __decorate);
|
||||
exporter("__param", __param);
|
||||
exporter("__metadata", __metadata);
|
||||
exporter("__awaiter", __awaiter);
|
||||
exporter("__generator", __generator);
|
||||
exporter("__exportStar", __exportStar);
|
||||
exporter("__createBinding", __createBinding);
|
||||
exporter("__values", __values);
|
||||
exporter("__read", __read);
|
||||
exporter("__spread", __spread);
|
||||
exporter("__spreadArrays", __spreadArrays);
|
||||
exporter("__spreadArray", __spreadArray);
|
||||
exporter("__await", __await);
|
||||
exporter("__asyncGenerator", __asyncGenerator);
|
||||
exporter("__asyncDelegator", __asyncDelegator);
|
||||
exporter("__asyncValues", __asyncValues);
|
||||
exporter("__makeTemplateObject", __makeTemplateObject);
|
||||
exporter("__importStar", __importStar);
|
||||
exporter("__importDefault", __importDefault);
|
||||
exporter("__classPrivateFieldGet", __classPrivateFieldGet);
|
||||
exporter("__classPrivateFieldSet", __classPrivateFieldSet);
|
||||
exporter("__classPrivateFieldIn", __classPrivateFieldIn);
|
||||
});
|
||||
65
node_modules/framesync/package.json
generated
vendored
Normal file
65
node_modules/framesync/package.json
generated
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"name": "framesync",
|
||||
"license": "MIT",
|
||||
"version": "6.1.2",
|
||||
"description": "A frame-synced render loop for JavaScript",
|
||||
"author": "Matt Perry",
|
||||
"homepage": "https://popmotion.io",
|
||||
"main": "dist/framesync.cjs.js",
|
||||
"types": "lib/index.d.ts",
|
||||
"module": "dist/es/index.mjs",
|
||||
"jsnext:main": "dist/es/index.mjs",
|
||||
"unpkg": "./dist/framesync.min.js",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./lib/index.d.ts",
|
||||
"import": "./dist/es/index.mjs",
|
||||
"require": "./dist/framesync.cjs.js",
|
||||
"default": "./dist/framesync.cjs.js"
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsc -p . && rollup -c && yarn measure",
|
||||
"watch": "rollup -c -w",
|
||||
"lint": "tslint -c tslint.json 'src/**/*.{ts}'",
|
||||
"test": "jest",
|
||||
"measure": "gzip -c dist/framesync.min.js | wc -c",
|
||||
"prepublishOnly": "npm run test && npm run build"
|
||||
},
|
||||
"files": [
|
||||
"lib",
|
||||
"dist"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/Popmotion/popmotion.git"
|
||||
},
|
||||
"keywords": [
|
||||
"animation",
|
||||
"raf"
|
||||
],
|
||||
"bugs": {
|
||||
"url": "https://github.com/Popmotion/popmotion/issues"
|
||||
},
|
||||
"jest": {
|
||||
"moduleFileExtensions": [
|
||||
"ts",
|
||||
"js"
|
||||
],
|
||||
"transform": {
|
||||
"\\.(ts)$": "../../../node_modules/ts-jest/preprocessor.js"
|
||||
},
|
||||
"testRegex": "/_tests/.*\\.(ts|js)$",
|
||||
"rootDir": "src"
|
||||
},
|
||||
"prettier": {
|
||||
"printWidth": 80,
|
||||
"tabWidth": 4,
|
||||
"semi": false,
|
||||
"trailingComma": "es5"
|
||||
},
|
||||
"dependencies": {
|
||||
"tslib": "2.4.0"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user