Skip to content

Commit

Permalink
Add several different snowflake types, and one very special, um, 'sno…
Browse files Browse the repository at this point in the history
…wflake'. Yeah.
  • Loading branch information
Benjamin Clark committed Dec 4, 2024
1 parent 21ee2ff commit 3d37827
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 3 deletions.
File renamed without changes
Binary file added dist/img/icons/snowflake2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/img/icons/snowflake3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/img/icons/snowflake4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/img/icons/snowflake5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/img/icons/snowflake6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/img/icons/snowflake7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/img/icons/teapot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 18 additions & 3 deletions modules/pixi/PixiLayerSnowflakes.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,29 @@ export class PixiLayerSnowflakes {
// Modify each path by prepending the asset path.
snowflakeImagePath.textures = snowflakeImagePath.textures.map(texture => texture = this.context.assetPath + texture);

PIXI.Assets.load(this.context.assetPath + 'img/icons/snowflake.png').then(() => {
this.emitter = new particles.Emitter(container, distModifiedConfig);
const snowflakepaths = [
'img/icons/snowflake1.png',
'img/icons/snowflake2.png',
'img/icons/snowflake3.png',
'img/icons/snowflake4.png',
'img/icons/snowflake5.png',
'img/icons/snowflake6.png',
'img/icons/snowflake7.png',
'img/icons/teapot.png',
];

let snowflakePromises = snowflakepaths.map(path => PIXI.Assets.load(this.context.assetPath + path));

// let s1Promise = PIXI.Assets.load(this.context.assetPath + 'img/icons/snowflake.png');
// let s2Promise = PIXI.Assets.load(this.context.assetPath + 'img/icons/snowflake2.png');
Promise.all(snowflakePromises)
.then(() => {
this.emitter = new particles.Emitter(container, distModifiedConfig);
this.emitter.parent = container;


const ticker = this.pixi.ticker; //Thank goodness for shared tickers
ticker.add(this.render, this);

});
});
}
Expand Down

0 comments on commit 3d37827

Please sign in to comment.