@sepveneto/dao 0.1.8 → 0.1.9
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/dao.cjs +1 -1
- package/dist/dao.cjs.map +1 -1
- package/dist/dao.js +24 -4
- package/dist/dao.js.map +1 -1
- package/dist/renderer/RenderPipe.d.ts +6 -0
- package/dist/renderer/texture/TextureSource.d.ts +1 -0
- package/dist/scene/graphics/GraphicsPipe.d.ts +3 -1
- package/dist/scene/sprite/SpritePipe.d.ts +6 -1
- package/dist/scene/text/TextPipe.d.ts +2 -1
- package/package.json +1 -1
package/dist/dao.js
CHANGED
|
@@ -952,13 +952,30 @@ var _SpritePipe, SpritePipe = class {
|
|
|
952
952
|
this._renderer = n;
|
|
953
953
|
}
|
|
954
954
|
addRenderable(n, j) {
|
|
955
|
-
this.
|
|
955
|
+
let M = this._getRuntimeSprite(n);
|
|
956
|
+
n.didViewUpdate && this._updateBatchableSprite(n, M), this._renderer.renderPipes.batch.addToBatch(M, j);
|
|
957
|
+
}
|
|
958
|
+
_updateBatchableSprite(n, j) {
|
|
959
|
+
j.texture = n._texture, j.bounds = n.bounds;
|
|
960
|
+
}
|
|
961
|
+
validateRenderable(n) {
|
|
962
|
+
return this._getRuntimeSprite(n).texture._source.uid !== n._texture._source.uid;
|
|
963
|
+
}
|
|
964
|
+
_getRuntimeSprite(n) {
|
|
965
|
+
return n._runtimeData[this._renderer.uid] || this._initCacheSprite(n);
|
|
966
|
+
}
|
|
967
|
+
_initCacheSprite(n) {
|
|
968
|
+
let j = {
|
|
956
969
|
renderable: n,
|
|
957
970
|
texture: n.texture,
|
|
958
971
|
transform: n.relativeGroupTransform,
|
|
959
972
|
bounds: n.bounds,
|
|
960
|
-
roundPixels: this._renderer._roundPixels | n._roundPixels
|
|
961
|
-
|
|
973
|
+
roundPixels: this._renderer._roundPixels | n._roundPixels,
|
|
974
|
+
destroy: function() {
|
|
975
|
+
this.renderable = null, this.texture = null, this.transform = null, this.bounds = null;
|
|
976
|
+
}
|
|
977
|
+
};
|
|
978
|
+
return n._runtimeData[this._renderer.uid] = j, j;
|
|
962
979
|
}
|
|
963
980
|
destroy() {
|
|
964
981
|
this._renderer = null;
|
|
@@ -1411,6 +1428,9 @@ var Graphics = class extends ViewContainer {
|
|
|
1411
1428
|
addRenderable(n, j) {
|
|
1412
1429
|
this._renderer.renderPipes.batch.break(j), j.add(n);
|
|
1413
1430
|
}
|
|
1431
|
+
validateRenderable(n) {
|
|
1432
|
+
return !1;
|
|
1433
|
+
}
|
|
1414
1434
|
execute(n) {
|
|
1415
1435
|
let j = this._renderer, M = j.canvasContext, N = M.activeConext, P = j.roundPixels, F = (n.groupColorAlpha >>> 24 & 255) / 255;
|
|
1416
1436
|
if (!(F <= 0)) {
|
|
@@ -1800,7 +1820,7 @@ function drawLetterSpacing(n, j, M, N, P, F = !1, I = 0) {
|
|
|
1800
1820
|
}
|
|
1801
1821
|
var _TextureSource, TextureSource = class n extends eventemitter3_default {
|
|
1802
1822
|
constructor(j) {
|
|
1803
|
-
super(), this._resolution = 1, this.pixelWidth = 1, this.pixelHeight = 1, this.width = 1, this.height = 1;
|
|
1823
|
+
super(), this.uid = uid("textureSource"), this._resolution = 1, this.pixelWidth = 1, this.pixelHeight = 1, this.width = 1, this.height = 1;
|
|
1804
1824
|
let M = {
|
|
1805
1825
|
...n.defaultOptions,
|
|
1806
1826
|
...j
|