@layoutit/polycss 0.2.7 → 0.2.8
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/README.md +53 -5
- package/dist/PolyShapeElements-BviHejaw.d.cts +371 -0
- package/dist/PolyShapeElements-DV9o3DDi.d.ts +371 -0
- package/dist/createPolyScene-BBjx0kRF.d.cts +5 -0
- package/dist/createPolyScene-DHnue9qz.d.ts +5 -0
- package/dist/elements.d.cts +2 -1
- package/dist/elements.d.ts +2 -1
- package/dist/index.d.cts +6 -5
- package/dist/index.d.ts +6 -5
- package/dist/three.cjs +799 -0
- package/dist/three.d.cts +23 -0
- package/dist/three.d.ts +23 -0
- package/dist/three.js +799 -0
- package/dist/{PolyShapeElements-LEK_aL9q.d.cts → types-CfRKEj2z.d.cts} +1 -368
- package/dist/{PolyShapeElements-LEK_aL9q.d.ts → types-CfRKEj2z.d.ts} +1 -368
- package/package.json +17 -2
|
@@ -0,0 +1,371 @@
|
|
|
1
|
+
import { P as PolySceneHandle, a as PolyMeshHandle, f as PolyPerspectiveCameraHandle, d as PolyOrthographicCameraHandle } from './types-CfRKEj2z.js';
|
|
2
|
+
import { Vec3, Polygon } from '@layoutit/polycss-core';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Shared types, constants, and utilities for orbit/map controls factories.
|
|
6
|
+
* Not part of the public API surface — use createPolyOrbitControls or
|
|
7
|
+
* createPolyMapControls.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
interface PolyControlsAnimateOptions {
|
|
11
|
+
/**
|
|
12
|
+
* Rotation rate in degrees per 60 Hz-equivalent frame. The tick is
|
|
13
|
+
* dt-clamped so 0.3 deg/frame ≈ 18 deg/sec on every refresh rate.
|
|
14
|
+
* Default: 0.3.
|
|
15
|
+
*/
|
|
16
|
+
speed?: number;
|
|
17
|
+
/** Rotation axis. Default: "y" (yaw, rotates around vertical world Z). */
|
|
18
|
+
axis?: "x" | "y";
|
|
19
|
+
/** Halt the loop while a pointer drag is in progress. Default: true. */
|
|
20
|
+
pauseOnInteraction?: boolean;
|
|
21
|
+
}
|
|
22
|
+
interface PolyControlsBaseOptions {
|
|
23
|
+
/** Pointer-drag. Default: true. */
|
|
24
|
+
drag?: boolean;
|
|
25
|
+
/** Wheel / pinch zoom. Default: true. */
|
|
26
|
+
wheel?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* When `true`, wheel events change `distance` (camera pull-back in CSS px)
|
|
29
|
+
* instead of `zoom`. Mirrors Three.js OrbitControls dolly behaviour.
|
|
30
|
+
* Default: false (zoom mode).
|
|
31
|
+
*/
|
|
32
|
+
dolly?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Drag-direction inversion. `false` = natural, `true` = invert (×-1),
|
|
35
|
+
* a number multiplies sensitivity (negative inverts). Default: false.
|
|
36
|
+
*/
|
|
37
|
+
invert?: boolean | number;
|
|
38
|
+
/** Minimum CSS zoom. Default: 0.1. */
|
|
39
|
+
minZoom?: number;
|
|
40
|
+
/** Maximum CSS zoom. Default: 10. */
|
|
41
|
+
maxZoom?: number;
|
|
42
|
+
/** Minimum dolly distance in CSS pixels. Default: 0. Only used when `dolly: true`. */
|
|
43
|
+
minDistance?: number;
|
|
44
|
+
/** Maximum dolly distance in CSS pixels. Default: Infinity. Only used when `dolly: true`. */
|
|
45
|
+
maxDistance?: number;
|
|
46
|
+
/** Auto-rotate. Pass false (or omit) to disable. */
|
|
47
|
+
animate?: false | PolyControlsAnimateOptions;
|
|
48
|
+
}
|
|
49
|
+
interface PolyControlsCamera {
|
|
50
|
+
rotX: number;
|
|
51
|
+
rotY: number;
|
|
52
|
+
zoom: number;
|
|
53
|
+
target: Vec3;
|
|
54
|
+
distance: number;
|
|
55
|
+
}
|
|
56
|
+
interface PolyControlsChangeEvent {
|
|
57
|
+
type: "change";
|
|
58
|
+
camera: PolyControlsCamera;
|
|
59
|
+
}
|
|
60
|
+
interface PolyControlsInteractionEvent {
|
|
61
|
+
type: "start" | "end";
|
|
62
|
+
camera: PolyControlsCamera;
|
|
63
|
+
}
|
|
64
|
+
type PolyControlsEvent = PolyControlsChangeEvent | PolyControlsInteractionEvent;
|
|
65
|
+
type PolyControlsListener<E extends PolyControlsEvent = PolyControlsEvent> = (event: E) => void;
|
|
66
|
+
interface PolyControlsHandle {
|
|
67
|
+
update(partial: PolyControlsBaseOptions): void;
|
|
68
|
+
resume(): void;
|
|
69
|
+
pause(): void;
|
|
70
|
+
destroy(): void;
|
|
71
|
+
addEventListener<T extends PolyControlsEvent["type"]>(type: T, listener: PolyControlsListener<Extract<PolyControlsEvent, {
|
|
72
|
+
type: T;
|
|
73
|
+
}>>): void;
|
|
74
|
+
removeEventListener<T extends PolyControlsEvent["type"]>(type: T, listener: PolyControlsListener<Extract<PolyControlsEvent, {
|
|
75
|
+
type: T;
|
|
76
|
+
}>>): void;
|
|
77
|
+
hasEventListener<T extends PolyControlsEvent["type"]>(type: T, listener: PolyControlsListener<Extract<PolyControlsEvent, {
|
|
78
|
+
type: T;
|
|
79
|
+
}>>): boolean;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* createPolyOrbitControls — orbit-mode camera input for a PolyScene.
|
|
84
|
+
*
|
|
85
|
+
* Left-drag rotates rotX / rotY around the target (orbit). Wheel zooms or
|
|
86
|
+
* dollies. Mirrors Three.js OrbitControls semantics.
|
|
87
|
+
*
|
|
88
|
+
* For map/pan semantics (left-drag pans, right-drag orbits) use
|
|
89
|
+
* `createPolyMapControls` instead.
|
|
90
|
+
*/
|
|
91
|
+
|
|
92
|
+
type PolyOrbitControlsOptions = PolyControlsBaseOptions;
|
|
93
|
+
type PolyOrbitControlsHandle = PolyControlsHandle;
|
|
94
|
+
declare function createPolyOrbitControls(scene: PolySceneHandle, options?: PolyOrbitControlsOptions): PolyOrbitControlsHandle;
|
|
95
|
+
|
|
96
|
+
declare const ELEMENT_BASE$b: typeof HTMLElement;
|
|
97
|
+
declare class PolySceneElement extends ELEMENT_BASE$b {
|
|
98
|
+
static get observedAttributes(): string[];
|
|
99
|
+
private _scene;
|
|
100
|
+
private _implicitCamera;
|
|
101
|
+
/**
|
|
102
|
+
* Returns the underlying PolySceneHandle. Children call this during their own
|
|
103
|
+
* connectedCallback to register meshes.
|
|
104
|
+
*/
|
|
105
|
+
getScene(): PolySceneHandle | null;
|
|
106
|
+
private _findAncestorCamera;
|
|
107
|
+
private _buildImplicitCamera;
|
|
108
|
+
private _readNonCameraOptions;
|
|
109
|
+
private _readDirectionalLight;
|
|
110
|
+
private _readAmbientLight;
|
|
111
|
+
connectedCallback(): void;
|
|
112
|
+
disconnectedCallback(): void;
|
|
113
|
+
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
declare const ELEMENT_BASE$a: typeof HTMLElement;
|
|
117
|
+
declare class PolyMeshElement extends ELEMENT_BASE$a {
|
|
118
|
+
static get observedAttributes(): string[];
|
|
119
|
+
private _handle;
|
|
120
|
+
private _parseResult;
|
|
121
|
+
private _loadToken;
|
|
122
|
+
/** Returns the current mesh handle, or null if not yet loaded. */
|
|
123
|
+
getMeshHandle(): PolyMeshHandle | null;
|
|
124
|
+
connectedCallback(): void;
|
|
125
|
+
disconnectedCallback(): void;
|
|
126
|
+
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
127
|
+
private _tearDown;
|
|
128
|
+
private _maybeLoad;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
declare const ELEMENT_BASE$9: typeof HTMLElement;
|
|
132
|
+
declare class PolyIframeElement extends ELEMENT_BASE$9 {
|
|
133
|
+
static get observedAttributes(): string[];
|
|
134
|
+
private _wrapper;
|
|
135
|
+
private _iframe;
|
|
136
|
+
/** The iframe element this <poly-iframe> mounted, or null when detached. */
|
|
137
|
+
getIframeElement(): HTMLIFrameElement | null;
|
|
138
|
+
connectedCallback(): void;
|
|
139
|
+
disconnectedCallback(): void;
|
|
140
|
+
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
141
|
+
private _mount;
|
|
142
|
+
private _applyGeometry;
|
|
143
|
+
private _teardown;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
declare const ELEMENT_BASE$8: typeof HTMLElement;
|
|
147
|
+
declare class PolyPolygonElement extends ELEMENT_BASE$8 {
|
|
148
|
+
static get observedAttributes(): string[];
|
|
149
|
+
private _handle;
|
|
150
|
+
connectedCallback(): void;
|
|
151
|
+
disconnectedCallback(): void;
|
|
152
|
+
attributeChangedCallback(_name: string, oldValue: string | null, newValue: string | null): void;
|
|
153
|
+
private _tearDown;
|
|
154
|
+
private _mount;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
declare const ELEMENT_BASE$7: typeof HTMLElement;
|
|
158
|
+
declare class PolyOrbitControlsElement extends ELEMENT_BASE$7 {
|
|
159
|
+
static get observedAttributes(): string[];
|
|
160
|
+
private _controls;
|
|
161
|
+
/** Returns the wrapped PolyOrbitControlsHandle once the element has
|
|
162
|
+
* connected to its `<poly-scene>` ancestor. Lets external callers attach
|
|
163
|
+
* `change` listeners (or call `update()` / `pause()`) the same way they
|
|
164
|
+
* would on a vanilla `createPolyOrbitControls(scene, ...)` handle. */
|
|
165
|
+
getControls(): PolyOrbitControlsHandle | null;
|
|
166
|
+
private _readAnimate;
|
|
167
|
+
private _readOptions;
|
|
168
|
+
private _findScene;
|
|
169
|
+
private _attach;
|
|
170
|
+
connectedCallback(): void;
|
|
171
|
+
disconnectedCallback(): void;
|
|
172
|
+
attributeChangedCallback(_name: string, oldValue: string | null, newValue: string | null): void;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
declare const ELEMENT_BASE$6: typeof HTMLElement;
|
|
176
|
+
declare class PolyMapControlsElement extends ELEMENT_BASE$6 {
|
|
177
|
+
static get observedAttributes(): string[];
|
|
178
|
+
private _controls;
|
|
179
|
+
private _readAnimate;
|
|
180
|
+
private _readOptions;
|
|
181
|
+
private _findScene;
|
|
182
|
+
private _attach;
|
|
183
|
+
connectedCallback(): void;
|
|
184
|
+
disconnectedCallback(): void;
|
|
185
|
+
attributeChangedCallback(_name: string, oldValue: string | null, newValue: string | null): void;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
declare const ELEMENT_BASE$5: typeof HTMLElement;
|
|
189
|
+
declare class PolyFirstPersonControlsElement extends ELEMENT_BASE$5 {
|
|
190
|
+
static get observedAttributes(): string[];
|
|
191
|
+
private _controls;
|
|
192
|
+
private _readOptions;
|
|
193
|
+
private _findScene;
|
|
194
|
+
private _attach;
|
|
195
|
+
connectedCallback(): void;
|
|
196
|
+
disconnectedCallback(): void;
|
|
197
|
+
attributeChangedCallback(_name: string, oldValue: string | null, newValue: string | null): void;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* <poly-perspective-camera> — standalone perspective camera element.
|
|
202
|
+
*
|
|
203
|
+
* Wraps `createPolyPerspectiveCamera`. Unlike <poly-scene> which owns the
|
|
204
|
+
* scene DOM, this element provides a camera context that child controls can
|
|
205
|
+
* read. It creates a `<div class="polycss-camera">` wrapper with the
|
|
206
|
+
* CSS `perspective` property set.
|
|
207
|
+
*
|
|
208
|
+
* Attributes (all optional):
|
|
209
|
+
* perspective — number, CSS perspective in pixels (default 32000)
|
|
210
|
+
* zoom — number
|
|
211
|
+
* rot-x — number, degrees (default 65)
|
|
212
|
+
* rot-y — number, degrees (default 45)
|
|
213
|
+
* target — "x,y,z" comma-separated world coordinates
|
|
214
|
+
* distance — number, camera pull-back in CSS pixels
|
|
215
|
+
*/
|
|
216
|
+
|
|
217
|
+
declare const ELEMENT_BASE$4: typeof HTMLElement;
|
|
218
|
+
declare class PolyPerspectiveCameraElement extends ELEMENT_BASE$4 {
|
|
219
|
+
static get observedAttributes(): string[];
|
|
220
|
+
private _camera;
|
|
221
|
+
private _wrapper;
|
|
222
|
+
/** Returns the camera handle, or null if not yet connected. */
|
|
223
|
+
getCamera(): PolyPerspectiveCameraHandle | null;
|
|
224
|
+
private _readOptions;
|
|
225
|
+
private _mount;
|
|
226
|
+
private _teardown;
|
|
227
|
+
connectedCallback(): void;
|
|
228
|
+
disconnectedCallback(): void;
|
|
229
|
+
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* <poly-orthographic-camera> — standalone orthographic camera element.
|
|
234
|
+
*
|
|
235
|
+
* Wraps `createPolyOrthographicCamera`. Sets CSS `perspective: none` on the
|
|
236
|
+
* camera wrapper, disabling perspective projection.
|
|
237
|
+
*
|
|
238
|
+
* Attributes (all optional):
|
|
239
|
+
* zoom — number
|
|
240
|
+
* rot-x — number, degrees (default 65)
|
|
241
|
+
* rot-y — number, degrees (default 45)
|
|
242
|
+
* target — "x,y,z" comma-separated world coordinates
|
|
243
|
+
* distance — number, camera pull-back in CSS pixels
|
|
244
|
+
*/
|
|
245
|
+
|
|
246
|
+
declare const ELEMENT_BASE$3: typeof HTMLElement;
|
|
247
|
+
declare class PolyOrthographicCameraElement extends ELEMENT_BASE$3 {
|
|
248
|
+
static get observedAttributes(): string[];
|
|
249
|
+
private _camera;
|
|
250
|
+
private _wrapper;
|
|
251
|
+
/** Returns the camera handle, or null if not yet connected. */
|
|
252
|
+
getCamera(): PolyOrthographicCameraHandle | null;
|
|
253
|
+
private _readOptions;
|
|
254
|
+
private _mount;
|
|
255
|
+
private _teardown;
|
|
256
|
+
connectedCallback(): void;
|
|
257
|
+
disconnectedCallback(): void;
|
|
258
|
+
attributeChangedCallback(_name: string, oldValue: string | null, newValue: string | null): void;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* <poly-camera> — ergonomic alias for <poly-orthographic-camera>.
|
|
263
|
+
*
|
|
264
|
+
* The default camera in PolyCSS is orthographic. `<poly-camera>` maps to
|
|
265
|
+
* `PolyOrthographicCameraElement` so the canonical tree shape works without
|
|
266
|
+
* spelling out "orthographic" when it isn't relevant to the scene being built.
|
|
267
|
+
*
|
|
268
|
+
* Use <poly-perspective-camera> when depth foreshortening is needed.
|
|
269
|
+
*/
|
|
270
|
+
|
|
271
|
+
declare class PolyCameraElement extends PolyOrthographicCameraElement {
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
declare const ELEMENT_BASE$2: typeof HTMLElement;
|
|
275
|
+
declare class PolyTransformControlsElement extends ELEMENT_BASE$2 {
|
|
276
|
+
static get observedAttributes(): string[];
|
|
277
|
+
private _tc;
|
|
278
|
+
private _findScene;
|
|
279
|
+
private _findTargetMesh;
|
|
280
|
+
private _readOptions;
|
|
281
|
+
private _attach;
|
|
282
|
+
connectedCallback(): void;
|
|
283
|
+
disconnectedCallback(): void;
|
|
284
|
+
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
declare const ELEMENT_BASE$1: typeof HTMLElement;
|
|
288
|
+
declare class PolySelectElement extends ELEMENT_BASE$1 {
|
|
289
|
+
static get observedAttributes(): string[];
|
|
290
|
+
private _selection;
|
|
291
|
+
private _findScene;
|
|
292
|
+
private _readOptions;
|
|
293
|
+
private _attach;
|
|
294
|
+
connectedCallback(): void;
|
|
295
|
+
disconnectedCallback(): void;
|
|
296
|
+
attributeChangedCallback(_name: string, oldValue: string | null, newValue: string | null): void;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* Primitive shape custom elements — <poly-box>, <poly-plane>, <poly-ring>,
|
|
301
|
+
* <poly-octahedron>, <poly-tetrahedron>, <poly-icosahedron>, <poly-dodecahedron>,
|
|
302
|
+
* <poly-cylinder>, <poly-cone>, <poly-torus>.
|
|
303
|
+
*
|
|
304
|
+
* Each element reads shape-specific attributes, calls the matching polygon
|
|
305
|
+
* generator from @layoutit/polycss-core, then registers the result with the
|
|
306
|
+
* nearest <poly-scene> ancestor using the same mechanism as <poly-mesh>.
|
|
307
|
+
*
|
|
308
|
+
* Attribute naming follows kebab-case conventions: `radial-segments`,
|
|
309
|
+
* `tubular-segments`, `radius-top`, `half-thickness`, etc.
|
|
310
|
+
*/
|
|
311
|
+
|
|
312
|
+
declare const ELEMENT_BASE: typeof HTMLElement;
|
|
313
|
+
/**
|
|
314
|
+
* Base class for all primitive shape elements. Subclasses implement
|
|
315
|
+
* `buildPolygons()` which returns a Polygon[] from this element's attributes.
|
|
316
|
+
*/
|
|
317
|
+
declare abstract class PolyShapeElement extends ELEMENT_BASE {
|
|
318
|
+
private _handle;
|
|
319
|
+
abstract buildPolygons(): Polygon[];
|
|
320
|
+
connectedCallback(): void;
|
|
321
|
+
disconnectedCallback(): void;
|
|
322
|
+
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
323
|
+
private _tearDown;
|
|
324
|
+
private _mount;
|
|
325
|
+
}
|
|
326
|
+
declare class PolyBoxElement extends PolyShapeElement {
|
|
327
|
+
static get observedAttributes(): string[];
|
|
328
|
+
buildPolygons(): Polygon[];
|
|
329
|
+
}
|
|
330
|
+
declare class PolyPlaneElement extends PolyShapeElement {
|
|
331
|
+
static get observedAttributes(): string[];
|
|
332
|
+
buildPolygons(): Polygon[];
|
|
333
|
+
}
|
|
334
|
+
declare class PolyRingElement extends PolyShapeElement {
|
|
335
|
+
static get observedAttributes(): string[];
|
|
336
|
+
buildPolygons(): Polygon[];
|
|
337
|
+
}
|
|
338
|
+
declare class PolyOctahedronElement extends PolyShapeElement {
|
|
339
|
+
static get observedAttributes(): string[];
|
|
340
|
+
buildPolygons(): Polygon[];
|
|
341
|
+
}
|
|
342
|
+
declare class PolyTetrahedronElement extends PolyShapeElement {
|
|
343
|
+
static get observedAttributes(): string[];
|
|
344
|
+
buildPolygons(): Polygon[];
|
|
345
|
+
}
|
|
346
|
+
declare class PolyIcosahedronElement extends PolyShapeElement {
|
|
347
|
+
static get observedAttributes(): string[];
|
|
348
|
+
buildPolygons(): Polygon[];
|
|
349
|
+
}
|
|
350
|
+
declare class PolyDodecahedronElement extends PolyShapeElement {
|
|
351
|
+
static get observedAttributes(): string[];
|
|
352
|
+
buildPolygons(): Polygon[];
|
|
353
|
+
}
|
|
354
|
+
declare class PolySphereElement extends PolyShapeElement {
|
|
355
|
+
static get observedAttributes(): string[];
|
|
356
|
+
buildPolygons(): Polygon[];
|
|
357
|
+
}
|
|
358
|
+
declare class PolyCylinderElement extends PolyShapeElement {
|
|
359
|
+
static get observedAttributes(): string[];
|
|
360
|
+
buildPolygons(): Polygon[];
|
|
361
|
+
}
|
|
362
|
+
declare class PolyConeElement extends PolyShapeElement {
|
|
363
|
+
static get observedAttributes(): string[];
|
|
364
|
+
buildPolygons(): Polygon[];
|
|
365
|
+
}
|
|
366
|
+
declare class PolyTorusElement extends PolyShapeElement {
|
|
367
|
+
static get observedAttributes(): string[];
|
|
368
|
+
buildPolygons(): Polygon[];
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
export { PolySceneElement as A, PolySelectElement as B, PolySphereElement as C, PolyTetrahedronElement as D, PolyTorusElement as E, PolyTransformControlsElement as F, createPolyOrbitControls as G, type PolyControlsHandle as P, type PolyControlsBaseOptions as a, type PolyControlsEvent as b, type PolyControlsListener as c, PolyBoxElement as d, PolyCameraElement as e, PolyConeElement as f, type PolyControlsAnimateOptions as g, type PolyControlsCamera as h, type PolyControlsChangeEvent as i, type PolyControlsInteractionEvent as j, PolyCylinderElement as k, PolyDodecahedronElement as l, PolyFirstPersonControlsElement as m, PolyIcosahedronElement as n, PolyIframeElement as o, PolyMapControlsElement as p, PolyMeshElement as q, PolyOctahedronElement as r, PolyOrbitControlsElement as s, type PolyOrbitControlsHandle as t, type PolyOrbitControlsOptions as u, PolyOrthographicCameraElement as v, PolyPerspectiveCameraElement as w, PolyPlaneElement as x, PolyPolygonElement as y, PolyRingElement as z };
|
package/dist/elements.d.cts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { d as PolyBoxElement, e as PolyCameraElement, f as PolyConeElement, k as PolyCylinderElement, l as PolyDodecahedronElement, m as PolyFirstPersonControlsElement, n as PolyIcosahedronElement, o as PolyIframeElement, p as PolyMapControlsElement, q as PolyMeshElement, r as PolyOctahedronElement, s as PolyOrbitControlsElement, v as PolyOrthographicCameraElement, w as PolyPerspectiveCameraElement, x as PolyPlaneElement, y as PolyPolygonElement, z as PolyRingElement, A as PolySceneElement, B as PolySelectElement, C as PolySphereElement, D as PolyTetrahedronElement, E as PolyTorusElement, F as PolyTransformControlsElement } from './PolyShapeElements-BviHejaw.cjs';
|
|
2
|
+
import './types-CfRKEj2z.cjs';
|
|
2
3
|
import '@layoutit/polycss-core';
|
|
3
4
|
|
|
4
5
|
declare const ELEMENT_BASE$1: typeof HTMLElement;
|
package/dist/elements.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { d as PolyBoxElement, e as PolyCameraElement, f as PolyConeElement, k as PolyCylinderElement, l as PolyDodecahedronElement, m as PolyFirstPersonControlsElement, n as PolyIcosahedronElement, o as PolyIframeElement, p as PolyMapControlsElement, q as PolyMeshElement, r as PolyOctahedronElement, s as PolyOrbitControlsElement, v as PolyOrthographicCameraElement, w as PolyPerspectiveCameraElement, x as PolyPlaneElement, y as PolyPolygonElement, z as PolyRingElement, A as PolySceneElement, B as PolySelectElement, C as PolySphereElement, D as PolyTetrahedronElement, E as PolyTorusElement, F as PolyTransformControlsElement } from './PolyShapeElements-DV9o3DDi.js';
|
|
2
|
+
import './types-CfRKEj2z.js';
|
|
2
3
|
import '@layoutit/polycss-core';
|
|
3
4
|
|
|
4
5
|
declare const ELEMENT_BASE$1: typeof HTMLElement;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
export { g as PolyBoxElement, h as PolyCameraElement, i as PolyCameraOptions, j as PolyConeElement, k as PolyControlsAnimateOptions, l as PolyControlsCamera, m as PolyControlsChangeEvent, n as PolyControlsInteractionEvent, o as PolyCylinderElement, p as PolyDodecahedronElement, q as PolyFirstPersonControlsElement, r as PolyIcosahedronElement, s as PolyIframeElement, t as PolyMapControlsElement, u as PolyMeshElement, v as PolyMeshTransform, w as PolyOctahedronElement, x as PolyOrbitControlsElement, y as PolyOrbitControlsHandle, z as PolyOrbitControlsOptions, A as PolyOrthographicCameraElement, B as PolyOrthographicCameraHandle, C as PolyOrthographicCameraOptions, D as PolyPerspectiveCameraElement, E as PolyPerspectiveCameraHandle, F as PolyPerspectiveCameraOptions, G as PolyPlaneElement, H as PolyPolygonElement, I as PolyRingElement, J as PolySceneElement, K as PolySelectElement, L as PolySphereElement, M as PolyTetrahedronElement, N as PolyTorusElement, O as PolyTransformControlsElement, Q as createPolyCamera, R as createPolyOrbitControls, S as createPolyOrthographicCamera, T as createPolyPerspectiveCamera } from './PolyShapeElements-LEK_aL9q.cjs';
|
|
1
|
+
export { c as createPolyScene } from './createPolyScene-BBjx0kRF.cjs';
|
|
3
2
|
import * as _layoutit_polycss_core from '@layoutit/polycss-core';
|
|
4
3
|
import { PolyDirectionalLight, PolyAmbientLight, PolyTextureLightingMode, PolyTextureLeafSizing, PolyTextureImageRendering, PolyTextureBackend, PolyTextureProjection, TextureAtlasPlan, TextureQuality, PackedAtlas, PackedPage, TextureAtlasPage, PolyRenderStrategy, SolidPaintDefaults, Polygon, SolidTriangleFrame, Vec3, BoxPolygonsOptions, ParseResult, ConePolygonsOptions, CylinderPolygonsOptions, DodecahedronPolygonsOptions, IcosahedronPolygonsOptions, OctahedronPolygonsOptions, PlanePolygonsOptions, RingPolygonsOptions, SpherePolygonsOptions, TetrahedronPolygonsOptions, TorusPolygonsOptions } from '@layoutit/polycss-core';
|
|
5
4
|
export * from '@layoutit/polycss-core';
|
|
6
5
|
export { ComputeTextureAtlasPlanOptions, PackedAtlas, PackedPage, PackedTextureAtlasEntry, PolyMeshTransformInput, PolyRenderStrategiesOption, PolyRenderStrategy, PolySceneTransformInput, ParseResult as PolyShapeResult, SolidPaintDefaults, SolidTriangleFrame, TextureAtlasPage, TextureAtlasPlan, TextureQuality, buildPolyMeshTransform, buildPolySceneTransform, buildTextureEdgeRepairSets, computeTextureAtlasPlanPublic, cssBorderShapeForPlan, cssDistanceToWorld, cssPositionToWorld, formatBorderShapeEntryMatrix, formatCssLengthPx, formatMatrix3d, formatSolidQuadEntryMatrix, isFullRectSolid, isProjectiveQuadPlan, isSolidTrianglePlan, cssDistanceToWorld as polyCssDistanceToWorld, cssPositionToWorld as polyCssPositionToWorld, worldDirectionToPolyCss, worldDirectionalLightToCss as worldDirectionalLightToPolyCss, worldDistanceToCss, worldDistanceToCss as worldDistanceToPolyCss, worldPositionToPolyCss } from '@layoutit/polycss-core';
|
|
6
|
+
import { P as PolySceneHandle, a as PolyMeshHandle } from './types-CfRKEj2z.cjs';
|
|
7
|
+
export { b as PolyCameraOptions, c as PolyMeshTransform, d as PolyOrthographicCameraHandle, e as PolyOrthographicCameraOptions, f as PolyPerspectiveCameraHandle, g as PolyPerspectiveCameraOptions, h as PolySceneOptions, i as createPolyCamera, j as createPolyOrthographicCamera, k as createPolyPerspectiveCamera } from './types-CfRKEj2z.cjs';
|
|
8
|
+
import { P as PolyControlsHandle, a as PolyControlsBaseOptions, b as PolyControlsEvent, c as PolyControlsListener } from './PolyShapeElements-BviHejaw.cjs';
|
|
9
|
+
export { d as PolyBoxElement, e as PolyCameraElement, f as PolyConeElement, g as PolyControlsAnimateOptions, h as PolyControlsCamera, i as PolyControlsChangeEvent, j as PolyControlsInteractionEvent, k as PolyCylinderElement, l as PolyDodecahedronElement, m as PolyFirstPersonControlsElement, n as PolyIcosahedronElement, o as PolyIframeElement, p as PolyMapControlsElement, q as PolyMeshElement, r as PolyOctahedronElement, s as PolyOrbitControlsElement, t as PolyOrbitControlsHandle, u as PolyOrbitControlsOptions, v as PolyOrthographicCameraElement, w as PolyPerspectiveCameraElement, x as PolyPlaneElement, y as PolyPolygonElement, z as PolyRingElement, A as PolySceneElement, B as PolySelectElement, C as PolySphereElement, D as PolyTetrahedronElement, E as PolyTorusElement, F as PolyTransformControlsElement, G as createPolyOrbitControls } from './PolyShapeElements-BviHejaw.cjs';
|
|
7
10
|
|
|
8
11
|
interface RenderTextureAtlasOptions {
|
|
9
12
|
doc?: Document;
|
|
@@ -104,8 +107,6 @@ declare function updatePolygonsWithStableTopology(rendered: RenderedPoly[], poly
|
|
|
104
107
|
declare function renderPolygonsWithStableTriangles(polygons: Polygon[], options?: RenderTextureAtlasOptions): RenderTextureAtlasResult | null;
|
|
105
108
|
declare function updatePolygonsWithStableTriangles(rendered: RenderedPoly[], polygons: Polygon[], options?: RenderTextureAtlasOptions): RenderTextureAtlasResult | null;
|
|
106
109
|
|
|
107
|
-
declare function createPolyScene(host: HTMLElement, options: PolySceneOptions): PolySceneHandle;
|
|
108
|
-
|
|
109
110
|
/**
|
|
110
111
|
* createPolyMapControls — map/pan-mode camera input for a PolyScene.
|
|
111
112
|
*
|
|
@@ -437,4 +438,4 @@ declare function createPolyTorus(options?: TorusPolygonsOptions): ParseResult;
|
|
|
437
438
|
|
|
438
439
|
declare function injectPolyBaseStyles(doc?: Document): void;
|
|
439
440
|
|
|
440
|
-
export { type PolyCameraSnapshotStats, PolyControlsBaseOptions, PolyControlsEvent, PolyControlsHandle, PolyControlsListener, type PolyFirstPersonControlsHandle, type PolyFirstPersonControlsOptions, type PolyLeafInfo, type PolyMapControlsHandle, type PolyMapControlsOptions, PolyMeshHandle, type PolyRenderLeafStrategy, type PolyRenderStats, type PolyRenderStatsOptions, type PolyRenderSurfaceLeafCounts, PolySceneHandle,
|
|
441
|
+
export { type PolyCameraSnapshotStats, PolyControlsBaseOptions, PolyControlsEvent, PolyControlsHandle, PolyControlsListener, type PolyFirstPersonControlsHandle, type PolyFirstPersonControlsOptions, type PolyLeafInfo, type PolyMapControlsHandle, type PolyMapControlsOptions, PolyMeshHandle, type PolyRenderLeafStrategy, type PolyRenderStats, type PolyRenderStatsOptions, type PolyRenderSurfaceLeafCounts, PolySceneHandle, PolySceneSnapshotError, type PolySceneSnapshotErrorCode, type PolySelectOptions, type PolySelectionHandle, type PolySnapshotRenderStats, type PolyTextureReadiness, type PolyTextureRenderStats, type PolyTransformControlsHandle, type PolyTransformControlsObjectChangeEvent, type PolyTransformControlsOptions, type RenderTextureAtlasAsyncResult, type RenderTextureAtlasOptions, type RenderTextureAtlasResult, type RenderedPoly, buildAtlasPages, collectPolyRenderStats, collectPolyTextureReadiness, createPolyBox, createPolyCone, createPolyCylinder, createPolyDodecahedron, createPolyFirstPersonControls, createPolyIcosahedron, createPolyMapControls, createPolyOctahedron, createPolyPlane, createPolyRing, createPolySphere, createPolyTetrahedron, createPolyTorus, createSelect, createTransformControls, exportPolySceneSnapshot, filterAtlasPlans, getSolidPaintDefaults, getSolidPaintDefaultsFromPlans, injectPolyBaseStyles, isBorderShapeSupported, isSolidTriangleSupported, packTextureAtlasPlansWithScale, queryPolyLeaves, renderPolygonsWithStableTriangles, renderPolygonsWithTextureAtlas, renderPolygonsWithTextureAtlasAsync, updatePolygonsWithStableTopology, updatePolygonsWithStableTriangles, updateStableTriangleFrame };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
export { g as PolyBoxElement, h as PolyCameraElement, i as PolyCameraOptions, j as PolyConeElement, k as PolyControlsAnimateOptions, l as PolyControlsCamera, m as PolyControlsChangeEvent, n as PolyControlsInteractionEvent, o as PolyCylinderElement, p as PolyDodecahedronElement, q as PolyFirstPersonControlsElement, r as PolyIcosahedronElement, s as PolyIframeElement, t as PolyMapControlsElement, u as PolyMeshElement, v as PolyMeshTransform, w as PolyOctahedronElement, x as PolyOrbitControlsElement, y as PolyOrbitControlsHandle, z as PolyOrbitControlsOptions, A as PolyOrthographicCameraElement, B as PolyOrthographicCameraHandle, C as PolyOrthographicCameraOptions, D as PolyPerspectiveCameraElement, E as PolyPerspectiveCameraHandle, F as PolyPerspectiveCameraOptions, G as PolyPlaneElement, H as PolyPolygonElement, I as PolyRingElement, J as PolySceneElement, K as PolySelectElement, L as PolySphereElement, M as PolyTetrahedronElement, N as PolyTorusElement, O as PolyTransformControlsElement, Q as createPolyCamera, R as createPolyOrbitControls, S as createPolyOrthographicCamera, T as createPolyPerspectiveCamera } from './PolyShapeElements-LEK_aL9q.js';
|
|
1
|
+
export { c as createPolyScene } from './createPolyScene-DHnue9qz.js';
|
|
3
2
|
import * as _layoutit_polycss_core from '@layoutit/polycss-core';
|
|
4
3
|
import { PolyDirectionalLight, PolyAmbientLight, PolyTextureLightingMode, PolyTextureLeafSizing, PolyTextureImageRendering, PolyTextureBackend, PolyTextureProjection, TextureAtlasPlan, TextureQuality, PackedAtlas, PackedPage, TextureAtlasPage, PolyRenderStrategy, SolidPaintDefaults, Polygon, SolidTriangleFrame, Vec3, BoxPolygonsOptions, ParseResult, ConePolygonsOptions, CylinderPolygonsOptions, DodecahedronPolygonsOptions, IcosahedronPolygonsOptions, OctahedronPolygonsOptions, PlanePolygonsOptions, RingPolygonsOptions, SpherePolygonsOptions, TetrahedronPolygonsOptions, TorusPolygonsOptions } from '@layoutit/polycss-core';
|
|
5
4
|
export * from '@layoutit/polycss-core';
|
|
6
5
|
export { ComputeTextureAtlasPlanOptions, PackedAtlas, PackedPage, PackedTextureAtlasEntry, PolyMeshTransformInput, PolyRenderStrategiesOption, PolyRenderStrategy, PolySceneTransformInput, ParseResult as PolyShapeResult, SolidPaintDefaults, SolidTriangleFrame, TextureAtlasPage, TextureAtlasPlan, TextureQuality, buildPolyMeshTransform, buildPolySceneTransform, buildTextureEdgeRepairSets, computeTextureAtlasPlanPublic, cssBorderShapeForPlan, cssDistanceToWorld, cssPositionToWorld, formatBorderShapeEntryMatrix, formatCssLengthPx, formatMatrix3d, formatSolidQuadEntryMatrix, isFullRectSolid, isProjectiveQuadPlan, isSolidTrianglePlan, cssDistanceToWorld as polyCssDistanceToWorld, cssPositionToWorld as polyCssPositionToWorld, worldDirectionToPolyCss, worldDirectionalLightToCss as worldDirectionalLightToPolyCss, worldDistanceToCss, worldDistanceToCss as worldDistanceToPolyCss, worldPositionToPolyCss } from '@layoutit/polycss-core';
|
|
6
|
+
import { P as PolySceneHandle, a as PolyMeshHandle } from './types-CfRKEj2z.js';
|
|
7
|
+
export { b as PolyCameraOptions, c as PolyMeshTransform, d as PolyOrthographicCameraHandle, e as PolyOrthographicCameraOptions, f as PolyPerspectiveCameraHandle, g as PolyPerspectiveCameraOptions, h as PolySceneOptions, i as createPolyCamera, j as createPolyOrthographicCamera, k as createPolyPerspectiveCamera } from './types-CfRKEj2z.js';
|
|
8
|
+
import { P as PolyControlsHandle, a as PolyControlsBaseOptions, b as PolyControlsEvent, c as PolyControlsListener } from './PolyShapeElements-DV9o3DDi.js';
|
|
9
|
+
export { d as PolyBoxElement, e as PolyCameraElement, f as PolyConeElement, g as PolyControlsAnimateOptions, h as PolyControlsCamera, i as PolyControlsChangeEvent, j as PolyControlsInteractionEvent, k as PolyCylinderElement, l as PolyDodecahedronElement, m as PolyFirstPersonControlsElement, n as PolyIcosahedronElement, o as PolyIframeElement, p as PolyMapControlsElement, q as PolyMeshElement, r as PolyOctahedronElement, s as PolyOrbitControlsElement, t as PolyOrbitControlsHandle, u as PolyOrbitControlsOptions, v as PolyOrthographicCameraElement, w as PolyPerspectiveCameraElement, x as PolyPlaneElement, y as PolyPolygonElement, z as PolyRingElement, A as PolySceneElement, B as PolySelectElement, C as PolySphereElement, D as PolyTetrahedronElement, E as PolyTorusElement, F as PolyTransformControlsElement, G as createPolyOrbitControls } from './PolyShapeElements-DV9o3DDi.js';
|
|
7
10
|
|
|
8
11
|
interface RenderTextureAtlasOptions {
|
|
9
12
|
doc?: Document;
|
|
@@ -104,8 +107,6 @@ declare function updatePolygonsWithStableTopology(rendered: RenderedPoly[], poly
|
|
|
104
107
|
declare function renderPolygonsWithStableTriangles(polygons: Polygon[], options?: RenderTextureAtlasOptions): RenderTextureAtlasResult | null;
|
|
105
108
|
declare function updatePolygonsWithStableTriangles(rendered: RenderedPoly[], polygons: Polygon[], options?: RenderTextureAtlasOptions): RenderTextureAtlasResult | null;
|
|
106
109
|
|
|
107
|
-
declare function createPolyScene(host: HTMLElement, options: PolySceneOptions): PolySceneHandle;
|
|
108
|
-
|
|
109
110
|
/**
|
|
110
111
|
* createPolyMapControls — map/pan-mode camera input for a PolyScene.
|
|
111
112
|
*
|
|
@@ -437,4 +438,4 @@ declare function createPolyTorus(options?: TorusPolygonsOptions): ParseResult;
|
|
|
437
438
|
|
|
438
439
|
declare function injectPolyBaseStyles(doc?: Document): void;
|
|
439
440
|
|
|
440
|
-
export { type PolyCameraSnapshotStats, PolyControlsBaseOptions, PolyControlsEvent, PolyControlsHandle, PolyControlsListener, type PolyFirstPersonControlsHandle, type PolyFirstPersonControlsOptions, type PolyLeafInfo, type PolyMapControlsHandle, type PolyMapControlsOptions, PolyMeshHandle, type PolyRenderLeafStrategy, type PolyRenderStats, type PolyRenderStatsOptions, type PolyRenderSurfaceLeafCounts, PolySceneHandle,
|
|
441
|
+
export { type PolyCameraSnapshotStats, PolyControlsBaseOptions, PolyControlsEvent, PolyControlsHandle, PolyControlsListener, type PolyFirstPersonControlsHandle, type PolyFirstPersonControlsOptions, type PolyLeafInfo, type PolyMapControlsHandle, type PolyMapControlsOptions, PolyMeshHandle, type PolyRenderLeafStrategy, type PolyRenderStats, type PolyRenderStatsOptions, type PolyRenderSurfaceLeafCounts, PolySceneHandle, PolySceneSnapshotError, type PolySceneSnapshotErrorCode, type PolySelectOptions, type PolySelectionHandle, type PolySnapshotRenderStats, type PolyTextureReadiness, type PolyTextureRenderStats, type PolyTransformControlsHandle, type PolyTransformControlsObjectChangeEvent, type PolyTransformControlsOptions, type RenderTextureAtlasAsyncResult, type RenderTextureAtlasOptions, type RenderTextureAtlasResult, type RenderedPoly, buildAtlasPages, collectPolyRenderStats, collectPolyTextureReadiness, createPolyBox, createPolyCone, createPolyCylinder, createPolyDodecahedron, createPolyFirstPersonControls, createPolyIcosahedron, createPolyMapControls, createPolyOctahedron, createPolyPlane, createPolyRing, createPolySphere, createPolyTetrahedron, createPolyTorus, createSelect, createTransformControls, exportPolySceneSnapshot, filterAtlasPlans, getSolidPaintDefaults, getSolidPaintDefaultsFromPlans, injectPolyBaseStyles, isBorderShapeSupported, isSolidTriangleSupported, packTextureAtlasPlansWithScale, queryPolyLeaves, renderPolygonsWithStableTriangles, renderPolygonsWithTextureAtlas, renderPolygonsWithTextureAtlasAsync, updatePolygonsWithStableTopology, updatePolygonsWithStableTriangles, updateStableTriangleFrame };
|