├── .gitignore ├── .nvmrc ├── README.md ├── docs └── screenshot.png ├── index.html ├── package-lock.json ├── package.json └── public ├── Gradients ├── gradi001.png ├── gradi002.png ├── gradi003.png ├── gradi004.png ├── gradi005.png ├── gradi006.png ├── gradi007.png ├── gradi008.png ├── gradi009.png ├── gradi010.png ├── gradi011.png ├── gradi012.png ├── gradi013.png ├── gradi014.png ├── gradi015.png ├── gradi016.png ├── gradi017.png ├── gradi018.png ├── gradi019.png └── gradi020.png ├── JS2sprites ├── Aggromaxx │ ├── 001.svg │ ├── 002.svg │ ├── 003-alt.svg │ ├── 003.svg │ ├── 004.svg │ ├── Addon.svg │ ├── Addon2.svg │ ├── Addon3.svg │ ├── Vent.svg │ ├── Vent2.svg │ ├── Wires.svg │ └── Wires2.svg ├── BigData │ ├── 001.svg │ ├── 002.svg │ ├── 003a.svg │ ├── 003b.svg │ └── 005.svg ├── CrapPack │ ├── altcrap-001.svg │ ├── altcrap-001b.svg │ ├── altcrap-002.svg │ ├── altcrap-003.svg │ ├── altcrap-004.svg │ ├── altcrap-005.svg │ ├── altcrap-006.svg │ ├── altcrap-007.svg │ ├── altcrap-008.svg │ ├── altcrap-009.svg │ ├── altcrap-010.svg │ ├── altcrap-011.svg │ ├── altcrap-012.svg │ ├── altcrap-013.svg │ ├── altcrap-014.svg │ ├── altcrap-015.svg │ ├── altcrap-016.svg │ ├── altcrap-016b.svg │ ├── crap-001.svg │ ├── crap-002.svg │ ├── crap-003.svg │ ├── crap-004.svg │ ├── crap-005.svg │ ├── crap-006.svg │ ├── crap-007.svg │ ├── crap-007b.svg │ └── newcrap-001.svg └── JS2Classic │ ├── 001.svg │ ├── 004.svg │ ├── 005.svg │ ├── 006.svg │ ├── 007.svg │ ├── 008.svg │ ├── 009.svg │ ├── 010.svg │ ├── 011.svg │ ├── 012.svg │ ├── 013.svg │ ├── 014.svg │ ├── 015.svg │ ├── 016.svg │ ├── 017.svg │ ├── 018.svg │ └── 019.svg ├── JSUdata ├── addons │ ├── A-000.png │ ├── B-000.png │ ├── C-000.png │ ├── D-000.png │ ├── E-000.png │ └── F-000.png └── bases │ ├── 000.png │ ├── 001.png │ └── 002.png ├── WEB_PORT.css ├── WEB_PORT.js ├── WEB_PORT_AFTER.js ├── WEB_PORT_icon.png ├── WEB_PORT_og_image.png ├── googlec44b55cb93ac5031.html ├── guides ├── gradients.html ├── index.html ├── js2-2-01.jpg ├── js2-2.html ├── js2.html ├── jsc.html ├── jsd.html ├── jsv.html └── jsw.html ├── pages ├── about.html ├── gen │ ├── dotgrid.html │ ├── jsplacement.html │ ├── jsplacement2.html │ ├── metropolis.html │ ├── ultra.html │ ├── velvet.html │ └── wyre.html ├── gradients.html ├── home.html └── settings.html ├── req ├── img │ ├── canbg-light.png │ ├── canbg.png │ ├── canwork.png │ ├── dots │ │ ├── box.svg │ │ ├── circle.svg │ │ ├── diamond.svg │ │ ├── diamondout.svg │ │ ├── pat-xline.svg │ │ ├── pat-xyadd.svg │ │ ├── pat-xygrid.svg │ │ ├── pat-xysub.svg │ │ ├── pat-yline.svg │ │ ├── pat-yxadd.svg │ │ ├── pat-yxsub.svg │ │ ├── ring.svg │ │ └── square.svg │ ├── gradi.png │ ├── home-light.jpg │ ├── home.jpg │ ├── hotkeys.png │ ├── jsico.ico │ ├── jsico.png │ ├── logo.png │ ├── overlay │ │ └── overlay001.png │ ├── splash │ │ ├── 01.jpg │ │ ├── 02.jpg │ │ ├── 03.jpg │ │ ├── 04.jpg │ │ ├── 05.jpg │ │ ├── 06.jpg │ │ ├── 07.jpg │ │ ├── 08.jpg │ │ ├── 09.jpg │ │ ├── 10.jpg │ │ ├── 11.jpg │ │ ├── 12.jpg │ │ └── 13.jpg │ └── upd.svg ├── js │ ├── gen │ │ ├── common │ │ │ ├── blob.js │ │ │ ├── colorizer.js │ │ │ ├── common.js │ │ │ └── filesaver.js │ │ ├── js-2 │ │ │ └── js-2.js │ │ ├── js-classic │ │ │ ├── js-classic.js │ │ │ ├── preset.js │ │ │ ├── presets.json │ │ │ └── userpresets.json │ │ ├── js-dotgrid │ │ │ └── js-dotgrid.js │ │ ├── js-metropolis │ │ │ └── js-metropolis.js │ │ ├── js-ultra │ │ │ └── js-ultra.js │ │ ├── js-velvet │ │ │ └── js-velvet.js │ │ └── js-wyre │ │ │ └── js-wyre.js │ └── sys │ │ ├── backbone.js │ │ ├── config.js │ │ ├── hotkeys.js │ │ ├── jsunloader.js │ │ ├── navigation.js │ │ ├── settings.js │ │ ├── splash.js │ │ └── vercheck.js ├── jsplacement.conf ├── style-pro.css └── style.css └── robots.txt /.gitignore: -------------------------------------------------------------------------------- 1 | # node.js 2 | node_modules/ 3 | 4 | # builds 5 | dist/ 6 | 7 | # os-specific 8 | .DS_Store 9 | -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | 18 -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # JSPlacementWeb 2 | 3 | 👾👽 4 | 5 | Web version of **JSPlacement** - procedural displacement sci-fi maps generator. 6 | 7 | **https://jsplacementweb.pages.dev/** 8 | 9 | 10 | 11 | 12 | ## You might also like 🖤 13 | 14 | ▶▶▶ Check out **[Displacement X](https://github.com/satelllte/displacementx)** - free and open source alternative of `JSplacement`. 15 | 16 | ## IMPORTANT INFORMATION 17 | 18 | - I am not the author of this software. All rights belong to [Windmill](https://windmillart.net/) - the creator of JSPlacement original desktop application. The only thing I did is ported it to web. 19 | - I don't make any money from this software and I didn't steal it because the source code of any [Electron](https://www.electronjs.org/) app is not protected from reading. 20 | - The reason for making this port is to keep this amazing, useful and loved piece of software alive ❤️. Also, please consider to support the author of this software - [Windmill](https://windmillart.net/), who wasn't getting enough respect and who eventually [turned it down](https://www.reddit.com/r/blender/comments/zfwmjr/does_anyone_know_what_happened_to_jsplacement/) 😔: 21 | - https://www.paypal.com/paypalme/WMillArt 22 | - https://ko-fi.com/windmill 23 | - Note that this software is unstable, because it's a quick port which is missing some features and which might be buggy. This is mostly because there's no file system access given to the web application. 24 | 25 | ## Technical details 26 | 27 | The original static files of the port moved into `/public` directory, which is served by [Vite](https://vitejs.dev/) tool. 28 | 29 | All the web overrides are highlighted with the code comments containing `WEB_PORT` word. 30 | 31 | The original desktop app source code is available at [native](https://github.com/satelllte/JSPlacementWeb/tree/native) branch, which can be compared against the `main` branch anytime. 32 | 33 | To run local development server, clone the repository and run: 34 | 35 | ```sh 36 | npm ci 37 | nvm use 38 | npm run dev 39 | ``` 40 | -------------------------------------------------------------------------------- /docs/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satelllte/JSPlacementWeb/f5de697e47d312e642aba7013781ff04e5de1247/docs/screenshot.png -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "JSPlacementWeb", 3 | "version": "1.3.0", 4 | "description": "Web version of JSPlacement app - procedural displacement sci-fi maps generator.", 5 | "author": "Windmill", 6 | "keywords": [ 7 | "jsplacement", 8 | "jsplacement-web", 9 | "displacement-map", 10 | "displacement-maps", 11 | "normal-map", 12 | "normal-maps", 13 | "generative-art", 14 | "sci-fi", 15 | "blender", 16 | "blender-maps", 17 | "blender-displacement" 18 | ], 19 | "scripts": { 20 | "dev": "vite dev", 21 | "build": "vite build", 22 | "preview": "vite preview" 23 | }, 24 | "devDependencies": { 25 | "vite": "^4.4.9" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /public/Gradients/gradi001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satelllte/JSPlacementWeb/f5de697e47d312e642aba7013781ff04e5de1247/public/Gradients/gradi001.png -------------------------------------------------------------------------------- /public/Gradients/gradi002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satelllte/JSPlacementWeb/f5de697e47d312e642aba7013781ff04e5de1247/public/Gradients/gradi002.png -------------------------------------------------------------------------------- /public/Gradients/gradi003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satelllte/JSPlacementWeb/f5de697e47d312e642aba7013781ff04e5de1247/public/Gradients/gradi003.png -------------------------------------------------------------------------------- /public/Gradients/gradi004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satelllte/JSPlacementWeb/f5de697e47d312e642aba7013781ff04e5de1247/public/Gradients/gradi004.png -------------------------------------------------------------------------------- /public/Gradients/gradi005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satelllte/JSPlacementWeb/f5de697e47d312e642aba7013781ff04e5de1247/public/Gradients/gradi005.png -------------------------------------------------------------------------------- /public/Gradients/gradi006.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satelllte/JSPlacementWeb/f5de697e47d312e642aba7013781ff04e5de1247/public/Gradients/gradi006.png -------------------------------------------------------------------------------- /public/Gradients/gradi007.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satelllte/JSPlacementWeb/f5de697e47d312e642aba7013781ff04e5de1247/public/Gradients/gradi007.png -------------------------------------------------------------------------------- /public/Gradients/gradi008.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satelllte/JSPlacementWeb/f5de697e47d312e642aba7013781ff04e5de1247/public/Gradients/gradi008.png -------------------------------------------------------------------------------- /public/Gradients/gradi009.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satelllte/JSPlacementWeb/f5de697e47d312e642aba7013781ff04e5de1247/public/Gradients/gradi009.png -------------------------------------------------------------------------------- /public/Gradients/gradi010.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satelllte/JSPlacementWeb/f5de697e47d312e642aba7013781ff04e5de1247/public/Gradients/gradi010.png -------------------------------------------------------------------------------- /public/Gradients/gradi011.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satelllte/JSPlacementWeb/f5de697e47d312e642aba7013781ff04e5de1247/public/Gradients/gradi011.png -------------------------------------------------------------------------------- /public/Gradients/gradi012.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satelllte/JSPlacementWeb/f5de697e47d312e642aba7013781ff04e5de1247/public/Gradients/gradi012.png -------------------------------------------------------------------------------- /public/Gradients/gradi013.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satelllte/JSPlacementWeb/f5de697e47d312e642aba7013781ff04e5de1247/public/Gradients/gradi013.png -------------------------------------------------------------------------------- /public/Gradients/gradi014.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satelllte/JSPlacementWeb/f5de697e47d312e642aba7013781ff04e5de1247/public/Gradients/gradi014.png -------------------------------------------------------------------------------- /public/Gradients/gradi015.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satelllte/JSPlacementWeb/f5de697e47d312e642aba7013781ff04e5de1247/public/Gradients/gradi015.png -------------------------------------------------------------------------------- /public/Gradients/gradi016.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satelllte/JSPlacementWeb/f5de697e47d312e642aba7013781ff04e5de1247/public/Gradients/gradi016.png -------------------------------------------------------------------------------- /public/Gradients/gradi017.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satelllte/JSPlacementWeb/f5de697e47d312e642aba7013781ff04e5de1247/public/Gradients/gradi017.png -------------------------------------------------------------------------------- /public/Gradients/gradi018.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satelllte/JSPlacementWeb/f5de697e47d312e642aba7013781ff04e5de1247/public/Gradients/gradi018.png -------------------------------------------------------------------------------- /public/Gradients/gradi019.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satelllte/JSPlacementWeb/f5de697e47d312e642aba7013781ff04e5de1247/public/Gradients/gradi019.png -------------------------------------------------------------------------------- /public/Gradients/gradi020.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satelllte/JSPlacementWeb/f5de697e47d312e642aba7013781ff04e5de1247/public/Gradients/gradi020.png -------------------------------------------------------------------------------- /public/JS2sprites/Aggromaxx/001.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/JS2sprites/Aggromaxx/Addon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/JS2sprites/Aggromaxx/Addon3.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/JS2sprites/CrapPack/altcrap-001.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/JS2sprites/CrapPack/altcrap-001b.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/JS2sprites/CrapPack/altcrap-002.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/JS2sprites/CrapPack/altcrap-003.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/JS2sprites/CrapPack/altcrap-004.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/JS2sprites/CrapPack/altcrap-005.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/JS2sprites/CrapPack/altcrap-006.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/JS2sprites/CrapPack/altcrap-007.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/JS2sprites/CrapPack/altcrap-009.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/JS2sprites/CrapPack/altcrap-011.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/JS2sprites/CrapPack/altcrap-013.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/JS2sprites/CrapPack/altcrap-014.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/JS2sprites/CrapPack/altcrap-015.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/JS2sprites/CrapPack/altcrap-016.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/JS2sprites/CrapPack/altcrap-016b.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/JS2sprites/CrapPack/crap-003.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/JS2sprites/CrapPack/crap-004.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/JS2sprites/CrapPack/crap-007.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/JS2sprites/CrapPack/crap-007b.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/JS2sprites/CrapPack/newcrap-001.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/JS2sprites/JS2Classic/005.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/JS2sprites/JS2Classic/013.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/JS2sprites/JS2Classic/018.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/JSUdata/addons/A-000.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satelllte/JSPlacementWeb/f5de697e47d312e642aba7013781ff04e5de1247/public/JSUdata/addons/A-000.png -------------------------------------------------------------------------------- /public/JSUdata/addons/B-000.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satelllte/JSPlacementWeb/f5de697e47d312e642aba7013781ff04e5de1247/public/JSUdata/addons/B-000.png -------------------------------------------------------------------------------- /public/JSUdata/addons/C-000.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satelllte/JSPlacementWeb/f5de697e47d312e642aba7013781ff04e5de1247/public/JSUdata/addons/C-000.png -------------------------------------------------------------------------------- /public/JSUdata/addons/D-000.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satelllte/JSPlacementWeb/f5de697e47d312e642aba7013781ff04e5de1247/public/JSUdata/addons/D-000.png -------------------------------------------------------------------------------- /public/JSUdata/addons/E-000.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satelllte/JSPlacementWeb/f5de697e47d312e642aba7013781ff04e5de1247/public/JSUdata/addons/E-000.png -------------------------------------------------------------------------------- /public/JSUdata/addons/F-000.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satelllte/JSPlacementWeb/f5de697e47d312e642aba7013781ff04e5de1247/public/JSUdata/addons/F-000.png -------------------------------------------------------------------------------- /public/JSUdata/bases/000.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satelllte/JSPlacementWeb/f5de697e47d312e642aba7013781ff04e5de1247/public/JSUdata/bases/000.png -------------------------------------------------------------------------------- /public/JSUdata/bases/001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satelllte/JSPlacementWeb/f5de697e47d312e642aba7013781ff04e5de1247/public/JSUdata/bases/001.png -------------------------------------------------------------------------------- /public/JSUdata/bases/002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satelllte/JSPlacementWeb/f5de697e47d312e642aba7013781ff04e5de1247/public/JSUdata/bases/002.png -------------------------------------------------------------------------------- /public/WEB_PORT.css: -------------------------------------------------------------------------------- 1 | #WEB_PORT_head { 2 | position: fixed; 3 | z-index: 1000; 4 | top: 42px; 5 | right: 0; 6 | font-size: 16px; 7 | font-weight: bold; 8 | padding: 12px 8px; 9 | padding-top: 8px; 10 | margin: 0; 11 | color: #F44; 12 | display: flex; 13 | flex-direction: column; 14 | align-items: flex-end; 15 | background-color: rgba(0, 0, 0, 0.2); 16 | } 17 | #WEB_PORT_head > h1 { 18 | font-size: 16px; 19 | } 20 | #WEB_PORT_head > a { 21 | color: #44F; 22 | font-size: 12px; 23 | text-decoration: underline; 24 | } 25 | -------------------------------------------------------------------------------- /public/WEB_PORT.js: -------------------------------------------------------------------------------- 1 | // define `__dirname` global variable which is used in the original source code 2 | __dirname = ""; 3 | 4 | // define `rand` function 5 | function rand(min, max) { 6 | min = Math.ceil(min); 7 | max = Math.floor(max); 8 | return Math.floor(Math.random() * (max - min + 1)) + min; 9 | } 10 | 11 | // define `files` global variable which is used in the original source code 12 | files = [ 13 | 'JS2sprites/Aggromaxx/001.svg', 14 | 'JS2sprites/Aggromaxx/002.svg', 15 | 'JS2sprites/Aggromaxx/003.svg', 16 | 'JS2sprites/Aggromaxx/003-alt.svg', 17 | 'JS2sprites/Aggromaxx/004.svg', 18 | 'JS2sprites/Aggromaxx/Addon.svg', 19 | 'JS2sprites/Aggromaxx/Addon2.svg', 20 | 'JS2sprites/Aggromaxx/Addon3.svg', 21 | 'JS2sprites/Aggromaxx/Vent.svg', 22 | 'JS2sprites/Aggromaxx/Vent2.svg', 23 | 'JS2sprites/Aggromaxx/Wires.svg', 24 | 'JS2sprites/Aggromaxx/Wires2.svg', 25 | 'JS2sprites/BigData/001.svg', 26 | 'JS2sprites/BigData/002.svg', 27 | 'JS2sprites/BigData/003a.svg', 28 | 'JS2sprites/BigData/003b.svg', 29 | 'JS2sprites/BigData/005.svg', 30 | 'JS2sprites/CrapPack/altcrap-001.svg', 31 | 'JS2sprites/CrapPack/altcrap-001b.svg', 32 | 'JS2sprites/CrapPack/altcrap-002.svg', 33 | 'JS2sprites/CrapPack/altcrap-003.svg', 34 | 'JS2sprites/CrapPack/altcrap-004.svg', 35 | 'JS2sprites/CrapPack/altcrap-005.svg', 36 | 'JS2sprites/CrapPack/altcrap-006.svg', 37 | 'JS2sprites/CrapPack/altcrap-007.svg', 38 | 'JS2sprites/CrapPack/altcrap-008.svg', 39 | 'JS2sprites/CrapPack/altcrap-009.svg', 40 | 'JS2sprites/CrapPack/altcrap-010.svg', 41 | 'JS2sprites/CrapPack/altcrap-011.svg', 42 | 'JS2sprites/CrapPack/altcrap-012.svg', 43 | 'JS2sprites/CrapPack/altcrap-013.svg', 44 | 'JS2sprites/CrapPack/altcrap-014.svg', 45 | 'JS2sprites/CrapPack/altcrap-015.svg', 46 | 'JS2sprites/CrapPack/altcrap-016.svg', 47 | 'JS2sprites/CrapPack/altcrap-016b.svg', 48 | 'JS2sprites/CrapPack/crap-001.svg', 49 | 'JS2sprites/CrapPack/crap-002.svg', 50 | 'JS2sprites/CrapPack/crap-003.svg', 51 | 'JS2sprites/CrapPack/crap-004.svg', 52 | 'JS2sprites/CrapPack/crap-005.svg', 53 | 'JS2sprites/CrapPack/crap-006.svg', 54 | 'JS2sprites/CrapPack/crap-007.svg', 55 | 'JS2sprites/CrapPack/crap-007b.svg', 56 | 'JS2sprites/CrapPack/newcrap-001.svg', 57 | 'JS2sprites/JS2Classic/001.svg', 58 | 'JS2sprites/JS2Classic/004.svg', 59 | 'JS2sprites/JS2Classic/005.svg', 60 | 'JS2sprites/JS2Classic/006.svg', 61 | 'JS2sprites/JS2Classic/007.svg', 62 | 'JS2sprites/JS2Classic/008.svg', 63 | 'JS2sprites/JS2Classic/009.svg', 64 | 'JS2sprites/JS2Classic/010.svg', 65 | 'JS2sprites/JS2Classic/011.svg', 66 | 'JS2sprites/JS2Classic/012.svg', 67 | 'JS2sprites/JS2Classic/013.svg', 68 | 'JS2sprites/JS2Classic/014.svg', 69 | 'JS2sprites/JS2Classic/015.svg', 70 | 'JS2sprites/JS2Classic/016.svg', 71 | 'JS2sprites/JS2Classic/017.svg', 72 | 'JS2sprites/JS2Classic/018.svg', 73 | 'JS2sprites/JS2Classic/019.svg', 74 | 'JSUdata/bases/000', 75 | 'JSUdata/bases/001', 76 | 'JSUdata/bases/002', 77 | 'JSUdata/addons/A-000', 78 | 'JSUdata/addons/B-000', 79 | 'JSUdata/addons/C-000', 80 | 'JSUdata/addons/D-000', 81 | 'JSUdata/addons/E-000', 82 | 'JSUdata/addons/F-000', 83 | ]; 84 | 85 | // define `gfiles` global variable which contains paths to gradients 86 | gfiles = [ 87 | 'Gradients/gradi001.png', 88 | 'Gradients/gradi002.png', 89 | 'Gradients/gradi003.png', 90 | 'Gradients/gradi004.png', 91 | 'Gradients/gradi005.png', 92 | 'Gradients/gradi006.png', 93 | 'Gradients/gradi007.png', 94 | 'Gradients/gradi008.png', 95 | 'Gradients/gradi009.png', 96 | 'Gradients/gradi010.png', 97 | 'Gradients/gradi011.png', 98 | 'Gradients/gradi012.png', 99 | 'Gradients/gradi013.png', 100 | 'Gradients/gradi014.png', 101 | 'Gradients/gradi015.png', 102 | 'Gradients/gradi016.png', 103 | 'Gradients/gradi017.png', 104 | 'Gradients/gradi018.png', 105 | 'Gradients/gradi019.png', 106 | 'Gradients/gradi020.png', 107 | ]; 108 | 109 | // define global configuration object 110 | cfg = { 111 | General: { 112 | skipSplashScreen: true, 113 | disableAnimations: false, 114 | disableUpdateCheck: true, 115 | timestampFormat: 0, 116 | skin: 0, 117 | iddqd: false, 118 | } 119 | } -------------------------------------------------------------------------------- /public/WEB_PORT_AFTER.js: -------------------------------------------------------------------------------- 1 | // attach static images to the document 2 | (() => { 3 | const container = document.createElement('div'); 4 | container.id = 'imgs'; 5 | for (i = 0; i < files.length; i++){ 6 | container.innerHTML = container.innerHTML + ""; 7 | } 8 | document.body.appendChild(container); 9 | })(); 10 | -------------------------------------------------------------------------------- /public/WEB_PORT_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satelllte/JSPlacementWeb/f5de697e47d312e642aba7013781ff04e5de1247/public/WEB_PORT_icon.png -------------------------------------------------------------------------------- /public/WEB_PORT_og_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satelllte/JSPlacementWeb/f5de697e47d312e642aba7013781ff04e5de1247/public/WEB_PORT_og_image.png -------------------------------------------------------------------------------- /public/googlec44b55cb93ac5031.html: -------------------------------------------------------------------------------- 1 | google-site-verification: googlec44b55cb93ac5031.html -------------------------------------------------------------------------------- /public/guides/gradients.html: -------------------------------------------------------------------------------- 1 | Close guide 2 | « Guide index

