Package Exports
- @villagekit/stepper-ramp
- @villagekit/stepper-ramp/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@villagekit/stepper-ramp) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@villagekit/stepper-ramp
install
npm install @villagekit/stepper-rampexample
const createRamp = require('@villagekit/stepper-ramp')
const ramp = createRamp({
targetSpeedInStepsPerSec: 50,
accelerationInStepsPerSecPerSec: 50,
})
const movement = ramp.movement(100)
const stepPeriodsInMicrosecs = Array.from(movement)
console.log(stepPeriodsInMicrosecs)api
createRamp = require('@villagekit/stepper-ramp')
ramp = createRamp(options)
options is an object with shape:
targetSpeedInStepsPerSec: max speed in (steps / second)accelerationInStepsPerSecPerSec: acceleration in (steps / second^2)
stepPeriods = ramp.movement(steps)
steps is a number.
stepPeriods is an Iterable of step periods in microsecs.