add dummy function with todo
This commit is contained in:
parent
93e565f8df
commit
15b32abadf
2 changed files with 20 additions and 0 deletions
8
packages/core/splitLanes.mjs
Normal file
8
packages/core/splitLanes.mjs
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
function splitLanes(haps) {
|
||||||
|
// TODO: split haps into multiple arrays so that no overlapping events are in the same array
|
||||||
|
// also make sure the lanes are packed as tight as possible
|
||||||
|
// use logic analogous to drawLine
|
||||||
|
return [haps];
|
||||||
|
}
|
||||||
|
|
||||||
|
export default splitLanes;
|
||||||
12
packages/core/test/splitLanes.test.mjs
Normal file
12
packages/core/test/splitLanes.test.mjs
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
import { fastcat, stack, slowcat, silence, pure } from '../pattern.mjs';
|
||||||
|
import { strict as assert } from 'assert';
|
||||||
|
import splitLanes from '../splitLanes.mjs';
|
||||||
|
|
||||||
|
describe('splitLanes', () => {
|
||||||
|
it('should split', () => {
|
||||||
|
const haps = fastcat(0, stack(1, 2))._firstCycleValues;
|
||||||
|
|
||||||
|
assert.deepStrictEqual(haps, [0, 1, 2]);
|
||||||
|
assert.deepStrictEqual(splitLanes([0, 1, 2]), [[0, 1, 2]]);
|
||||||
|
});
|
||||||
|
});
|
||||||
Loading…
Add table
Add a link
Reference in a new issue