3 | 4 |

Custom colorizer gradients

5 | 6 |

7 | Adding custom gradients 8 | can be done in several ways.
9 |

10 | 11 |

12 | The first way 13 | is to create a 256x256 image with a left to right gradient of your choice. This can be done in various applications such as Adobe Photoshop and Illustrator, Affinity Photo and Designer, GIMP, Inkscape, etc. 14 |

15 | 16 |

17 | The second way 18 | is sampling. Crop and downscale an image to 256x256 size, select a 256x1 area, and scale it up to 256x256 using nearest neighbour interpolation for best result. 19 |

20 | 21 |

22 | The third way 23 | is sampling for lazy people. Just use the picture as is. JSplacement's colorizer will sample it for you. 24 |

25 | 26 |

27 | Adding gradients 28 | to JSplacement works the same way as custom sprites.
29 | Go to your home directory and open "JSplacement" folder or use "C" hotkey in JSplacement.
30 | Place your gradient images into "CustomGradients" folder. 31 |

32 | 33 |
34 |

35 | Supported file formats: 36 | JPG, PNG, BMP 37 |

38 | -------------------------------------------------------------------------------- /public/guides/index.html: -------------------------------------------------------------------------------- 1 |

JSplacement Digital Guide

2 | 3 | 7 | 8 | JSplacement: Classic
9 | Generator settings »
10 |
11 | 12 | JSplacement: 2
13 | Generator settings »
14 | Custom sprites »
15 |
16 | 17 | JSplacement: Velvet
18 | Generator settings »
19 |
20 | 21 | JSplacement: Wyre
22 | Generator settings »
23 |
24 | 25 | JSplacement: dotGrid
26 | Generator settings »
27 |
28 | 29 | Additional features
30 | Custom colorizer gradients »
31 |
32 | 33 | 34 | 35 | 36 | 37 | Close guide
38 | -------------------------------------------------------------------------------- /public/guides/js2-2-01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satelllte/JSPlacementWeb/f5de697e47d312e642aba7013781ff04e5de1247/public/guides/js2-2-01.jpg -------------------------------------------------------------------------------- /public/guides/js2-2.html: -------------------------------------------------------------------------------- 1 | Close guide 2 | « Guide index

3 | 4 |

JSplacement: 2 - Custom sprites

5 | 6 | 7 | 8 |

9 | To create custom sprites 10 | you will need an illustration software capable of exporting SVG files such as Adobe Illustrator, Affinity Designer, or Inkscape. 11 | Please se attached image as a reference for creating your own sprites. 12 |

13 | 14 |

15 | Start creating 16 | your custom sprite by opening a new document.
17 | Due to way JSplacement: 2 sprite scaling has been set, the canvas should ALWAYS be in 1:1 ratio
18 | to avoid any issues with scaling, proportions, and tiling when using seamless generator.
19 | The base color of JSplacement: 2 maps is rgb(128,128,128). Any higher value will go up, lower will go down. 20 |

