File tree Expand file tree Collapse file tree 3 files changed +3
-4
lines changed Expand file tree Collapse file tree 3 files changed +3
-4
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " pietron" ,
3
- "version" : " 1.0.0 " ,
3
+ "version" : " 1.0.1 " ,
4
4
"description" : " Cross-platform IDE for Piet." ,
5
5
"main" : " src/main.js" ,
6
6
"repository" : {
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ const createCanvas = (width, height) => {
65
65
66
66
const createFromBitmap = bitmap => {
67
67
bitmap = transpose ( bitmap ) ;
68
- const [ width , height ] = [ bitmap . length , bitmap [ 0 ] . length ] ;
68
+ const [ height , width ] = [ bitmap . length , bitmap [ 0 ] . length ] ;
69
69
setCanvasWidth ( width , false ) ;
70
70
setCanvasHeight ( height , false ) ;
71
71
for ( let i = 0 ; i < height ; i ++ ) {
Original file line number Diff line number Diff line change @@ -72,8 +72,7 @@ const fileToBitmap = async path => {
72
72
for ( let i = 0 ; i < fieldWidth ; i ++ ) {
73
73
const row = [ ] ;
74
74
for ( let j = 0 ; j < fieldHeight ; j ++ ) {
75
- // const hex = img.bitmap.data.readUInt32BE(img.getPixelIndex(i * codelSize, j * codelSize));
76
- const hex = img . getPixelColor ( i * codelSize , j * codelSize ) ;
75
+ const hex = img . bitmap . data . readUInt32BE ( img . getPixelIndex ( i * codelSize , j * codelSize ) ) ;
77
76
const color = hexToPietColor ( hex ) ;
78
77
row . push ( color > - 1 ? color : 18 ) ;
79
78
}
You can’t perform that action at this time.
0 commit comments