There is a patterned glass sheet in front of the light bulb of the flashlight. The light can only pass through the hollow part, which naturally forms a special pattern. You can imagine that a star shape is carved out on a piece of opaque cardboard. Then cover it in front of the lampshade of the flashlight.
The principle of the rotation can be changed is that there are different patterns on it in a circle, and the rotation can make the lamp holder align with different patterns.