@anvaka/streamlines
Advanced tools
Comparing version 1.0.2 to 1.1.0
@@ -56,2 +56,3 @@ /** | ||
options.stepsPerIteration = protoOptions.stepsPerIteration > 0 ? protoOptions.stepsPerIteration : 10; | ||
options.maxTimePerIteration = protoOptions.maxTimePerIteration > 0 ? protoOptions.maxTimePerIteration : 1000; | ||
@@ -93,2 +94,4 @@ var stepsPerIteration = options.stepsPerIteration; | ||
if (disposed) return; | ||
var maxTimePerIteration = options.maxTimePerIteration; | ||
var start = window.performance.now(); | ||
@@ -100,2 +103,3 @@ for (var i = 0; i < stepsPerIteration; ++i) { | ||
if (state === STATE_SEED_STREAMLINE) seedStreamline(); | ||
if (window.performance.now() - start > maxTimePerIteration) break; | ||
@@ -174,3 +178,3 @@ if (state === STATE_DONE) { | ||
function assertNumber(x, msg) { | ||
if (typeof x !== 'number') throw new Error(msg); | ||
if (typeof x !== 'number' || Number.isNaN(x)) throw new Error(msg); | ||
} |
{ | ||
"name": "@anvaka/streamlines", | ||
"version": "1.0.2", | ||
"version": "1.1.0", | ||
"description": "Streamlines calculator", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -15,2 +15,5 @@ # streamlines | ||
More advanced example is [wind-map](https://anvaka.github.io/wind-lines/) - visualization of the winds | ||
map with evenly spaced streamlines. | ||
## get it | ||
@@ -17,0 +20,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
113395
1980
126