From 1e2e314aa372973bc286806f8be05ffb7eff4355 Mon Sep 17 00:00:00 2001 From: Marcus Wenzel Date: Sat, 30 Mar 2024 15:38:43 -0400 Subject: [PATCH 1/6] Propose CCSMB-15 and CCSMB-16 --- Standards/CCSMB-15.md | 60 +++++++++++++++++++++++++++++++++++++++++ Standards/CCSMB-16.md | 62 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 122 insertions(+) create mode 100644 Standards/CCSMB-15.md create mode 100644 Standards/CCSMB-16.md diff --git a/Standards/CCSMB-15.md b/Standards/CCSMB-15.md new file mode 100644 index 0000000..a477176 --- /dev/null +++ b/Standards/CCSMB-15.md @@ -0,0 +1,60 @@ +# _CCSMB-12_: 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). + +## Rational + +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`. + +### Keys + +- `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. + - 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`. + +### 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 diff --git a/Standards/CCSMB-16.md b/Standards/CCSMB-16.md new file mode 100644 index 0000000..400b3e3 --- /dev/null +++ b/Standards/CCSMB-16.md @@ -0,0 +1,62 @@ +# _CCSMB-12_: 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 + +##3 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 `.2dj`. + +## 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: `:/` +- `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 From 54c346ccfc18b0b8518af80956578efb3c6c21d1 Mon Sep 17 00:00:00 2001 From: Marcus Wenzel Date: Sat, 30 Mar 2024 15:58:36 -0400 Subject: [PATCH 2/6] Fix titles --- Standards/CCSMB-15.md | 2 +- Standards/CCSMB-16.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Standards/CCSMB-15.md b/Standards/CCSMB-15.md index a477176..a05bda1 100644 --- a/Standards/CCSMB-15.md +++ b/Standards/CCSMB-15.md @@ -1,4 +1,4 @@ -# _CCSMB-12_: Wide Printer Format and Wide Printer Format Array +# _CCSMB-15_: Wide Printer Format and Wide Printer Format Array _Author: znepb_ _Version_: 1.0.0 diff --git a/Standards/CCSMB-16.md b/Standards/CCSMB-16.md index 400b3e3..cfc7a3e 100644 --- a/Standards/CCSMB-16.md +++ b/Standards/CCSMB-16.md @@ -1,4 +1,4 @@ -# _CCSMB-12_: 3D Print JSON +# _CCSMB-16_: 3D Print JSON _Author: znepb_ _Version_: 1.0.0 From e7388dcee8be6f5211a58d369dbf94968f682e0f Mon Sep 17 00:00:00 2001 From: Marcus Date: Sat, 30 Mar 2024 19:19:01 -0400 Subject: [PATCH 3/6] Update CCSMB-15.md Co-authored-by: Tomo <68489118+tomodachi94@users.noreply.github.com> --- Standards/CCSMB-15.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Standards/CCSMB-15.md b/Standards/CCSMB-15.md index a05bda1..b678e17 100644 --- a/Standards/CCSMB-15.md +++ b/Standards/CCSMB-15.md @@ -5,7 +5,7 @@ _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 +## 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. From 8b45819a0e92e0d25396adb05ea377b4b3a66fe8 Mon Sep 17 00:00:00 2001 From: Marcus Date: Sat, 30 Mar 2024 19:19:12 -0400 Subject: [PATCH 4/6] Update CCSMB-15.md Co-authored-by: Tomo <68489118+tomodachi94@users.noreply.github.com> --- Standards/CCSMB-15.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Standards/CCSMB-15.md b/Standards/CCSMB-15.md index b678e17..cfeb5ed 100644 --- a/Standards/CCSMB-15.md +++ b/Standards/CCSMB-15.md @@ -7,7 +7,7 @@ The words MUST, MUST NOT, SHOULD, SHOULD NOT, and MAY are defined in [RFC 2119]( ## 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. +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 From 6ea0cd976ef0a1cde4d2062cbbaf7477ff3a8e25 Mon Sep 17 00:00:00 2001 From: Marcus Wenzel Date: Sat, 30 Mar 2024 21:48:04 -0400 Subject: [PATCH 5/6] Add clarification on that the files should contain --- Standards/CCSMB-15.md | 4 ++-- Standards/CCSMB-16.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Standards/CCSMB-15.md b/Standards/CCSMB-15.md index cfeb5ed..50d1cf2 100644 --- a/Standards/CCSMB-15.md +++ b/Standards/CCSMB-15.md @@ -20,7 +20,7 @@ Wide Printer Format (2dj) is a file format used by [SwitchCraft Peripherals](htt | 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`. +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 @@ -45,7 +45,7 @@ Wide Printer Format files MUST follow [RFC 8259](https://datatracker.ietf.org/do ### 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`. +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 diff --git a/Standards/CCSMB-16.md b/Standards/CCSMB-16.md index cfc7a3e..69060b7 100644 --- a/Standards/CCSMB-16.md +++ b/Standards/CCSMB-16.md @@ -18,7 +18,7 @@ The words MUST, MUST NOT, SHOULD, SHOULD NOT, and MAY are defined in [RFC 2119]( | 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 `.2dj`. +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 From cdcaa5a3cc388976e74df33ce8a8588149019625 Mon Sep 17 00:00:00 2001 From: Marcus Date: Wed, 3 Apr 2024 16:00:07 -0400 Subject: [PATCH 6/6] Update CCSMB-16.md --- Standards/CCSMB-16.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Standards/CCSMB-16.md b/Standards/CCSMB-16.md index 69060b7..dd65a4c 100644 --- a/Standards/CCSMB-16.md +++ b/Standards/CCSMB-16.md @@ -9,7 +9,7 @@ The words MUST, MUST NOT, SHOULD, SHOULD NOT, and MAY are defined in [RFC 2119]( 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 -##3 Format +### Format | Information | | | ----------- | ------------- |