Skip to content

SphereMoveEffect

Source: SphereMoveEffect.h

SphereMoveEffect

class SphereMoveEffect
src/light/effects/SphereMoveEffect.h:22

Inherits: EffectBase

Effect moving a lit sphere through a 3D layout.

SphereMoveEffect card SphereMoveEffect controls

A hollow sphere whose shell sweeps the volume on a Lissajous path, breathing as it goes. Every voxel inside the one-unit shell lights from the palette, jittered so it shimmers.

Prior art: MoonLight's SphereMove, whose oscillator and shell test this reproduces.

Public Attributes

uint8_t speed = 50 : How fast the sphere sweeps, where higher shrinks the divisor.

Public Methods

virtual inline const char * tags() const override : Catalog tags: MoonLight origin, and 3D-native.

virtual inline Dim dimensions() const override : A sphere needs the whole volume.

virtual inline void defineControls() override : Publish the sweep rate.

virtual inline void tick() override : Place the sphere on its path, then light every voxel inside its shell.

More info

Float per voxel, deliberately

The distance test is a square root per voxel, kept for exact fidelity with the source. The time base is float throughout, so the sweep and the breathing integrate continuously. Dividing in integers first would quantize both into visible steps.