Skip to content

Conversation

@ricardoboss
Copy link

Fixes #6

@ricardoboss ricardoboss marked this pull request as ready for review November 17, 2025 20:24
@ricardoboss
Copy link
Author

@piebro as discussed, I added a simple HTML file just for viewing the blueprint. It also takes in the blueprint via a bp=<blueprint> query parameter. I've not implemented reading settings or other things yet, but this should be a good base to build upon.

Comment on lines +16 to +23
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/codemirror.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/theme/monokai.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/codemirror.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/mode/javascript/javascript.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/addon/lint/lint.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/addon/lint/lint.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/addon/lint/json-lint.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jsonlint/1.6.0/jsonlint.min.js"></script>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are not needed here

@piebro
Copy link
Owner

piebro commented Nov 18, 2025

This looks good. I think this should also be documented in the README somewhere and maybe a link where people can encode a Blueprint, e.g. https://meyerweb.com/eric/tools/dencoder/ or this can also be a small extra website, I think either way is good.

I tested it for example with:

bp=0eJyd1M1qwzAMAOB30dktcf5W59jXGGUkrRiGRAm2uzaEvPvkdbAxdxD7FMeRPoEdaYGuv%2BJkNDloFtDnkSw0rwtY%2FU5t7%2FfcPCE0YPCseSGA2sG%2FO9OSnUbjdh32DlYBmi54h0auJwFITjuND%2Bt5hoBptBw0kq%2FCiTu5rwTMvMj2FXsXzTUf37NvcX6j69Ch8VVEAiz%2FwmUA5zFwFgEXEXCMW0a4%2Fx%2FEIXCrFDe4udCtE9wN7EsCG5yCzAP3kHBtW1yV8p9tgWWW0hqB%2FKTlknpuSy%2FnfmRohwPDP%2FNIwAca%2B5VT1bkqleJHoYqahb7lshx9%2FBV94xp%2B4JzW9RNuVpWm

I added two comment.

<script defer data-domain="piebro.github.io/factorio-blueprint-visualizer" src="https://plausible.io/js/plausible.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pako/2.1.0/pako.min.js"></script>
<!-- for deflating the blueprint string -->
<script src="website/startExampleBlueprintString.js"></script>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this and expect that bp is set, otherwise maybe show a small text that no blueprint is set

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a way to pass blueprints via URL

2 participants