Reference · Shizen and Arashi environments
previewFaultfunction
Preview a bounded top-to-bottom fracture. The path keeps at least one column active on each side.
Import it
import { previewFault } from "@johnmorrisdotca/houseki/nature";
Definition
function previewFault(state: NatureState): FaultPreview
Parameters
| Name | Type | Description |
|---|---|---|
state | NatureState | The immutable native state to read or transition; the input is retained. |
Returns
FaultPreview
Preview a bounded top-to-bottom fracture. The path keeps at least one column active on each side.
Examples
import { createNatureState, previewFault } from "@johnmorrisdotca/houseki/nature";
const state=createNatureState({width:4,height:4,seed:"docs"});
console.log(previewFault(state).removedIds.length);0What it prints (run when this page was built)