@awayjs/scene 0.13.240 → 0.13.241
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/bundle/awayjs-scene.umd.js +3 -3
- package/bundle/awayjs-scene.umd.js.map +1 -1
- package/bundle/awayjs-scene.umd.min.js.map +1 -1
- package/bundle/awayjs-scene.umd.min.js.map.map +1 -1
- package/dist/index.js +1 -1
- package/dist/lib/display/DisplayObjectContainer.js +2 -2
- package/index.ts +1 -1
- package/lib/display/DisplayObjectContainer.ts +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
console.debug('AwayJS - Scene - 0.13.
|
|
1
|
+
console.debug('AwayJS - Scene - 0.13.241');
|
|
2
2
|
export { Timeline } from './lib/base/Timeline';
|
|
3
3
|
export { ControllerBase } from './lib/controllers/ControllerBase';
|
|
4
4
|
export { FirstPersonController } from './lib/controllers/FirstPersonController';
|
|
@@ -420,12 +420,12 @@ var DisplayObjectContainer = /** @class */ (function (_super) {
|
|
|
420
420
|
var original_idx = this.getChildIndex(child);
|
|
421
421
|
if (original_idx < 0)
|
|
422
422
|
throw new ArgumentError('Parameter child must be child of this object');
|
|
423
|
-
if (index > this._children.length)
|
|
423
|
+
if (index > this._children.length - 1)
|
|
424
424
|
throw new RangeError('Parameter index is out of range of the child list');
|
|
425
425
|
if (original_idx == index)
|
|
426
426
|
return;
|
|
427
427
|
this.removeChildAt(original_idx);
|
|
428
|
-
this.addChildAt(child,
|
|
428
|
+
this.addChildAt(child, index);
|
|
429
429
|
if (child._sessionID >= 0 && this._sessionID_childs) {
|
|
430
430
|
delete this._sessionID_childs[child._sessionID];
|
|
431
431
|
child._sessionID = -1;
|
package/index.ts
CHANGED
|
@@ -466,7 +466,7 @@ export class DisplayObjectContainer extends DisplayObject implements IRenderCont
|
|
|
466
466
|
if (original_idx < 0)
|
|
467
467
|
throw new ArgumentError('Parameter child must be child of this object');
|
|
468
468
|
|
|
469
|
-
if (index > this._children.length)
|
|
469
|
+
if (index > this._children.length - 1)
|
|
470
470
|
throw new RangeError('Parameter index is out of range of the child list');
|
|
471
471
|
|
|
472
472
|
if (original_idx == index)
|
|
@@ -474,7 +474,7 @@ export class DisplayObjectContainer extends DisplayObject implements IRenderCont
|
|
|
474
474
|
|
|
475
475
|
this.removeChildAt(original_idx);
|
|
476
476
|
|
|
477
|
-
this.addChildAt(child,
|
|
477
|
+
this.addChildAt(child, index);
|
|
478
478
|
|
|
479
479
|
if (child._sessionID >= 0 && (<any> this)._sessionID_childs) {
|
|
480
480
|
delete (<any> this)._sessionID_childs[child._sessionID];
|