21 | 22 |

23 | After drawing your sprite, 24 | scale it up or down to fit onto the canvas for the best result. For the reference, see the image on the right.
25 | However, sprites that are intended to be smaller than the most can be smaller than the canvas itself.
26 | Center aligning your sprite is not required. That one is up to your personal preference. 27 |

28 | 29 |

30 | Import your sprites into JSplacement: 2 31 | by opening user data folder in your home directory ("JSplacement"), or by pressing C on your keyboard.
32 | Move your SVG sprites into "CustomSprites" folder and select "Custom Sprites" in JSplacement: 2's settings. 33 |

34 | 35 | 36 | 37 |
38 |

39 | Warning: 40 | While using PNG sprites with JSplacement: 2 is possible, SVG is much lighter and prefered option. 41 |

42 | 43 | JSplacement: 2 - Generator settings » 44 | -------------------------------------------------------------------------------- /public/guides/js2.html: -------------------------------------------------------------------------------- 1 | Close guide 2 | « Guide index

3 | 4 |

JSplacement: 2 - Generator settings

5 | 6 |

7 | Sprite set: 8 | This is just as simple as it looks. A selector between sprite sets that come with JSplacement and custom sprites.
9 | Please read next page for full documentation on how to make and use custom sprites. 10 |

11 | 12 |

13 | Background brightness: 14 | Control background color of the map for different results in whatever you're going to do with it.
15 | In displacement, setting this to 0 will make everything extrude. 255 does the opposite. By default this is 128. 16 |

17 | 18 |

19 | Background iterations: 20 | These are sorted sprite draws which happen on the background to fill the holes on the canvas 21 | and, in most cases, lowers the required amount of sprites to fill the canvas. 22 | Each iteration creates a layer of random sprites in even formation. 23 | 1 iteration draws a single sprite on whole canvas. 2 iterations draw additional 2x2 sprites. 24 | 3 iterations draw additional 3x3. 4 iterations draw additional 4x4. Setting background iterations 0 will disable this feature.
25 | Total count of sprites per levels are: 1 for 1, 5 for 2, 14 for 3, and 30 for 4. By default this is set to 3. 26 |

27 | 28 |

29 | Iterations: 30 | This is the main value of JSplacement: 2. It controls the exact amount of sprites drawn onto the canvas 31 | with exception when using seamless mode which occasionally performs multiple sprite draws based on co-ordinates. 32 | Please note that this is one of two key factors in JSplacement: 2's performance and it will slow down when set to a high value. 33 | By default this is set to 125. 34 |

35 | 36 |

37 | Sprite scaling: 38 | This is the second main value of JSplacement: 2. It controls the average size of generated sprites 39 | based on some math thing that I don't even remember anymore, but it made sense when I did it. 40 | Sprite scaling should be set together with the amount of iteration to achieve desired look.
41 | Please note that just like iterations, sprite scaling affects the overall performance. Larger sprites take longer to generate. 42 | By default this is set to 60. 43 |

44 | 45 |

46 | Seamless: 47 | This switch enables or disables seamless generator mode. In seamless mode, sprites are drawn second time on the opposite side of the canvas 48 | if the sprite is out of bounds to create seamless repeating pattern. If sprite overlaps with a corner, additional 3 draws will be done. 49 | By default this is turned on. 50 |

51 | 52 |

53 | Rotate sprites & Flip sprites: 54 | When turned on, generator will randomly rotate and/or mirror the dreawn sprites to add extra variety to the generated map. 55 | Rotation is done in steps of 90 degrees (0°, 90°, 180°, 270°). By default both of these are turned on. 56 |

57 | 58 |

59 | Blend sprites: 60 | When turned on, generated sprite may use lighten/darken blending mode instead of normal mode. 61 | The odds of using blending modes are: 60% normal, 20% darken, 20% lighten. By default this is turned on. 62 |

63 | 64 | 65 | 66 | JSplacement: 2 - Custom sprites » 67 | -------------------------------------------------------------------------------- /public/guides/jsc.html: -------------------------------------------------------------------------------- 1 | Close guide 2 | « Guide index

3 | 4 |

JSplacement: Classic - Generator settings

5 | 6 |

7 | Iterations: 8 | This is the main value of JSplacement: Classic. It controls the exact amount of objects drawn onto the canvas.
9 | By default this is set to 1000. 10 |

11 | 12 |

13 | Background brightness: 14 | Control background color of the map for different results in whatever you're going to do with it.
15 | In displacement, setting this to 0 will make everything extrude. 255 does the opposite. By default this is 128. 16 |

17 | 18 |

19 | Object types: 20 | Series of switches for various types of objects. Turning all objects off will be overwritten by box only.
21 | By default all are turned on. 22 |

23 | 24 |
25 |

Object settings

26 | 27 |

28 | Brightness clamp: 29 | Limit generated shape's brightness between two values OR set both sliders to the same value to make it static.
30 | By default these are set to 0 and 255. 31 |

32 | 33 |

34 | Scale: 35 | Control shapes' average size. By default it's 100%. 36 |

37 | 38 |

39 | Alpha: 40 | Control the opacity of transparent boxes the same way the brightness clamp works.
41 | By default these are set to 50% and 80%. 42 |

43 | 44 |

45 | Spacing: 46 | Control the size of the space between the shapes in the patterns.
47 | By default these are set to 100%. 48 |

49 | 50 |

51 | Max Amount: 52 | Contol the maximum amount of elements in the patterns.
53 | By default these are set to 5. 54 |

55 | 56 |

57 | Line Width: 58 | Control the pixel width of the generated lines.
59 | By default these are set to 10. 60 |

61 | 62 |
63 |

Other

64 | 65 |

66 | Randomize: 67 | This button will randomize every single setting in this generator. Have fun! 68 |

69 | 70 |

71 | Presets: 72 | This button will open a list of "Windmill's Seal of Approval" presets. 73 |

74 | -------------------------------------------------------------------------------- /public/guides/jsd.html: -------------------------------------------------------------------------------- 1 | Close guide 2 | « Guide index

3 | 4 |

JSplacement: dotGrid - Generator settings

5 | 6 |

7 | Scale: 8 | This slider defines the scale of dots on the map. By default this is set to 30. 9 |

10 | 11 |

12 | Minimum brightness: 13 | This slider defines the minimum brightness of the dots, which affects the visibility when used as a mask. By default this is set to 0. 14 |

15 | 16 |

17 | Drawning chance %: 18 | Unlike other generators, dotGrid uses systematic co-ordinate based system rather than amount of iterations.
19 | Drawing chance defines the odds of a dot or pattern being drawn per point on co-ordinates.
20 | By default this is set to 2.5. 21 |

22 | 23 |

24 | Pattern max length: 25 | The maximum lenght of the patterns. By default this is 5. 26 |

27 | 28 |

29 | Dot shapes: 30 | Series of switches for various types of dots. Turning all dots off will be overwritten by box only.
31 | By default all are turned on. 32 |

33 | 34 |

35 | Dot patterns: 36 | Series of switches for various types of patterns which use selected dot types. Turning all pattern types off will disable patterns entirely.
37 | By default all are turned on. 38 |

39 | 40 |

41 | Break the code: 42 | This switch disables necessary path closing in the code and turns on every single switch. It simulates the accidental broken code during the development of JSplacement 1.1.0.
43 | By default this is turned off. 44 |

45 | -------------------------------------------------------------------------------- /public/guides/jsv.html: -------------------------------------------------------------------------------- 1 | Close guide 2 | « Guide index

3 | 4 |

JSplacement: Velvet - Generator settings

5 | 6 |

7 | Iterations: 8 | This controls the value of the boxes drawn onto the canvas multiplied by 2 if using X or Y symmetry. 4 if X&Y. By default this is set to 100. 9 |

10 | 11 |

12 | Sub-iterations: 13 | This controls the value of additional boxes drawn onto the canvas in X shape. Like normal iterations, these are multiplied based on symmetry. Default: 50. 14 |

15 | 16 |

17 | Splitter iterations: 18 | This controls the amount of boxes drawn onto the canvas in + shape. This value is multiplied by 2 regardless of the symmetry. Default: 50. 19 |

20 | 21 |

22 | Background brightness: 23 | Control background color of the map for different results in whatever you're going to do with it.
24 | In d 25 | isplacement, setting this to 0 will make everything extrude. 255 does the opposite. By default this is 128. 26 |

27 | 28 |

29 | Symmetry along: 30 | This selector allows you to pick what type of symmetry you want from JSplacement: Velvet. By default this is set to X & Y. 31 |

32 | 33 |

34 | Use splitter: 35 | This selector allows you to turn generation of + shaped overlay on and off. By default this is set to Yes. 36 |

37 | 38 |

39 | Use splitter blending: 40 | This selector allows you to turn + shaped overlay's difference blending mode on and off. By default this is set to Yes. 41 |

42 | -------------------------------------------------------------------------------- /public/guides/jsw.html: -------------------------------------------------------------------------------- 1 | Close guide 2 | « Guide index

3 | 4 |

JSplacement: Wyre - Generator settings

5 | 6 |

7 | Layer count: 8 | Defines the amount of overlapping layers of wires from 2 to 255. By default this is 35. 9 |

10 | 11 |

12 | Wires per layer: 13 | Number of separate wires drawn per each layer. By default this is 3.
14 | Warning! Setting this values high may cause serious lag on lower end computers. Tread carefully. 15 |

16 | 17 |

18 | Max wire width: 19 | Maximum pixel width of the wire. By default this is 64. 20 |

21 | 22 |

23 | Max origin spread: 24 | This setting adds maximum size of the random offset to wire's point of origin. By default this is 0. 25 |

26 | 27 |

28 | Min and max step length: 29 | Minimum and maximum required distance between two points on the wire. By default these are 128 and 2048.
30 | Warning! Setting these values low may cause serious lag on lower end computers. Tread carefully. 31 |

32 | 33 |

34 | Wire color mode: 35 | This controls the way wires' brightness is set. Linear and curve draw them from dark to bright layer by layer.
36 | Inverted linear and inverted curve draw them from bright to dark. Random selects random brightness from 1 to 255.
37 | By default this is set to linear. 38 |

39 | 40 |

41 | Wire width mode: 42 | This controls the way wires' pixel thickness is set. Linear and curve draw them from thick to thin layer by layer.
43 | Inverted linear and inverted curve draw them from thin to thick. Random selects random width from 1 to maximum set width.
44 | By default this is set to random. 45 |

46 | 47 |
48 |

Step directions

49 | 50 |

51 | Any: 52 | In this mode, wires have 8 different travel directions per step. This is the default value. 53 |

54 | 55 |

56 | Cardinal: 57 | In this mode, wires have 4 cardinal directions to travel per each step; up, down, left, and right. 58 |

59 | 60 |

61 | Diagonal: 62 | In this mode, wires can only travel diagonally. Essentially same as Cardinal mode, but everything is at 45° angle. 63 |

64 | 65 |

66 | Conical: 67 | In this special mode, each wire starts by going one step in any of the 8 direction, and each step afterwards is the same OR +-45° to previous step. 68 |

69 | -------------------------------------------------------------------------------- /public/pages/gen/jsplacement2.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | Height 4 | Color 5 |
6 |
7 | 8 | 9 | 10 | 11 |
12 |
13 | 14 | 15 | 16 |
17 | 18 | 19 |
20 | 21 |
22 | 23 | 24 |
25 |
26 | 27 |
28 | 29 |
30 | 31 | 32 |
33 |
34 | 35 |
36 | 37 |
38 | 39 | 40 |
41 |
42 | 43 |
44 | 45 | 46 |
47 |
48 | 49 |
50 | 51 |
52 | 53 | 54 |
55 |
56 | 57 |
58 |
59 |
60 | 61 | 62 |
63 | 64 |
65 |
Background brightness 128
66 |
67 |
68 |
69 |
70 |
Background iterations 3
71 |
72 |
73 | 74 |
75 |
Iterations 125
76 |
77 |
78 |
79 |
80 |
Sprite scaling 60
81 |
82 |
83 | 84 |
85 |
86 | 87 | 88 | 89 |
90 |
Seamless
91 |
92 | 93 | 94 |
95 |
96 | 97 |
98 |
Rotate sprites
99 |
100 | 101 | 102 |
103 |
104 | 105 |
106 |
Flip sprites
107 |
108 | 109 | 110 |
111 |
112 | 113 |
114 |
Blend sprites
115 |
116 | 117 | 118 |
119 |
120 | 121 |
122 | 123 |
124 | 125 | 128 | 129 |
130 | Generate 131 | Save Height 132 | Undo 133 | Invert 134 | Save Normal 135 | Toggle colorizer 136 | Save Color 137 |
138 | 139 | 140 |
141 | 142 | 143 | 148 | 149 | 150 | 151 | 160 | -------------------------------------------------------------------------------- /public/pages/gen/metropolis.html: -------------------------------------------------------------------------------- 1 | 6 | 7 |
8 |
9 | Height 10 | Color 11 |
12 |
13 | 14 | 15 | 16 | 17 |
18 |
19 | 20 |
21 |

Attention!

22 |

23 | JSplacement: Metropolis is currenty a rough sketch of an idea I'm working on.
24 | None of the maps generated with JS:M have resulted in desired geometry as of June 15th.
25 |
26 | You can still use JS:M if you want, but honestly, you should wait for further updates in future version.
27 |

