@hatiolab/figure-model 0.1.75 → 0.1.77
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/CHANGELOG.md +11 -0
- package/README.md +60 -138
- package/dist/index.d.ts +2 -13
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -26
- package/dist/index.js.map +1 -1
- package/dist/v3-asset-types.d.ts +1 -2
- package/dist/v3-asset-types.d.ts.map +1 -1
- package/dist/v3-asset.js +1 -1
- package/dist/v3-asset.js.map +1 -1
- package/dist/v3-authoring-actions.d.ts +9 -12
- package/dist/v3-authoring-actions.d.ts.map +1 -1
- package/dist/v3-authoring-actions.js +4 -5
- package/dist/v3-authoring-actions.js.map +1 -1
- package/dist/v3-capabilities.js +4 -1
- package/dist/v3-capabilities.js.map +1 -1
- package/dist/v3-cost.d.ts.map +1 -1
- package/dist/v3-cost.js +3 -5
- package/dist/v3-cost.js.map +1 -1
- package/dist/v3-create.d.ts +1 -1
- package/dist/v3-create.d.ts.map +1 -1
- package/dist/v3-editor-workspace.d.ts +38 -0
- package/dist/v3-editor-workspace.d.ts.map +1 -1
- package/dist/v3-editor-workspace.js +14 -0
- package/dist/v3-editor-workspace.js.map +1 -1
- package/dist/v3-examples.js +1 -1
- package/dist/v3-gate.d.ts +7 -8
- package/dist/v3-gate.d.ts.map +1 -1
- package/dist/v3-gate.js +11 -14
- package/dist/v3-gate.js.map +1 -1
- package/dist/v3-graph.d.ts +1 -2
- package/dist/v3-graph.d.ts.map +1 -1
- package/dist/v3-graph.js +5 -7
- package/dist/v3-graph.js.map +1 -1
- package/dist/v3-instance-size.d.ts +3 -5
- package/dist/v3-instance-size.d.ts.map +1 -1
- package/dist/v3-instance-size.js +2 -4
- package/dist/v3-instance-size.js.map +1 -1
- package/dist/v3-kernel-version.d.ts +1 -1
- package/dist/v3-kernel-version.js +1 -1
- package/dist/v3-part-edit.d.ts +4 -5
- package/dist/v3-part-edit.d.ts.map +1 -1
- package/dist/v3-part-edit.js +2 -2
- package/dist/v3-part-edit.js.map +1 -1
- package/dist/v3-proposal.d.ts +42 -0
- package/dist/v3-proposal.d.ts.map +1 -0
- package/dist/v3-proposal.js +179 -0
- package/dist/v3-proposal.js.map +1 -0
- package/dist/v3-release-contract.js +1 -1
- package/dist/v3-release-contract.js.map +1 -1
- package/dist/v3-score.d.ts +4 -5
- package/dist/v3-score.d.ts.map +1 -1
- package/dist/v3-score.js +7 -8
- package/dist/v3-score.js.map +1 -1
- package/dist/v3-words.d.ts +87 -0
- package/dist/v3-words.d.ts.map +1 -0
- package/dist/v3-words.js +87 -0
- package/dist/v3-words.js.map +1 -0
- package/docs/assembly-constraints-v3.md +13 -23
- package/docs/v3-asset-persistence.md +4 -4
- package/docs/v3-common-kernel-experiment.md +1 -1
- package/docs/v3-core-semantics.md +3 -3
- package/docs/v3-cutover.md +5 -3
- package/docs/v3-design.md +13 -26
- package/docs/v3-editor-integration.md +2 -2
- package/docs/v3-full-conveyor-validation.md +3 -3
- package/docs/v3-layout-system.md +1 -1
- package/docs/v3-minimal-model.md +0 -1
- package/docs/v3-motion-contract.md +21 -56
- package/docs/v3-runtime-extraction.md +7 -7
- package/docs/v3-sample-validation-expanded.md +1 -1
- package/docs/v3-sample-validation.md +1 -1
- package/docs/v3-shape-dimension-contract.md +23 -57
- package/docs/v3-status.md +5 -5
- package/docs/v3-storage-integration.md +4 -4
- package/package.json +2 -20
- package/dist/blueprint-shape.d.ts +0 -10
- package/dist/blueprint-shape.d.ts.map +0 -1
- package/dist/blueprint-shape.js +0 -194
- package/dist/blueprint-shape.js.map +0 -1
- package/dist/blueprint.d.ts +0 -73
- package/dist/blueprint.d.ts.map +0 -1
- package/dist/blueprint.js +0 -388
- package/dist/blueprint.js.map +0 -1
- package/dist/cost-chart.d.ts +0 -35
- package/dist/cost-chart.d.ts.map +0 -1
- package/dist/cost-chart.js +0 -150
- package/dist/cost-chart.js.map +0 -1
- package/dist/cost.d.ts +0 -162
- package/dist/cost.d.ts.map +0 -1
- package/dist/cost.js +0 -194
- package/dist/cost.js.map +0 -1
- package/dist/gate.d.ts +0 -65
- package/dist/gate.d.ts.map +0 -1
- package/dist/gate.js +0 -284
- package/dist/gate.js.map +0 -1
- package/dist/grouping.d.ts +0 -121
- package/dist/grouping.d.ts.map +0 -1
- package/dist/grouping.js +0 -224
- package/dist/grouping.js.map +0 -1
- package/dist/keys.d.ts +0 -45
- package/dist/keys.d.ts.map +0 -1
- package/dist/keys.js +0 -84
- package/dist/keys.js.map +0 -1
- package/dist/origin.d.ts +0 -33
- package/dist/origin.d.ts.map +0 -1
- package/dist/origin.js +0 -46
- package/dist/origin.js.map +0 -1
- package/dist/release-contract.d.ts +0 -38
- package/dist/release-contract.d.ts.map +0 -1
- package/dist/release-contract.js +0 -246
- package/dist/release-contract.js.map +0 -1
- package/dist/sizing.d.ts +0 -231
- package/dist/sizing.d.ts.map +0 -1
- package/dist/sizing.js +0 -550
- package/dist/sizing.js.map +0 -1
- package/dist/types.d.ts +0 -1233
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -547
- package/dist/types.js.map +0 -1
- package/dist/v3-from-v2.d.ts +0 -203
- package/dist/v3-from-v2.d.ts.map +0 -1
- package/dist/v3-from-v2.js +0 -2053
- package/dist/v3-from-v2.js.map +0 -1
- package/dist/v3-mesh-compare.d.ts +0 -24
- package/dist/v3-mesh-compare.d.ts.map +0 -1
- package/dist/v3-mesh-compare.js +0 -55
- package/dist/v3-mesh-compare.js.map +0 -1
- package/dist/validate.d.ts +0 -7
- package/dist/validate.d.ts.map +0 -1
- package/dist/validate.js +0 -1119
- package/dist/validate.js.map +0 -1
- package/dist/visual-evidence.d.ts +0 -21
- package/dist/visual-evidence.d.ts.map +0 -1
- package/dist/visual-evidence.js +0 -52
- package/dist/visual-evidence.js.map +0 -1
- package/docs/design.md +0 -193
- package/docs/format-survey.md +0 -108
- package/docs/format.md +0 -704
- package/docs/sizing.md +0 -183
- package/docs/validation.md +0 -357
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { type V3PrimitiveCreation } from './v3-create.ts';
|
|
2
|
+
import { type V3AuthoringAction } from './v3-authoring-actions.ts';
|
|
3
|
+
import { type V3PartEdit } from './v3-part-edit.ts';
|
|
4
|
+
import { type V3Asset, type V3Placement } from './v3-asset-types.ts';
|
|
5
|
+
/** A part, new. Its place is where it is fastened; `position` is only for a part left unfastened. */
|
|
6
|
+
export interface V3ProposalAddPart {
|
|
7
|
+
kind: 'add-part';
|
|
8
|
+
part: Omit<V3PrimitiveCreation, 'position'> & {
|
|
9
|
+
position?: V3PrimitiveCreation['position'];
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
/** The room the figure takes up, fitted to its parts as they are -- the modeller's 「부품에 맞추기」. */
|
|
13
|
+
export interface V3ProposalFitRoom {
|
|
14
|
+
kind: 'fit-room';
|
|
15
|
+
placement: V3Placement;
|
|
16
|
+
}
|
|
17
|
+
export type V3ProposalStep = V3ProposalAddPart | V3ProposalFitRoom | V3AuthoringAction | V3PartEdit;
|
|
18
|
+
declare const PART_EDIT_KINDS: readonly ["set-material", "set-segments", "remove-part", "set-capabilities", "set-state-input", "set-state-defaults", "set-driver", "remove-driver", "set-clip", "duplicate-part", "move-part", "rename-part"];
|
|
19
|
+
type Exhaustive<T extends never> = T;
|
|
20
|
+
export type _PartEditKindsComplete = Exhaustive<Exclude<V3PartEdit['kind'], (typeof PART_EDIT_KINDS)[number]>>;
|
|
21
|
+
/**
|
|
22
|
+
* The steps in order, on a copy of the asset. The first one the kernel refuses stops the proposal, with the step's
|
|
23
|
+
* place in the list and the kernel's code and sentence; nothing is kept from it.
|
|
24
|
+
*/
|
|
25
|
+
export declare function applyV3Proposal(source: V3Asset, steps: readonly V3ProposalStep[]): V3Asset;
|
|
26
|
+
/** One step the model may write: its kind, its shape, and what it means, in the author's terms. */
|
|
27
|
+
export interface V3ProposalWord {
|
|
28
|
+
kind: string;
|
|
29
|
+
shape: string;
|
|
30
|
+
means: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* The words, in the order a figure is usually made. Each shape is the command's own, written short; the means say
|
|
34
|
+
* the relation, not the graph. Kept complete against the kernel's command types (`_GrammarComplete` below).
|
|
35
|
+
*/
|
|
36
|
+
export declare const V3_PROPOSAL_GRAMMAR: readonly V3ProposalWord[];
|
|
37
|
+
/** Taken only through a word of its own (`fit-room` asks the kernel for the proposal it confirms). */
|
|
38
|
+
type LeftOut = 'declare-occupancy';
|
|
39
|
+
export type _GrammarComplete = Exhaustive<Exclude<V3AuthoringAction['kind'] | V3PartEdit['kind'], LeftOut | (typeof V3_PROPOSAL_KINDS)[number]>>;
|
|
40
|
+
export declare const V3_PROPOSAL_KINDS: readonly ["add-part", "attach", "set-joint", "declare-instance-size", "link-dimension", "unlink-dimension", "scale-uniformly", "follow-size-in-proportion", "scale-position", "fix-position", "nudge-part", "detach", "remove-joint", "make-repeat", "set-repeat", "remove-repeat", "add-binding", "remove-binding", "fit-room", "set-mounting-face", "clear-mounting-face", "set-detail-level", "rename", "set-material", "set-segments", "rename-part", "remove-part", "duplicate-part", "move-part", "set-capabilities", "set-state-input", "set-state-defaults", "set-driver", "remove-driver", "set-clip"];
|
|
41
|
+
export {};
|
|
42
|
+
//# sourceMappingURL=v3-proposal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v3-proposal.d.ts","sourceRoot":"","sources":["../src/v3-proposal.ts"],"names":[],"mappings":"AAaA,OAAO,EAAkB,KAAK,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AACzE,OAAO,EAAkE,KAAK,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAClI,OAAO,EAAc,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC/D,OAAO,EAAiB,KAAK,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAGnF,qGAAqG;AACrG,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,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1
|
+
/**
|
|
2
|
+
* An AI proposal for a V3 figure: a list of the authoring commands a person gives in the modeller, applied in order.
|
|
3
|
+
*
|
|
4
|
+
* The model does not write an asset. It writes the steps -- add a part, fasten it, let it follow a size, move it on a
|
|
5
|
+
* joint -- and the kernel applies them exactly as it applies the modeller's buttons (r3 §3: the UI and the AI change
|
|
6
|
+
* the inputs of the same relations). A step the kernel refuses is refused with the kernel's own code and sentence, so
|
|
7
|
+
* the proposer can say it back to the model and ask again; a proposal is never half applied (ADR-0094).
|
|
8
|
+
*
|
|
9
|
+
* The words the model may use are the ones below, made from the kernel's own constants and checked against its
|
|
10
|
+
* command types when this file compiles: a command the kernel gains and the grammar does not name is a type error,
|
|
11
|
+
* not a prompt that quietly speaks an older language.
|
|
12
|
+
*/
|
|
13
|
+
import { V3ContractError } from "./v3-contract.js";
|
|
14
|
+
import { addV3Primitive } from "./v3-create.js";
|
|
15
|
+
import { applyV3Authoring, proposeV3Occupancy, V3_FACES, V3_JOINT_TYPES } from "./v3-authoring-actions.js";
|
|
16
|
+
import { editV3Part } from "./v3-part-edit.js";
|
|
17
|
+
import { V3_PLACEMENTS } from "./v3-asset-types.js";
|
|
18
|
+
import { AXES } from "./v3-words.js";
|
|
19
|
+
/* The part edits, told apart from the authoring commands by kind -- one list, checked below to be the whole union. */
|
|
20
|
+
const PART_EDIT_KINDS = [
|
|
21
|
+
'set-material',
|
|
22
|
+
'set-segments',
|
|
23
|
+
'remove-part',
|
|
24
|
+
'set-capabilities',
|
|
25
|
+
'set-state-input',
|
|
26
|
+
'set-state-defaults',
|
|
27
|
+
'set-driver',
|
|
28
|
+
'remove-driver',
|
|
29
|
+
'set-clip',
|
|
30
|
+
'duplicate-part',
|
|
31
|
+
'move-part',
|
|
32
|
+
'rename-part'
|
|
33
|
+
];
|
|
34
|
+
/**
|
|
35
|
+
* The steps in order, on a copy of the asset. The first one the kernel refuses stops the proposal, with the step's
|
|
36
|
+
* place in the list and the kernel's code and sentence; nothing is kept from it.
|
|
37
|
+
*/
|
|
38
|
+
export function applyV3Proposal(source, steps) {
|
|
39
|
+
if (!Array.isArray(steps) || !steps.length)
|
|
40
|
+
throw new V3ContractError('PROPOSAL_EMPTY', 'steps', 'a proposal is a list of one or more steps');
|
|
41
|
+
let asset = structuredClone(source);
|
|
42
|
+
steps.forEach((step, i) => {
|
|
43
|
+
const at = `steps[${i}]`;
|
|
44
|
+
try {
|
|
45
|
+
if (!step || typeof step !== 'object' || typeof step.kind !== 'string')
|
|
46
|
+
throw new V3ContractError('SCHEMA', at, 'a step is an object with a kind');
|
|
47
|
+
if (step.kind === 'add-part') {
|
|
48
|
+
const part = { position: { x: 0, y: 0, z: 0 }, ...step.part };
|
|
49
|
+
asset = addV3Primitive(asset, part);
|
|
50
|
+
}
|
|
51
|
+
else if (step.kind === 'fit-room') {
|
|
52
|
+
asset = applyV3Authoring(asset, { kind: 'declare-occupancy', proposal: proposeV3Occupancy(asset), placement: step.placement });
|
|
53
|
+
}
|
|
54
|
+
else if (PART_EDIT_KINDS.includes(step.kind)) {
|
|
55
|
+
asset = editV3Part(asset, step);
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
asset = applyV3Authoring(asset, step);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
catch (e) {
|
|
62
|
+
const error = e;
|
|
63
|
+
throw new V3ContractError(error.code ?? 'SCHEMA', at, `${step?.kind ?? '?'}: ${String(error.message ?? e).replace(/^[A-Z_]+: /, '')}`);
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
return asset;
|
|
67
|
+
}
|
|
68
|
+
const faces = Object.keys(V3_FACES).join(' | ');
|
|
69
|
+
const axes = AXES.join(' | ');
|
|
70
|
+
const upper = AXES.map(a => a.toUpperCase()).join(' | ');
|
|
71
|
+
const measure = `number (mm) | { from: { of: 'instance', axis: ${axes} } | { of: 'part', part, axis }, times?, plus? }`;
|
|
72
|
+
const alignment = `'centre' | 'min' | 'max' | { mm: ${measure} }`;
|
|
73
|
+
/**
|
|
74
|
+
* The words, in the order a figure is usually made. Each shape is the command's own, written short; the means say
|
|
75
|
+
* the relation, not the graph. Kept complete against the kernel's command types (`_GrammarComplete` below).
|
|
76
|
+
*/
|
|
77
|
+
export const V3_PROPOSAL_GRAMMAR = [
|
|
78
|
+
{
|
|
79
|
+
kind: 'add-part',
|
|
80
|
+
shape: `{ kind: 'add-part', part: { id, kind: 'box', dimensions: { width, height, depth } } | { id, kind: 'cylinder', dimensions: { radius, length } } | { id, kind: 'rounded-box', dimensions: { width, height, depth, round } } | { id, kind: 'sphere', dimensions: { radiusX, radiusY, radiusZ } } | { id, kind: 'frustum', dimensions: { radiusTop, radiusBottom, height } } }`,
|
|
81
|
+
means: 'A new part, its measures in mm. A cylinder and a frustum stand along their local Y. Fasten it next; it stands at the origin until then.'
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
kind: 'attach',
|
|
85
|
+
shape: `{ kind: 'attach', part, face: ${faces}, to: { plane: 'mounting-plane' } | { part, face: ${faces} }, facing?: 'meet' | 'flush', gap?: ${measure}, align?: { ${axes}?: ${alignment} }, twist?: degrees, replace?: true }`,
|
|
86
|
+
means: "Fasten this face of the part to that face of another part (or to the mounting plane: the floor or ceiling is Y = 0 and takes a bottom or a top; a wall is Z = 0 and takes a back). meet puts the faces against each other, flush lays them in one plane. align places it across the face: centred, level with the min or max edge, or a measured offset from the centre. When the target resizes, the part follows."
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
kind: 'set-joint',
|
|
90
|
+
shape: `{ kind: 'set-joint', joint: { id, type: ${V3_JOINT_TYPES.map(t => `'${t}'`).join(' | ')}, body0, body1, origin, axis?: ${upper}, lowerLimit?, upperLimit?, state?: { id, label? }, mimic?: { joint, multiplier, offset? }, travel?: { source: { of: 'instance', axis } | { of: 'part', part, axis }, times?, plus? } } }`,
|
|
91
|
+
means: 'The fastening record, made to move: a revolute turns about axis (limits in degrees, none = turns without end), a prismatic slides along it (limits in mm, or a travel that is a share of a length with a ratio control 0..1). mimic follows another joint. Take body0, body1 and origin from the fastening as it is.'
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
kind: 'declare-instance-size',
|
|
95
|
+
shape: `{ kind: 'declare-instance-size', range: { x: { min, max }, y: { min, max }, z: { min, max } }, at?: { x?, y?, z? }, replace?: true }`,
|
|
96
|
+
means: 'The sizes the figure may be placed at, and the size it is authored at (its parts as they stand, when at is left out). Needed before a part can follow the figure.'
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
kind: 'link-dimension',
|
|
100
|
+
shape: `{ kind: 'link-dimension', part, axis: ${axes}, source: { of: 'instance', axis } | { of: 'part', part, axis }, times?, plus?, replace?: true, narrowRange?: true }`,
|
|
101
|
+
means: "This measure of the part follows the figure's size, or another part's measure, times a share plus a difference. A cylinder's X is its radius (read as the diameter), its Y its length."
|
|
102
|
+
},
|
|
103
|
+
{ kind: 'unlink-dimension', shape: `{ kind: 'unlink-dimension', part, axis, mm }`, means: 'Stop following: this measure is this many mm.' },
|
|
104
|
+
{ kind: 'scale-uniformly', shape: `{ kind: 'scale-uniformly' }`, means: 'The whole figure grows by one ratio (the geometric mean of the three sizes).' },
|
|
105
|
+
{ kind: 'follow-size-in-proportion', shape: `{ kind: 'follow-size-in-proportion' }`, means: 'In a figure that grows by one ratio, every length still with its own number follows the ratio.' },
|
|
106
|
+
{ kind: 'scale-position', shape: `{ kind: 'scale-position', part, axis }`, means: "The part's place on this axis becomes a share of the figure's size." },
|
|
107
|
+
{ kind: 'fix-position', shape: `{ kind: 'fix-position', part, axis }`, means: 'The part keeps its place on this axis whatever the size.' },
|
|
108
|
+
{ kind: 'nudge-part', shape: `{ kind: 'nudge-part', part, by?: { x?, y?, z? }, turn?: { x?, y?, z? }, grow?: { x?, y?, z? } }`, means: 'Move, turn or grow an unfastened part by these amounts (mm, degrees).' },
|
|
109
|
+
{ kind: 'detach', shape: `{ kind: 'detach', part }`, means: 'The part stops being fastened and stays where it stands.' },
|
|
110
|
+
{ kind: 'remove-joint', shape: `{ kind: 'remove-joint', joint }`, means: 'The fastening record goes; the part stays where it stands.' },
|
|
111
|
+
{
|
|
112
|
+
kind: 'make-repeat',
|
|
113
|
+
shape: `{ kind: 'make-repeat', part, axis: ${axes}, pitch, count?: number | 'fills' }`,
|
|
114
|
+
means: "The fastened part is repeated across the face it is fastened to: as many as fit at pitch (mm) from the parent's one edge to the other, or count spread evenly. A part in a row holds nothing."
|
|
115
|
+
},
|
|
116
|
+
{ kind: 'set-repeat', shape: `{ kind: 'set-repeat', part, pitch }`, means: "A row's pitch." },
|
|
117
|
+
{ kind: 'remove-repeat', shape: `{ kind: 'remove-repeat', part }`, means: 'The row goes back to one part.' },
|
|
118
|
+
{
|
|
119
|
+
kind: 'add-binding',
|
|
120
|
+
shape: `{ kind: 'add-binding', id, label, role: 'seat' | 'grip', part, face: ${faces}, accepts: string[], capacity, region?: { x, y, z }, replace?: true }`,
|
|
121
|
+
means: 'A place things are held: a seat things rest on, a grip things are held in, on a face of a part; it follows the part. accepts names the types it takes.'
|
|
122
|
+
},
|
|
123
|
+
{ kind: 'remove-binding', shape: `{ kind: 'remove-binding', id }`, means: 'The place goes.' },
|
|
124
|
+
{ kind: 'fit-room', shape: `{ kind: 'fit-room', placement: ${V3_PLACEMENTS.map(p => `'${p}'`).join(' | ')} }`, means: 'Declare the room the figure takes up, fitted to its parts, and what it is placed on. Do it last, after the parts and their motions.' },
|
|
125
|
+
{ kind: 'set-mounting-face', shape: `{ kind: 'set-mounting-face', part, face: ${faces} }`, means: 'The face that lies on the mounting plane (after the room is declared).' },
|
|
126
|
+
{ kind: 'clear-mounting-face', shape: `{ kind: 'clear-mounting-face' }`, means: 'No face is named as lying on the mounting plane.' },
|
|
127
|
+
{ kind: 'set-detail-level', shape: `{ kind: 'set-detail-level', level: 'S' | 'M' | 'L' | null }`, means: 'How much detail the figure is authored to, and so its part limit.' },
|
|
128
|
+
{ kind: 'rename', shape: `{ kind: 'rename', name }`, means: 'The name a person reads in the catalogue.' },
|
|
129
|
+
{ kind: 'set-material', shape: `{ kind: 'set-material', target: part, material: { token } }`, means: "The part's colour, a palette token." },
|
|
130
|
+
{ kind: 'set-segments', shape: `{ kind: 'set-segments', target: part, segments }`, means: "How finely a round part's rim is drawn." },
|
|
131
|
+
{ kind: 'rename-part', shape: `{ kind: 'rename-part', target: part, name }`, means: 'The part is renamed, and everything that names it with it.' },
|
|
132
|
+
{ kind: 'remove-part', shape: `{ kind: 'remove-part', target: part, refitRoom?: true }`, means: 'The part goes. refitRoom fits the room to the parts left when the room holds it.' },
|
|
133
|
+
{ kind: 'duplicate-part', shape: `{ kind: 'duplicate-part', target: part }`, means: 'A copy named <part>-copy, in the same place, following the same things.' },
|
|
134
|
+
{ kind: 'move-part', shape: `{ kind: 'move-part', target: part, to }`, means: 'The part moves to this place in the list.' },
|
|
135
|
+
{ kind: 'set-capabilities', shape: `{ kind: 'set-capabilities', names: string[] }`, means: 'What the figure can do, by name, for a scene to attach behaviour.' },
|
|
136
|
+
{ kind: 'set-state-input', shape: `{ kind: 'set-state-input', input, label?, sweep?, min?, max?, start? }`, means: 'A control: the words a person sees, how long it takes to travel, its range and where it starts.' },
|
|
137
|
+
{ kind: 'set-state-defaults', shape: `{ kind: 'set-state-defaults', values: { [control]: number } }`, means: 'The pose the figure stands in.' },
|
|
138
|
+
{ kind: 'set-driver', shape: `{ kind: 'set-driver', state, clip, duration?, keys: [{ seconds, value }], interpolation?: 'linear' | 'step', loop?: 'wrap' | 'hold', accumulates? }`, means: 'A control played over time in a clip.' },
|
|
139
|
+
{ kind: 'remove-driver', shape: `{ kind: 'remove-driver', state }`, means: 'The control is not played any more.' },
|
|
140
|
+
{ kind: 'set-clip', shape: `{ kind: 'set-clip', clip, name?, duration? }`, means: 'A clip renamed, or its length changed.' }
|
|
141
|
+
];
|
|
142
|
+
export const V3_PROPOSAL_KINDS = [
|
|
143
|
+
'add-part',
|
|
144
|
+
'attach',
|
|
145
|
+
'set-joint',
|
|
146
|
+
'declare-instance-size',
|
|
147
|
+
'link-dimension',
|
|
148
|
+
'unlink-dimension',
|
|
149
|
+
'scale-uniformly',
|
|
150
|
+
'follow-size-in-proportion',
|
|
151
|
+
'scale-position',
|
|
152
|
+
'fix-position',
|
|
153
|
+
'nudge-part',
|
|
154
|
+
'detach',
|
|
155
|
+
'remove-joint',
|
|
156
|
+
'make-repeat',
|
|
157
|
+
'set-repeat',
|
|
158
|
+
'remove-repeat',
|
|
159
|
+
'add-binding',
|
|
160
|
+
'remove-binding',
|
|
161
|
+
'fit-room',
|
|
162
|
+
'set-mounting-face',
|
|
163
|
+
'clear-mounting-face',
|
|
164
|
+
'set-detail-level',
|
|
165
|
+
'rename',
|
|
166
|
+
'set-material',
|
|
167
|
+
'set-segments',
|
|
168
|
+
'rename-part',
|
|
169
|
+
'remove-part',
|
|
170
|
+
'duplicate-part',
|
|
171
|
+
'move-part',
|
|
172
|
+
'set-capabilities',
|
|
173
|
+
'set-state-input',
|
|
174
|
+
'set-state-defaults',
|
|
175
|
+
'set-driver',
|
|
176
|
+
'remove-driver',
|
|
177
|
+
'set-clip'
|
|
178
|
+
];
|
|
179
|
+
//# sourceMappingURL=v3-proposal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v3-proposal.js","sourceRoot":"","sources":["../src/v3-proposal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,EAAE,cAAc,EAA4B,MAAM,gBAAgB,CAAA;AACzE,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,QAAQ,EAAE,cAAc,EAA0B,MAAM,2BAA2B,CAAA;AAClI,OAAO,EAAE,UAAU,EAAmB,MAAM,mBAAmB,CAAA;AAC/D,OAAO,EAAE,aAAa,EAAkC,MAAM,qBAAqB,CAAA;AACnF,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAcpC,sHAA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,eAAe;IACf,aAAa;IACb,gBAAgB;IAChB,UAAU;IACV,mBAAmB;IACnB,qBAAqB;IACrB,kBAAkB;IAClB,QAAQ;IACR,cAAc;IACd,cAAc;IACd,aAAa;IACb,aAAa;IACb,gBAAgB;IAChB,WAAW;IACX,kBAAkB;IAClB,iBAAiB;IACjB,oBAAoB;IACpB,YAAY;IACZ,eAAe;IACf,UAAU;CACF,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { V3_SIZE_INPUTS } from "./v3-
|
|
1
|
+
import { V3_SIZE_INPUTS } from "./v3-words.js";
|
|
2
2
|
const stateInputs = (asset) => new Map(asset.document.model.inputs.filter(i => i.role === 'state').map(i => [i.id, i]));
|
|
3
3
|
const sizeInputs = (asset) => {
|
|
4
4
|
const ids = Object.values(V3_SIZE_INPUTS);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v3-release-contract.js","sourceRoot":"","sources":["../src/v3-release-contract.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"v3-release-contract.js","sourceRoot":"","sources":["../src/v3-release-contract.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AA8D9C,MAAM,WAAW,GAAG,CAAC,KAAc,EAAE,EAAE,CACrC,IAAI,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAU,CAAC,CAAC,CAAA;AAEnG,MAAM,UAAU,GAAG,CAAC,KAAc,EAAoC,EAAE;IACtE,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,CAAA;IACzC,MAAM,KAAK,GAAG,KAA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KAAK,MAAM,IAAI,IAAI,QAAQ,EAAE,CAAC;QAC5B,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC;YAAE,IAAI,CAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,MAAM,EAAE,cAAc,IAAI,UAAU,EAAE,CAAC,CAAA;IACnJ,CAAC;IACD,KAAK,MAAM,IAAI,IAAI,QAAQ,EAAE,CAAC;QAC5B,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC;YAAE,IAAI,CAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,MAAM,EAAE,cAAc,IAAI,SAAS,EAAE,CAAC,CAAA;IACpJ,CAAC;IAED,OAAO,OAAO,CAAA;AAChB,CAAC;AAED,mHAAmH;AACnH,SAAS,cAAc,CAAC,GAAyB,EAAE,GAAyB;IAC1E,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM;QAAE,OAAO,EAAE,CAAA;IACzD,OAAO,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAA;AAChE,CAAC"}
|
package/dist/v3-score.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import type { FigureGrade } from './
|
|
1
|
+
import type { FigureGrade } from './v3-words.ts';
|
|
2
2
|
import type { V3Asset, V3AssetGeometry } from './v3-asset-types.ts';
|
|
3
3
|
export type V3BudgetKey = 'groups' | 'triangles' | 'independent' | 'transparent' | 'parts';
|
|
4
4
|
/** Every budget, in the order a screen draws them. */
|
|
5
5
|
export declare const V3_BUDGET_KEYS: readonly V3BudgetKey[];
|
|
6
6
|
/**
|
|
7
|
-
* How many parts the figure is authored with: one per authored part, a repeat once however many copies it makes
|
|
8
|
-
* counted its `parts` the same way. The number the detail level's limit (`PART_LIMIT`) is held against.
|
|
7
|
+
* How many parts the figure is authored with: one per authored part, a repeat once however many copies it makes. The number the detail level's limit (`PART_LIMIT`) is held against.
|
|
9
8
|
*/
|
|
10
9
|
export declare function v3PartCountOf(asset: V3Asset): number;
|
|
11
10
|
/** The detail level's part budget, or nothing when the figure declares no level. */
|
|
@@ -30,7 +29,7 @@ export interface V3Score {
|
|
|
30
29
|
tightest: V3BudgetUse;
|
|
31
30
|
budgets: V3BudgetUse[];
|
|
32
31
|
}
|
|
33
|
-
/**
|
|
32
|
+
/** The grade bounds. A screen draws its scale from this list, so the two cannot disagree. */
|
|
34
33
|
export declare const V3_GRADE_SCALE: readonly (readonly [FigureGrade, number])[];
|
|
35
34
|
export declare function v3GradeOf(ratio: number): FigureGrade;
|
|
36
35
|
/** What one instance may draw so that `LIMITS.screenInstances` of them fit on one screen. */
|
|
@@ -41,7 +40,7 @@ export declare const V3_PER_INSTANCE: {
|
|
|
41
40
|
/** The key a body's material is shared by: token, preset, transparency and glow. */
|
|
42
41
|
export declare function v3MaterialKeyOf(body: V3AssetGeometry): string;
|
|
43
42
|
/**
|
|
44
|
-
* Drawn bodies that move with a state input
|
|
43
|
+
* Drawn bodies that move with a state input. A body counts when the value that places it
|
|
45
44
|
* depends on a state input (`dependence`, contract §2), which is what makes it carry its own transform frame to frame.
|
|
46
45
|
* A visibility flag is not a placement, so a lamp that only switches on does not count.
|
|
47
46
|
*/
|
package/dist/v3-score.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v3-score.d.ts","sourceRoot":"","sources":["../src/v3-score.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file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ACpF,wBAAgB,eAAe,CAAC,IAAI,EAAE,eAAe,GAAG,MAAM,CAI7D;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,eAAe,EAAE,GAAG,MAAM,CAQ/F;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS,CA0B7D"}
|
package/dist/v3-score.js
CHANGED
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
* There is no fixed draw-call limit. The old one (`LIMITS.materialGroups`, 3) meant material-slot combinations and went
|
|
14
14
|
* stale once draw calls were counted as they are; a fixed number would go stale again as figures grow. The declared rule
|
|
15
15
|
* limits still count: bodies that move on their own (`LIMITS.independentParts`) and transparent materials
|
|
16
|
-
* (`LIMITS.transparentMaterials`)
|
|
16
|
+
* (`LIMITS.transparentMaterials`).
|
|
17
17
|
*
|
|
18
|
-
* The bounds
|
|
18
|
+
* The bounds: A up to half of a budget used, B up to three quarters, C up to all of it, D over.
|
|
19
19
|
* The tightest budget decides — it is where to start.
|
|
20
20
|
*/
|
|
21
|
-
import { LIMITS, PART_LIMIT } from "./
|
|
21
|
+
import { LIMITS, PART_LIMIT } from "./v3-words.js";
|
|
22
22
|
import { compileV3Asset } from "./v3-asset.js";
|
|
23
23
|
import { compileV3Document } from "./v3-document.js";
|
|
24
24
|
import { v3WritersOf } from "./v3-gate.js";
|
|
@@ -26,8 +26,7 @@ import { v3TrianglesOf } from "./v3-cost.js";
|
|
|
26
26
|
/** Every budget, in the order a screen draws them. */
|
|
27
27
|
export const V3_BUDGET_KEYS = ['groups', 'triangles', 'independent', 'transparent', 'parts'];
|
|
28
28
|
/**
|
|
29
|
-
* How many parts the figure is authored with: one per authored part, a repeat once however many copies it makes
|
|
30
|
-
* counted its `parts` the same way. The number the detail level's limit (`PART_LIMIT`) is held against.
|
|
29
|
+
* How many parts the figure is authored with: one per authored part, a repeat once however many copies it makes. The number the detail level's limit (`PART_LIMIT`) is held against.
|
|
31
30
|
*/
|
|
32
31
|
export function v3PartCountOf(asset) {
|
|
33
32
|
return asset.appearance.length;
|
|
@@ -38,7 +37,7 @@ export function v3PartBudgetOf(asset) {
|
|
|
38
37
|
return undefined;
|
|
39
38
|
return { level: asset.detailLevel, used: v3PartCountOf(asset), limit: PART_LIMIT[asset.detailLevel] };
|
|
40
39
|
}
|
|
41
|
-
/**
|
|
40
|
+
/** The grade bounds. A screen draws its scale from this list, so the two cannot disagree. */
|
|
42
41
|
export const V3_GRADE_SCALE = [
|
|
43
42
|
['A', 0.5],
|
|
44
43
|
['B', 0.75],
|
|
@@ -62,7 +61,7 @@ export function v3MaterialKeyOf(body) {
|
|
|
62
61
|
return `${m.token}|${m.preset ?? 'default'}|${m.transparent ? 't' : 'o'}|${on}`;
|
|
63
62
|
}
|
|
64
63
|
/**
|
|
65
|
-
* Drawn bodies that move with a state input
|
|
64
|
+
* Drawn bodies that move with a state input. A body counts when the value that places it
|
|
66
65
|
* depends on a state input (`dependence`, contract §2), which is what makes it carry its own transform frame to frame.
|
|
67
66
|
* A visibility flag is not a placement, so a lamp that only switches on does not count.
|
|
68
67
|
*/
|
|
@@ -94,7 +93,7 @@ export function v3ScoreOf(asset) {
|
|
|
94
93
|
budget('triangles', triangles, V3_PER_INSTANCE.triangles),
|
|
95
94
|
budget('independent', independent, LIMITS.independentParts),
|
|
96
95
|
budget('transparent', transparent, LIMITS.transparentMaterials),
|
|
97
|
-
/*
|
|
96
|
+
/* The detail level's part budget, when the figure declares a level. */
|
|
98
97
|
...(asset.detailLevel ? [budget('parts', v3PartCountOf(asset), PART_LIMIT[asset.detailLevel])] : [])
|
|
99
98
|
];
|
|
100
99
|
let tightest = budgets[0];
|
package/dist/v3-score.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v3-score.js","sourceRoot":"","sources":["../src/v3-score.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;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**
|
|
9
|
+
* The capabilities a figure may declare -- **only the ones a scene can actually assemble** (ADR-0051 ④).
|
|
10
|
+
*
|
|
11
|
+
* Capacity it has places
|
|
12
|
+
* Holdable it carries and draws what it holds
|
|
13
|
+
* Transferable it reserves a place and takes things over -- needs `Capacity` to find the place
|
|
14
|
+
* FlowNode a node of a flow; includes the three above
|
|
15
|
+
*
|
|
16
|
+
* A name with metadata in the scene but no mixin to assemble (`PlacementSurface`, `CarrierLine`) is not here: declaring
|
|
17
|
+
* it would promise behaviour nothing provides.
|
|
18
|
+
*/
|
|
19
|
+
export declare const FIGURE_CAPABILITIES: readonly ["Capacity", "Holdable", "Transferable", "FlowNode"];
|
|
20
|
+
export type FigureCapability = (typeof FIGURE_CAPABILITIES)[number];
|
|
21
|
+
/**
|
|
22
|
+
* Capabilities that cannot stand alone -- a name → one of these must be declared with it. `Transferable` leaves finding
|
|
23
|
+
* the place to `Capacity`; declared alone, the scene throws when it assembles the class, after the figure is released.
|
|
24
|
+
*/
|
|
25
|
+
export declare const CAPABILITY_NEEDS: Readonly<Record<string, readonly FigureCapability[]>>;
|
|
26
|
+
/** Material presets, the same set as things-scene's `threed/material-3d.ts`. */
|
|
27
|
+
export declare const MATERIAL_PRESETS: readonly ["default", "metal", "glass", "plastic", "wood", "ceramic", "rubber"];
|
|
28
|
+
export type MaterialPreset = (typeof MATERIAL_PRESETS)[number];
|
|
29
|
+
/**
|
|
30
|
+
* How many copies one repeated part may expand to. Every copy is a draw call, so a row stretched far enough would grow
|
|
31
|
+
* without bound; past this the copies are too small to count. The renderer holds the same number.
|
|
32
|
+
*/
|
|
33
|
+
export declare const REPEAT_LIMIT = 100;
|
|
34
|
+
/**
|
|
35
|
+
* The detail a figure is authored to:
|
|
36
|
+
*
|
|
37
|
+
* S simple a sign, a post
|
|
38
|
+
* M ordinary most equipment
|
|
39
|
+
* L detailed the large equipment a scene is about
|
|
40
|
+
*
|
|
41
|
+
* The level sets the part limit, and the maturity check reads whether the figure was made to it.
|
|
42
|
+
*/
|
|
43
|
+
export declare const DETAIL_LEVELS: readonly ["S", "M", "L"];
|
|
44
|
+
export type DetailLevel = (typeof DETAIL_LEVELS)[number];
|
|
45
|
+
/** The part limit of each detail level. */
|
|
46
|
+
export declare const PART_LIMIT: Record<DetailLevel, number>;
|
|
47
|
+
/**
|
|
48
|
+
* Faces set against each other are exactly 0 apart; a floating-point remainder counts as touching. One tolerance for
|
|
49
|
+
* every contact the gate measures, so no two checks disagree on whether a face touches.
|
|
50
|
+
*/
|
|
51
|
+
export declare const SKIN = 0.5;
|
|
52
|
+
export type FigureGrade = 'A' | 'B' | 'C' | 'D';
|
|
53
|
+
/**
|
|
54
|
+
* The limits that hold performance (ADR-0051 and its 09-19 rulings). What one screen pays for is **the draw groups of
|
|
55
|
+
* every figure it shows**, which breaks 60 fps near 4,000 (measured 2026-09-18, Apple M5).
|
|
56
|
+
*/
|
|
57
|
+
export declare const LIMITS: {
|
|
58
|
+
/** Distinct materials: the palette's ceiling, for legibility; unrelated to draw calls (09-19 ruling 3). */
|
|
59
|
+
readonly distinctMaterials: 3;
|
|
60
|
+
/** Draw groups one screen shows before 60 fps breaks -- measured. */
|
|
61
|
+
readonly groupsOnScreen: 4000;
|
|
62
|
+
/** Triangles on one screen. **Not measured yet** -- the design target. */
|
|
63
|
+
readonly trianglesOnScreen: 500000;
|
|
64
|
+
/**
|
|
65
|
+
* How many of the same figure one screen must hold -- the V3 grade's target (chief architect, 2026-09-24). A figure of
|
|
66
|
+
* 12 moving parts and 12 bodies (24 groups) runs 166 on one screen at 60 fps; one that fits that many is within the
|
|
67
|
+
* limit (C), twice as many is A.
|
|
68
|
+
*/
|
|
69
|
+
readonly screenInstances: 166;
|
|
70
|
+
/** Parts that move on their own: each carries its own transform and so its own draw group (ADR-0051 ③). Measured. */
|
|
71
|
+
readonly independentParts: 12;
|
|
72
|
+
/** Transparent materials: sorting is expensive. */
|
|
73
|
+
readonly transparentMaterials: 1;
|
|
74
|
+
/** Surfaces outside the palette (patterns, gradients): one, for the place that really needs it. */
|
|
75
|
+
readonly surfaceTextures: 1;
|
|
76
|
+
/** The fewest segments a round part may have. */
|
|
77
|
+
readonly minSegments: 3;
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* The segment counts a round part may take. Kept narrow so that the unit surfaces are shared: each count is one stored
|
|
81
|
+
* surface. A ladder whose deviation from the circle roughly halves each step, up to 48 -- past which the difference is
|
|
82
|
+
* under a pixel even where the modeller draws a part large.
|
|
83
|
+
*/
|
|
84
|
+
export declare const SEGMENT_PRESETS: readonly number[];
|
|
85
|
+
/** The design inputs that stand for the figure's size, in mm. */
|
|
86
|
+
export declare const V3_SIZE_INPUTS: Readonly<Record<Axis, string>>;
|
|
87
|
+
//# sourceMappingURL=v3-words.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v3-words.d.ts","sourceRoot":"","sources":["../src/v3-words.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,IAAI,0BAA2B,CAAA;AAC5C,MAAM,MAAM,IAAI,GAAG,CAAC,OAAO,IAAI,CAAC,CAAC,MAAM,CAAC,CAAA;AAExC,MAAM,WAAW,IAAI;IACnB,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;CACV;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,mBAAmB,+DAAgE,CAAA;AAChG,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAA;AAEnE;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,gBAAgB,EAAE,CAAC,CAEjF,CAAA;AAEF,gFAAgF;AAChF,eAAO,MAAM,gBAAgB,gFAAiF,CAAA;AAC9G,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAA;AAE9D;;;GAGG;AACH,eAAO,MAAM,YAAY,MAAM,CAAA;AAE/B;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa,0BAA2B,CAAA;AACrD,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAA;AAExD,2CAA2C;AAC3C,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CAAyB,CAAA;AAE5E;;;GAGG;AACH,eAAO,MAAM,IAAI,MAAM,CAAA;AAEvB,MAAM,MAAM,WAAW,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAA;AAE/C;;;GAGG;AACH,eAAO,MAAM,MAAM;IACjB,2GAA2G;;IAE3G,qEAAqE;;IAErE,0EAA0E;;IAE1E;;;;OAIG;;IAEH,qHAAqH;;IAErH,mDAAmD;;IAEnD,mGAAmG;;IAEnG,iDAAiD;;CAEzC,CAAA;AAEV;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAAE,SAAS,MAAM,EAA4B,CAAA;AAEzE,iEAAiE;AACjE,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAA4D,CAAA"}
|
package/dist/v3-words.js
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright © HatioLab Inc. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
/*
|
|
5
|
+
* The figure's shared words: axes, the capability names a scene can assemble, the detail levels and their part limits,
|
|
6
|
+
* the round-part segment presets, the contact tolerance and the performance limits. The kernel, the gate, the score and
|
|
7
|
+
* the authoring commands all read them from here.
|
|
8
|
+
*/
|
|
9
|
+
export const AXES = ['x', 'y', 'z'];
|
|
10
|
+
/**
|
|
11
|
+
* The capabilities a figure may declare -- **only the ones a scene can actually assemble** (ADR-0051 ④).
|
|
12
|
+
*
|
|
13
|
+
* Capacity it has places
|
|
14
|
+
* Holdable it carries and draws what it holds
|
|
15
|
+
* Transferable it reserves a place and takes things over -- needs `Capacity` to find the place
|
|
16
|
+
* FlowNode a node of a flow; includes the three above
|
|
17
|
+
*
|
|
18
|
+
* A name with metadata in the scene but no mixin to assemble (`PlacementSurface`, `CarrierLine`) is not here: declaring
|
|
19
|
+
* it would promise behaviour nothing provides.
|
|
20
|
+
*/
|
|
21
|
+
export const FIGURE_CAPABILITIES = ['Capacity', 'Holdable', 'Transferable', 'FlowNode'];
|
|
22
|
+
/**
|
|
23
|
+
* Capabilities that cannot stand alone -- a name → one of these must be declared with it. `Transferable` leaves finding
|
|
24
|
+
* the place to `Capacity`; declared alone, the scene throws when it assembles the class, after the figure is released.
|
|
25
|
+
*/
|
|
26
|
+
export const CAPABILITY_NEEDS = Object.freeze({
|
|
27
|
+
Transferable: ['Capacity', 'FlowNode']
|
|
28
|
+
});
|
|
29
|
+
/** Material presets, the same set as things-scene's `threed/material-3d.ts`. */
|
|
30
|
+
export const MATERIAL_PRESETS = ['default', 'metal', 'glass', 'plastic', 'wood', 'ceramic', 'rubber'];
|
|
31
|
+
/**
|
|
32
|
+
* How many copies one repeated part may expand to. Every copy is a draw call, so a row stretched far enough would grow
|
|
33
|
+
* without bound; past this the copies are too small to count. The renderer holds the same number.
|
|
34
|
+
*/
|
|
35
|
+
export const REPEAT_LIMIT = 100;
|
|
36
|
+
/**
|
|
37
|
+
* The detail a figure is authored to:
|
|
38
|
+
*
|
|
39
|
+
* S simple a sign, a post
|
|
40
|
+
* M ordinary most equipment
|
|
41
|
+
* L detailed the large equipment a scene is about
|
|
42
|
+
*
|
|
43
|
+
* The level sets the part limit, and the maturity check reads whether the figure was made to it.
|
|
44
|
+
*/
|
|
45
|
+
export const DETAIL_LEVELS = ['S', 'M', 'L'];
|
|
46
|
+
/** The part limit of each detail level. */
|
|
47
|
+
export const PART_LIMIT = { S: 3, M: 8, L: 20 };
|
|
48
|
+
/**
|
|
49
|
+
* Faces set against each other are exactly 0 apart; a floating-point remainder counts as touching. One tolerance for
|
|
50
|
+
* every contact the gate measures, so no two checks disagree on whether a face touches.
|
|
51
|
+
*/
|
|
52
|
+
export const SKIN = 0.5;
|
|
53
|
+
/**
|
|
54
|
+
* The limits that hold performance (ADR-0051 and its 09-19 rulings). What one screen pays for is **the draw groups of
|
|
55
|
+
* every figure it shows**, which breaks 60 fps near 4,000 (measured 2026-09-18, Apple M5).
|
|
56
|
+
*/
|
|
57
|
+
export const LIMITS = {
|
|
58
|
+
/** Distinct materials: the palette's ceiling, for legibility; unrelated to draw calls (09-19 ruling 3). */
|
|
59
|
+
distinctMaterials: 3,
|
|
60
|
+
/** Draw groups one screen shows before 60 fps breaks -- measured. */
|
|
61
|
+
groupsOnScreen: 4000,
|
|
62
|
+
/** Triangles on one screen. **Not measured yet** -- the design target. */
|
|
63
|
+
trianglesOnScreen: 500_000,
|
|
64
|
+
/**
|
|
65
|
+
* How many of the same figure one screen must hold -- the V3 grade's target (chief architect, 2026-09-24). A figure of
|
|
66
|
+
* 12 moving parts and 12 bodies (24 groups) runs 166 on one screen at 60 fps; one that fits that many is within the
|
|
67
|
+
* limit (C), twice as many is A.
|
|
68
|
+
*/
|
|
69
|
+
screenInstances: 166,
|
|
70
|
+
/** Parts that move on their own: each carries its own transform and so its own draw group (ADR-0051 ③). Measured. */
|
|
71
|
+
independentParts: 12,
|
|
72
|
+
/** Transparent materials: sorting is expensive. */
|
|
73
|
+
transparentMaterials: 1,
|
|
74
|
+
/** Surfaces outside the palette (patterns, gradients): one, for the place that really needs it. */
|
|
75
|
+
surfaceTextures: 1,
|
|
76
|
+
/** The fewest segments a round part may have. */
|
|
77
|
+
minSegments: 3
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* The segment counts a round part may take. Kept narrow so that the unit surfaces are shared: each count is one stored
|
|
81
|
+
* surface. A ladder whose deviation from the circle roughly halves each step, up to 48 -- past which the difference is
|
|
82
|
+
* under a pixel even where the modeller draws a part large.
|
|
83
|
+
*/
|
|
84
|
+
export const SEGMENT_PRESETS = [8, 12, 16, 24, 32, 48];
|
|
85
|
+
/** The design inputs that stand for the figure's size, in mm. */
|
|
86
|
+
export const V3_SIZE_INPUTS = Object.freeze({ x: 'size.x', y: 'size.y', z: 'size.z' });
|
|
87
|
+
//# sourceMappingURL=v3-words.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v3-words.js","sourceRoot":"","sources":["../src/v3-words.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;GAIG;AAEH,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAU,CAAA;AAS5C;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,UAAU,EAAE,UAAU,EAAE,cAAc,EAAE,UAAU,CAAU,CAAA;AAGhG;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAA0D,MAAM,CAAC,MAAM,CAAC;IACnG,YAAY,EAAE,CAAC,UAAU,EAAE,UAAU,CAAC;CACvC,CAAC,CAAA;AAEF,gFAAgF;AAChF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,CAAU,CAAA;AAG9G;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,CAAA;AAE/B;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAU,CAAA;AAGrD,2CAA2C;AAC3C,MAAM,CAAC,MAAM,UAAU,GAAgC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,CAAA;AAE5E;;;GAGG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,GAAG,CAAA;AAIvB;;;GAGG;AACH,MAAM,CAAC,MAAM,MAAM,GAA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