@layoutit/polycss 0.2.5 → 0.2.6
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/{PolyShapeElements-CoKhApyN.d.cts → PolyShapeElements-YDkJX2Fz.d.cts} +13 -1
- package/dist/{PolyShapeElements-CoKhApyN.d.ts → PolyShapeElements-YDkJX2Fz.d.ts} +13 -1
- package/dist/elements.cjs +4 -4
- package/dist/elements.d.cts +1 -1
- package/dist/elements.d.ts +1 -1
- package/dist/elements.js +4 -4
- package/dist/index.cjs +22 -22
- package/dist/index.d.cts +85 -6
- package/dist/index.d.ts +85 -6
- package/dist/index.js +22 -22
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CameraHandle, Vec3, Polygon, MeshResolution, ParseResult, PolyDirectionalLight, PolyAmbientLight, PolyTextureLightingMode, TextureQuality, PolySeamBleed, PolyRenderStrategiesOption } from '@layoutit/polycss-core';
|
|
1
|
+
import { CameraHandle, Vec3, Polygon, MeshResolution, ParseResult, PolyDirectionalLight, PolyAmbientLight, PolyTextureLightingMode, TextureQuality, PolyTextureLeafSizing, PolyTextureImageRendering, PolyTextureBackend, PolyTextureProjection, PolySeamBleed, PolyRenderStrategiesOption } from '@layoutit/polycss-core';
|
|
2
2
|
|
|
3
3
|
interface PolyCameraOptions {
|
|
4
4
|
zoom?: number;
|
|
@@ -69,6 +69,14 @@ interface PolySceneOptions {
|
|
|
69
69
|
* desktop/mobile sprite sizing. Numeric values 0.1..1 force an explicit
|
|
70
70
|
* raster scale and the 64px sprite. */
|
|
71
71
|
textureQuality?: TextureQuality;
|
|
72
|
+
/** Texture leaf primitive sizing. Defaults to "canonical". */
|
|
73
|
+
textureLeafSizing?: PolyTextureLeafSizing;
|
|
74
|
+
/** Default image filtering for atlas and direct image texture leaves. */
|
|
75
|
+
textureImageRendering?: PolyTextureImageRendering;
|
|
76
|
+
/** Default texture backend request. Defaults to "auto". */
|
|
77
|
+
textureBackend?: PolyTextureBackend;
|
|
78
|
+
/** Default texture projection request. Defaults to "affine". */
|
|
79
|
+
textureProjection?: PolyTextureProjection;
|
|
72
80
|
/** Solid seam overscan. `"auto"` computes a fitted per-edge amount from the polygon plan. */
|
|
73
81
|
seamBleed?: PolySeamBleed;
|
|
74
82
|
/**
|
|
@@ -229,6 +237,8 @@ interface PolyMeshHandle {
|
|
|
229
237
|
* pointer release (or any point where you want to commit the new shading).
|
|
230
238
|
*/
|
|
231
239
|
rebakeAtlas(): void;
|
|
240
|
+
/** Resolves when this mesh's current texture generation has usable backgrounds. */
|
|
241
|
+
whenTexturesReady(): Promise<void>;
|
|
232
242
|
/** Current `position` from the transform (matches framework API). */
|
|
233
243
|
getPosition(): Vec3 | undefined;
|
|
234
244
|
/** Current `rotation` from the transform (matches framework API). */
|
|
@@ -284,6 +294,8 @@ interface PolySceneHandle {
|
|
|
284
294
|
/** Snapshot of mesh handles currently in the scene (insertion order).
|
|
285
295
|
* Used by selection helpers to enumerate hit-test candidates. */
|
|
286
296
|
meshes(): readonly PolyMeshHandle[];
|
|
297
|
+
/** Resolves when every mesh currently in the scene has usable texture backgrounds. */
|
|
298
|
+
whenTexturesReady(): Promise<void>;
|
|
287
299
|
/** Resolve a `.polycss-mesh` element back to its handle, or `null` if
|
|
288
300
|
* the element doesn't belong to this scene. */
|
|
289
301
|
findMeshByElement(element: Element | null): PolyMeshHandle | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CameraHandle, Vec3, Polygon, MeshResolution, ParseResult, PolyDirectionalLight, PolyAmbientLight, PolyTextureLightingMode, TextureQuality, PolySeamBleed, PolyRenderStrategiesOption } from '@layoutit/polycss-core';
|
|
1
|
+
import { CameraHandle, Vec3, Polygon, MeshResolution, ParseResult, PolyDirectionalLight, PolyAmbientLight, PolyTextureLightingMode, TextureQuality, PolyTextureLeafSizing, PolyTextureImageRendering, PolyTextureBackend, PolyTextureProjection, PolySeamBleed, PolyRenderStrategiesOption } from '@layoutit/polycss-core';
|
|
2
2
|
|
|
3
3
|
interface PolyCameraOptions {
|
|
4
4
|
zoom?: number;
|
|
@@ -69,6 +69,14 @@ interface PolySceneOptions {
|
|
|
69
69
|
* desktop/mobile sprite sizing. Numeric values 0.1..1 force an explicit
|
|
70
70
|
* raster scale and the 64px sprite. */
|
|
71
71
|
textureQuality?: TextureQuality;
|
|
72
|
+
/** Texture leaf primitive sizing. Defaults to "canonical". */
|
|
73
|
+
textureLeafSizing?: PolyTextureLeafSizing;
|
|
74
|
+
/** Default image filtering for atlas and direct image texture leaves. */
|
|
75
|
+
textureImageRendering?: PolyTextureImageRendering;
|
|
76
|
+
/** Default texture backend request. Defaults to "auto". */
|
|
77
|
+
textureBackend?: PolyTextureBackend;
|
|
78
|
+
/** Default texture projection request. Defaults to "affine". */
|
|
79
|
+
textureProjection?: PolyTextureProjection;
|
|
72
80
|
/** Solid seam overscan. `"auto"` computes a fitted per-edge amount from the polygon plan. */
|
|
73
81
|
seamBleed?: PolySeamBleed;
|
|
74
82
|
/**
|
|
@@ -229,6 +237,8 @@ interface PolyMeshHandle {
|
|
|
229
237
|
* pointer release (or any point where you want to commit the new shading).
|
|
230
238
|
*/
|
|
231
239
|
rebakeAtlas(): void;
|
|
240
|
+
/** Resolves when this mesh's current texture generation has usable backgrounds. */
|
|
241
|
+
whenTexturesReady(): Promise<void>;
|
|
232
242
|
/** Current `position` from the transform (matches framework API). */
|
|
233
243
|
getPosition(): Vec3 | undefined;
|
|
234
244
|
/** Current `rotation` from the transform (matches framework API). */
|
|
@@ -284,6 +294,8 @@ interface PolySceneHandle {
|
|
|
284
294
|
/** Snapshot of mesh handles currently in the scene (insertion order).
|
|
285
295
|
* Used by selection helpers to enumerate hit-test candidates. */
|
|
286
296
|
meshes(): readonly PolyMeshHandle[];
|
|
297
|
+
/** Resolves when every mesh currently in the scene has usable texture backgrounds. */
|
|
298
|
+
whenTexturesReady(): Promise<void>;
|
|
287
299
|
/** Resolve a `.polycss-mesh` element back to its handle, or `null` if
|
|
288
300
|
* the element doesn't belong to this scene. */
|
|
289
301
|
findMeshByElement(element: Element | null): PolyMeshHandle | null;
|