@layoutit/polycss 0.2.9 → 0.2.11
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 +15 -11
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -21,6 +21,9 @@ npm install @layoutit/polycss-react
|
|
|
21
21
|
# Vue
|
|
22
22
|
npm install @layoutit/polycss-vue
|
|
23
23
|
|
|
24
|
+
# Morph
|
|
25
|
+
npm install @layoutit/polycss-morph
|
|
26
|
+
|
|
24
27
|
```
|
|
25
28
|
|
|
26
29
|
You can also load PolyCSS directly from a CDN. Here is a minimal custom-element scene:
|
|
@@ -153,14 +156,12 @@ const html = await exportPolySceneSnapshot(scene.host);
|
|
|
153
156
|
|
|
154
157
|
If any referenced asset cannot be inlined, the function throws `PolySceneSnapshotError` with `code: "ASSET_INLINE_FAILED"`.
|
|
155
158
|
|
|
156
|
-
###
|
|
159
|
+
### PolyCSS Morph
|
|
157
160
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
one retained PolyCSS DOM graph. Version `0.0.1` is qualified for publication;
|
|
161
|
-
this documentation does not announce npm registry availability.
|
|
161
|
+
Use `@layoutit/polycss-morph` for models built ahead of time and updated through
|
|
162
|
+
a stable PolyCSS DOM graph.
|
|
162
163
|
|
|
163
|
-
Preparation
|
|
164
|
+
Preparation runs in Node:
|
|
164
165
|
|
|
165
166
|
```ts
|
|
166
167
|
import { preparePolyMorphModel } from "@layoutit/polycss-morph/prepare";
|
|
@@ -201,13 +202,16 @@ updates do not rebuild topology or redraw prepared image resources.
|
|
|
201
202
|
Prepared playback uses a two-phase sample: apply `sample.update`, then call
|
|
202
203
|
`runtime.commit(sample)` only after the retained mount accepts the update.
|
|
203
204
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
205
|
+
Morph chooses the triangle paint path once when it mounts. It uses
|
|
206
|
+
`corner-shape` where available, a larger CSS border triangle in Firefox, and
|
|
207
|
+
prepared alpha-atlas pages in WebKit/Safari. Every polygon receives a slice
|
|
208
|
+
sized to its local-2D bounding rect. Mount creates object URLs from the
|
|
208
209
|
already-verified package bytes, selects the fallback once, and revokes those
|
|
209
210
|
URLs at teardown; it never refetches, generates, or redraws the atlas.
|
|
210
211
|
|
|
212
|
+
See the [PolyCSS Morph guide](https://polycss.com/guides/morph/), including the
|
|
213
|
+
interactive cube-to-sphere example.
|
|
214
|
+
|
|
211
215
|
### Polygon Data Model
|
|
212
216
|
|
|
213
217
|
Each polygon describes one renderable face:
|
|
@@ -288,7 +292,7 @@ Each visible polygon is emitted as one leaf element; the renderer chooses the le
|
|
|
288
292
|
| `@layoutit/polycss` | Vanilla custom elements and imperative `createPolyScene` API. |
|
|
289
293
|
| `@layoutit/polycss-react` | React components, hooks, controls, and core re-exports. |
|
|
290
294
|
| `@layoutit/polycss-vue` | Vue 3 components, composables, controls, and core re-exports. |
|
|
291
|
-
| `@layoutit/polycss-morph` | Prepared
|
|
295
|
+
| `@layoutit/polycss-morph` | Prepared-model loading, retained DOM animation, morph targets, skinning, and playback. |
|
|
292
296
|
|
|
293
297
|
## Made with PolyCSS
|
|
294
298
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@layoutit/polycss",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.11",
|
|
4
4
|
"description": "PolyCSS vanilla / custom-elements + imperative API. Renders OBJ / STL / glTF / GLB mesh polygons as DOM via CSS matrix3d.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"access": "public"
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@layoutit/polycss-core": "^0.2.
|
|
65
|
+
"@layoutit/polycss-core": "^0.2.11"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"tsup": "^8.0.1",
|