Skip to content

Commit

Permalink
Rename
Browse files Browse the repository at this point in the history
  • Loading branch information
rexrainbow committed Sep 30, 2023
1 parent 426610a commit f3179e0
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
5 changes: 5 additions & 0 deletions examples/loader/load-atlas-from-binary.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@echo off
set main=./examples/loader/load-atlas-from-binary.js
cd ..
cd ..
npm run watch
File renamed without changes.
4 changes: 0 additions & 4 deletions examples/loader/load-binary-and-image.bat

This file was deleted.

5 changes: 0 additions & 5 deletions examples/loader/load-binary-atlas.bat

This file was deleted.

4 changes: 4 additions & 0 deletions examples/loader/load-image-from-binary.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
set main=./examples/loader/load-image-from-binary.js
cd ..
cd ..
npm run watch
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ class Demo extends Phaser.Scene {

preload() {
var key = 'card';
this.load.binary('card', 'assets/images/card2.png', Uint8Array);
this.load.binary(key, 'assets/images/card2.png', Uint8Array);
this.load.once(`filecomplete-binary-${key}`, function () {
var buffer = this.cache.binary.get(key);

var blob = new Blob([buffer], { type: 'image/png' });
var url = window.URL.createObjectURL(blob);
this.load.image(key, url);
var blobURL = window.URL.createObjectURL(blob);
this.load.image(key, blobURL);
}, this);
}

Expand Down

0 comments on commit f3179e0

Please sign in to comment.