superfly-timeline
Advanced tools
Comparing version 8.2.6-nightly-latest-20220329-143412-1014912.0 to 8.2.7
@@ -5,2 +5,12 @@ # Changelog | ||
### [8.2.7](https://github.com/SuperFlyTV/supertimeline/compare/8.2.6...8.2.7) (2022-03-30) | ||
### [8.2.6](https://github.com/SuperFlyTV/supertimeline/compare/8.2.5...8.2.6) (2022-03-30) | ||
### Bug Fixes | ||
* bug which caused unit test "too many start events" to fail ([7412021](https://github.com/SuperFlyTV/supertimeline/commit/7412021ab71c8ad833837f49cc43552729194094)) | ||
* change all ".end || Infinity" to ".end ?? Infinity" to take into account that .end might be 0 (which means that it ends at 0, not Infinity) ([218b7c5](https://github.com/SuperFlyTV/supertimeline/commit/218b7c5c07afd271f238bd138bb8b3a07ad4e7c3)) | ||
### [8.2.5](https://github.com/SuperFlyTV/supertimeline/compare/8.2.4...8.2.5) (2022-01-26) | ||
@@ -7,0 +17,0 @@ |
@@ -59,8 +59,4 @@ "use strict"; | ||
return []; | ||
if (instances.length <= 1) { | ||
const instance = instances[0]; | ||
if (!instance.end) | ||
instance.end = null; | ||
return [instance]; | ||
} | ||
if (instances.length === 1) | ||
return instances; | ||
const events = []; | ||
@@ -360,3 +356,3 @@ for (let i = 0; i < instances.length; i++) { | ||
const cappedEndTime = cap && cap.end !== null && endTime !== null ? Math.min(cap.end, endTime) : endTime; | ||
if ((cappedEndTime || Infinity) > cappedStartTime) { | ||
if ((cappedEndTime !== null && cappedEndTime !== void 0 ? cappedEndTime : Infinity) > cappedStartTime) { | ||
repeatedInstances.push({ | ||
@@ -383,2 +379,3 @@ id: getId(), | ||
function capInstances(instances, parentInstances) { | ||
var _a, _b, _c, _d, _e, _f; | ||
if (isReference(parentInstances) || parentInstances === null) | ||
@@ -393,3 +390,3 @@ return instances; | ||
// First, check if the instance crosses the parent at all: | ||
if (instanceOrg.start <= (parent.end || Infinity) && (instanceOrg.end || Infinity) >= parent.start) { | ||
if (instanceOrg.start <= ((_a = parent.end) !== null && _a !== void 0 ? _a : Infinity) && ((_b = instanceOrg.end) !== null && _b !== void 0 ? _b : Infinity) >= parent.start) { | ||
const instance = _.clone(instanceOrg); | ||
@@ -401,6 +398,6 @@ // Cap start | ||
// Cap end | ||
if ((instance.end || Infinity) > (parent.end || Infinity)) { | ||
if (((_c = instance.end) !== null && _c !== void 0 ? _c : Infinity) > ((_d = parent.end) !== null && _d !== void 0 ? _d : Infinity)) { | ||
setInstanceEndTime(instance, parent.end); | ||
} | ||
if (instance.start >= parent.start && (instance.end || Infinity) <= (parent.end || Infinity)) { | ||
if (instance.start >= parent.start && ((_e = instance.end) !== null && _e !== void 0 ? _e : Infinity) <= ((_f = parent.end) !== null && _f !== void 0 ? _f : Infinity)) { | ||
// The instance is within the parent | ||
@@ -485,3 +482,3 @@ if (instance.start === instance.end && addedInstanceTimes.has(instance.start)) { | ||
const cap = joinedCaps[i]; | ||
if (cap.end && instance.end && cap.end > instance.end) { | ||
if (cap.end !== null && instance.end !== null && cap.end > instance.end) { | ||
capsToAdd.push({ | ||
@@ -488,0 +485,0 @@ id: cap.id, |
@@ -28,3 +28,3 @@ "use strict"; | ||
function resolveStates(resolved, cache) { | ||
var _a, _b; | ||
var _a, _b, _c, _d, _e, _f, _g, _h; | ||
const resolvedStates = { | ||
@@ -82,3 +82,3 @@ options: resolved.options, | ||
parentTime.time > (instance.start || 0) && | ||
parentTime.time < (instance.end || Infinity)) { | ||
parentTime.time < ((_a = instance.end) !== null && _a !== void 0 ? _a : Infinity)) { | ||
timeEvents.push(parentTime); | ||
@@ -158,3 +158,3 @@ } | ||
const instance = o.instance; | ||
let toBeEnabled = (instance.start || 0) <= time && (instance.end || Infinity) > time; | ||
let toBeEnabled = (instance.start || 0) <= time && ((_b = instance.end) !== null && _b !== void 0 ? _b : Infinity) > time; | ||
const layer = obj.layer + ''; | ||
@@ -293,10 +293,10 @@ const identifier = obj.id + '_' + instance.id + '_' + o.checkId; | ||
parentsToCheck.push(obj); | ||
if ((_a = currentState[layer]) === null || _a === void 0 ? void 0 : _a.isGroup) | ||
if ((_c = currentState[layer]) === null || _c === void 0 ? void 0 : _c.isGroup) | ||
parentsToCheck.push(currentState[layer]); | ||
for (const parent of parentsToCheck) { | ||
if ((_b = parent.children) === null || _b === void 0 ? void 0 : _b.length) { | ||
if ((_d = parent.children) === null || _d === void 0 ? void 0 : _d.length) { | ||
for (const child0 of parent.children) { | ||
const child = resolved.objects[child0.id]; | ||
for (const instance of child.resolved.instances) { | ||
if (instance.start <= time && (instance.end || Infinity) > time) { | ||
if (instance.start <= time && ((_e = instance.end) !== null && _e !== void 0 ? _e : Infinity) > time) { | ||
// Add the child instance, because that might be affected: | ||
@@ -316,3 +316,3 @@ addPointInTime(time, 'child', 99, child, instance); | ||
resolvedStates.objects[keyframe.id] = keyframe; | ||
const toBeEnabled = (instance.start || 0) <= time && (instance.end || Infinity) > time; | ||
const toBeEnabled = (instance.start || 0) <= time && ((_f = instance.end) !== null && _f !== void 0 ? _f : Infinity) > time; | ||
if (toBeEnabled) { | ||
@@ -358,3 +358,3 @@ const newObjInstance = { | ||
// Cap end within parent | ||
let instanceEnd = Math.min(instance.end || Infinity, parentObjInstance.instance.end || Infinity); | ||
let instanceEnd = Math.min((_g = instance.end) !== null && _g !== void 0 ? _g : Infinity, (_h = parentObjInstance.instance.end) !== null && _h !== void 0 ? _h : Infinity); | ||
if (instanceEnd === Infinity) | ||
@@ -424,3 +424,3 @@ instanceEnd = null; | ||
stateLayer[startTime].objectInstance = newObjInstance; | ||
if (instance.end) { | ||
if (instance.end !== null) { | ||
const endTime = instance.end + ''; | ||
@@ -577,2 +577,3 @@ if (!stateLayer[endTime]) { | ||
function getStateAtTime(states, layer, requestTime) { | ||
var _a; | ||
const layerStates = states[layer] || {}; | ||
@@ -604,3 +605,3 @@ const times = _.map(_.keys(layerStates), (time) => parseFloat(time)); | ||
if (state && keyframe.resolved.parentId === state.id) { | ||
if ((keyframe.keyframeEndTime || Infinity) > requestTime) { | ||
if (((_a = keyframe.keyframeEndTime) !== null && _a !== void 0 ? _a : Infinity) > requestTime) { | ||
if (!isCloned) { | ||
@@ -607,0 +608,0 @@ isCloned = true; |
{ | ||
"name": "superfly-timeline", | ||
"version": "8.2.6-nightly-latest-20220329-143412-1014912.0", | ||
"version": "8.2.7", | ||
"description": "A collection of rules as well as a resolver for placing objects on a virtual timeline.", | ||
@@ -94,5 +94,5 @@ "license": "MIT", | ||
"standard-version": { | ||
"message": "chore(release): %s [skip ci]", | ||
"message": "chore(release): %s", | ||
"tagPrefix": "" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
303349
0
2884