mirror of
https://github.com/stronk-dev/RandomChad.git
synced 2025-07-05 10:35:08 +02:00
Remove debugging statements
This commit is contained in:
parent
4eec540d71
commit
d0db0d66f4
@ -19,10 +19,12 @@ contract Rocketeer is ERC721Tradable {
|
|||||||
constructor(address _proxyRegistryAddress)
|
constructor(address _proxyRegistryAddress)
|
||||||
ERC721Tradable("Rocketeer", "RCT", _proxyRegistryAddress)
|
ERC721Tradable("Rocketeer", "RCT", _proxyRegistryAddress)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
spawnRocketeer( owner() );
|
||||||
// Birth the genesis Rocketeers
|
// Birth the genesis Rocketeers
|
||||||
for( uint i=0; i < 50; i++ ) {
|
// for( uint i=0; i < 50; i++ ) {
|
||||||
spawnRocketeer( owner() );
|
// spawnRocketeer( owner() );
|
||||||
}
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 339 KiB |
Binary file not shown.
Before Width: | Height: | Size: 53 KiB |
@ -122,8 +122,6 @@ module.exports = async function svgFromAttributes( attributes=[], path='' ) {
|
|||||||
|
|
||||||
const bakedRaster = await convert( bakedSvg, { } )
|
const bakedRaster = await convert( bakedSvg, { } )
|
||||||
|
|
||||||
await fs.writeFile( `${ __dirname }/../assets/temp.jpg`, bakedRaster )
|
|
||||||
|
|
||||||
// Store file on firebase
|
// Store file on firebase
|
||||||
const storage = getStorage()
|
const storage = getStorage()
|
||||||
const bucket = storage.bucket()
|
const bucket = storage.bucket()
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { Container, Loading } from './components/generic'
|
import { Container, Loading } from './components/generic'
|
||||||
import { log, callApi, exportSvg } from './modules/helpers'
|
import { log, callApi } from './modules/helpers'
|
||||||
import download from 'downloadjs'
|
// import download from 'downloadjs'
|
||||||
import DraftRocketeer from './assets/draft-rocketeer.png'
|
import DraftRocketeer from './assets/draft-rocketeer.png'
|
||||||
|
|
||||||
import './App.css'
|
import './App.css'
|
||||||
@ -64,35 +64,6 @@ function App() {
|
|||||||
|
|
||||||
}, [ rocketeerId ] )
|
}, [ rocketeerId ] )
|
||||||
|
|
||||||
// ///////////////////////////////
|
|
||||||
// Functions
|
|
||||||
// ///////////////////////////////
|
|
||||||
async function downloadJPEG( e, size ) {
|
|
||||||
|
|
||||||
e.preventDefault()
|
|
||||||
|
|
||||||
try {
|
|
||||||
|
|
||||||
setLoading( `Generating ${ size }x${ size } JPEG` )
|
|
||||||
|
|
||||||
// Fetch SVG as string
|
|
||||||
const svg = await fetch( rocketeer.image, { mode: 'no-cors' } ).then( res => res.text() )
|
|
||||||
const imageUri = await exportSvg( svg, 'jpeg' )
|
|
||||||
|
|
||||||
download( imageUri, `rocketeer-${ rocketeerId }.jpg` )
|
|
||||||
|
|
||||||
setLoading( false )
|
|
||||||
|
|
||||||
} catch( e ) {
|
|
||||||
|
|
||||||
log( 'JPEG error ', e )
|
|
||||||
setError( 'JPEG error' )
|
|
||||||
|
|
||||||
} finally {
|
|
||||||
setLoading( false )
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// ///////////////////////////////
|
// ///////////////////////////////
|
||||||
// Rendering
|
// Rendering
|
||||||
@ -112,9 +83,9 @@ function App() {
|
|||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
|
||||||
<a href={ rocketeer.image } className="button">Download SVG</a>
|
<a href={ rocketeer.image } className="button">Download Jpeg</a>
|
||||||
|
|
||||||
<a href='/#' onClick={ e => downloadJPEG( e, 500 ) } className="button">Download JPEG</a>
|
<a href='/#' onClick={ rocketeer.image.replace( 'jpg', 'svg' ) } className="button">Download Svg</a>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user