Reference · Cube engine and views
pastCommitfunction
Whether a dragged layer is past the point of no return: letting go now, at rest, makes a move.
Import it
import { pastCommit } from "@johnmorrisdotca/kyuubu";
Definition
function pastCommit(angle: number, commitAngle?: number): boolean
Parameters
| Name | Type | Description |
|---|---|---|
angle | number | The signed drag angle in degrees. |
commitAngle (optional) | number | The drag angle in degrees at which a resting release commits a turn. |
Returns
boolean
Whether a dragged layer is past the point of no return: letting go now, at rest, makes a move.
Examples
import { pastCommit } from "@johnmorrisdotca/kyuubu";
console.log(pastCommit(60));trueWhat it prints (run when this page was built)