partforge 0.132.0 → 0.132.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -47,7 +47,7 @@ export const ENVIRONMENTS = {
|
|
|
47
47
|
},
|
|
48
48
|
},
|
|
49
49
|
"print-bed": {
|
|
50
|
-
id: "print-bed", label: "Print bed", exposure: 0.
|
|
50
|
+
id: "print-bed", label: "Print bed", exposure: 0.26,
|
|
51
51
|
// The studio photo re-baked with --contrast: a darker, harsher room, like
|
|
52
52
|
// the inside of a printer's enclosure.
|
|
53
53
|
hdr: "env-print-bed.jpg",
|
|
@@ -48,9 +48,9 @@ export const PRESETS = {
|
|
|
48
48
|
{ color: 0xb3261e, metalness: 0, roughness: 0.4, clearcoat: 1, clearcoatRoughness: 0.08, tintable: true }),
|
|
49
49
|
|
|
50
50
|
"pla-print": P("pla-print", "PLA print", "print", "FDM-printed PLA with visible layer lines; tint with `color`.",
|
|
51
|
-
{ color: 0xe8e4da, metalness: 0, roughness: 0.
|
|
51
|
+
{ color: 0xe8e4da, metalness: 0, roughness: 0.72, envIntensity: 0.45, specularIntensity: 0.3, pattern: "layer-lines", textureScale: 0.2, tintable: true }),
|
|
52
52
|
"petg-print": P("petg-print", "PETG print", "print", "FDM-printed PETG: glossier than PLA, visible layers; tint with `color`.",
|
|
53
|
-
{ color: 0x2d6cdf, metalness: 0, roughness: 0.
|
|
53
|
+
{ color: 0x2d6cdf, metalness: 0, roughness: 0.62, envIntensity: 0.5, specularIntensity: 0.4, pattern: "layer-lines", textureScale: 0.2, tintable: true }),
|
|
54
54
|
"resin-print": P("resin-print", "Resin print", "print", "SLA/MSLA resin print: smooth, faintly waxy; tint with `color`.",
|
|
55
55
|
{ color: 0x8a8f96, metalness: 0, roughness: 0.35, clearcoat: 0.2, clearcoatRoughness: 0.3, tintable: true }),
|
|
56
56
|
"nylon-sls": P("nylon-sls", "Nylon SLS", "print", "Powder-bed nylon: matte, grainy, usually white or dyed black.",
|
|
@@ -6,13 +6,23 @@ import { PRESETS } from "../framework/materials/presets.js";
|
|
|
6
6
|
const ids = Object.keys(PRESETS);
|
|
7
7
|
const COLS = 6, PITCH = 40;
|
|
8
8
|
|
|
9
|
+
// Common filament colours for the "PLA colours" and "PETG colours" views: how
|
|
10
|
+
// each print finish reads across light, dark and saturated tints, since a preset
|
|
11
|
+
// tuned on one colour can wash out another. The last is the no-material blue-grey.
|
|
12
|
+
const FILAMENT_COLOURS = [
|
|
13
|
+
["White", 0xf2f0eb], ["Cream (preset)", PRESETS["pla-print"].color], ["Light grey", 0xa3a6a8],
|
|
14
|
+
["Charcoal", 0x4a4c50], ["Black", 0x1e1f21], ["No-material blue-grey", 0x9fb4cc],
|
|
15
|
+
["Red", 0xc8102e], ["Orange", 0xe0592a], ["Yellow", 0xf2c500],
|
|
16
|
+
["Green", 0x2e8b3d], ["Blue", 0x1f5fbf], ["Purple", 0x6b3fa0],
|
|
17
|
+
];
|
|
18
|
+
|
|
9
19
|
const withHole = (k) =>
|
|
10
20
|
k.box({ size: [30, 30, 12] }).fillet({ r: 3 }).cut(k.cylinder({ r: 5, h: 20 }).translate([0, 0, -4]));
|
|
11
21
|
|
|
12
22
|
export default {
|
|
13
23
|
meta: { title: "Material swatches", units: "mm", environment: "studio" },
|
|
14
24
|
defaults: {},
|
|
15
|
-
views: { all: { label: "All presets", default: true }, print: { label: "Layer lines" } },
|
|
25
|
+
views: { all: { label: "All presets", default: true }, colours: { label: "PLA colours" }, petg: { label: "PETG colours" }, print: { label: "Layer lines" } },
|
|
16
26
|
parts: {
|
|
17
27
|
...Object.fromEntries(ids.map((id, i) => [id.replaceAll("-", "_"), {
|
|
18
28
|
label: PRESETS[id].label,
|
|
@@ -27,6 +37,18 @@ export default {
|
|
|
27
37
|
views: ["all"],
|
|
28
38
|
build: (k) => withHole(k).translate([(ids.length % COLS) * PITCH, -Math.floor(ids.length / COLS) * PITCH, 0]),
|
|
29
39
|
},
|
|
40
|
+
...Object.fromEntries(FILAMENT_COLOURS.map(([label, color], i) => [`pla_${i}`, {
|
|
41
|
+
label: `PLA — ${label}`,
|
|
42
|
+
views: ["colours"],
|
|
43
|
+
build: (k) => withHole(k).translate([(i % COLS) * PITCH, -Math.floor(i / COLS) * PITCH, 0]),
|
|
44
|
+
display: { material: "pla-print", color },
|
|
45
|
+
}])),
|
|
46
|
+
...Object.fromEntries(FILAMENT_COLOURS.map(([label, color], i) => [`petg_${i}`, {
|
|
47
|
+
label: `PETG — ${label}`,
|
|
48
|
+
views: ["petg"],
|
|
49
|
+
build: (k) => withHole(k).translate([(i % COLS) * PITCH, -Math.floor(i / COLS) * PITCH, 0]),
|
|
50
|
+
display: { material: "petg-print", color },
|
|
51
|
+
}])),
|
|
30
52
|
upright_pla: {
|
|
31
53
|
label: "PLA, displayed upright, printed flat",
|
|
32
54
|
views: ["print"],
|