Skip to content

Commit

Permalink
more build update
Browse files Browse the repository at this point in the history
  • Loading branch information
gkjohnson committed Jul 13, 2020
1 parent 775419f commit fe5238b
Show file tree
Hide file tree
Showing 21 changed files with 231 additions and 217 deletions.
60 changes: 31 additions & 29 deletions example/bundle/b3dmExample.d88db709.js
Original file line number Diff line number Diff line change
Expand Up @@ -35957,12 +35957,20 @@ function () {
// options
this.maxSize = 800;
this.minSize = 600;
this.unloadPercent = 0.05;
this.usedSet = new Set();
this.itemSet = new Set();
this.unloadPercent = 0.05; // "itemSet" doubles as both the list of the full set of items currently
// stored in the cache (keys) as well as a map to the time the item was last
// used so it can be sorted appropriately.

this.itemSet = new Map();
this.itemList = [];
this.usedSet = new Set();
this.callbacks = new Map();
this.unloadPriorityCallback = null;
var itemSet = this.itemSet;

this.defaultPriorityCallback = function (item) {
return itemSet.get(item);
};
} // Returns whether or not the cache has reached the maximum size


Expand All @@ -35989,7 +35997,7 @@ function () {
var callbacks = this.callbacks;
itemList.push(item);
usedSet.add(item);
itemSet.add(item);
itemSet.set(item, Date.now());
callbacks.set(item, removeCb);
return true;
}
Expand Down Expand Up @@ -36020,10 +36028,7 @@ function () {
var usedSet = this.usedSet;

if (itemSet.has(item) && !usedSet.has(item)) {
var itemList = this.itemList;
var index = itemList.indexOf(item);
itemList.splice(index, 1);
itemList.push(item);
itemSet.set(item, Date.now());
usedSet.add(item);
}
}
Expand All @@ -36045,31 +36050,28 @@ function () {
var callbacks = this.callbacks;
var unused = itemList.length - usedSet.size;
var excess = itemList.length - targetSize;
var unloadPriorityCallback = this.unloadPriorityCallback;
var unloadPriorityCallback = this.unloadPriorityCallback || this.defaultPriorityCallback;

if (excess > 0 && unused > 0) {
if (unloadPriorityCallback) {
// used items should be at the end of the array
itemList.sort(function (a, b) {
var usedA = usedSet.has(a);
var usedB = usedSet.has(b);

if (usedA && usedB) {
// If they're both used then don't bother moving them
return 0;
} else if (!usedA && !usedB) {
// Use the sort function otherwise
// higher priority should be further to the left
return unloadPriorityCallback(b) - unloadPriorityCallback(a);
} else {
// If one is used and the other is not move the used one towards the end of the array
return usedA ? 1 : -1;
}
});
} // address corner cases where the minSize might be zero or smaller than maxSize - minSize,
// used items should be at the end of the array
itemList.sort(function (a, b) {
var usedA = usedSet.has(a);
var usedB = usedSet.has(b);

if (usedA && usedB) {
// If they're both used then don't bother moving them
return 0;
} else if (!usedA && !usedB) {
// Use the sort function otherwise
// higher priority should be further to the left
return unloadPriorityCallback(b) - unloadPriorityCallback(a);
} else {
// If one is used and the other is not move the used one towards the end of the array
return usedA ? 1 : -1;
}
}); // address corner cases where the minSize might be zero or smaller than maxSize - minSize,
// which would result in a very small or no items being unloaded.


var unusedExcess = Math.min(excess, unused);
var maxUnload = Math.max(targetSize * unloadPercent, unusedExcess * unloadPercent);
var nodesToUnload = Math.min(maxUnload, unused);
Expand Down
2 changes: 1 addition & 1 deletion example/bundle/b3dmExample.d88db709.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion example/bundle/b3dmExample.js.map

Large diffs are not rendered by default.

60 changes: 31 additions & 29 deletions example/bundle/cmptExample.4b2a3f0d.js
Original file line number Diff line number Diff line change
Expand Up @@ -35957,12 +35957,20 @@ function () {
// options
this.maxSize = 800;
this.minSize = 600;
this.unloadPercent = 0.05;
this.usedSet = new Set();
this.itemSet = new Set();
this.unloadPercent = 0.05; // "itemSet" doubles as both the list of the full set of items currently
// stored in the cache (keys) as well as a map to the time the item was last
// used so it can be sorted appropriately.

this.itemSet = new Map();
this.itemList = [];
this.usedSet = new Set();
this.callbacks = new Map();
this.unloadPriorityCallback = null;
var itemSet = this.itemSet;

this.defaultPriorityCallback = function (item) {
return itemSet.get(item);
};
} // Returns whether or not the cache has reached the maximum size


Expand All @@ -35989,7 +35997,7 @@ function () {
var callbacks = this.callbacks;
itemList.push(item);
usedSet.add(item);
itemSet.add(item);
itemSet.set(item, Date.now());
callbacks.set(item, removeCb);
return true;
}
Expand Down Expand Up @@ -36020,10 +36028,7 @@ function () {
var usedSet = this.usedSet;

if (itemSet.has(item) && !usedSet.has(item)) {
var itemList = this.itemList;
var index = itemList.indexOf(item);
itemList.splice(index, 1);
itemList.push(item);
itemSet.set(item, Date.now());
usedSet.add(item);
}
}
Expand All @@ -36045,31 +36050,28 @@ function () {
var callbacks = this.callbacks;
var unused = itemList.length - usedSet.size;
var excess = itemList.length - targetSize;
var unloadPriorityCallback = this.unloadPriorityCallback;
var unloadPriorityCallback = this.unloadPriorityCallback || this.defaultPriorityCallback;

if (excess > 0 && unused > 0) {
if (unloadPriorityCallback) {
// used items should be at the end of the array
itemList.sort(function (a, b) {
var usedA = usedSet.has(a);
var usedB = usedSet.has(b);

if (usedA && usedB) {
// If they're both used then don't bother moving them
return 0;
} else if (!usedA && !usedB) {
// Use the sort function otherwise
// higher priority should be further to the left
return unloadPriorityCallback(b) - unloadPriorityCallback(a);
} else {
// If one is used and the other is not move the used one towards the end of the array
return usedA ? 1 : -1;
}
});
} // address corner cases where the minSize might be zero or smaller than maxSize - minSize,
// used items should be at the end of the array
itemList.sort(function (a, b) {
var usedA = usedSet.has(a);
var usedB = usedSet.has(b);

if (usedA && usedB) {
// If they're both used then don't bother moving them
return 0;
} else if (!usedA && !usedB) {
// Use the sort function otherwise
// higher priority should be further to the left
return unloadPriorityCallback(b) - unloadPriorityCallback(a);
} else {
// If one is used and the other is not move the used one towards the end of the array
return usedA ? 1 : -1;
}
}); // address corner cases where the minSize might be zero or smaller than maxSize - minSize,
// which would result in a very small or no items being unloaded.


var unusedExcess = Math.min(excess, unused);
var maxUnload = Math.max(targetSize * unloadPercent, unusedExcess * unloadPercent);
var nodesToUnload = Math.min(maxUnload, unused);
Expand Down
2 changes: 1 addition & 1 deletion example/bundle/cmptExample.4b2a3f0d.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion example/bundle/cmptExample.js.map

Large diffs are not rendered by default.

60 changes: 31 additions & 29 deletions example/bundle/customMaterial.dd39ecee.js
Original file line number Diff line number Diff line change
Expand Up @@ -35957,12 +35957,20 @@ function () {
// options
this.maxSize = 800;
this.minSize = 600;
this.unloadPercent = 0.05;
this.usedSet = new Set();
this.itemSet = new Set();
this.unloadPercent = 0.05; // "itemSet" doubles as both the list of the full set of items currently
// stored in the cache (keys) as well as a map to the time the item was last
// used so it can be sorted appropriately.

this.itemSet = new Map();
this.itemList = [];
this.usedSet = new Set();
this.callbacks = new Map();
this.unloadPriorityCallback = null;
var itemSet = this.itemSet;

this.defaultPriorityCallback = function (item) {
return itemSet.get(item);
};
} // Returns whether or not the cache has reached the maximum size


Expand All @@ -35989,7 +35997,7 @@ function () {
var callbacks = this.callbacks;
itemList.push(item);
usedSet.add(item);
itemSet.add(item);
itemSet.set(item, Date.now());
callbacks.set(item, removeCb);
return true;
}
Expand Down Expand Up @@ -36020,10 +36028,7 @@ function () {
var usedSet = this.usedSet;

if (itemSet.has(item) && !usedSet.has(item)) {
var itemList = this.itemList;
var index = itemList.indexOf(item);
itemList.splice(index, 1);
itemList.push(item);
itemSet.set(item, Date.now());
usedSet.add(item);
}
}
Expand All @@ -36045,31 +36050,28 @@ function () {
var callbacks = this.callbacks;
var unused = itemList.length - usedSet.size;
var excess = itemList.length - targetSize;
var unloadPriorityCallback = this.unloadPriorityCallback;
var unloadPriorityCallback = this.unloadPriorityCallback || this.defaultPriorityCallback;

if (excess > 0 && unused > 0) {
if (unloadPriorityCallback) {
// used items should be at the end of the array
itemList.sort(function (a, b) {
var usedA = usedSet.has(a);
var usedB = usedSet.has(b);

if (usedA && usedB) {
// If they're both used then don't bother moving them
return 0;
} else if (!usedA && !usedB) {
// Use the sort function otherwise
// higher priority should be further to the left
return unloadPriorityCallback(b) - unloadPriorityCallback(a);
} else {
// If one is used and the other is not move the used one towards the end of the array
return usedA ? 1 : -1;
}
});
} // address corner cases where the minSize might be zero or smaller than maxSize - minSize,
// used items should be at the end of the array
itemList.sort(function (a, b) {
var usedA = usedSet.has(a);
var usedB = usedSet.has(b);

if (usedA && usedB) {
// If they're both used then don't bother moving them
return 0;
} else if (!usedA && !usedB) {
// Use the sort function otherwise
// higher priority should be further to the left
return unloadPriorityCallback(b) - unloadPriorityCallback(a);
} else {
// If one is used and the other is not move the used one towards the end of the array
return usedA ? 1 : -1;
}
}); // address corner cases where the minSize might be zero or smaller than maxSize - minSize,
// which would result in a very small or no items being unloaded.


var unusedExcess = Math.min(excess, unused);
var maxUnload = Math.max(targetSize * unloadPercent, unusedExcess * unloadPercent);
var nodesToUnload = Math.min(maxUnload, unused);
Expand Down
2 changes: 1 addition & 1 deletion example/bundle/customMaterial.dd39ecee.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion example/bundle/customMaterial.js.map

Large diffs are not rendered by default.

60 changes: 31 additions & 29 deletions example/bundle/example.e31bb0bc.js
Original file line number Diff line number Diff line change
Expand Up @@ -35957,12 +35957,20 @@ function () {
// options
this.maxSize = 800;
this.minSize = 600;
this.unloadPercent = 0.05;
this.usedSet = new Set();
this.itemSet = new Set();
this.unloadPercent = 0.05; // "itemSet" doubles as both the list of the full set of items currently
// stored in the cache (keys) as well as a map to the time the item was last
// used so it can be sorted appropriately.

this.itemSet = new Map();
this.itemList = [];
this.usedSet = new Set();
this.callbacks = new Map();
this.unloadPriorityCallback = null;
var itemSet = this.itemSet;

this.defaultPriorityCallback = function (item) {
return itemSet.get(item);
};
} // Returns whether or not the cache has reached the maximum size


Expand All @@ -35989,7 +35997,7 @@ function () {
var callbacks = this.callbacks;
itemList.push(item);
usedSet.add(item);
itemSet.add(item);
itemSet.set(item, Date.now());
callbacks.set(item, removeCb);
return true;
}
Expand Down Expand Up @@ -36020,10 +36028,7 @@ function () {
var usedSet = this.usedSet;

if (itemSet.has(item) && !usedSet.has(item)) {
var itemList = this.itemList;
var index = itemList.indexOf(item);
itemList.splice(index, 1);
itemList.push(item);
itemSet.set(item, Date.now());
usedSet.add(item);
}
}
Expand All @@ -36045,31 +36050,28 @@ function () {
var callbacks = this.callbacks;
var unused = itemList.length - usedSet.size;
var excess = itemList.length - targetSize;
var unloadPriorityCallback = this.unloadPriorityCallback;
var unloadPriorityCallback = this.unloadPriorityCallback || this.defaultPriorityCallback;

if (excess > 0 && unused > 0) {
if (unloadPriorityCallback) {
// used items should be at the end of the array
itemList.sort(function (a, b) {
var usedA = usedSet.has(a);
var usedB = usedSet.has(b);

if (usedA && usedB) {
// If they're both used then don't bother moving them
return 0;
} else if (!usedA && !usedB) {
// Use the sort function otherwise
// higher priority should be further to the left
return unloadPriorityCallback(b) - unloadPriorityCallback(a);
} else {
// If one is used and the other is not move the used one towards the end of the array
return usedA ? 1 : -1;
}
});
} // address corner cases where the minSize might be zero or smaller than maxSize - minSize,
// used items should be at the end of the array
itemList.sort(function (a, b) {
var usedA = usedSet.has(a);
var usedB = usedSet.has(b);

if (usedA && usedB) {
// If they're both used then don't bother moving them
return 0;
} else if (!usedA && !usedB) {
// Use the sort function otherwise
// higher priority should be further to the left
return unloadPriorityCallback(b) - unloadPriorityCallback(a);
} else {
// If one is used and the other is not move the used one towards the end of the array
return usedA ? 1 : -1;
}
}); // address corner cases where the minSize might be zero or smaller than maxSize - minSize,
// which would result in a very small or no items being unloaded.


var unusedExcess = Math.min(excess, unused);
var maxUnload = Math.max(targetSize * unloadPercent, unusedExcess * unloadPercent);
var nodesToUnload = Math.min(maxUnload, unused);
Expand Down
2 changes: 1 addition & 1 deletion example/bundle/example.e31bb0bc.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit fe5238b

Please sign in to comment.