Skip to content

Commit

Permalink
Sprite: Clean up. (#26774)
Browse files Browse the repository at this point in the history
  • Loading branch information
linbingquan authored Sep 16, 2023
1 parent c6cfa6a commit 99d705f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/objects/Sprite.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const _uvC = /*@__PURE__*/ new Vector2();

class Sprite extends Object3D {

constructor( material ) {
constructor( material = new SpriteMaterial() ) {

super();

Expand Down Expand Up @@ -56,7 +56,7 @@ class Sprite extends Object3D {
}

this.geometry = _geometry;
this.material = ( material !== undefined ) ? material : new SpriteMaterial();
this.material = material;

this.center = new Vector2( 0.5, 0.5 );

Expand Down

0 comments on commit 99d705f

Please sign in to comment.