← Back to Docs
  • index.html
  • Clayground
  • Clayground.Lab
  • TransportChip
  • Clayground 2026.7
  • TransportChip QML Type

    Sim time, pause and speed - the clock, on screen. More...

    Import Statement: import Clayground.Lab
    Inherits:

    Rectangle

    Properties

    Methods

    Detailed Description

    No lab showed its clock, which is a strange gap in a framework whose whole claim is determinism: "the same seed and the same stepped frames" is the contract, and until now nothing told the learner what time it was.

    Three parts in one chip: the sim-time readout, a pause toggle, and a speed cycle. It drives SimClock.timeScale from the outside rather than owning any clock state, so a lab that also binds a simSpeed parameter to the same clock keeps working - the chip simply reads back whatever the scale now is.

    Pausing sets timeScale to 0, which is the kernel's pause verb, and resuming restores the speed that was running before - not 1x, because a pause taken during a 4x run is meant to be resumed at 4x.

    TransportChip {
        anchors.horizontalCenter: parent.horizontalCenter
        anchors.top: parent.top; anchors.topMargin: LabTheme.spaceXl
    }

    See also SimClock and Lab.

    Property Documentation

    clock : var

    The SimClock; the active one by default.


    digits : int

    Decimals on the time readout.


    paused : bool [read-only]

    The clock is standing still.


    showSpeed : bool

    Offer the speed cycle.


    speeds : var

    The speed rungs the button cycles.


    Method Documentation

    void cycleSpeed()

    Next speed rung, resuming if paused.


    void toggle()

    Pause or resume.