@awayjs/scene 0.13.236 → 0.13.237

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.
@@ -6654,7 +6654,7 @@ var FrameScriptManager = /** @class */ (function () {
6654
6654
  * after that execute_as3_constructors_finish_scene is called for the scene-mc
6655
6655
  * so that we can continue with the next top-level child that has not yet been processed
6656
6656
  */
6657
- for (var i = 0; i < mc.numChildren; i++) {
6657
+ for (var i = 0, l = mc.numChildren; i < l; i++) {
6658
6658
  var child = mc.getChildAt(i);
6659
6659
  if (child.parent && child.adapter.executeConstructor)
6660
6660
  FrameScriptManager.execute_as3_constructors_recursiv(child);
@@ -6732,11 +6732,12 @@ var FrameScriptManager = /** @class */ (function () {
6732
6732
  }
6733
6733
  else {
6734
6734
  // constructor already has run. we need to still do recursion on childs
6735
- for (var i = 0; i < mc.numChildren; i++) {
6735
+ for (var i = 0, l = mc.numChildren; i < l; i++) {
6736
6736
  var child = mc.getChildAt(i);
6737
- if (child.parent) {
6738
- FrameScriptManager.execute_as3_constructors_recursiv(child);
6739
- }
6737
+ // because we iterate over mc, it already is parent
6738
+ //if (child.parent) {
6739
+ FrameScriptManager.execute_as3_constructors_recursiv(child);
6740
+ //}
6740
6741
  }
6741
6742
  }
6742
6743
  // if mc was created by timeline, instanceID != ""
@@ -15061,20 +15062,22 @@ var SceneImage2D = /** @class */ (function (_super) {
15061
15062
  !internal); // and not internal
15062
15063
  // target image for rendering.
15063
15064
  var target = this;
15065
+ // we should run compositor when blendMode !== LAYER (default)
15066
+ // or when we use MSAA + fill is not flat.
15067
+ var useBlend = blendMode !== _awayjs_stage.BlendMode.LAYER || this._lastUsedFill === null;
15068
+ var useTemp = useBlend || nativeMSAA;
15064
15069
  // lazy filling
15065
15070
  // we require fill image with initial color, because we not doing this immediate
15066
- if (!nativeMSAA && this._initalFillColor !== null) {
15071
+ // and when blend is required, because we should blend with vald color
15072
+ if ((!nativeMSAA || useBlend) && this._initalFillColor !== null) {
15067
15073
  this.fillRect(this._rect, this._initalFillColor);
15068
15074
  this._initalFillColor = null;
15069
15075
  }
15070
- // we should run compositor when blendMode !== LAYER (default)
15071
- // or when we use MSAA + fill is not flat.
15072
- var useBlend = blendMode !== _awayjs_stage.BlendMode.LAYER || this._lastUsedFill === null;
15073
- var useTemp = useBlend || nativeMSAA;
15074
15076
  if (useTemp) {
15075
15077
  target = SceneImage2D.getTemp(this.width, this.height, this._stage, nativeMSAA);
15076
15078
  // because target image is stupid filled - it not require merging
15077
- if (this._lastUsedFill !== null) {
15079
+ // BUT when blend is required - we shpuld skip color clear and use empty TMP
15080
+ if (!useBlend && this._lastUsedFill !== null) {
15078
15081
  // bitmap was filled plain, go clear TMP to this color too
15079
15082
  renderer.disableClear = false;
15080
15083
  renderer.view.backgroundColor = this._lastUsedFill;
@@ -18372,7 +18375,7 @@ var Scene = /** @class */ (function () {
18372
18375
  _awayjs_graphics.MaterialManager.materialClass = _awayjs_materials.MethodMaterial;
18373
18376
  _awayjs_graphics.MaterialManager.textureClass = _awayjs_renderer.ImageTexture2D;
18374
18377
 
18375
- console.debug('AwayJS - Scene - 0.13.236');
18378
+ console.debug('AwayJS - Scene - 0.13.237');
18376
18379
 
18377
18380
  exports.Timeline = Timeline;
18378
18381
  exports.ControllerBase = ControllerBase;