Update index.js

use one create for particles and bars from resize