Skip to content

Commit

Permalink
Added options to SpritePackedManager
Browse files Browse the repository at this point in the history
  • Loading branch information
RolandCsibrei committed Oct 10, 2024
1 parent 265755d commit 8462019
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/dev/core/src/Sprites/spritePackedManager.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { SpriteManagerOptions } from "./spriteManager";
import { SpriteManager } from "./spriteManager";
import type { Scene } from "../scene";
import { Texture } from "../Materials/Textures/texture";
Expand All @@ -7,6 +8,9 @@ import { Texture } from "../Materials/Textures/texture";
* @see https://doc.babylonjs.com/features/featuresDeepDive/sprites
*/

/**
*
*/
export class SpritePackedManager extends SpriteManager {
/**
* Creates a new sprite manager from a packed sprite sheet
Expand All @@ -18,6 +22,7 @@ export class SpritePackedManager extends SpriteManager {
* @param epsilon defines the epsilon value to align texture (0.01 by default)
* @param samplingMode defines the sampling mode to use with spritesheet
* @param fromPacked set to true; do not alter
* @param options options for the sprite manager
*/

constructor(
Expand All @@ -28,9 +33,10 @@ export class SpritePackedManager extends SpriteManager {
scene: Scene,
spriteJSON: string | null = null,
epsilon: number = 0.01,
samplingMode: number = Texture.TRILINEAR_SAMPLINGMODE
samplingMode: number = Texture.TRILINEAR_SAMPLINGMODE,
options?: SpriteManagerOptions
) {
//the cellSize parameter is not used when built from JSON which provides individual cell data, defaults to 64 if JSON load fails
super(name, imgUrl, capacity, 64, scene, epsilon, samplingMode, true, spriteJSON);
super(name, imgUrl, capacity, 64, scene, epsilon, samplingMode, true, spriteJSON, options);
}
}

0 comments on commit 8462019

Please sign in to comment.