Skip to main content
A highly customizable 3D highway speed visual effect built with Three.js, featuring animated road, cars, lights, and distortion effects for immersive motion simulation.

Installation

npm install three postprocessing

Usage

<script setup lang="ts">
import { LightSpeed } from '@/components/visualization'
import type { LightSpeedOptions } from '@/components/visualization'

const effectOptions: Partial<LightSpeedOptions> = {
  speed: 2,
  roadWidth: 9,
  roadLength: 400,
  islandWidth: 2,
  nPairs: 50,
}
</script>

<template>
  <LightSpeed :effect-options="effectOptions" />
</template>

Props

Prop NameTypeDefaultDescription
effectOptionsPartial<LightSpeedOptions>See defaultOptionsConfiguration object to customize road, lights, distortion, speed, and colors.

Credits

Build docs developers (and LLMs) love