[Build] Prepare for improved rendering capbilities
This commit is contained in:
		| @@ -4,6 +4,7 @@ const fs = require( 'fs' ); | ||||
| const path = require( 'path' ); | ||||
| const util = require( './util' ); | ||||
| const renderColourAsRGB = util.renderColourAsRGB; | ||||
| const renderColourAsRGBA = util.renderColourAsRGBA; | ||||
| const renderColourAsHex = util.renderColourAsHex; | ||||
|  | ||||
| const build = ( wallpaper, lockpaper, theme ) => { | ||||
| @@ -21,12 +22,14 @@ const build = ( wallpaper, lockpaper, theme ) => { | ||||
|             'colour-foreground-rgb': renderColourAsRGB( palette[ 0 ] ), | ||||
|             'colour-accent-hex': renderColourAsHex( palette[ 1 ] ), | ||||
|             'colour-accent-rgb': renderColourAsRGB( palette[ 1 ] ), | ||||
|             'colour-accent-rgba': renderColourAsRGBA( palette[ 1 ], 0.3 ), | ||||
|             'colour-accent-2-hex': renderColourAsHex( palette[ 2 ] ), | ||||
|             'colour-accent-2-rgb': renderColourAsRGB( palette[ 2 ] ), | ||||
|             'colour-accent-3-hex': renderColourAsHex( palette[ 3 ] ), | ||||
|             'colour-accent-3-rgb': renderColourAsRGB( palette[ 3 ] ), | ||||
|             'colour-background-hex': renderColourAsHex( colours.background[ theme ] ), | ||||
|             'colour-background-rgb': renderColourAsRGB( colours.background[ theme ] ), | ||||
|             'colour-background-rgba': renderColourAsRGBA( colours.background[ theme ], 0.5 ), | ||||
|             'colour-shadow-hex': renderColourAsHex( colours.shadow[ theme ] ), | ||||
|             'colour-shadow-rgb': renderColourAsRGB( colours.shadow[ theme ] ), | ||||
|             'colour-inavtive-hex': renderColourAsHex( colours.inactive[ theme ] ), | ||||
| @@ -57,7 +60,7 @@ const build = ( wallpaper, lockpaper, theme ) => { | ||||
|  | ||||
|         // recursively index files from config directory -> Maybe add a file to each | ||||
|         // directory to indicate whether or not to index files in it? | ||||
|         const fileList = util.treeWalker( path.join( __dirname, '/../config/' ), '*', [ 'node_modules', '@girs', '.gitignore', '.git', 'flavours' ] ); | ||||
|         const fileList = util.treeWalker( path.join( __dirname, '/../renderable/' ), '*', [ 'node_modules', '@girs', '.gitignore', '.git', 'flavours' ] ); | ||||
|  | ||||
|         // TODO: Copy missing files over directly | ||||
|         console.log( fileList ); | ||||
|   | ||||
| @@ -38,8 +38,13 @@ const renderColourAsRGB = ( colour ) => { | ||||
|     return `rgb( ${ colour[ 0 ] }, ${ colour[ 1 ] }, ${ colour[ 2 ] } )` | ||||
| } | ||||
|  | ||||
| const renderColourAsRGBA = ( colour, ambiance ) => { | ||||
|     return `rgb( ${ colour[ 0 ] }, ${ colour[ 1 ] }, ${ colour[ 2 ] }, ${ ambiance } )` | ||||
| } | ||||
|  | ||||
| module.exports = { | ||||
|     treeWalker, | ||||
|     renderColourAsHex, | ||||
|     renderColourAsRGB | ||||
|     renderColourAsRGB, | ||||
|     renderColourAsRGBA | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user