Generate GreyHack website with image
npm install gh-website-image-generator``bash`
npm install -g gh-website-image-generator
`
Usage: gh-website-image-generator [options]
Generates Grey Hack website with image.
Arguments:
filepath image to transform
width output width of image
height output height of image
Options:
-V, --version output the version number
-o, --output-directory
-id, --canvas-id
-s, --scale
-wa, --without-alpha ignore alpha channel
-ar, --asnyc-rendering use setTimeout to trigger draw which makes it render async
-cm, --compression-mode set compression mode (0 - none, 1 - medium, 2 - heavy)
-h, --help display help for command
`
By default, images are rendered synchronously, which can block the game's UI until the image has fully loaded, especially with large images.
Enabling --async-rendering offloads image rendering to a separate thread, keeping the UI responsive. However, due to a poorly implemented setTimeout mechanism in PowerUI, images may occasionally fail to render on the first load when this flag is enabled. This appears to be an issue with PowerUI.
If you have an existing website and just want to add images to it, you can use the --canvas-id option.
1. Add a