28 |
29 | 30 |

31 | 32 | 34 | 35 | 36 |
37 | Generate 38 | Save Height 39 | Undo 40 | Invert 41 | Save Normal 42 | Toggle colorizer 43 | Save Color 44 |
45 | 46 | 47 | 52 | 53 | 54 | 55 | 64 | -------------------------------------------------------------------------------- /public/pages/gen/ultra.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | Height 4 | Color 5 |
6 |
7 | 8 | 9 | 10 | 11 |
12 |
13 | 14 |
15 | 16 |
17 |
Grid size 4
18 |
19 |
20 | 21 |
22 | 23 | 26 | 27 |
28 | Generate 29 | Save Height 30 | Undo 31 | Invert 32 | Save Normal 33 | Toggle colorizer 34 | Save Color 35 |
36 | 37 | 38 |
39 | 40 | 41 | 46 | 47 | 48 | 49 | 58 | -------------------------------------------------------------------------------- /public/pages/gen/velvet.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | Height 4 | Color 5 |
6 |
7 | 8 | 9 | 10 | 11 |
12 |
13 | 14 |
15 | 16 |
17 |
Iterations 100
18 |
19 |
20 |
21 |
22 |
Sub-iterations 50
23 |
24 |
25 | 26 |
27 |
Splitter iterations 50
28 |
29 |
30 |
31 |
32 |
Background brightness 128
33 |
34 |
35 | 36 |
37 |
38 | 39 | 40 | 41 |
Symmetry along...
42 | 43 |
44 | 45 |
46 | 47 | 48 |
49 |
50 | 51 |
52 | 53 |
54 | 55 | 56 |
57 |
58 | 59 |
60 | 61 |
62 | 63 | 64 |
65 |
66 | 67 |
68 |
69 | 70 | 71 | 72 |
73 |
Use splitter:
74 |
75 | 76 | 77 |
78 |
79 | 80 |
81 |
Use splitter blending:
82 |
83 | 84 | 85 |
86 |
87 | 88 |
89 | 90 |
91 | 92 | 95 | 96 |
97 | Generate 98 | Save Height 99 | Undo 100 | Invert 101 | Save Normal 102 | Toggle colorizer 103 | Save Color 104 |
105 | 106 | 107 |
108 | 109 | 110 | 115 | 116 | 117 | 118 | 127 | -------------------------------------------------------------------------------- /public/pages/gradients.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 26 | -------------------------------------------------------------------------------- /public/pages/home.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 11 | 12 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 25 | 31 | -------------------------------------------------------------------------------- /public/pages/settings.html: -------------------------------------------------------------------------------- 1 |
2 |
Timestamp format
3 | 4 |
5 | 6 | 7 |
8 |
9 |
10 | 11 | 12 |
13 |
14 |
15 | 16 | 17 |
18 |
19 |
20 | 21 |
22 | 23 |
24 | 25 |
Theme
26 | 27 |
28 | 29 | 30 |
31 |
32 |
33 | 34 | 35 |
36 |
37 |
38 | 39 |
40 | 41 | Skip splash screen: 42 |
43 | Disable version checker: 44 |
45 | Disable animations (for slow machines): 46 | 47 | 48 |
49 | 50 | 51 | 52 | 55 | -------------------------------------------------------------------------------- /public/req/img/canbg-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satelllte/JSPlacementWeb/f5de697e47d312e642aba7013781ff04e5de1247/public/req/img/canbg-light.png -------------------------------------------------------------------------------- /public/req/img/canbg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satelllte/JSPlacementWeb/f5de697e47d312e642aba7013781ff04e5de1247/public/req/img/canbg.png -------------------------------------------------------------------------------- /public/req/img/canwork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satelllte/JSPlacementWeb/f5de697e47d312e642aba7013781ff04e5de1247/public/req/img/canwork.png -------------------------------------------------------------------------------- /public/req/img/dots/box.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/req/img/dots/circle.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/req/img/dots/diamond.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/req/img/dots/diamondout.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/req/img/dots/pat-xline.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/req/img/dots/pat-xyadd.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/req/img/dots/pat-xygrid.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/req/img/dots/pat-xysub.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/req/img/dots/pat-yline.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/req/img/dots/pat-yxadd.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/req/img/dots/pat-yxsub.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/req/img/dots/ring.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/req/img/dots/square.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/req/img/gradi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satelllte/JSPlacementWeb/f5de697e47d312e642aba7013781ff04e5de1247/public/req/img/gradi.png -------------------------------------------------------------------------------- /public/req/img/home-light.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satelllte/JSPlacementWeb/f5de697e47d312e642aba7013781ff04e5de1247/public/req/img/home-light.jpg -------------------------------------------------------------------------------- /public/req/img/home.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satelllte/JSPlacementWeb/f5de697e47d312e642aba7013781ff04e5de1247/public/req/img/home.jpg -------------------------------------------------------------------------------- /public/req/img/hotkeys.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satelllte/JSPlacementWeb/f5de697e47d312e642aba7013781ff04e5de1247/public/req/img/hotkeys.png -------------------------------------------------------------------------------- /public/req/img/jsico.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satelllte/JSPlacementWeb/f5de697e47d312e642aba7013781ff04e5de1247/public/req/img/jsico.ico -------------------------------------------------------------------------------- /public/req/img/jsico.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satelllte/JSPlacementWeb/f5de697e47d312e642aba7013781ff04e5de1247/public/req/img/jsico.png -------------------------------------------------------------------------------- /public/req/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satelllte/JSPlacementWeb/f5de697e47d312e642aba7013781ff04e5de1247/public/req/img/logo.png -------------------------------------------------------------------------------- /public/req/img/overlay/overlay001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satelllte/JSPlacementWeb/f5de697e47d312e642aba7013781ff04e5de1247/public/req/img/overlay/overlay001.png -------------------------------------------------------------------------------- /public/req/img/splash/01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satelllte/JSPlacementWeb/f5de697e47d312e642aba7013781ff04e5de1247/public/req/img/splash/01.jpg -------------------------------------------------------------------------------- /public/req/img/splash/02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satelllte/JSPlacementWeb/f5de697e47d312e642aba7013781ff04e5de1247/public/req/img/splash/02.jpg -------------------------------------------------------------------------------- /public/req/img/splash/03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satelllte/JSPlacementWeb/f5de697e47d312e642aba7013781ff04e5de1247/public/req/img/splash/03.jpg -------------------------------------------------------------------------------- /public/req/img/splash/04.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satelllte/JSPlacementWeb/f5de697e47d312e642aba7013781ff04e5de1247/public/req/img/splash/04.jpg -------------------------------------------------------------------------------- /public/req/img/splash/05.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satelllte/JSPlacementWeb/f5de697e47d312e642aba7013781ff04e5de1247/public/req/img/splash/05.jpg -------------------------------------------------------------------------------- /public/req/img/splash/06.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satelllte/JSPlacementWeb/f5de697e47d312e642aba7013781ff04e5de1247/public/req/img/splash/06.jpg -------------------------------------------------------------------------------- /public/req/img/splash/07.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satelllte/JSPlacementWeb/f5de697e47d312e642aba7013781ff04e5de1247/public/req/img/splash/07.jpg -------------------------------------------------------------------------------- /public/req/img/splash/08.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satelllte/JSPlacementWeb/f5de697e47d312e642aba7013781ff04e5de1247/public/req/img/splash/08.jpg -------------------------------------------------------------------------------- /public/req/img/splash/09.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satelllte/JSPlacementWeb/f5de697e47d312e642aba7013781ff04e5de1247/public/req/img/splash/09.jpg -------------------------------------------------------------------------------- /public/req/img/splash/10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satelllte/JSPlacementWeb/f5de697e47d312e642aba7013781ff04e5de1247/public/req/img/splash/10.jpg -------------------------------------------------------------------------------- /public/req/img/splash/11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satelllte/JSPlacementWeb/f5de697e47d312e642aba7013781ff04e5de1247/public/req/img/splash/11.jpg -------------------------------------------------------------------------------- /public/req/img/splash/12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satelllte/JSPlacementWeb/f5de697e47d312e642aba7013781ff04e5de1247/public/req/img/splash/12.jpg -------------------------------------------------------------------------------- /public/req/img/splash/13.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satelllte/JSPlacementWeb/f5de697e47d312e642aba7013781ff04e5de1247/public/req/img/splash/13.jpg -------------------------------------------------------------------------------- /public/req/img/upd.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/req/js/gen/common/blob.js: -------------------------------------------------------------------------------- 1 | /* Blob.js 2 | * A Blob implementation. 3 | * 2014-07-24 4 | * 5 | * By Eli Grey, http://eligrey.com 6 | * By Devin Samarin, https://github.com/dsamarin 7 | * License: MIT 8 | * See https://github.com/eligrey/Blob.js/blob/master/LICENSE.md 9 | */ 10 | 11 | /*global self, unescape */ 12 | /*jslint bitwise: true, regexp: true, confusion: true, es5: true, vars: true, white: true, 13 | plusplus: true */ 14 | 15 | /*! @source http://purl.eligrey.com/github/Blob.js/blob/master/Blob.js */ 16 | 17 | (function (view) { 18 | "use strict"; 19 | 20 | view.URL = view.URL || view.webkitURL; 21 | 22 | if (view.Blob && view.URL) { 23 | try { 24 | new Blob; 25 | return; 26 | } catch (e) {} 27 | } 28 | 29 | // Internally we use a BlobBuilder implementation to base Blob off of 30 | // in order to support older browsers that only have BlobBuilder 31 | var BlobBuilder = view.BlobBuilder || view.WebKitBlobBuilder || view.MozBlobBuilder || (function(view) { 32 | var 33 | get_class = function(object) { 34 | return Object.prototype.toString.call(object).match(/^\[object\s(.*)\]$/)[1]; 35 | } 36 | , FakeBlobBuilder = function BlobBuilder() { 37 | this.data = []; 38 | } 39 | , FakeBlob = function Blob(data, type, encoding) { 40 | this.data = data; 41 | this.size = data.length; 42 | this.type = type; 43 | this.encoding = encoding; 44 | } 45 | , FBB_proto = FakeBlobBuilder.prototype 46 | , FB_proto = FakeBlob.prototype 47 | , FileReaderSync = view.FileReaderSync 48 | , FileException = function(type) { 49 | this.code = this[this.name = type]; 50 | } 51 | , file_ex_codes = ( 52 | "NOT_FOUND_ERR SECURITY_ERR ABORT_ERR NOT_READABLE_ERR ENCODING_ERR " 53 | + "NO_MODIFICATION_ALLOWED_ERR INVALID_STATE_ERR SYNTAX_ERR" 54 | ).split(" ") 55 | , file_ex_code = file_ex_codes.length 56 | , real_URL = view.URL || view.webkitURL || view 57 | , real_create_object_URL = real_URL.createObjectURL 58 | , real_revoke_object_URL = real_URL.revokeObjectURL 59 | , URL = real_URL 60 | , btoa = view.btoa 61 | , atob = view.atob 62 | 63 | , ArrayBuffer = view.ArrayBuffer 64 | , Uint8Array = view.Uint8Array 65 | 66 | , origin = /^[\w-]+:\/*\[?[\w\.:-]+\]?(?::[0-9]+)?/ 67 | ; 68 | FakeBlob.fake = FB_proto.fake = true; 69 | while (file_ex_code--) { 70 | FileException.prototype[file_ex_codes[file_ex_code]] = file_ex_code + 1; 71 | } 72 | // Polyfill URL 73 | if (!real_URL.createObjectURL) { 74 | URL = view.URL = function(uri) { 75 | var 76 | uri_info = document.createElementNS("http://www.w3.org/1999/xhtml", "a") 77 | , uri_origin 78 | ; 79 | uri_info.href = uri; 80 | if (!("origin" in uri_info)) { 81 | if (uri_info.protocol.toLowerCase() === "data:") { 82 | uri_info.origin = null; 83 | } else { 84 | uri_origin = uri.match(origin); 85 | uri_info.origin = uri_origin && uri_origin[1]; 86 | } 87 | } 88 | return uri_info; 89 | }; 90 | } 91 | URL.createObjectURL = function(blob) { 92 | var 93 | type = blob.type 94 | , data_URI_header 95 | ; 96 | if (type === null) { 97 | type = "application/octet-stream"; 98 | } 99 | if (blob instanceof FakeBlob) { 100 | data_URI_header = "data:" + type; 101 | if (blob.encoding === "base64") { 102 | return data_URI_header + ";base64," + blob.data; 103 | } else if (blob.encoding === "URI") { 104 | return data_URI_header + "," + decodeURIComponent(blob.data); 105 | } if (btoa) { 106 | return data_URI_header + ";base64," + btoa(blob.data); 107 | } else { 108 | return data_URI_header + "," + encodeURIComponent(blob.data); 109 | } 110 | } else if (real_create_object_URL) { 111 | return real_create_object_URL.call(real_URL, blob); 112 | } 113 | }; 114 | URL.revokeObjectURL = function(object_URL) { 115 | if (object_URL.substring(0, 5) !== "data:" && real_revoke_object_URL) { 116 | real_revoke_object_URL.call(real_URL, object_URL); 117 | } 118 | }; 119 | FBB_proto.append = function(data/*, endings*/) { 120 | var bb = this.data; 121 | // decode data to a binary string 122 | if (Uint8Array && (data instanceof ArrayBuffer || data instanceof Uint8Array)) { 123 | var 124 | str = "" 125 | , buf = new Uint8Array(data) 126 | , i = 0 127 | , buf_len = buf.length 128 | ; 129 | for (; i < buf_len; i++) { 130 | str += String.fromCharCode(buf[i]); 131 | } 132 | bb.push(str); 133 | } else if (get_class(data) === "Blob" || get_class(data) === "File") { 134 | if (FileReaderSync) { 135 | var fr = new FileReaderSync; 136 | bb.push(fr.readAsBinaryString(data)); 137 | } else { 138 | // async FileReader won't work as BlobBuilder is sync 139 | throw new FileException("NOT_READABLE_ERR"); 140 | } 141 | } else if (data instanceof FakeBlob) { 142 | if (data.encoding === "base64" && atob) { 143 | bb.push(atob(data.data)); 144 | } else if (data.encoding === "URI") { 145 | bb.push(decodeURIComponent(data.data)); 146 | } else if (data.encoding === "raw") { 147 | bb.push(data.data); 148 | } 149 | } else { 150 | if (typeof data !== "string") { 151 | data += ""; // convert unsupported types to strings 152 | } 153 | // decode UTF-16 to binary string 154 | bb.push(unescape(encodeURIComponent(data))); 155 | } 156 | }; 157 | FBB_proto.getBlob = function(type) { 158 | if (!arguments.length) { 159 | type = null; 160 | } 161 | return new FakeBlob(this.data.join(""), type, "raw"); 162 | }; 163 | FBB_proto.toString = function() { 164 | return "[object BlobBuilder]"; 165 | }; 166 | FB_proto.slice = function(start, end, type) { 167 | var args = arguments.length; 168 | if (args < 3) { 169 | type = null; 170 | } 171 | return new FakeBlob( 172 | this.data.slice(start, args > 1 ? end : this.data.length) 173 | , type 174 | , this.encoding 175 | ); 176 | }; 177 | FB_proto.toString = function() { 178 | return "[object Blob]"; 179 | }; 180 | FB_proto.close = function() { 181 | this.size = 0; 182 | delete this.data; 183 | }; 184 | return FakeBlobBuilder; 185 | }(view)); 186 | 187 | view.Blob = function(blobParts, options) { 188 | var type = options ? (options.type || "") : ""; 189 | var builder = new BlobBuilder(); 190 | if (blobParts) { 191 | for (var i = 0, len = blobParts.length; i < len; i++) { 192 | if (Uint8Array && blobParts[i] instanceof Uint8Array) { 193 | builder.append(blobParts[i].buffer); 194 | } 195 | else { 196 | builder.append(blobParts[i]); 197 | } 198 | } 199 | } 200 | var blob = builder.getBlob(type); 201 | if (!blob.slice && blob.webkitSlice) { 202 | blob.slice = blob.webkitSlice; 203 | } 204 | return blob; 205 | }; 206 | 207 | var getPrototypeOf = Object.getPrototypeOf || function(object) { 208 | return object.__proto__; 209 | }; 210 | view.Blob.prototype = getPrototypeOf(new view.Blob()); 211 | }(typeof self !== "undefined" && self || typeof window !== "undefined" && window || this.content || this)); 212 | -------------------------------------------------------------------------------- /public/req/js/gen/common/colorizer.js: -------------------------------------------------------------------------------- 1 | // Save color 2 | function saveColor(savename){ 3 | savename += timestamp; 4 | if(seamlsmode == "1"){ 5 | savename += "-Seamless"; 6 | } 7 | savename += "-Color"; 8 | savename += ".png"; 9 | 10 | colorCanvas.toBlob(function(blob) { 11 | saveAs(blob, savename); 12 | }); 13 | } 14 | 15 | // Load custom gradients 16 | 17 | var custoloaded; 18 | 19 | function loadGrad(){ 20 | if(custoloaded){ 21 | return; 22 | } 23 | 24 | var gradlist = document.getElementById("gradients"); 25 | // WEB_PORT override 26 | // var gpath = app.getPath('home') + "/JSplacement/CustomGradients"; 27 | var gpath = ""; 28 | var supported = ["jpg","jpeg","png","gif","bmp"]; 29 | 30 | // WEB_PORT override 31 | // gfiles = fs.readdirSync(gpath); 32 | 33 | gfiles = gfiles.filter(function(file){ 34 | for(i=0;i"; 43 | } 44 | 45 | custoloaded = true; 46 | } 47 | 48 | // Colorizer 49 | var colorCanvas = document.getElementById("dat"); 50 | var colorctx = colorCanvas.getContext("2d"); 51 | 52 | function theColorizer(gradifile){ 53 | $("#canover").addClass("visible"); 54 | setTimeout(function(){ 55 | var paletteCanvas = document.createElement('canvas'); 56 | paletteCanvas.width = 256; paletteCanvas.height = 1; 57 | var palettectx = paletteCanvas.getContext('2d'); 58 | 59 | var paletteimg = document.getElementById(gradifile); 60 | palettectx.drawImage(paletteimg,0,0,256,1); 61 | 62 | var heightsource = ctx.getImageData(0,0,res,res); 63 | var palettesource = palettectx.getImageData(0,0,256,1); 64 | 65 | var destination = ctx.createImageData(res,res); 66 | 67 | var paletter = [], paletteg=[], paletteb=[]; 68 | 69 | for(var i=0; i<=1023; i+=4){ 70 | paletter.push(palettesource.data[i]); 71 | paletteg.push(palettesource.data[i+1]); 72 | paletteb.push(palettesource.data[i+2]); 73 | } 74 | 75 | for(var i=0, l=res*res*4; ires*(res-1)*4){ 101 | y1 = source.data[i-res*4]; 102 | y2 = source.data[i]; 103 | } 104 | 105 | else{ 106 | y1 = source.data[i-res*4]; 107 | y2 = source.data[i+res*4]; 108 | } 109 | 110 | destination.data[i] = (x1-x2)+127; 111 | destination.data[i+1] = (y1-y2)+127; 112 | destination.data[i+2] = 255; 113 | destination.data[i+3] = 255; 114 | 115 | } 116 | 117 | ctxnorm.putImageData( destination, 0, 0 ); 118 | 119 | savename += timestamp; 120 | if(seamlsmode == "1"){ 121 | savename += "-Seamless"; 122 | } 123 | savename += "-Normal"; 124 | savename += ".png"; 125 | 126 | normalCanvas.toBlob(function(blob) { 127 | saveAs(blob, savename); 128 | }); 129 | } 130 | 131 | // Calculate date 132 | 133 | function setTimestamp(){ 134 | if(cfg.General.timestampFormat == 0){ 135 | timestamp = Math.floor(Date.now() / 1000); 136 | } 137 | if(cfg.General.timestampFormat == 1){ 138 | timestamp = realDate(); 139 | } 140 | else{ 141 | timestamp = compactDate(); 142 | } 143 | } 144 | 145 | function realDate(){ 146 | var date = new Date(); 147 | var str = date.getFullYear() + '-' + ('0' + (date.getMonth()+1)).slice(-2) + '-' + ('0' + date.getDate()).slice(-2) + '-' + ('0' + date.getHours()).slice(-2)+ '-' + ('0' + date.getMinutes()).slice(-2) + '-' + ('0' + date.getSeconds()).slice(-2); 148 | return str; 149 | } 150 | 151 | function compactDate(){ 152 | var date = new Date(); 153 | var str = date.getFullYear() + ('0' + (date.getMonth()+1)).slice(-2) + ('0' + date.getDate()).slice(-2) + ('0' + date.getHours()).slice(-2) + ('0' + date.getMinutes()).slice(-2) + ('0' + date.getSeconds()).slice(-2); 154 | return str; 155 | } 156 | -------------------------------------------------------------------------------- /public/req/js/gen/common/filesaver.js: -------------------------------------------------------------------------------- 1 | /*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */ 2 | var saveAs=saveAs||function(e){"use strict";if(typeof e==="undefined"||typeof navigator!=="undefined"&&/MSIE [1-9]\./.test(navigator.userAgent)){return}var t=e.document,n=function(){return e.URL||e.webkitURL||e},r=t.createElementNS("http://www.w3.org/1999/xhtml","a"),o="download"in r,a=function(e){var t=new MouseEvent("click");e.dispatchEvent(t)},i=/constructor/i.test(e.HTMLElement)||e.safari,f=/CriOS\/[\d]+/.test(navigator.userAgent),u=function(t){(e.setImmediate||e.setTimeout)(function(){throw t},0)},s="application/octet-stream",d=1e3*40,c=function(e){var t=function(){if(typeof e==="string"){n().revokeObjectURL(e)}else{e.remove()}};setTimeout(t,d)},l=function(e,t,n){t=[].concat(t);var r=t.length;while(r--){var o=e["on"+t[r]];if(typeof o==="function"){try{o.call(e,n||e)}catch(a){u(a)}}}},p=function(e){if(/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)){return new Blob([String.fromCharCode(65279),e],{type:e.type})}return e},v=function(t,u,d){if(!d){t=p(t)}var v=this,w=t.type,m=w===s,y,h=function(){l(v,"writestart progress write writeend".split(" "))},S=function(){if((f||m&&i)&&e.FileReader){var r=new FileReader;r.onloadend=function(){var t=f?r.result:r.result.replace(/^data:[^;]*;/,"data:attachment/file;");var n=e.open(t,"_blank");if(!n)e.location.href=t;t=undefined;v.readyState=v.DONE;h()};r.readAsDataURL(t);v.readyState=v.INIT;return}if(!y){y=n().createObjectURL(t)}if(m){e.location.href=y}else{var o=e.open(y,"_blank");if(!o){e.location.href=y}}v.readyState=v.DONE;h();c(y)};v.readyState=v.INIT;if(o){y=n().createObjectURL(t);setTimeout(function(){r.href=y;r.download=u;a(r);h();c(y);v.readyState=v.DONE});return}S()},w=v.prototype,m=function(e,t,n){return new v(e,t||e.name||"download",n)};if(typeof navigator!=="undefined"&&navigator.msSaveOrOpenBlob){return function(e,t,n){t=t||e.name||"download";if(!n){e=p(e)}return navigator.msSaveOrOpenBlob(e,t)}}w.abort=function(){};w.readyState=w.INIT=0;w.WRITING=1;w.DONE=2;w.error=w.onwritestart=w.onprogress=w.onwrite=w.onabort=w.onerror=w.onwriteend=null;return m}(typeof self!=="undefined"&&self||typeof window!=="undefined"&&window||this.content);if(typeof module!=="undefined"&&module.exports){module.exports.saveAs=saveAs}else if(typeof define!=="undefined"&&define!==null&&define.amd!==null){define("FileSaver.js",function(){return saveAs})} 3 | -------------------------------------------------------------------------------- /public/req/js/gen/js-2/js-2.js: -------------------------------------------------------------------------------- 1 | function generateMap(){ 2 | 3 | var bgcol = document.getElementById('bgcol').value; 4 | var iters = document.getElementById('iterations').value; 5 | var bgits = document.getElementById('bgits').value; 6 | 7 | seamlsmode = $('#seamlsmode:checked').val(); 8 | var rotatemode = $('#rotatemode:checked').val(); 9 | var mirrormode = $('#mirrormode:checked').val(); 10 | var blendimode = $('#blendimode:checked').val(); 11 | var alphamode = $('#alphamode:checked').val(); 12 | 13 | ctx.globalCompositeOperation = "source-over"; 14 | ctx.fillStyle = "rgb(" + bgcol + "," + bgcol + "," + bgcol + ")"; 15 | ctx.fillRect(-cord, -cord, res, res); 16 | 17 | var minime = 125-document.getElementById('minsize').value; 18 | var maxime = minime*1.5; 19 | 20 | if(bgits != "0"){ 21 | var bets = 1; 22 | for(i = 1; i <= bgits; i++){ 23 | for(yi = -cord; yi <= cord; yi+=(res/bets)){ 24 | for(xi = -cord; xi <= cord; xi+=(res/bets)){ 25 | var rng = rand(0,files.length-1); 26 | var img = document.getElementById(files[rng]); 27 | ctx.drawImage(img,xi,yi,res/bets,res/bets); 28 | } 29 | } 30 | bets++; 31 | } 32 | } 33 | 34 | for(i = 0; i < iters; i++) { 35 | setTimeout(function() { 36 | if(seamlsmode == "1"){ 37 | var scale = (res/rand(maxime,minime))*rand(10,25); 38 | var posx = rand(-res,res); 39 | var posy = rand(-res,res); 40 | } 41 | else{ 42 | var scale = (res/rand(maxime,minime))*rand(10,25); 43 | var posx = rand(-cord-(cord/4),cord); 44 | var posy = rand(-cord-(cord/4),cord); 45 | } 46 | 47 | var rng = rand(0,files.length-1); 48 | var img = document.getElementById(files[rng]); 49 | 50 | if(rotatemode == "1"){ 51 | var roota = rand(0,3)*90; // 0, 90, 180, 270 52 | if(roota != 0){ctx.rotate(roota*Math.PI/180);} 53 | } 54 | 55 | if(mirrormode == "1"){ 56 | var flip = rand(0,1); 57 | if(flip == "0"){ ctx.scale(-1,1); } 58 | } 59 | 60 | var mood = rand(0,mode.length-1); 61 | 62 | if(blendimode == "1"){ 63 | ctx.globalCompositeOperation = mode[mood]; 64 | } 65 | 66 | ctx.drawImage(img,posx,posy,scale,scale); 67 | 68 | if(seamlsmode == "1"){ 69 | if((posx+scale >= cord) && (posy+scale >= cord)){ 70 | posx = posx-res; 71 | ctx.drawImage(img,posx,posy,scale,scale); 72 | posy = posy-res; 73 | ctx.drawImage(img,posx,posy,scale,scale); 74 | posx = posx+res; 75 | ctx.drawImage(img,posx,posy,scale,scale); 76 | } 77 | else if((posx <= -cord) && (posy+scale >= cord)){ 78 | posx = posx+res; 79 | ctx.drawImage(img,posx,posy,scale,scale); 80 | posy = posy-res; 81 | ctx.drawImage(img,posx,posy,scale,scale); 82 | posx = posx-res; 83 | ctx.drawImage(img,posx,posy,scale,scale); 84 | } 85 | else if((posx+scale >= cord) && (posy <= -cord)){ 86 | posx = posx-res; 87 | ctx.drawImage(img,posx,posy,scale,scale); 88 | posy = posy+res; 89 | ctx.drawImage(img,posx,posy,scale,scale); 90 | posx = posx+res; 91 | ctx.drawImage(img,posx,posy,scale,scale); 92 | } 93 | else if((posx <= -cord) && (posy <= -cord)){ 94 | posx = posx+res; 95 | ctx.drawImage(img,posx,posy,scale,scale); 96 | posy = posy+res; 97 | ctx.drawImage(img,posx,posy,scale,scale); 98 | posx = posx-res; 99 | ctx.drawImage(img,posx,posy,scale,scale); 100 | } 101 | 102 | 103 | else if(posx+scale >= cord){ 104 | posx = posx-res; 105 | ctx.drawImage(img,posx,posy,scale,scale); 106 | } 107 | else if(posx <= -cord){ 108 | posx = posx+res; 109 | ctx.drawImage(img,posx,posy,scale,scale); 110 | } 111 | else if(posy+scale >= cord){ 112 | posy = posy-res; 113 | ctx.drawImage(img,posx,posy,scale,scale); 114 | } 115 | else if(posy <= -cord){ 116 | posy = posy+res; 117 | ctx.drawImage(img,posx,posy,scale,scale); 118 | } 119 | } 120 | 121 | if(mirrormode == "1"){ 122 | if(flip == "0"){ ctx.scale(-1,1); } 123 | } 124 | 125 | if(rotatemode == "1"){ 126 | if(roota != 0){ctx.rotate(-roota*Math.PI/180);} 127 | } 128 | }, 20); 129 | } 130 | var sourceCanvas = document.getElementById("dis"); 131 | ctx.drawImage(sourceCanvas, -cord, -cord); 132 | } 133 | 134 | $(document).ready(function() { 135 | $('input:radio[name=spriteset]').change(function() { 136 | if (this.value == 'spritea') { 137 | spriteSet("JS2Classic"); 138 | } 139 | else if (this.value == 'spriteb') { 140 | spriteSet("CrapPack"); 141 | } 142 | else if (this.value == 'spritec') { 143 | spriteSet("BigData"); 144 | } 145 | else if (this.value == 'sprited') { 146 | spriteSet("Aggromaxx"); 147 | } 148 | else if (this.value == 'spritecustom') { 149 | spriteSet("CustomSprites"); 150 | } 151 | }); 152 | }); 153 | 154 | var mode = [ 155 | "source-over", 156 | "source-over", 157 | "source-over", 158 | "darken", 159 | "lighten" 160 | ]; 161 | 162 | var canvas = document.getElementById("dis"); 163 | var ctx = canvas.getContext("2d"); 164 | var pupu = document.getElementById("imgs"); 165 | 166 | var res = 8192; 167 | var cord = res/2; 168 | 169 | var undoCanvas = document.createElement('canvas'); 170 | undoCanvas.width = res; 171 | undoCanvas.height = res; 172 | var undoctx = undoCanvas.getContext('2d'); 173 | 174 | ctx.translate(cord,cord); 175 | 176 | spriteSet("JS2Classic"); 177 | 178 | for (i = 0; i < files.length; i++){ 179 | pupu.innerHTML = pupu.innerHTML + ""; 180 | } 181 | 182 | function spriteSet(dir){ 183 | $("#imgs").empty(); 184 | 185 | if(dir == "CustomSprites"){ 186 | path = app.getPath('home') + "/JSplacement/CustomSprites"; 187 | } 188 | else{ 189 | path = __dirname + "/JS2sprites/" + dir + ""; 190 | } 191 | 192 | var supported = ["svg","png"]; 193 | 194 | files = fs.readdirSync(path); 195 | 196 | files = files.filter(function(file){ 197 | for(i=0;i"; 206 | } 207 | 208 | koko = files.length-1; 209 | 210 | } 211 | -------------------------------------------------------------------------------- /public/req/js/gen/js-classic/preset.js: -------------------------------------------------------------------------------- 1 | var presets = require("./req/js/gen/js-classic/presets.json"); 2 | 3 | /* Check for user presets file */ 4 | if (!fs.existsSync(homepath + "/userpresets.json")){ 5 | fs.copySync(__dirname + '/req/js/gen/js-classic/userpresets.json', homepath+'/userpresets.json'); 6 | } 7 | 8 | var userpresets = require(homepath + "/userpresets.json"); 9 | 10 | presets = presets.concat(userpresets); 11 | 12 | // List presets 13 | 14 | for (var i=0;i' + presets[i].name + ''; 16 | $(towrite).appendTo( "#presetlist" ); 17 | } 18 | 19 | var objects = [ 20 | "iterations", "bgcol", 21 | "draw.Box", "draw.BoxA", "draw.Grid", "draw.BatV", "draw.BatH", "draw.Lines", 22 | "Box.clampmin", "Box.clampmax", "Box.scale", 23 | "BoxA.clampmin", "BoxA.clampmax", "BoxA.clampAmin", "BoxA.clampAmax", "BoxA.scale", 24 | "Grid.clampmin", "Grid.clampmax", "Grid.scale", "Grid.spacing", "Grid.amount", 25 | "BatV.clampmin", "BatV.clampmax", "BatV.scale", "BatV.spacing", "BatV.amount", 26 | "BatH.clampmin", "BatH.clampmax", "BatH.scale", "BatH.spacing", "BatH.amount", 27 | "Lines.clampmin", "Lines.clampmax", "Lines.thick" 28 | ]; 29 | 30 | function Preset(x){ 31 | for (var i=0;i"; 11 | } 12 | 13 | function generateMap(){ 14 | 15 | ctx.globalCompositeOperation = "normal"; 16 | 17 | ctx.fillStyle = "rgb(0,0,0)"; 18 | ctx.fillRect(-res, -res, res*2, res*2); 19 | 20 | 21 | var r = rand(0,5000); 22 | for(i = 0; i < r; i++){ 23 | drawBuildings(96,64,1,0,32); 24 | } 25 | 26 | var r = rand(0,1250); 27 | for(i = 0; i < r; i++){ 28 | drawBuildings(75,54,1.15,0,64); 29 | } 30 | 31 | var r = rand(0,1250); 32 | for(i = 0; i < r; i++){ 33 | drawBuildings(64,32,1.5,0,96); 34 | } 35 | 36 | ctx.globalCompositeOperation = "difference"; 37 | 38 | var r = rand(0,250); 39 | for(i = 0; i < r; i++){ 40 | drawBuildings(64,32,3,0,128); 41 | } 42 | 43 | var r = rand(0,750); 44 | for(i = 0; i < r; i++){ 45 | drawBuildings(256,96,1,64,100); 46 | } 47 | 48 | ctx.globalCompositeOperation = "normal"; 49 | var r = rand(0,350); 50 | for(i = 0; i < r; i++){ 51 | drawBuildings(96,32,4,128,169); 52 | } 53 | 54 | var r = rand(0,150); 55 | for(i = 0; i < r; i++){ 56 | drawBuildings(64,28,6,0,255); 57 | } 58 | 59 | ctx.globalCompositeOperation = "normal"; 60 | 61 | ctx.rotate(rand(0,360)*Math.PI/180); 62 | 63 | var keke = rand(0,sprite.length-1); 64 | var img = document.getElementById(sprite[keke]); 65 | 66 | ctx.drawImage(img,(-res*1.5)/2,(-res*1.5)/2,res*1.5,res*1.5); 67 | 68 | 69 | 70 | var sourceCanvas = document.getElementById("dis"); 71 | ctx.drawImage(sourceCanvas, res/-2, res/-2); 72 | } 73 | 74 | function drawBuildings(min,max,range,colow,cohi){ 75 | var co = rand(colow,cohi); 76 | 77 | ctx.fillStyle = "rgb(" + co + "," + co + "," + co + ")"; 78 | 79 | var x = rand(-res/2,res/2)/range; 80 | var y = rand(-res/2,res/2)/range; 81 | var sx = rand(res/min,res/max); 82 | var sy = rand(res/min,res/max); 83 | 84 | ctx.fillRect(x,y,sx,sy); 85 | ctx.rotate(rand(0,360)*Math.PI/180); 86 | } 87 | -------------------------------------------------------------------------------- /public/req/js/gen/js-ultra/js-ultra.js: -------------------------------------------------------------------------------- 1 | var canvas = document.getElementById("dis"); 2 | var ctx = canvas.getContext("2d"); 3 | var pupu = document.getElementById("imgs"); 4 | 5 | var parts = [ 6 | [ 7 | "000", 8 | "001", 9 | "002" 10 | ], 11 | [ 12 | "A-000", 13 | "B-000", 14 | "C-000", 15 | "D-000", 16 | "E-000", 17 | "F-000" 18 | ] 19 | ]; 20 | 21 | 22 | var res = 8192; 23 | var cord = 0; 24 | var gridsize = document.getElementById('gridsize').value; 25 | 26 | ultraSet(); 27 | 28 | var undoCanvas = document.createElement('canvas'); 29 | undoCanvas.width = res; 30 | undoCanvas.height = res; 31 | var undoctx = undoCanvas.getContext('2d'); 32 | 33 | var dcan = document.createElement('canvas'); 34 | dcan.width = res/gridsize; dcan.height = res/gridsize; 35 | var dtx = dcan.getContext('2d'); 36 | dtx.translate(dcan.width/2,dcan.height/2) 37 | 38 | function generateMap(){ 39 | gridsize = document.getElementById('gridsize').value; 40 | ctx.globalCompositeOperation = "normal"; 41 | ctx.fillStyle = "#000000"; 42 | ctx.fillRect(0, 0, res, res); 43 | base = 0; 44 | 45 | for(yi=0;yi= 150){ 52 | var img = document.getElementById("addon-"+parts[1][rand(0,parts[1].length-1)]); 53 | dtx.drawImage(img,dcan.width/-2,dcan.height/-2,dcan.width,dcan.height); 54 | } 55 | 56 | var roota = rand(0,3)*90; // 0, 90, 180, 270 57 | if(roota != 0){dtx.rotate(roota*Math.PI/180);} 58 | 59 | ctx.drawImage(dcan,xi*(res/gridsize),yi*(res/gridsize),res/gridsize,res/gridsize); 60 | } 61 | } 62 | 63 | ctx.globalCompositeOperation = "normal"; 64 | var sourceCanvas = document.getElementById("dis"); 65 | ctx.drawImage(sourceCanvas, 0, 0); 66 | } 67 | 68 | function ultraSet(){ 69 | $("#imgs").empty(); 70 | 71 | path = __dirname + "/JSUdata/bases/"; 72 | for (i = 0; i < parts[0].length; i++){ 73 | pupu.innerHTML = pupu.innerHTML + ""; 74 | } 75 | path = __dirname + "/JSUdata/addons/"; 76 | for (i = 0; i < parts[1].length; i++){ 77 | pupu.innerHTML = pupu.innerHTML + ""; 78 | } 79 | 80 | } 81 | -------------------------------------------------------------------------------- /public/req/js/gen/js-velvet/js-velvet.js: -------------------------------------------------------------------------------- 1 | var canvas = document.getElementById("dis"); 2 | var ctx = canvas.getContext("2d"); 3 | var res = 8192; 4 | var cord = res/2; 5 | 6 | var undoCanvas = document.createElement('canvas'); 7 | undoCanvas.width = res; 8 | undoCanvas.height = res; 9 | var undoctx = undoCanvas.getContext('2d'); 10 | 11 | ctx.translate(res/2, res/2); 12 | 13 | function generateMap(){ 14 | 15 | ctx.globalCompositeOperation = "normal"; 16 | 17 | var iters = document.getElementById('iterations').value; 18 | var itersalt = document.getElementById('subiterations').value; 19 | var itersb = document.getElementById('iterationsb').value; 20 | var bgcol = document.getElementById('bgcol').value; 21 | 22 | ctx.fillStyle = "rgb(" + bgcol + "," + bgcol + "," + bgcol + ")"; 23 | ctx.fillRect(res/-2, res/-2, res, res); 24 | 25 | ctx.globalCompositeOperation = "difference"; 26 | 27 | for(i = 0; i < iters; i++){ 28 | drawBox(res/2,3); 29 | } 30 | for(i = 0; i < itersalt; i++){ 31 | drawBox(res/2,3,true); 32 | } 33 | 34 | ctx.globalCompositeOperation = "normal"; 35 | 36 | for(i = 0; i < itersalt; i++){ 37 | drawBox(res/2,6); 38 | } 39 | for(i = 0; i < iters; i++){ 40 | drawBox(res/2,12); 41 | } 42 | 43 | if (document.getElementById('difference-option').checked) { 44 | ctx.globalCompositeOperation = "difference"; 45 | } 46 | 47 | if (document.getElementById('yes-option').checked) { 48 | for(i = 0; i < itersb; i++){ 49 | splitter(res,8,false); 50 | } 51 | for(i = 0; i < itersb; i++){ 52 | splitter(res,8,true); 53 | } 54 | } 55 | 56 | ctx.globalCompositeOperation = "normal"; 57 | 58 | var sourceCanvas = document.getElementById("dis"); 59 | ctx.drawImage(sourceCanvas, res/-2, res/-2); 60 | } 61 | 62 | function drawBox(max,limit,yn){ 63 | var x = rand(-max,max); 64 | if(yn == true){ 65 | var y = x; 66 | } 67 | else{ 68 | var y = rand(-max,max); 69 | } 70 | var sx = rand(1,max/limit); 71 | var sy = rand(1,max/limit); 72 | 73 | var co = rand(0,255); 74 | 75 | ctx.fillStyle = "rgb(" + co + "," + co + "," + co + ")"; 76 | 77 | if (document.getElementById('symmetry1').checked) { 78 | ctx.fillRect(x,y,sx,sy); 79 | ctx.fillRect(x,-y,sx,-sy); 80 | } 81 | else if (document.getElementById('symmetry2').checked) { 82 | ctx.fillRect(x,y,sx,sy); 83 | ctx.fillRect(-x,y,-sx,sy); 84 | } 85 | else if (document.getElementById('symmetry0').checked) { 86 | ctx.fillRect(x,y,sx,sy); 87 | ctx.fillRect(-x,y,-sx,sy); 88 | ctx.fillRect(x,-y,sx,-sy); 89 | ctx.fillRect(-x,-y,-sx,-sy); 90 | } 91 | 92 | } 93 | 94 | function splitter(max,limit,vert){ 95 | var x = rand(-max,max); 96 | var y = rand(-max,max); 97 | var sx = rand(max/32,max/limit); 98 | var sy = rand(max/32,max/limit); 99 | 100 | if (document.getElementById('difference-option').checked) { 101 | var co = 128; 102 | } 103 | else{ 104 | var co = rand(0,255); 105 | } 106 | 107 | ctx.fillStyle = "rgb(" + co + "," + co + "," + co + ")"; 108 | 109 | if(vert == false){ 110 | ctx.fillRect(0,y,sx,sy); 111 | ctx.fillRect(0,y,-sx,sy); 112 | ctx.fillRect(0,-y,sx,-sy); 113 | ctx.fillRect(0,-y,-sx,-sy); 114 | } 115 | else{ 116 | ctx.fillRect(x,0,sx,sy); 117 | ctx.fillRect(-x,0,-sx,sy); 118 | ctx.fillRect(x,0,sx,-sy); 119 | ctx.fillRect(-x,0,-sx,-sy); 120 | } 121 | } 122 | -------------------------------------------------------------------------------- /public/req/js/gen/js-wyre/js-wyre.js: -------------------------------------------------------------------------------- 1 | var canvas = document.getElementById("dis"); 2 | var ctx = canvas.getContext("2d"); 3 | var res = 8192; 4 | 5 | var undoCanvas = document.createElement('canvas'); 6 | undoCanvas.width = res; 7 | undoCanvas.height = res; 8 | var undoctx = undoCanvas.getContext('2d'); 9 | 10 | var cord = 0; 11 | var curx, cury, nxtx, nxty, step, co, lw; 12 | 13 | function generateMap(){ 14 | var layers = document.getElementById('layers').value; 15 | var wpl = document.getElementById('wpl').value; 16 | var linewidth = document.getElementById('linewidth').value; 17 | var spread = document.getElementById('spread').value; 18 | 19 | var colormode = Number($("input[name=colormode]:checked").val()); 20 | var scalemode = Number($("input[name=scalemode]:checked").val()); 21 | var diremode = Number($("input[name=diremode]:checked").val()); 22 | 23 | var minstep = document.getElementById('minstep').value; 24 | var maxstep = document.getElementById('maxstep').value; 25 | 26 | var bgcol = 0; 27 | var nxtdir = rand(0,7); 28 | 29 | ctx.fillStyle = "rgb(" + bgcol + "," + bgcol + "," + bgcol + ")"; 30 | ctx.fillRect(0, 0, res, res); 31 | 32 | for(l=0;l=0)&&(curx<=res)) && ((cury>=0)&&(cury<=res))){ 43 | step = rand(minstep,maxstep); 44 | 45 | switch (diremode) { 46 | case 0: direction(rand(0,7),step); break; 47 | case 1: direction(rand(0,3),step); break; 48 | case 2: direction(rand(4,7),step); break; 49 | case 3: conical(nxtdir,step); break; 50 | } 51 | 52 | if(diremode == 3){ 53 | nxtdir = nxtdir + rand(-1,1); 54 | if(nxtdir < 0){ 55 | nxtdir = 7; 56 | } 57 | else if(nxtdir > 7){ 58 | nxtdir = 0; 59 | } 60 | } 61 | 62 | ctx.lineTo(nxtx,nxty); 63 | curx = nxtx; cury = nxty; 64 | } 65 | 66 | switch (colormode) { 67 | case 0: co = Math.ceil(((254/layers)*l)+1); break; 68 | case 1: co = 255-Math.floor(((255/layers)*l)); break; 69 | case 2: co = Math.ceil((254/Math.sqrt(layers))*Math.sqrt(l))+1; break; 70 | case 3: co = 255-(Math.ceil((254/Math.sqrt(layers))*Math.sqrt(l))); break; 71 | case 4: co = rand(1,255); break; 72 | } 73 | 74 | switch (scalemode) { 75 | case 0: lw = linewidth-Math.floor(((linewidth/layers)*l)); break; 76 | case 1: lw = Math.ceil(((linewidth/layers)*l)+1); break; 77 | case 2: lw = linewidth-(Math.ceil(((linewidth-1)/Math.sqrt(layers))*Math.sqrt(l))); break; 78 | case 3: lw = Math.ceil(((linewidth-1)/Math.sqrt(layers))*Math.sqrt(l))+1; break; 79 | case 4: lw = rand(1,linewidth); break; 80 | } 81 | 82 | ctx.strokeStyle='rgb('+co+','+co+','+co+')'; 83 | ctx.lineWidth=lw; 84 | ctx.stroke(); 85 | ctx.closePath(); 86 | } 87 | } 88 | 89 | ctx.globalCompositeOperation = "normal"; 90 | var sourceCanvas = document.getElementById("dis"); 91 | ctx.drawImage(sourceCanvas, 0, 0); 92 | } 93 | 94 | function direction(i,step){ 95 | switch (i) { 96 | case 0: nxtx = curx; nxty = cury+step; break; //Up 97 | case 1: nxtx = curx+step; nxty = cury; break; //Right 98 | case 2: nxtx = curx; nxty = cury-step; break; //Down 99 | case 3: nxtx = curx-step; nxty = cury; break; //Left 100 | case 4: nxtx = curx+(step*0.715); nxty = cury+(step*0.715); break; //Up Right 101 | case 5: nxtx = curx+(step*0.715); nxty = cury-(step*0.715); break; //Right Down 102 | case 6: nxtx = curx-(step*0.715); nxty = cury-(step*0.715); break; //Left Down 103 | case 7: nxtx = curx-(step*0.715); nxty = cury+(step*0.715); break; //Left Up 104 | } 105 | } 106 | 107 | function conical(i,step){ 108 | switch (i) { 109 | case 0: nxtx = curx; nxty = cury+step; break; //Up 110 | case 1: nxtx = curx+(step*0.715); nxty = cury+(step*0.715); break; //Up Right 111 | case 2: nxtx = curx+step; nxty = cury; break; //Right 112 | case 3: nxtx = curx+(step*0.715); nxty = cury-(step*0.715); break; //Right Down 113 | case 4: nxtx = curx; nxty = cury-step; break; //Down 114 | case 5: nxtx = curx-(step*0.715); nxty = cury-(step*0.715); break; //Left Down 115 | case 6: nxtx = curx-step; nxty = cury; break; //Left 116 | case 7: nxtx = curx-(step*0.715); nxty = cury+(step*0.715); break; //Left Up 117 | } 118 | } 119 | -------------------------------------------------------------------------------- /public/req/js/sys/backbone.js: -------------------------------------------------------------------------------- 1 | /* Electron Setup */ 2 | 3 | const remote = require('electron').remote; 4 | const app = remote.app; 5 | const process = remote.process; 6 | 7 | window.$ = window.jQuery = require('jquery'); 8 | $.ajaxPrefilter(function( options, originalOptions, jqXHR ) { 9 | options.async = true; 10 | }); 11 | 12 | var win = remote.getCurrentWindow(); 13 | win.webContents.session.clearCache(function(){ 14 | }); 15 | 16 | /* fs module + paths */ 17 | 18 | const fs = require('fs-extra'); 19 | 20 | var homepath = app.getPath('home') + "/JSplacement"; 21 | var customs = app.getPath('home') + "/JSplacement/CustomSprites"; 22 | 23 | /* Check for config file */ 24 | 25 | if (!fs.existsSync(homepath + "/jsplacement.conf")){ 26 | // $( "div#firstrun" ).addClass( "visible" ); 27 | // $( "div#wrapper" ).addClass( "blurd" ); 28 | fs.copySync(__dirname + '/req/jsplacement.conf', homepath+'/jsplacement.conf'); 29 | } 30 | 31 | if(!fs.existsSync(homepath + "/CustomSprites")){ 32 | fs.mkdirSync(homepath + '/CustomSprites'); 33 | } 34 | 35 | if(!fs.existsSync(homepath + "/CustomGradients")){ 36 | fs.mkdirSync(homepath + '/CustomGradients'); 37 | } 38 | 39 | /* Startup */ 40 | 41 | $(function() { 42 | $("#container").load("pages/home.html"); 43 | }); 44 | 45 | // RNG 46 | function rand(min, max) { 47 | min = Math.ceil(min); 48 | max = Math.floor(max); 49 | return Math.floor(Math.random() * (max - min + 1)) + min; 50 | } 51 | -------------------------------------------------------------------------------- /public/req/js/sys/config.js: -------------------------------------------------------------------------------- 1 | /* Config read */ 2 | 3 | var ini = require('ini'); 4 | var cfg = ini.parse(fs.readFileSync(homepath + "/jsplacement.conf", 'utf-8')); 5 | 6 | if(((typeof cfg.General) == "undefined") || ((typeof cfg.General.timestampFormat) == "undefined")){ 7 | cfg.timestampFormat = 1; 8 | fs.writeFileSync(homepath + "/jsplacement.conf", ini.stringify(cfg,{ section: 'General' })); 9 | cfg = ini.parse(fs.readFileSync(homepath + "/jsplacement.conf", 'utf-8')); 10 | } 11 | 12 | if((typeof cfg.General.skipSplashScreen) == "undefined"){ 13 | cfg.General.skipSplashScreen = false; 14 | } 15 | 16 | if((typeof cfg.General.disableUpdateCheck) == "undefined"){ 17 | cfg.General.disableUpdateCheck = false; 18 | } 19 | 20 | if((typeof cfg.General.disableAnimations) == "undefined"){ 21 | cfg.General.disableAnimations = false; 22 | } 23 | 24 | if((typeof cfg.General.skin) == "undefined"){ 25 | cfg.General.skin = 0; 26 | } 27 | 28 | if((typeof cfg.General.iddqd) == "undefined"){ 29 | cfg.General.iddqd = false; 30 | } 31 | 32 | fs.writeFileSync(homepath + "/jsplacement.conf", ini.stringify(cfg)); 33 | cfg = ini.parse(fs.readFileSync(homepath + "/jsplacement.conf", 'utf-8')); 34 | 35 | if(cfg.General.skin == 1){ 36 | $('link[rel="stylesheet"]').attr('href','req/style-pro.css'); 37 | } 38 | -------------------------------------------------------------------------------- /public/req/js/sys/hotkeys.js: -------------------------------------------------------------------------------- 1 | var MousePosX = 250; 2 | var MousePosY = 250; 3 | 4 | $(document).keyup(function(e) { 5 | if($( "div#firstrun" ).hasClass( "visible" )){} 6 | else if($( "div#digiguide" ).hasClass( "invisible" ) == false){ 7 | if (e.which == 71){ 8 | $( "div#digiguide" ).toggleClass( "invisible" ); 9 | $( "div#container" ).toggleClass( "blurd" ); 10 | } 11 | else if (e.which == 67) { 12 | var shell = require('electron').shell; 13 | var cusstom = app.getPath('home') + "/JSplacement/CustomSprites/"; 14 | shell.showItemInFolder(cusstom); 15 | } 16 | } 17 | else{ 18 | 19 | // Generators 20 | if ((e.which == 49)||(e.which == 97)) { hideMenu();unload();loadPage('gen/jsplacement.html'); } 21 | else if ((e.which == 50)||(e.which == 98)) { hideMenu();unload();loadPage('gen/jsplacement2.html'); } 22 | // else if ((e.which == 51)||(e.which == 99)) { hideMenu();unload();loadPage('gen/ultra.html'); } 23 | else if ((e.which == 51)||(e.which == 99)) { hideMenu();unload();loadPage('gen/velvet.html'); } 24 | // else if (e.which == 52) { hideMenu();unload();loadPage('gen/metropolis.html'); } 25 | else if ((e.which == 52)||(e.which == 100)) { hideMenu();unload();loadPage('gen/wyre.html'); } 26 | else if ((e.which == 53)||(e.which == 101)) { hideMenu();unload();loadPage('gen/dotgrid.html'); } 27 | 28 | // Home & About 29 | else if ((e.which == 72)||(e.which == 48)||(e.which == 96)) { hideMenu();unload();loadPage('home.html'); } 30 | else if (e.which == 65) { hideMenu();unload();loadPage('about.html'); } 31 | 32 | // Generator 33 | else if (e.which == 82) { refresh(); } 34 | else if (e.which == 83) { saveHeight(savename); } 35 | else if (e.which == 73) { invertMap(savename); } 36 | 37 | // Menu 38 | else if (e.which == 77) { toggleMenu(); } 39 | 40 | // User directory 41 | else if (e.which == 67) { 42 | var shell = require('electron').shell; 43 | var cusstom = app.getPath('home') + "/JSplacement/"; 44 | shell.openItem(cusstom); 45 | } 46 | 47 | // In-app Guide 48 | else if (e.which == 71){ 49 | $( "#digiguide" ).toggleClass( "invisible" ); 50 | $( "div#container" ).toggleClass( "blurd" ); 51 | $( "#guide" ).empty(); 52 | 53 | if($( "div#digiguide" ).hasClass( "invisible" ) == false){ 54 | $( "#guide" ).load( "guides/" + guidepage + ".html" ); 55 | } 56 | } 57 | 58 | // Hotkey view undo 59 | else if (e.which == 88) { 60 | $( "div#hotkeys" ).addClass( "invisible" ); 61 | $( "div#container" ).removeClass( "blurd" ); 62 | } 63 | // Zoom undo 64 | else if (e.which == 90) { 65 | $( "canvas#dis" ).removeClass( "zoomed" ); 66 | $( "canvas#dat" ).removeClass( "zoomed" ); 67 | $( ".viewcontrols" ).removeClass( "hidden" ); 68 | $( "div.canvasboxinner" ).unbind(); 69 | $("canvas#dis").css("transform", "translateX(0px) translateY(0px)"); 70 | $("canvas#dat").css("transform", "translateX(0px) translateY(0px)"); 71 | } 72 | } 73 | 74 | }); 75 | 76 | $(document).keydown(function(f){ 77 | if($( "div#firstrun" ).hasClass( "visible" )){ 78 | } 79 | else if($( "div#digiguide" ).hasClass( "invisible" ) == false){ 80 | } 81 | else{ 82 | // Hotkeys 83 | if (f.which == 88){ 84 | $( "div#hotkeys" ).removeClass( "invisible" ); 85 | $( "div#container" ).addClass( "blurd" ); 86 | } 87 | else if(f.which == 9){ 88 | f.preventDefault(); 89 | } 90 | // Zoom 91 | else if (f.which == 90){ 92 | $( "canvas#dis" ).addClass( "zoomed" ); 93 | $( "canvas#dat" ).addClass( "zoomed" ); 94 | $( ".viewcontrols" ).addClass( "hidden" ); 95 | transX = (1+MousePosX)*-5; transY = (1+MousePosY)*-5; 96 | $("canvas#dis").css("transform", "translateX("+transX+"px) translateY("+transY+"px)"); 97 | $("canvas#dat").css("transform", "translateX("+transX+"px) translateY("+transY+"px)"); 98 | $( "div.canvasboxinner" ).mouseover(function(event){ 99 | MousePosY = event.offsetY; 100 | MousePosX = event.offsetX; 101 | transX = (1+MousePosX)*-5; 102 | transY = (1+MousePosY)*-5; 103 | $("canvas#dis").css("transform", "translateX("+transX+"px) translateY("+transY+"px)"); 104 | $("canvas#dat").css("transform", "translateX("+transX+"px) translateY("+transY+"px)"); 105 | }); 106 | $( "div.canvasboxinner" ).mousemove(function(event){ 107 | MousePosY = event.offsetY; 108 | MousePosX = event.offsetX; 109 | transX = (1+MousePosX)*-5; 110 | transY = (1+MousePosY)*-5; 111 | $("canvas#dis").css("transform", "translateX("+transX+"px) translateY("+transY+"px)"); 112 | $("canvas#dat").css("transform", "translateX("+transX+"px) translateY("+transY+"px)"); 113 | }); 114 | } 115 | } 116 | 117 | }); 118 | -------------------------------------------------------------------------------- /public/req/js/sys/jsunloader.js: -------------------------------------------------------------------------------- 1 | function saveHeight(){ 2 | console.log( "Nice..." ); 3 | } 4 | 5 | function refresh(){ 6 | console.log( "Meme!" ); 7 | } 8 | -------------------------------------------------------------------------------- /public/req/js/sys/navigation.js: -------------------------------------------------------------------------------- 1 | // Toggle side menu visibility 2 | function toggleMenu(){ 3 | $( "div#sidemenu" ).toggleClass( "visible" ); 4 | $( "svg.menubutton" ).toggleClass( "visible" ); 5 | } 6 | 7 | function hideMenu(){ 8 | $( "div#sidemenu" ).removeClass( "visible" ); 9 | $( "svg.menubutton" ).removeClass( "visible" ); 10 | } 11 | 12 | function unload(){ 13 | $( "div#container" ).toggleClass( "hiding" ); 14 | setTimeout(function(){ 15 | $("#container").empty(); 16 | }, 125); 17 | } 18 | 19 | function loadPage(page){ 20 | setTimeout(function(){ 21 | $("#container").load("pages/"+page); 22 | }, 250); 23 | setTimeout(function(){ 24 | $( "div#container" ).toggleClass("hiding"); 25 | }, 375); 26 | hideColorizer() 27 | } 28 | 29 | function goToPage(url) { 30 | // WEB_PORT override 31 | window.open(url); 32 | 33 | // var shell = require('electron').shell; 34 | // event.preventDefault(); 35 | // shell.openExternal(url); 36 | } 37 | 38 | function guidePage(x){ 39 | $("div#guide").empty(); 40 | $("div#guide").load("guides/"+x+".html"); 41 | } 42 | 43 | function closeGuide(){ 44 | $( "div#guide" ).empty(); 45 | $( "div#digiguide" ).toggleClass( "invisible" ); 46 | $( "div#container" ).toggleClass( "blurd" ); 47 | } 48 | 49 | function gitGuide(){ 50 | $( "div#digiguide" ).toggleClass( "invisible" ); 51 | $( "div#container" ).toggleClass( "blurd" ); 52 | if($( "div#digiguide" ).hasClass( "invisible" ) == false){ 53 | $( "#guide" ).load( "guides/" + guidepage + ".html" ); 54 | } 55 | } 56 | 57 | // Toggle Colorizer Menu 58 | function toggleColorizer(){ 59 | $("#colorizer").toggleClass("hidden"); 60 | $("a.colorize").toggleClass("active"); 61 | $("#container").toggleClass("colorizer"); 62 | $("#canover").toggleClass("colorizer"); 63 | loadGrad(); 64 | } 65 | 66 | function hideColorizer(){ 67 | $("#colorizer").addClass("hidden"); 68 | $("a.colorize").removeClass("active"); 69 | $("#container").removeClass("colorizer"); 70 | $("#canover").removeClass("colorizer"); 71 | } 72 | -------------------------------------------------------------------------------- /public/req/js/sys/settings.js: -------------------------------------------------------------------------------- 1 | $(function() { 2 | $('input[name="timestampFormat"][value="'+cfg.General.timestampFormat+'"]').prop('checked',true); 3 | $('input[name="skin"][value="'+cfg.General.skin+'"]').prop('checked',true); 4 | $('#skipSplashScreen').prop('checked',cfg.General.skipSplashScreen); 5 | $('#disableUpdateCheck').prop('checked',cfg.General.disableUpdateCheck); 6 | $('#disableAnimations').prop('checked',cfg.General.disableAnimations); 7 | timeMode(); 8 | }); 9 | 10 | function saveNewSetting(id){ 11 | switch (id){ 12 | case "timestampFormat": cfg.General.timestampFormat = $('input[name="'+id+'"]:checked').val(); break; 13 | case "skipSplashScreen": cfg.General.skipSplashScreen = $('#'+id).prop('checked'); break; 14 | case "disableUpdateCheck": cfg.General.disableUpdateCheck = $('#'+id).prop('checked'); break; 15 | case "disableAnimations": cfg.General.disableAnimations = $('#'+id).prop('checked'); break; 16 | case "skin": cfg.General.skin = $('input[name="'+id+'"]:checked').val(); break; 17 | } 18 | 19 | fs.writeFileSync(homepath + "/jsplacement.conf", ini.stringify(cfg)); 20 | cfg = ini.parse(fs.readFileSync(homepath + "/jsplacement.conf", 'utf-8')); 21 | } 22 | 23 | $('input[name="timestampFormat"]').change(function(){ 24 | timeMode(); 25 | }); 26 | 27 | $('input[name="skin"]').change(function(){ 28 | if(cfg.General.skin == 0){ 29 | $('link[rel="stylesheet"]').attr('href','req/style.css'); 30 | } 31 | if(cfg.General.skin == 1){ 32 | $('link[rel="stylesheet"]').attr('href','req/style-pro.css'); 33 | } 34 | }); 35 | 36 | $('#disableUpdateCheck').change(function(){ 37 | if(cfg.General.disableUpdateCheck == true){ 38 | $('#vercheck').css('display','none'); 39 | } 40 | else{ 41 | verCheck(); 42 | } 43 | }); 44 | 45 | $('#disableAnimations').change(function(){ 46 | if(cfg.General.disableAnimations == true){ 47 | $('#disableanimation').html(''); 48 | } 49 | else{ 50 | $('#disableanimation').html(''); 51 | } 52 | }) 53 | 54 | 55 | function timeMode(){ 56 | switch (cfg.General.timestampFormat) { 57 | case "0": 58 | var str = Math.floor(Date.now() / 1000); 59 | $('#showtime').html("Files will be saved as: JS-Something-" + str + ".png"); 60 | break; 61 | 62 | case "1": 63 | var date = new Date(); 64 | var str = date.getFullYear() + '-' + ('0' + (date.getMonth()+1)).slice(-2) + '-' + ('0' + date.getDate()).slice(-2) + '-' + ('0' + date.getHours()).slice(-2) + '-' + ('0' + date.getMinutes()).slice(-2) + '-' + ('0' + date.getSeconds()).slice(-2); 65 | $('#showtime').html("Files will be saved as: JS-Something-" + str + ".png"); 66 | break; 67 | 68 | case "2": 69 | var date = new Date(); 70 | var str = date.getFullYear() + ('0' + (date.getMonth()+1)).slice(-2) + ('0' + date.getDate()).slice(-2) + ('0' + date.getHours()).slice(-2) + ('0' + date.getMinutes()).slice(-2) + ('0' + date.getSeconds()).slice(-2); 71 | $('#showtime').html("Files will be saved as: JS-Something-" + str + ".png"); 72 | break; 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /public/req/js/sys/splash.js: -------------------------------------------------------------------------------- 1 | var splashfiles = [ 2 | // ["01",'Philip Lück'], 3 | // ['02','Damon Milstead'], 4 | // ['03','Mario Tran Phuc'], 5 | // ['04','Stu Ballinger'], 6 | // ['05','Dortus aka MM'], 7 | // ['06','Grigori Shevtsov'], 8 | // ['07','Grigori Shevtsov'], 9 | // ['08','Stu Ballinger'], 10 | // ['09','Alex Ness'], 11 | ['10','Grigori Shevtsov'], 12 | ['11','Matnes_Design'], 13 | ['12','Grigori Shevtsov'], 14 | ['13','Ross A. Morris'] 15 | ]; 16 | 17 | var rng = rand(0,splashfiles.length-1); 18 | 19 | $( document ).ready(function() { 20 | if(cfg.General.skipSplashScreen == true){ 21 | } 22 | else{ 23 | $( "div#splash" ).removeClass( "skip" ); 24 | setTimeout(function(){ 25 | $( "div#splash" ).removeClass( "visible" ); 26 | }, 1500); 27 | } 28 | $("#splashartist").append(splashfiles[rng][1]); 29 | $("div#splash").css("background-image","url('req/img/splash/" + splashfiles[rng][0] + ".jpg')"); 30 | 31 | }); 32 | -------------------------------------------------------------------------------- /public/req/js/sys/vercheck.js: -------------------------------------------------------------------------------- 1 | var curver = 130; 2 | 3 | $(function() { 4 | verCheck(); 5 | }); 6 | 7 | function verCheck(){ 8 | if(cfg.General.disableUpdateCheck == false){ 9 | $('#vercheck').css('display','block'); 10 | $('#vercheck').html(''); 11 | var versionCheck = $.get( "https://windmillart.net/jspver.html", function( data ){ 12 | latver = Number(data); 13 | }) 14 | .done(function(){ 15 | if(curver < latver){ 16 | setTimeout(function(){ $('#vercheck').html('');}, 3500); 17 | } 18 | else{ 19 | setTimeout(function(){ $('#vercheck').html('');}, 3500); 20 | } 21 | }) 22 | .fail(function() { 23 | setTimeout(function(){ $('#vercheck').html('');}, 3500); 24 | }); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /public/req/jsplacement.conf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/satelllte/JSPlacementWeb/f5de697e47d312e642aba7013781ff04e5de1247/public/req/jsplacement.conf -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Allow: / 3 | Disallow: /guides/ 4 | Disallow: /pages/ 5 | --------------------------------------------------------------------------------