-
Notifications
You must be signed in to change notification settings - Fork 7
CCSMB-15: Wide Printer Format (2dj) and Wide Printer Format Array (2dja) Formats and CCSMB-16: 3D Print JSON (3dj) #31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
znepb
wants to merge
6
commits into
master
Choose a base branch
from
2dj-2dja-3dj
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+122
−0
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
1e2e314
Propose CCSMB-15 and CCSMB-16
znepb 54c346c
Fix titles
znepb e7388dc
Update CCSMB-15.md
znepb 8b45819
Update CCSMB-15.md
znepb 6ea0cd9
Add clarification on that the files should contain
znepb cdcaa5a
Update CCSMB-16.md
znepb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| # _CCSMB-15_: Wide Printer Format and Wide Printer Format Array | ||
|
|
||
| _Author: znepb_ | ||
| _Version_: 1.0.0 | ||
| _Last revised:_ | ||
| The words MUST, MUST NOT, SHOULD, SHOULD NOT, and MAY are defined in [RFC 2119](https://www.rfc-editor.org/rfc/rfc2119). | ||
|
|
||
| ## Rationale | ||
|
|
||
| Wide Printer Format (2dj) is a file format used by [SwitchCraft Peripherals](https://github.com/SwitchCraftCC/sc-peripherals) to print poster files. These files contain information to print onto these posters, each pixel being a different color similar to map files. Wide Format Print (A) (2dja), is similar to 2dj. | ||
|
|
||
| ## 2dj | ||
|
|
||
| ### Format | ||
|
|
||
| | Information | | | ||
| | ----------- | ------------------- | | ||
| | Version | 1.0.0 | | ||
| | Type | Wide Printer Format | | ||
| | MIME | `image/2dj` | | ||
| | Extensions | `.2dj` | | ||
|
|
||
| Wide Printer Format files MUST follow [RFC 8259](https://datatracker.ietf.org/doc/html/rfc8259), "The JavaScript Object Notation (JSON) Data Interchange Format." These files MUST also use the file extension `.2dj`. The file MUST contain an object, with keys and values specified below. | ||
|
|
||
| ### Keys | ||
znepb marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| - `label`: This key SHOULD contain the name of the poster. It MUST be a string. | ||
| - `tooltip`: This key MAY contain a tooltip displayed while hovering over the poster in the players inventory. It MUST be a string. | ||
| - `palette`: MUST be `null` or an array and MUST NOT have more than 63 values. This defines the color palette the poster will use. | ||
tomodachi94 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - Each value MUST be a hexadecimal value between `0x000000` (0) and `0xFFFFFF` (16777215) | ||
| - In the event that this key is not provided, the printer MUST follow the [default Minecraft colors for maps.](https://minecraft.wiki/w/Map_item_format#Base_colors) | ||
| - Index zero MUST NOT be included. This is reserved for the transparent color. | ||
| - `pixels`: MUST be an array of length 16384. Each value MUST be between zero (0) and sixty-three (63). | ||
| - Each value MUST correspond to its value in the index of palette. For example, if the value is 2, and index 2 of `palette` is `0xff0000`, that color MUST be red. | ||
| - `width` and `height`: MAY be included, if included its value MUST be the number `128`. | ||
|
|
||
| ## 2dja | ||
|
|
||
| | Information | | | ||
| | ----------- | ------------------------- | | ||
| | Version | 1.0.0 | | ||
| | Type | Wide Printer Format Array | | ||
| | MIME | `image/2dja` | | ||
| | Extensions | `.2dja` | | ||
|
|
||
| ### Format | ||
|
|
||
| Wide Printer Format Array files MUST follow [RFC 8259](https://datatracker.ietf.org/doc/html/rfc8259), "The JavaScript Object Notation (JSON) Data Interchange Format." These files MUST also use the file extension `.2dja`. The file MUST contain an object, with keys and values specified below. | ||
|
|
||
| ### Keys | ||
|
|
||
| - `title`: This key SHOULD contain the title of the poster array. It MUST be a string. | ||
| - `width`: This key SHOUlD be included, and if included, MUST be the width of the poster array. It MUST be a number. | ||
| - `height`: This key SHOULD be the height, and if included, MUST be the poster array. It MUST be a number. | ||
| - `pages`: MUST be an array of 2dj files. | ||
|
|
||
| ## References | ||
|
|
||
| - https://docs.sc3.io/features/sc-peripherals.html#_2dja-format | ||
| - https://docs.sc3.io/features/sc-peripherals.html#_2dja-format | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| # _CCSMB-16_: 3D Print JSON | ||
|
|
||
| _Author: znepb_ | ||
| _Version_: 1.0.0 | ||
| _Last revised:_ | ||
| The words MUST, MUST NOT, SHOULD, SHOULD NOT, and MAY are defined in [RFC 2119](https://www.rfc-editor.org/rfc/rfc2119). | ||
|
|
||
| ## Rational | ||
|
|
||
| 3D Print JSON Storage (3dj) is a file format used by [SwitchCraft peripherals](https://github.com/SwitchCraftCC/sc-peripherals) to create 3-dimensional prints. These files contain shapes and other metadata to create 3D prints, special blocks which can have special geometry and other properties | ||
|
|
||
| ### Format | ||
|
|
||
| | Information | | | ||
| | ----------- | ------------- | | ||
| | Version | 1.0.0 | | ||
| | Type | 3D Print JSON | | ||
| | MIME | `model/3dj` | | ||
| | Extensions | `.3dj` | | ||
|
|
||
| 2D JSON Image Storage files MUST follow [RFC 8259](https://datatracker.ietf.org/doc/html/rfc8259), "The JavaScript Object Notation (JSON) Data Interchange Format." These files MUST also use the file extension `.3dj`. The file MUST contain an object, with keys and values specified below. | ||
|
|
||
| ## States | ||
|
|
||
| 3D prints contain two states: | ||
|
|
||
| - Off: When off, all data specified as being off will be used. This is the default state for all 3D prints. | ||
| - On: For this to be available, the 3D print MUST contain a `shapesOn` array. | ||
|
|
||
| ## Definitions | ||
|
|
||
| ### Shape | ||
|
|
||
| A JSON object defining a shape in the 3D print. | ||
| **Keys:** | ||
|
|
||
| - `bounds`: MUST be an array of integers zero (0) through sixteen (16), and MUST be of length six (6). The array MUST contain positions in this order: `minX`, `minY`, `minZ`, `maxX`, `maxY`, `maxZ`. | ||
| - `texture`: MUST be a string containing a path to a texture. | ||
| - Example: `minecraft:block/stone` | ||
| - Format: `<namespace>:<type>/<file>` | ||
| - `tint`: MAY be a string, number, or `null`. | ||
| - If a string, it MUST follow the `RRGGBB` format. | ||
| - If a number, it MUST be between `0x000000` (0) and `0xFFFFFF` (16777215). It SHOULD be represented as a hexadecimal in the file (e.g. `0x16D34B`). | ||
|
|
||
| ## Keys | ||
|
|
||
| - `label`: SHOULD contain the name of the 3D print. It MUST be a string. It MUST be a string. | ||
| - `tooltip`: MUST be a string or `null`. MAY contain a tooltip with a brief explanation of the 3D print, displayed while hovering over the 3D print in the players inventory. | ||
| - `isButton`: MUST be `null` or a boolean. When set, the 3D print will act like a button, pressing the print will shift from the `OFF` state to the `ON` state for a moment. This is `false` by default. | ||
| - `collideWhenOff`: MUST be `null` or a boolean, defines whether or not the 3D print will respect collision in the `OFF` state. This is `true` by default. | ||
| - `collideWhenOn`: MUST be `null` or a boolean, defines whether or not the 3D print will respect collision in the `ON` state. This is `true` by default. | ||
| - `lightLevel`: MUST be an integer from zero (0) to fifteen (15), or `null`. This is zero (0) by default. | ||
| - `lightWhenOff`: MUST be an boolean or `null`. This defines if the print will emit light when in the `OFF` state. This is `true` by default. | ||
| - `lightWhenOn`: MUST be `null` or a boolean. This defines if the print will emit light when in the `ON` state. This is `true` by default. | ||
| - `redstoneLevel`: MUST be `null` or an integer ranging from zero (0) to fifteen (15). This defines the redstone level the 3D print will output. This is zero (0) by default. | ||
| - `seatPos`: MUST be `null`, or an array of length three (3). Each value MUST be a number between 0.1 and 0.9. | ||
| - `shapesOff`: MUST be an array of shapes (see Definitions), and SHOULD have a length greater than zero (0). This is the shapes that will be displayed in the block. | ||
| - `shapesOn`: MUST be an array of shapes (see Definitions). If the ability to switch the print between the `ON` and `OFF` state is not desired, the length of this array MUST be zero (0). | ||
|
|
||
| ## References | ||
|
|
||
| -https://docs.sc3.io/features/sc-peripherals.html#_3dj-format |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.