Skip to content

A lamp blinking with delay

Updated

A point light switched on and off every half second by a script that schedules itself with delay instead of setInterval.

Watch the lamp blink. Drag to orbit the camera, scroll to zoom.

A lamp blinking with delay

The script is explained step by step in A lamp blinking with delay.

Download the project file below, then import it in XR Hub with Projects › New › Import, as described in Projects and templates. It opens in XR Creator with the same scene you see running above, each script already attached to its Behavior entity. From there you can edit the scripts, adjust components and their props, preview your changes, and deploy the result as a world of your own.

BlinkingLamp.xrproj