Skip to content
PixiKit

Night Drive

A night highway of glowing light trails on a winding road. Click and hold to boost: the trails stretch, the view widens and the air streaks into warp lines.

pixikit.com/docs/effects/night-drive

Customize

Tail colors0 of 10
Head colors0 of 10
Pole colors0 of 10
Curve
Curvature1.00
Speed1.00
Boost3.0×
Fov90°
Boost fov130°
Lanes3
Road width10.0
Median width2.0
Density40
Trail length1.00
Light size1.00
Poles20
Pole height1.0
Dust100
Glow0.60
Reflections0.50
Road opacity0.10
Steer0.35
Road color
Line color
Background
Theme
Interactive
Boosting

Props

32
NameTypeDefaultDescription
tailColorsstring[]NONEThe colours of the lights moving away on the left road; magentas and violet when empty.
headColorsstring[]NONEThe colours of the oncoming lights on the right road; cyan and deep blues when empty.
poleColorsstring[]NONEThe colours of the light poles along both shoulders.
curve"straight" | "gentle" | "winding" | "hills" | "racing" | "deep""winding"The shape of the road; switching between curves morphs it smoothly.
curvaturenumber1How strongly the road bends; 0 is straight.
speednumber1The cruising speed of the traffic, poles and road markings.
boostnumber3The speed multiplier while the pointer is held down; the lights stretch into longer trails.
fovnumber90The camera field of view in degrees.
boostFovnumber130The field of view while boosting; the camera springs between the two.
lanesnumber3The lanes on each side of the road.
roadWidthnumber10The width of each side of the road.
medianWidthnumber2The width of the strip between the two sides.
densitynumber40The cars on each side of the road, up to 160.
trailLengthnumber1The length of the light trails.
lightSizenumber1The thickness of the light trails.
polesnumber20The light poles on each shoulder, up to 80; 0 removes them.
poleHeightnumber1The height of the light poles.
dustnumber100The speed streaks flying past in the air, up to 1500; they stretch into warp lines while boosting.
glownumber0.6A soft bloom around every light; 0 turns it off.
reflectionsnumber0.5How much the lights reflect on the road, like wet asphalt at night.
roadOpacitynumber0.1The opacity of the road and its markings; reflections fade with it.
steernumber0.35How far the camera drifts and turns toward the pointer.
roadColorstring""The colour of the asphalt; follows the theme when empty.
lineColorstring""The colour of the lane markings; follows the theme when empty.
backgroundstring""The colour behind the road; empty keeps the canvas transparent.
theme"dark" | "light""dark"Dark renders glowing light trails, light renders crisp coloured trails on a pale road.
interactivebooleantrueClick and hold to boost, and let the camera follow the pointer.
boostingbooleanfalseTurns the boost on from your own code, for example while something loads.
onBoostStart() => voidNoneCalled when the user starts boosting.
onBoostEnd() => voidNoneCalled when the user lets go.
classNamestringNone
styleCSSPropertiesNoneInline styles for the container.

Related