@pascal-app/geometry-script 1.0.5 → 1.0.7
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/dist/adapter.d.ts +41 -0
- package/dist/adapter.d.ts.map +1 -0
- package/dist/adapter.js +325 -0
- package/dist/author-scene.d.ts +7 -14
- package/dist/author-scene.d.ts.map +1 -1
- package/dist/author-scene.js +52 -7
- package/dist/blender.d.ts +1 -0
- package/dist/blender.d.ts.map +1 -1
- package/dist/blender.js +9 -1
- package/dist/compile.d.ts +36 -6
- package/dist/compile.d.ts.map +1 -1
- package/dist/compile.js +137 -12
- package/dist/cut.d.ts +4 -2
- package/dist/cut.d.ts.map +1 -1
- package/dist/cut.js +104 -18
- package/dist/design.d.ts +17 -0
- package/dist/design.d.ts.map +1 -0
- package/dist/design.js +52 -0
- package/dist/sandbox-worker.js +2 -2
- package/dist/sandbox.js +1 -1
- package/dist/transform.d.ts.map +1 -1
- package/dist/transform.js +115 -7
- package/dist/usage-shape.d.ts +15 -0
- package/dist/usage-shape.d.ts.map +1 -0
- package/dist/usage-shape.js +693 -0
- package/package.json +15 -5
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
/** `author_scene` takes a module of at most 48 000 characters. */
|
|
3
|
+
export declare const MODULE_MAX_CHARS = 48000;
|
|
4
|
+
export type AdapterResult = {
|
|
5
|
+
/** The `author_scene` payload; an item may name a piece (an add_object piece's id) instead of code. */
|
|
6
|
+
payload: Record<string, unknown>;
|
|
7
|
+
};
|
|
8
|
+
export type ToModuleOptions = {
|
|
9
|
+
/** Its placement point in world metres (default: the bottom centre of its world bounds; a ceiling mount's top centre). */
|
|
10
|
+
origin?: [number, number, number];
|
|
11
|
+
/** Its turn about Y in degrees, as an item's rotation: the module is written unturned by it. */
|
|
12
|
+
rotation?: number;
|
|
13
|
+
/** `export const mount`: 'floor', 'wall', 'wall-side' or 'ceiling'; none for a finish module. */
|
|
14
|
+
mount?: 'floor' | 'wall' | 'wall-side' | 'ceiling';
|
|
15
|
+
/** Clips on the module's root (default: the object's own `animations`); tracks name its objects. */
|
|
16
|
+
animations?: THREE.AnimationClip[];
|
|
17
|
+
};
|
|
18
|
+
export type WrittenModule = {
|
|
19
|
+
code: string;
|
|
20
|
+
/** The placement point, world metres. */
|
|
21
|
+
position: [number, number, number];
|
|
22
|
+
/** Its bounds in its own frame: width, height, depth. */
|
|
23
|
+
size: [number, number, number];
|
|
24
|
+
triangles: number;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Writes an object of the built scene, and everything under it, as one three.js module: its
|
|
28
|
+
* meshes (each geometry rebuilt from its constructor arguments when unchanged since, else from its
|
|
29
|
+
* buffers) and the groups between them, by name, so clips keep their targets.
|
|
30
|
+
*/
|
|
31
|
+
export declare function toModule(object: THREE.Object3D, options?: ToModuleOptions): WrittenModule;
|
|
32
|
+
/**
|
|
33
|
+
* Runs the adapter: `export default async function adapt({ THREE, addons, source, run, toModule })`
|
|
34
|
+
* returns the payload. `run(code = source)` builds a design module (the design, or a copy the
|
|
35
|
+
* adapter changed to mark what it needs) and answers `{ scene }`.
|
|
36
|
+
*/
|
|
37
|
+
export declare function runAdapter(input: {
|
|
38
|
+
adapter: string;
|
|
39
|
+
design: string;
|
|
40
|
+
}): Promise<AdapterResult>;
|
|
41
|
+
//# sourceMappingURL=adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,kEAAkE;AAClE,eAAO,MAAM,gBAAgB,QAAS,CAAA;AAEtC,MAAM,MAAM,aAAa,GAAG;IAC1B,uGAAuG;IACvG,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACjC,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,0HAA0H;IAC1H,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAA;IACjC,gGAAgG;IAChG,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,iGAAiG;IACjG,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,WAAW,GAAG,SAAS,CAAA;IAClD,oGAAoG;IACpG,UAAU,CAAC,EAAE,KAAK,CAAC,aAAa,EAAE,CAAA;CACnC,CAAA;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,yCAAyC;IACzC,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAA;IAClC,yDAAyD;IACzD,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAA;IAC9B,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AA8JD;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,KAAK,CAAC,QAAQ,EAAE,OAAO,GAAE,eAAoB,GAAG,aAAa,CAwJ7F;AAED;;;;GAIG;AACH,wBAAsB,UAAU,CAAC,KAAK,EAAE;IACtC,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;CACf,GAAG,OAAO,CAAC,aAAa,CAAC,CAoBzB"}
|
package/dist/adapter.js
ADDED
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
// Runs a design's adapter: the program its author writes to turn the design (free three.js) into
|
|
2
|
+
// an `author_scene` payload, the way an agent converts its own module. The adapter is the model's
|
|
3
|
+
// code: it runs where every three.js module runs (the isolated compiler), with the design to run
|
|
4
|
+
// and a helper that writes any part of the built scene as its own module. Pure data comes back.
|
|
5
|
+
import * as THREE from 'three';
|
|
6
|
+
import { RoundedBoxGeometry } from 'three/examples/jsm/geometries/RoundedBoxGeometry.js';
|
|
7
|
+
import { LIB } from './compile.js';
|
|
8
|
+
import { buildDesign, loadModule } from './design.js';
|
|
9
|
+
/** `author_scene` takes a module of at most 48 000 characters. */
|
|
10
|
+
export const MODULE_MAX_CHARS = 48_000;
|
|
11
|
+
const round = (value, digits = 5) => {
|
|
12
|
+
const scale = 10 ** digits;
|
|
13
|
+
return Math.round(value * scale) / scale || 0;
|
|
14
|
+
};
|
|
15
|
+
function toBase64(bytes) {
|
|
16
|
+
let binary = '';
|
|
17
|
+
for (let i = 0; i < bytes.length; i += 0x8000)
|
|
18
|
+
binary += String.fromCharCode(...bytes.subarray(i, i + 0x8000));
|
|
19
|
+
return btoa(binary);
|
|
20
|
+
}
|
|
21
|
+
/** Constructors a geometry can be rebuilt with, by `geometry.type`. */
|
|
22
|
+
const REBUILT = {
|
|
23
|
+
BoxGeometry: (...a) => new THREE.BoxGeometry(...a),
|
|
24
|
+
SphereGeometry: (...a) => new THREE.SphereGeometry(...a),
|
|
25
|
+
CylinderGeometry: (...a) => new THREE.CylinderGeometry(...a),
|
|
26
|
+
ConeGeometry: (...a) => new THREE.ConeGeometry(...a),
|
|
27
|
+
TorusGeometry: (...a) => new THREE.TorusGeometry(...a),
|
|
28
|
+
TorusKnotGeometry: (...a) => new THREE.TorusKnotGeometry(...a),
|
|
29
|
+
PlaneGeometry: (...a) => new THREE.PlaneGeometry(...a),
|
|
30
|
+
CircleGeometry: (...a) => new THREE.CircleGeometry(...a),
|
|
31
|
+
RingGeometry: (...a) => new THREE.RingGeometry(...a),
|
|
32
|
+
CapsuleGeometry: (...a) => new THREE.CapsuleGeometry(...a),
|
|
33
|
+
DodecahedronGeometry: (...a) => new THREE.DodecahedronGeometry(...a),
|
|
34
|
+
IcosahedronGeometry: (...a) => new THREE.IcosahedronGeometry(...a),
|
|
35
|
+
OctahedronGeometry: (...a) => new THREE.OctahedronGeometry(...a),
|
|
36
|
+
TetrahedronGeometry: (...a) => new THREE.TetrahedronGeometry(...a),
|
|
37
|
+
RoundedBoxGeometry: (...a) => new RoundedBoxGeometry(...a),
|
|
38
|
+
};
|
|
39
|
+
/** The constructor arguments a geometry was made with, when rebuilding from them gives it back. */
|
|
40
|
+
function constructorArgs(geometry) {
|
|
41
|
+
const parameters = geometry.parameters;
|
|
42
|
+
if (!parameters || geometry.getAttribute('color'))
|
|
43
|
+
return null;
|
|
44
|
+
const type = geometry instanceof RoundedBoxGeometry ? 'RoundedBoxGeometry' : geometry.type;
|
|
45
|
+
if (!(type in REBUILT))
|
|
46
|
+
return null;
|
|
47
|
+
const args = Object.values(parameters);
|
|
48
|
+
if (!args.every((a) => typeof a === 'number' || typeof a === 'boolean'))
|
|
49
|
+
return null;
|
|
50
|
+
const rebuilt = REBUILT[type](...args);
|
|
51
|
+
const a = geometry.getAttribute('position');
|
|
52
|
+
const b = rebuilt.getAttribute('position');
|
|
53
|
+
rebuilt.dispose();
|
|
54
|
+
if (!a || !b || a.count !== b.count)
|
|
55
|
+
return null;
|
|
56
|
+
for (let i = 0; i < a.count; i++)
|
|
57
|
+
if (Math.abs(a.getX(i) - b.getX(i)) > 1e-5 ||
|
|
58
|
+
Math.abs(a.getY(i) - b.getY(i)) > 1e-5 ||
|
|
59
|
+
Math.abs(a.getZ(i) - b.getZ(i)) > 1e-5)
|
|
60
|
+
return null;
|
|
61
|
+
return [type, ...args.map((v) => (typeof v === 'number' ? round(v, 6) : v))];
|
|
62
|
+
}
|
|
63
|
+
function geometryData(geometry) {
|
|
64
|
+
const made = constructorArgs(geometry);
|
|
65
|
+
if (made)
|
|
66
|
+
return made;
|
|
67
|
+
const position = geometry.getAttribute('position');
|
|
68
|
+
const xyz = new Float32Array(position.count * 3);
|
|
69
|
+
for (let i = 0; i < position.count; i++) {
|
|
70
|
+
xyz[i * 3] = position.getX(i);
|
|
71
|
+
xyz[i * 3 + 1] = position.getY(i);
|
|
72
|
+
xyz[i * 3 + 2] = position.getZ(i);
|
|
73
|
+
}
|
|
74
|
+
const index = geometry.getIndex();
|
|
75
|
+
const wide = index ? Array.from(index.array).some((i) => i > 0xffff) : false;
|
|
76
|
+
return {
|
|
77
|
+
p: toBase64(new Uint8Array(xyz.buffer)),
|
|
78
|
+
...(index
|
|
79
|
+
? {
|
|
80
|
+
i: [
|
|
81
|
+
wide ? 32 : 16,
|
|
82
|
+
toBase64(new Uint8Array((wide
|
|
83
|
+
? Uint32Array.from(index.array)
|
|
84
|
+
: Uint16Array.from(index.array)).buffer)),
|
|
85
|
+
],
|
|
86
|
+
}
|
|
87
|
+
: {}),
|
|
88
|
+
...(geometry.groups.length
|
|
89
|
+
? { g: geometry.groups.map((g) => [g.start, g.count, g.materialIndex ?? 0]) }
|
|
90
|
+
: {}),
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
const slug = (text) => text
|
|
94
|
+
.toLowerCase()
|
|
95
|
+
.replace(/[^a-z0-9]+/g, '_')
|
|
96
|
+
.replace(/^_+|_+$/g, '')
|
|
97
|
+
.slice(0, 24);
|
|
98
|
+
/** A material as constructor options, named as Pascal reads it: `glass` and `slot_*` kept, else a slot. */
|
|
99
|
+
function materialData(material, tint) {
|
|
100
|
+
const m = material;
|
|
101
|
+
const color = (m.color ?? new THREE.Color('#bbbbbb')).clone();
|
|
102
|
+
if (tint)
|
|
103
|
+
color.multiply(tint);
|
|
104
|
+
const hex = `#${color.getHexString()}`;
|
|
105
|
+
const name = material.name === 'glass' || material.name.startsWith('slot_')
|
|
106
|
+
? material.name
|
|
107
|
+
: `slot_${slug(material.name) || hex.slice(1)}`;
|
|
108
|
+
return {
|
|
109
|
+
t: m.isMeshPhysicalMaterial ? 'MeshPhysicalMaterial' : 'MeshStandardMaterial',
|
|
110
|
+
name,
|
|
111
|
+
color: hex,
|
|
112
|
+
roughness: round(typeof m.roughness === 'number' ? m.roughness : 0.6, 3),
|
|
113
|
+
metalness: round(m.metalness ?? 0, 3),
|
|
114
|
+
...(m.emissive && m.emissive.getHex() !== 0
|
|
115
|
+
? { emissive: `#${m.emissive.getHexString()}`, emissiveIntensity: m.emissiveIntensity ?? 1 }
|
|
116
|
+
: {}),
|
|
117
|
+
...(material.transparent ? { transparent: true, opacity: round(material.opacity, 3) } : {}),
|
|
118
|
+
...(material.depthWrite === false ? { depthWrite: false } : {}),
|
|
119
|
+
...(m.transmission ? { transmission: m.transmission } : {}),
|
|
120
|
+
...(material.side === THREE.DoubleSide ? { side: 2 } : {}),
|
|
121
|
+
...(material.vertexColors ? { vertexColors: true } : {}),
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
const RUNTIME = `const bytes = (s) => Uint8Array.from(atob(s), (c) => c.charCodeAt(0))
|
|
125
|
+
function geometry(THREE, d) {
|
|
126
|
+
if (!Array.isArray(d)) {
|
|
127
|
+
const g = new THREE.BufferGeometry()
|
|
128
|
+
g.setAttribute('position', new THREE.BufferAttribute(new Float32Array(bytes(d.p).buffer), 3))
|
|
129
|
+
if (d.i) g.setIndex(new THREE.BufferAttribute(d.i[0] === 32 ? new Uint32Array(bytes(d.i[1]).buffer) : new Uint16Array(bytes(d.i[1]).buffer), 1))
|
|
130
|
+
for (const [start, count, m] of d.g ?? []) g.addGroup(start, count, m)
|
|
131
|
+
g.computeVertexNormals()
|
|
132
|
+
return g
|
|
133
|
+
}
|
|
134
|
+
const [type, ...args] = d
|
|
135
|
+
return type === 'RoundedBoxGeometry' ? new RoundedBoxGeometry(...args) : new THREE[type](...args)
|
|
136
|
+
}
|
|
137
|
+
function place(THREE, o, t) {
|
|
138
|
+
if (t.length === 3) return o.position.fromArray(t)
|
|
139
|
+
new THREE.Matrix4().fromArray([t[0], t[1], t[2], 0, t[3], t[4], t[5], 0, t[6], t[7], t[8], 0, t[9], t[10], t[11], 1]).decompose(o.position, o.quaternion, o.scale)
|
|
140
|
+
}`;
|
|
141
|
+
/** The 12 affine numbers of a matrix, or its translation alone when it has no turn or scale. */
|
|
142
|
+
function transform(matrix) {
|
|
143
|
+
const e = matrix.elements;
|
|
144
|
+
const plain = Math.abs(e[0] - 1) < 1e-6 &&
|
|
145
|
+
Math.abs(e[5] - 1) < 1e-6 &&
|
|
146
|
+
Math.abs(e[10] - 1) < 1e-6 &&
|
|
147
|
+
[1, 2, 4, 6, 8, 9].every((i) => Math.abs(e[i]) < 1e-6);
|
|
148
|
+
const t = [round(e[12]), round(e[13]), round(e[14])];
|
|
149
|
+
if (plain)
|
|
150
|
+
return t;
|
|
151
|
+
return [e[0], e[1], e[2], e[4], e[5], e[6], e[8], e[9], e[10]]
|
|
152
|
+
.map((v) => round(v))
|
|
153
|
+
.concat(t);
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Writes an object of the built scene, and everything under it, as one three.js module: its
|
|
157
|
+
* meshes (each geometry rebuilt from its constructor arguments when unchanged since, else from its
|
|
158
|
+
* buffers) and the groups between them, by name, so clips keep their targets.
|
|
159
|
+
*/
|
|
160
|
+
export function toModule(object, options = {}) {
|
|
161
|
+
object.updateWorldMatrix(true, true);
|
|
162
|
+
const world = new THREE.Box3().setFromObject(object);
|
|
163
|
+
if (world.isEmpty())
|
|
164
|
+
throw new Error(`toModule: "${object.name || object.type}" holds no mesh`);
|
|
165
|
+
const origin = options.origin ??
|
|
166
|
+
[
|
|
167
|
+
(world.min.x + world.max.x) / 2,
|
|
168
|
+
options.mount === 'ceiling' ? world.max.y : world.min.y,
|
|
169
|
+
(world.min.z + world.max.z) / 2,
|
|
170
|
+
];
|
|
171
|
+
const frame = new THREE.Matrix4()
|
|
172
|
+
.compose(new THREE.Vector3(...origin), new THREE.Quaternion().setFromAxisAngle(new THREE.Vector3(0, 1, 0), THREE.MathUtils.degToRad(options.rotation ?? 0)), new THREE.Vector3(1, 1, 1))
|
|
173
|
+
.invert();
|
|
174
|
+
const materials = [];
|
|
175
|
+
const materialIds = new Map();
|
|
176
|
+
const materialId = (material, tint) => {
|
|
177
|
+
const data = materialData(material, tint);
|
|
178
|
+
const key = JSON.stringify(data);
|
|
179
|
+
let id = materialIds.get(key);
|
|
180
|
+
if (id === undefined) {
|
|
181
|
+
id = materials.push(data) - 1;
|
|
182
|
+
materialIds.set(key, id);
|
|
183
|
+
}
|
|
184
|
+
return id;
|
|
185
|
+
};
|
|
186
|
+
const geometries = [];
|
|
187
|
+
const geometryIds = new Map();
|
|
188
|
+
const geometryId = (geometry) => {
|
|
189
|
+
let id = geometryIds.get(geometry);
|
|
190
|
+
if (id === undefined) {
|
|
191
|
+
id = geometries.push(geometryData(geometry)) - 1;
|
|
192
|
+
geometryIds.set(geometry, id);
|
|
193
|
+
}
|
|
194
|
+
return id;
|
|
195
|
+
};
|
|
196
|
+
const nodes = [];
|
|
197
|
+
let triangles = 0;
|
|
198
|
+
const local = new THREE.Matrix4();
|
|
199
|
+
const parentInverse = new THREE.Matrix4();
|
|
200
|
+
const add = (o, parent, parentWorld, matrixWorld, mesh) => {
|
|
201
|
+
if (parentWorld)
|
|
202
|
+
local.multiplyMatrices(parentInverse.copy(parentWorld).invert(), matrixWorld);
|
|
203
|
+
else
|
|
204
|
+
local.multiplyMatrices(frame, matrixWorld);
|
|
205
|
+
nodes.push([
|
|
206
|
+
parent,
|
|
207
|
+
o.name,
|
|
208
|
+
mesh ? geometryId(mesh.geometry) : -1,
|
|
209
|
+
mesh ? mesh.material : -1,
|
|
210
|
+
transform(local),
|
|
211
|
+
]);
|
|
212
|
+
return nodes.length - 1;
|
|
213
|
+
};
|
|
214
|
+
const visit = (o, parent, parentWorld) => {
|
|
215
|
+
if (!o.visible)
|
|
216
|
+
return;
|
|
217
|
+
const flags = o;
|
|
218
|
+
if (flags.isLine || flags.isPoints || flags.isSprite || flags.isLight)
|
|
219
|
+
return;
|
|
220
|
+
let self;
|
|
221
|
+
if (o.isInstancedMesh) {
|
|
222
|
+
const source = o;
|
|
223
|
+
self = add(o, parent, parentWorld, o.matrixWorld);
|
|
224
|
+
const matrix = new THREE.Matrix4();
|
|
225
|
+
const tint = new THREE.Color();
|
|
226
|
+
const material = Array.isArray(source.material) ? source.material[0] : source.material;
|
|
227
|
+
for (let i = 0; i < source.count; i++) {
|
|
228
|
+
source.getMatrixAt(i, matrix);
|
|
229
|
+
if (source.instanceColor)
|
|
230
|
+
source.getColorAt(i, tint);
|
|
231
|
+
nodes.push([
|
|
232
|
+
self,
|
|
233
|
+
'',
|
|
234
|
+
geometryId(source.geometry),
|
|
235
|
+
materialId(material, source.instanceColor ? tint : undefined),
|
|
236
|
+
transform(matrix),
|
|
237
|
+
]);
|
|
238
|
+
triangles += Math.floor((source.geometry.index?.count ?? source.geometry.attributes.position.count) / 3);
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
else if (o.isMesh) {
|
|
242
|
+
const mesh = o;
|
|
243
|
+
if (!mesh.geometry.getAttribute('position'))
|
|
244
|
+
return;
|
|
245
|
+
const material = Array.isArray(mesh.material)
|
|
246
|
+
? mesh.material.map((m) => materialId(m))
|
|
247
|
+
: materialId(mesh.material);
|
|
248
|
+
self = add(o, parent, parentWorld, o.matrixWorld, { geometry: mesh.geometry, material });
|
|
249
|
+
triangles += Math.floor((mesh.geometry.index?.count ?? mesh.geometry.attributes.position.count) / 3);
|
|
250
|
+
}
|
|
251
|
+
else
|
|
252
|
+
self = add(o, parent, parentWorld, o.matrixWorld);
|
|
253
|
+
for (const child of o.children)
|
|
254
|
+
visit(child, self, o.matrixWorld);
|
|
255
|
+
};
|
|
256
|
+
visit(object, -1, null);
|
|
257
|
+
const clips = options.animations ?? object.animations;
|
|
258
|
+
const code = `import * as THREE from 'three'
|
|
259
|
+
import { RoundedBoxGeometry } from 'three/addons/geometries/RoundedBoxGeometry.js'
|
|
260
|
+
${options.mount ? `export const mount = '${options.mount}'\n` : ''}const M = ${JSON.stringify(materials)}
|
|
261
|
+
const G = ${JSON.stringify(geometries)}
|
|
262
|
+
const N = ${JSON.stringify(nodes)}
|
|
263
|
+
${RUNTIME}
|
|
264
|
+
export default function build() {
|
|
265
|
+
const materials = M.map(({ t, ...p }) => new THREE[t](p))
|
|
266
|
+
const geometries = G.map((d) => geometry(THREE, d))
|
|
267
|
+
const made = []
|
|
268
|
+
for (const [parent, name, g, m, t] of N) {
|
|
269
|
+
const o = g < 0 ? new THREE.Group() : new THREE.Mesh(geometries[g], Array.isArray(m) ? m.map((i) => materials[i]) : materials[m])
|
|
270
|
+
o.name = name
|
|
271
|
+
place(THREE, o, t)
|
|
272
|
+
if (parent >= 0) made[parent].add(o)
|
|
273
|
+
made.push(o)
|
|
274
|
+
}
|
|
275
|
+
const wrap = new THREE.Group()
|
|
276
|
+
wrap.add(made[0])
|
|
277
|
+
${clips.length ? ` wrap.animations = ${JSON.stringify(clips.map((clip) => THREE.AnimationClip.toJSON(clip)))}.map((clip) => THREE.AnimationClip.parse(clip))\n` : ''} return wrap
|
|
278
|
+
}
|
|
279
|
+
`;
|
|
280
|
+
if (code.length > MODULE_MAX_CHARS)
|
|
281
|
+
throw new Error(`toModule: "${object.name || object.type}" writes a module of ${code.length} characters; author_scene takes ${MODULE_MAX_CHARS}. Write it as several objects, or with fewer meshes.`);
|
|
282
|
+
const box = new THREE.Box3();
|
|
283
|
+
const inFrame = new THREE.Matrix4();
|
|
284
|
+
object.traverse((o) => {
|
|
285
|
+
const mesh = o;
|
|
286
|
+
if (!mesh.isMesh || !o.visible)
|
|
287
|
+
return;
|
|
288
|
+
mesh.geometry.computeBoundingBox();
|
|
289
|
+
box.union(mesh.geometry
|
|
290
|
+
.boundingBox.clone()
|
|
291
|
+
.applyMatrix4(inFrame.multiplyMatrices(frame, o.matrixWorld)));
|
|
292
|
+
});
|
|
293
|
+
const size = box.getSize(new THREE.Vector3());
|
|
294
|
+
return {
|
|
295
|
+
code,
|
|
296
|
+
position: origin.map((v) => round(v, 4)),
|
|
297
|
+
size: [round(size.x, 4), round(size.y, 4), round(size.z, 4)],
|
|
298
|
+
triangles,
|
|
299
|
+
};
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* Runs the adapter: `export default async function adapt({ THREE, addons, source, run, toModule })`
|
|
303
|
+
* returns the payload. `run(code = source)` builds a design module (the design, or a copy the
|
|
304
|
+
* adapter changed to mark what it needs) and answers `{ scene }`.
|
|
305
|
+
*/
|
|
306
|
+
export async function runAdapter(input) {
|
|
307
|
+
const adapt = loadModule(input.adapter, 'adapter');
|
|
308
|
+
const run = async (code = input.design) => {
|
|
309
|
+
if (typeof code !== 'string')
|
|
310
|
+
throw new Error('run(code): code is a design module, as text');
|
|
311
|
+
const { scene } = await buildDesign(code);
|
|
312
|
+
return { scene };
|
|
313
|
+
};
|
|
314
|
+
const payload = (await adapt({
|
|
315
|
+
THREE,
|
|
316
|
+
addons: LIB,
|
|
317
|
+
source: input.design,
|
|
318
|
+
run,
|
|
319
|
+
toModule,
|
|
320
|
+
}));
|
|
321
|
+
if (!payload || typeof payload !== 'object' || !Array.isArray(payload.levels))
|
|
322
|
+
throw new Error('adapt() must return the author_scene payload: { levels: [...], roof?, notes? }');
|
|
323
|
+
// JSON round trip: the payload crosses a process boundary, and nothing of three.js may ride along.
|
|
324
|
+
return { payload: JSON.parse(JSON.stringify(payload)) };
|
|
325
|
+
}
|
package/dist/author-scene.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { AuthorScenePayload } from '@pascal-app/core/agent-tools';
|
|
|
3
3
|
import type { CompiledGeometryScript } from '@pascal-app/core/schema';
|
|
4
4
|
export type AuthorSceneCompile = (input: {
|
|
5
5
|
code: string;
|
|
6
|
-
kind: 'object' | 'window' | 'door' | 'floor' | 'wall-face';
|
|
6
|
+
kind: 'object' | 'window' | 'door' | 'column' | 'floor' | 'wall-face';
|
|
7
7
|
inputs?: Record<string, unknown>;
|
|
8
8
|
nodeId?: string;
|
|
9
9
|
}) => Promise<CompiledGeometryScript>;
|
|
@@ -19,27 +19,20 @@ export declare function compileAuthorScene(nodes: SceneNodes, input: {
|
|
|
19
19
|
result: Record<string, unknown>;
|
|
20
20
|
changes?: import("@pascal-app/core/agent-operations").SceneChanges;
|
|
21
21
|
};
|
|
22
|
-
candidate: import("@pascal-app/core/agent-operations").
|
|
22
|
+
candidate: import("@pascal-app/core/agent-operations").AuthorSceneCandidate;
|
|
23
23
|
buildingId: string;
|
|
24
24
|
changes: {
|
|
25
25
|
materials?: readonly import("@pascal-app/core").SceneMaterial[];
|
|
26
|
-
|
|
26
|
+
delete?: string[];
|
|
27
|
+
collections?: Record<string, import("@pascal-app/core").Collection | null>;
|
|
28
|
+
create: {
|
|
27
29
|
node: import("@pascal-app/core").AnyNode;
|
|
28
30
|
parentId?: string;
|
|
29
31
|
}[];
|
|
30
|
-
|
|
31
|
-
collections?: Record<string, import("@pascal-app/core").Collection | null>;
|
|
32
|
-
update: ({
|
|
32
|
+
update: {
|
|
33
33
|
id: string;
|
|
34
34
|
data: Partial<import("@pascal-app/core").AnyNode>;
|
|
35
|
-
}
|
|
36
|
-
id: `building_${string}`;
|
|
37
|
-
data: {
|
|
38
|
-
metadata: {
|
|
39
|
-
authorSceneState: import("@pascal-app/core/agent-operations").AuthorSceneState;
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
})[];
|
|
35
|
+
}[];
|
|
43
36
|
};
|
|
44
37
|
itemTriangles: number;
|
|
45
38
|
itemsCompiled: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"author-scene.d.ts","sourceRoot":"","sources":["../src/author-scene.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,YAAY,
|
|
1
|
+
{"version":3,"file":"author-scene.d.ts","sourceRoot":"","sources":["../src/author-scene.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,YAAY,EASjB,KAAK,UAAU,EAIhB,MAAM,mCAAmC,CAAA;AAC1C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AACtE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAA;AAErE,MAAM,MAAM,kBAAkB,GAAG,CAAC,KAAK,EAAE;IACvC,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,WAAW,CAAA;IACrE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAChC,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,KAAK,OAAO,CAAC,sBAAsB,CAAC,CAAA;AAIrC,yFAAyF;AACzF,wBAAsB,kBAAkB,CACtC,KAAK,EAAE,UAAU,EACjB,KAAK,EAAE;IAAE,OAAO,EAAE,kBAAkB,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,EAC9E,OAAO,EAAE,YAAY,EACrB,OAAO,EAAE,kBAAkB,EAC3B,MAAM,CAAC,EAAE,WAAW;;;;;;;;;;;;;;;;;;;;;;;;GA+JrB"}
|
package/dist/author-scene.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { floorScriptInputs, wallFaceScriptInputs } from '@pascal-app/core';
|
|
2
|
-
import { applySceneChanges, authorScene, authorSceneCeilingPoints, authorSceneFaceScripts, authorSceneFinishGaps, authorSceneFloorScripts, finalizeAuthorScene, setRoomFloorScript, setWallFaceScript, } from '@pascal-app/core/agent-operations';
|
|
1
|
+
import { floorScriptInputs, slabSurfaceScriptInputs, wallFaceScriptInputs } from '@pascal-app/core';
|
|
2
|
+
import { applySceneChanges, authorScene, authorSceneCeilingPoints, authorSceneFaceScripts, authorSceneFinishGaps, authorSceneFloorScripts, authorSceneSlabScripts, finalizeAuthorScene, setRoomFloorScript, setSlabSurfaceScript, setWallFaceScript, } from '@pascal-app/core/agent-operations';
|
|
3
3
|
/** Build and validate a complete candidate before either host changes the live scene. */
|
|
4
4
|
export async function compileAuthorScene(nodes, input, context, compile, signal) {
|
|
5
5
|
signal?.throwIfAborted();
|
|
@@ -7,26 +7,45 @@ export async function compileAuthorScene(nodes, input, context, compile, signal)
|
|
|
7
7
|
const compiled = {};
|
|
8
8
|
const compileErrors = {};
|
|
9
9
|
const modules = [];
|
|
10
|
-
|
|
10
|
+
input.payload.levels.forEach((level, levelIndex) => {
|
|
11
|
+
level.columns?.forEach((column, i) => {
|
|
12
|
+
if (column.code)
|
|
13
|
+
modules.push({ id: `column/${levelIndex}/${i}`, code: column.code, kind: 'column' });
|
|
14
|
+
});
|
|
11
15
|
for (const item of level.items ?? [])
|
|
12
|
-
|
|
16
|
+
if (item.code)
|
|
17
|
+
modules.push({ id: item.id, code: item.code, kind: 'object' });
|
|
13
18
|
for (const wall of level.walls ?? [])
|
|
14
19
|
wall.openings?.forEach((opening, index) => {
|
|
15
|
-
if (opening.code)
|
|
20
|
+
if (opening.code && opening.kind !== 'passage')
|
|
16
21
|
modules.push({ id: `${wall.id}/${index}`, code: opening.code, kind: opening.kind });
|
|
17
22
|
});
|
|
18
|
-
}
|
|
23
|
+
});
|
|
24
|
+
for (const item of input.payload.roof?.items ?? [])
|
|
25
|
+
if (item.code)
|
|
26
|
+
modules.push({ id: item.id, code: item.code, kind: 'object' });
|
|
19
27
|
modules.push(...authorSceneCeilingPoints(input.payload).map((point) => ({
|
|
20
28
|
...point,
|
|
21
29
|
kind: 'object',
|
|
22
30
|
})));
|
|
31
|
+
// A module placed at several spots (a piece, every ceiling point) is compiled once.
|
|
32
|
+
const builds = new Map();
|
|
33
|
+
const build = (code, kind) => {
|
|
34
|
+
const key = `${kind}\n${code}`;
|
|
35
|
+
let pending = builds.get(key);
|
|
36
|
+
if (!pending) {
|
|
37
|
+
pending = compile({ code, kind });
|
|
38
|
+
builds.set(key, pending);
|
|
39
|
+
}
|
|
40
|
+
return pending;
|
|
41
|
+
};
|
|
23
42
|
let cursor = 0;
|
|
24
43
|
await Promise.all(Array.from({ length: Math.min(4, modules.length) }, async () => {
|
|
25
44
|
while (cursor < modules.length) {
|
|
26
45
|
const { id, code, kind } = modules[cursor++];
|
|
27
46
|
signal?.throwIfAborted();
|
|
28
47
|
try {
|
|
29
|
-
compiled[id] = await
|
|
48
|
+
compiled[id] = await build(code, kind);
|
|
30
49
|
}
|
|
31
50
|
catch (error) {
|
|
32
51
|
signal?.throwIfAborted();
|
|
@@ -61,6 +80,32 @@ export async function compileAuthorScene(nodes, input, context, compile, signal)
|
|
|
61
80
|
});
|
|
62
81
|
}
|
|
63
82
|
}
|
|
83
|
+
for (const { slabId, nodeId, name, code } of authorSceneSlabScripts(input.payload, outcome.result)) {
|
|
84
|
+
signal?.throwIfAborted();
|
|
85
|
+
try {
|
|
86
|
+
const inputs = slabSurfaceScriptInputs(candidate, nodeId);
|
|
87
|
+
if (!inputs)
|
|
88
|
+
throw new Error('The slab has no surface to build on.');
|
|
89
|
+
const built = await compile({ code, kind: 'floor', nodeId, inputs });
|
|
90
|
+
candidate = applySceneChanges(candidate, setSlabSurfaceScript(candidate, { slabId: nodeId, compiled: built, inputs }, context)
|
|
91
|
+
.changes);
|
|
92
|
+
outcome.result.floorScripts++;
|
|
93
|
+
const gaps = authorSceneFinishGaps(slabId, built.manifest, {
|
|
94
|
+
room: name,
|
|
95
|
+
polygon: inputs.polygon,
|
|
96
|
+
});
|
|
97
|
+
if (gaps)
|
|
98
|
+
outcome.result.warnings.push(gaps);
|
|
99
|
+
}
|
|
100
|
+
catch (error) {
|
|
101
|
+
signal?.throwIfAborted();
|
|
102
|
+
outcome.result.defects.push({
|
|
103
|
+
id: slabId,
|
|
104
|
+
code: 'floor_script_failed',
|
|
105
|
+
message: `${error instanceof Error ? error.message : String(error)} (the slab keeps its finish)`,
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
}
|
|
64
109
|
for (const { wallId, face, nodeId, code, toHeight } of authorSceneFaceScripts(input.payload, outcome.result, candidate)) {
|
|
65
110
|
signal?.throwIfAborted();
|
|
66
111
|
try {
|
package/dist/blender.d.ts
CHANGED
package/dist/blender.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blender.d.ts","sourceRoot":"","sources":["../src/blender.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAuB,wBAAwB,EAAE,MAAM,kBAAkB,CAAA;AAGrF,OAAO,EAGL,KAAK,2BAA2B,EAIjC,MAAM,WAAW,CAAA;AAElB,qFAAqF;AACrF,MAAM,MAAM,UAAU,GAAG;IACvB,GAAG,EAAE,UAAU,CAAA;IACf,KAAK,EAAE,OAAO,CAAA;IACd,yCAAyC;IACzC,MAAM,EAAE,OAAO,CAAA;IACf,2CAA2C;IAC3C,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACjC,sEAAsE;IACtE,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,UAAU,GAAG,IAAI,GAAG,UAAU,CAc9E;AAqCD;;;;;GAKG;AACH,wBAAsB,mBAAmB,CAAC,KAAK,EAAE;IAC/C,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,wBAAwB,CAAC,CAAA;IACjD,GAAG,EAAE,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"blender.d.ts","sourceRoot":"","sources":["../src/blender.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAuB,wBAAwB,EAAE,MAAM,kBAAkB,CAAA;AAGrF,OAAO,EAGL,KAAK,2BAA2B,EAIjC,MAAM,WAAW,CAAA;AAElB,qFAAqF;AACrF,MAAM,MAAM,UAAU,GAAG;IACvB,GAAG,EAAE,UAAU,CAAA;IACf,KAAK,EAAE,OAAO,CAAA;IACd,yCAAyC;IACzC,MAAM,EAAE,OAAO,CAAA;IACf,2CAA2C;IAC3C,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACjC,sEAAsE;IACtE,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,UAAU,GAAG,IAAI,GAAG,UAAU,CAc9E;AAqCD;;;;;GAKG;AACH,wBAAsB,mBAAmB,CAAC,KAAK,EAAE;IAC/C,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,wBAAwB,CAAC,CAAA;IACjD,GAAG,EAAE,UAAU,CAAA;IACf,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAwBvC"}
|
package/dist/blender.js
CHANGED
|
@@ -75,5 +75,13 @@ export async function compileBlenderBuild(input) {
|
|
|
75
75
|
restoreNames(gltf.scene, gltf.animations);
|
|
76
76
|
const built = gltf.scene;
|
|
77
77
|
built.animations = gltf.animations;
|
|
78
|
-
return finishBuild({
|
|
78
|
+
return finishBuild({
|
|
79
|
+
built,
|
|
80
|
+
mount,
|
|
81
|
+
specs,
|
|
82
|
+
params,
|
|
83
|
+
code: input.code,
|
|
84
|
+
language: 'bpy',
|
|
85
|
+
usageShape: input.usageShape,
|
|
86
|
+
});
|
|
79
87
|
}
|
package/dist/compile.d.ts
CHANGED
|
@@ -1,17 +1,28 @@
|
|
|
1
1
|
import type { CompiledGeometryScript, GeometryScriptLanguage, GeometryScriptMount, GeometryScriptParamSpec, GeometryScriptParamValue } from '@pascal-app/core';
|
|
2
2
|
import * as THREE from 'three';
|
|
3
|
+
import { ConvexGeometry } from 'three/examples/jsm/geometries/ConvexGeometry.js';
|
|
4
|
+
import { LoftGeometry } from 'three/examples/jsm/geometries/LoftGeometry.js';
|
|
5
|
+
import * as ParametricFunctions from 'three/examples/jsm/geometries/ParametricFunctions.js';
|
|
6
|
+
import { ParametricGeometry } from 'three/examples/jsm/geometries/ParametricGeometry.js';
|
|
7
|
+
import { RoundedBoxGeometry } from 'three/examples/jsm/geometries/RoundedBoxGeometry.js';
|
|
8
|
+
import * as BufferGeometryUtils from 'three/examples/jsm/utils/BufferGeometryUtils.js';
|
|
9
|
+
import { Brush, Evaluator } from 'three-bvh-csg';
|
|
10
|
+
import { type ModuleTable } from './transform.js';
|
|
3
11
|
export type { GeometryScriptMount };
|
|
4
12
|
export type GeometryScriptCompileInput = {
|
|
5
13
|
code: string;
|
|
6
14
|
params?: Record<string, GeometryScriptParamValue>;
|
|
7
15
|
/**
|
|
8
|
-
* What the host builds the module for (a room floor's `polygon
|
|
9
|
-
* face's `outline` and `holes`): the build reads them in
|
|
10
|
-
* as `inputs`; they are not among the returned params,
|
|
11
|
-
* is in the host's frame, so it is not re-origined for
|
|
12
|
-
* polygon or the face's outline, less their holes: the
|
|
16
|
+
* What the host builds the module for (a room floor's `polygon` and `holes` in plan x/z, with
|
|
17
|
+
* y = 0 the floor's surface; a wall face's `outline` and `holes`): the build reads them in
|
|
18
|
+
* `params` beside its declared ones, and as `inputs`; they are not among the returned params,
|
|
19
|
+
* which the scene keeps. A build given them is in the host's frame, so it is not re-origined for
|
|
20
|
+
* its mount, and it is cut to the floor's polygon or the face's outline, less their holes: the
|
|
21
|
+
* module lays out, Pascal clips.
|
|
13
22
|
*/
|
|
14
23
|
inputs?: Record<string, unknown>;
|
|
24
|
+
/** Also write the manifest's `shape`: what the build occupies in plan at each height, for the usage checks. */
|
|
25
|
+
usageShape?: boolean;
|
|
15
26
|
};
|
|
16
27
|
export type GeometryScriptCompileOutput = CompiledGeometryScript & {
|
|
17
28
|
glb: ArrayBuffer;
|
|
@@ -21,6 +32,23 @@ export declare const GEOMETRY_SCRIPT_LIMITS: {
|
|
|
21
32
|
readonly materials: 32;
|
|
22
33
|
readonly extent: 60;
|
|
23
34
|
};
|
|
35
|
+
export declare const MODULES: ModuleTable;
|
|
36
|
+
export declare const LIB: {
|
|
37
|
+
BufferGeometryUtils: typeof BufferGeometryUtils;
|
|
38
|
+
ConvexGeometry: typeof ConvexGeometry;
|
|
39
|
+
LoftGeometry: typeof LoftGeometry;
|
|
40
|
+
ParametricGeometry: typeof ParametricGeometry;
|
|
41
|
+
ParametricFunctions: typeof ParametricFunctions;
|
|
42
|
+
RoundedBoxGeometry: typeof RoundedBoxGeometry;
|
|
43
|
+
csg: {
|
|
44
|
+
ADDITION: import("three-bvh-csg").CSGOperation;
|
|
45
|
+
Brush: typeof Brush;
|
|
46
|
+
DIFFERENCE: import("three-bvh-csg").CSGOperation;
|
|
47
|
+
Evaluator: typeof Evaluator;
|
|
48
|
+
INTERSECTION: import("three-bvh-csg").CSGOperation;
|
|
49
|
+
SUBTRACTION: import("three-bvh-csg").CSGOperation;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
24
52
|
export declare const MOUNTS: Set<"ceiling" | "floor" | "wall" | "wall-side">;
|
|
25
53
|
export declare function readParamSpecs(raw: unknown): GeometryScriptParamSpec[];
|
|
26
54
|
export declare function resolveParams(specs: GeometryScriptParamSpec[], overrides: Record<string, GeometryScriptParamValue>): Record<string, GeometryScriptParamValue>;
|
|
@@ -30,7 +58,7 @@ export declare function resolveParams(specs: GeometryScriptParamSpec[], override
|
|
|
30
58
|
* floor or face they describe and measures how much of it the build covers), reads the conventions into the manifest,
|
|
31
59
|
* samples its clips and exports the GLB. `built.animations` holds its clips.
|
|
32
60
|
*/
|
|
33
|
-
export declare function finishBuild({ built, mount, specs, params, code, language, inputs, }: {
|
|
61
|
+
export declare function finishBuild({ built, mount, specs, params, code, language, inputs, usageShape, }: {
|
|
34
62
|
built: THREE.Object3D;
|
|
35
63
|
mount: GeometryScriptMount;
|
|
36
64
|
specs: GeometryScriptParamSpec[];
|
|
@@ -42,7 +70,9 @@ export declare function finishBuild({ built, mount, specs, params, code, languag
|
|
|
42
70
|
* stands, in the host's frame, and is cut to the floor or face they describe.
|
|
43
71
|
*/
|
|
44
72
|
inputs?: Record<string, unknown>;
|
|
73
|
+
usageShape?: boolean;
|
|
45
74
|
}): Promise<GeometryScriptCompileOutput>;
|
|
75
|
+
export declare const SOURCE_GUARD: RegExp;
|
|
46
76
|
export declare function assertScriptSize(code: string): void;
|
|
47
77
|
export declare function compileGeometryScript(input: GeometryScriptCompileInput): Promise<GeometryScriptCompileOutput>;
|
|
48
78
|
//# sourceMappingURL=compile.d.ts.map
|
package/dist/compile.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["../src/compile.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,sBAAsB,EAEtB,sBAAsB,EACtB,mBAAmB,EACnB,uBAAuB,EACvB,wBAAwB,EACzB,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["../src/compile.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,sBAAsB,EAEtB,sBAAsB,EACtB,mBAAmB,EACnB,uBAAuB,EACvB,wBAAwB,EACzB,MAAM,kBAAkB,CAAA;AAOzB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAA;AAChF,OAAO,EAAE,YAAY,EAAE,MAAM,+CAA+C,CAAA;AAC5E,OAAO,KAAK,mBAAmB,MAAM,sDAAsD,CAAA;AAC3F,OAAO,EAAE,kBAAkB,EAAE,MAAM,qDAAqD,CAAA;AACxF,OAAO,EAAE,kBAAkB,EAAE,MAAM,qDAAqD,CAAA;AACxF,OAAO,KAAK,mBAAmB,MAAM,iDAAiD,CAAA;AACtF,OAAO,EAAY,KAAK,EAAc,SAAS,EAA6B,MAAM,eAAe,CAAA;AAGjG,OAAO,EAAE,KAAK,WAAW,EAAmB,MAAM,aAAa,CAAA;AAG/D,YAAY,EAAE,mBAAmB,EAAE,CAAA;AAEnC,MAAM,MAAM,0BAA0B,GAAG;IACvC,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,wBAAwB,CAAC,CAAA;IACjD;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAChC,+GAA+G;IAC/G,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAA;AAED,MAAM,MAAM,2BAA2B,GAAG,sBAAsB,GAAG;IAAE,GAAG,EAAE,WAAW,CAAA;CAAE,CAAA;AAEvF,eAAO,MAAM,sBAAsB;aACjC,SAAS,EAAE,MAAO;aAClB,SAAS,EAAE,EAAE;aACb,MAAM,EAAE,EAAE;CACF,CAAA;AAIV,eAAO,MAAM,OAAO,EAAE,WASrB,CAAA;AAED,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;CAQf,CAAA;AAED,eAAO,MAAM,MAAM,iDAA0E,CAAA;AAe7F,wBAAgB,cAAc,CAAC,GAAG,EAAE,OAAO,GAAG,uBAAuB,EAAE,CA6BtE;AAED,wBAAgB,aAAa,CAC3B,KAAK,EAAE,uBAAuB,EAAE,EAChC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,wBAAwB,CAAC,GAClD,MAAM,CAAC,MAAM,EAAE,wBAAwB,CAAC,CAc1C;AAo2BD;;;;;GAKG;AACH,wBAAsB,WAAW,CAAC,EAChC,KAAK,EACL,KAAK,EACL,KAAK,EACL,MAAM,EACN,IAAI,EACJ,QAAQ,EACR,MAAM,EACN,UAAU,GACX,EAAE;IACD,KAAK,EAAE,KAAK,CAAC,QAAQ,CAAA;IACrB,KAAK,EAAE,mBAAmB,CAAA;IAC1B,KAAK,EAAE,uBAAuB,EAAE,CAAA;IAChC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,wBAAwB,CAAC,CAAA;IAChD,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,sBAAsB,CAAA;IAChC;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAChC,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAkFvC;AAGD,eAAO,MAAM,YAAY,QACkE,CAAA;AAE3F,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,QAI5C;AAED,wBAAsB,qBAAqB,CACzC,KAAK,EAAE,0BAA0B,GAChC,OAAO,CAAC,2BAA2B,CAAC,CA4CtC"}
|