@swf2es/render 0.1.34 → 0.1.36
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/commands.d.ts +11 -2
- package/dist/commands.d.ts.map +1 -1
- package/dist/commands.js +36 -6
- package/dist/commands.js.map +1 -1
- package/dist/geometry.d.ts +62 -5
- package/dist/geometry.d.ts.map +1 -1
- package/dist/geometry.js +100 -17
- package/dist/geometry.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/measure.d.ts.map +1 -1
- package/dist/measure.js +118 -61
- package/dist/measure.js.map +1 -1
- package/dist/plan.js +4 -4
- package/dist/plan.js.map +1 -1
- package/dist/rows.d.ts +4 -0
- package/dist/rows.d.ts.map +1 -1
- package/dist/rows.js +59 -10
- package/dist/rows.js.map +1 -1
- package/dist/scene.d.ts.map +1 -1
- package/dist/scene.js +37 -5
- package/dist/scene.js.map +1 -1
- package/dist/webgl/atlas.d.ts +89 -16
- package/dist/webgl/atlas.d.ts.map +1 -1
- package/dist/webgl/atlas.js +285 -109
- package/dist/webgl/atlas.js.map +1 -1
- package/dist/webgl/backend.d.ts +5 -3
- package/dist/webgl/backend.d.ts.map +1 -1
- package/dist/webgl/backend.js +9 -9
- package/dist/webgl/backend.js.map +1 -1
- package/dist/webgl/draws.js +1 -1
- package/dist/webgl/draws.js.map +1 -1
- package/package.json +2 -2
- package/src/commands.ts +48 -6
- package/src/geometry.ts +109 -19
- package/src/index.ts +1 -0
- package/src/measure.ts +132 -68
- package/src/plan.ts +4 -4
- package/src/rows.ts +62 -19
- package/src/scene.ts +41 -5
- package/src/webgl/atlas.ts +334 -118
- package/src/webgl/backend.ts +9 -9
- package/src/webgl/draws.ts +1 -1
package/src/webgl/backend.ts
CHANGED
|
@@ -221,26 +221,26 @@ export class WebGLBackend {
|
|
|
221
221
|
}
|
|
222
222
|
|
|
223
223
|
/**
|
|
224
|
-
* The context came back after it was lost: everything made again
|
|
225
|
-
*
|
|
226
|
-
*
|
|
224
|
+
* The context came back after it was lost: everything made again. The
|
|
225
|
+
* geometries whose arrays the registry let go of are lost with it, which
|
|
226
|
+
* their owners add again as they draw them, and those it keeps are copied
|
|
227
|
+
* in again by the next frame (Geometries.lost). The textures were lost
|
|
228
|
+
* too, which their owners add again (Textures.lost). Lost again
|
|
227
229
|
* meanwhile, it stays stale, for the next restore.
|
|
228
230
|
*/
|
|
229
231
|
restore(geometries: Geometries): void {
|
|
230
232
|
this.losses.clear();
|
|
231
233
|
this.made = this.ready = false;
|
|
232
|
-
geometries.
|
|
233
|
-
geometries
|
|
234
|
-
|
|
235
|
-
|
|
234
|
+
geometries.lost();
|
|
235
|
+
// Lost again already: the atlas keeps the places and settling geometries of the context
|
|
236
|
+
// before, naming ids Geometries.lost removed, till the next restore makes it anew (setUp).
|
|
237
|
+
// Nothing reads them meanwhile, as no frame is drawn or planned while the context is lost.
|
|
236
238
|
if (this.gl.isContextLost()) {
|
|
237
239
|
return;
|
|
238
240
|
}
|
|
239
241
|
|
|
240
242
|
try {
|
|
241
243
|
this.setUp();
|
|
242
|
-
this.atlas.repack(geometries);
|
|
243
|
-
this.atlas.repackGlyphs(geometries);
|
|
244
244
|
this.made = this.ready = true;
|
|
245
245
|
} catch (e) {
|
|
246
246
|
this.gaveUp(e);
|
package/src/webgl/draws.ts
CHANGED