Accretion of pebbles is then halted .
The gas envelope surrounding the core cools and collapses allowing for the rapid accretion of gas and the formation of a gas giant .
Accretion of pebbles is then halted and the gas envelope surrounding the core cools and collapses allowing for the rapid accretion of gas and the formation of a gas giant .