@awayjs/scene 0.13.234 → 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.
@@ -139,7 +139,7 @@ export class FrameScriptManager {
139
139
  * after that execute_as3_constructors_finish_scene is called for the scene-mc
140
140
  * so that we can continue with the next top-level child that has not yet been processed
141
141
  */
142
- for (let i = 0; i < mc.numChildren; i++) {
142
+ for (let i = 0, l = mc.numChildren; i < l; i++) {
143
143
  const child: DisplayObject = mc.getChildAt(i);
144
144
  if (child.parent && (<IDisplayObjectAdapter>child.adapter).executeConstructor)
145
145
  FrameScriptManager.execute_as3_constructors_recursiv(<MovieClip>child);
@@ -219,12 +219,13 @@ export class FrameScriptManager {
219
219
  constructorFunc();
220
220
  } else {
221
221
  // constructor already has run. we need to still do recursion on childs
222
- for (let i = 0; i < mc.numChildren; i++) {
222
+ for (let i = 0, l = mc.numChildren; i < l; i++) {
223
223
  const child: DisplayObject = mc.getChildAt(i);
224
224
 
225
- if (child.parent) {
226
- FrameScriptManager.execute_as3_constructors_recursiv(<MovieClip>child);
227
- }
225
+ // because we iterate over mc, it already is parent
226
+ //if (child.parent) {
227
+ FrameScriptManager.execute_as3_constructors_recursiv(<MovieClip>child);
228
+ //}
228
229
  }
229
230
  }
230
231
 
@@ -7,12 +7,13 @@ import { Stage, BitmapImage2D } from '@awayjs/stage';
7
7
  import { DefaultRenderer, RenderGroup } from '@awayjs/renderer';
8
8
 
9
9
  import { DisplayObjectContainer } from '../display/DisplayObjectContainer';
10
- import { BasicPartition, NodePool, View } from '@awayjs/view';
10
+ import { View } from '@awayjs/view';
11
11
  import { Sprite } from '../display/Sprite';
12
12
  import { Shape } from '@awayjs/graphics';
13
13
  import { FNTGeneratorBase } from './FNTGeneratrorBase';
14
14
 
15
15
  export class FNTGenerator extends FNTGeneratorBase {
16
+ private _view: View;
16
17
  private _root: DisplayObjectContainer;
17
18
  private _renderer: DefaultRenderer;
18
19
 
@@ -24,19 +25,21 @@ export class FNTGenerator extends FNTGeneratorBase {
24
25
  projection.coordinateSystem = CoordinateSystem.RIGHT_HANDED;
25
26
  projection.originX = -1;
26
27
  projection.originY = 1;
28
+ projection.transform = new Transform();
29
+ projection.transform.moveTo(0, 0, -1000);
30
+ projection.transform.lookAt(new Vector3D());
27
31
 
28
32
  //create the view
33
+ this._view = new View(projection, this._stage);
29
34
  this._root = new DisplayObjectContainer();
30
- this._renderer = RenderGroup
31
- .getInstance(new View(projection, stage, null, null, null, true), DefaultRenderer)
32
- .getRenderer(NodePool.getRootNode(this._root, BasicPartition).partition);
35
+ this._renderer = <DefaultRenderer> RenderGroup
36
+ .getInstance(DefaultRenderer)
37
+ .getRenderer(this._view.getNode(this._root).partition);
33
38
 
34
- //setup the projection
39
+ //set the view properties
35
40
  this._renderer.view.projection = projection;
36
- this._renderer.view.projection.transform = new Transform();
37
- this._renderer.view.projection.transform.moveTo(0, 0, -1000);
38
- this._renderer.view.projection.transform.lookAt(new Vector3D());
39
41
 
42
+ //set the renderer properties
40
43
  this._renderer.renderableSorter = null;//new RenderableSort2D();
41
44
  }
42
45
 
@@ -73,10 +76,10 @@ export class FNTGenerator extends FNTGeneratorBase {
73
76
 
74
77
  while (mipSize >= 1) {
75
78
 
76
- this._renderer.view.backgroundAlpha = 0;//1;
77
- this._renderer.view.backgroundColor = 0;//ColorUtils.ARGBtoFloat32(1, (mipSize/maxSize)*255, 0,0);
79
+ this._view.backgroundAlpha = 0;//1;
80
+ this._view.backgroundColor = 0;//ColorUtils.ARGBtoFloat32(1, (mipSize/maxSize)*255, 0,0);
78
81
 
79
- this._renderer.view.target = outputBitmap;
82
+ this._view.target = outputBitmap;
80
83
  this._renderer.render(true, 0, mipmapSelector);
81
84
  //this._scene.view.stage.context.configureBackBuffer(mipSize/2, mipSize/2, 0, true);
82
85
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awayjs/scene",
3
- "version": "0.13.234",
3
+ "version": "0.13.237",
4
4
  "description": "AwayJS scene classes",
5
5
  "main": "bundle/awayjs-scene.umd.js",
6
6
  "module": "dist/index.js",