@awayjs/scene 0.13.313 → 0.13.314
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 +1 -1
- package/bundle/awayjs-scene.umd.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/lib/image/SceneImage2D.d.ts +1 -1
- package/dist/lib/image/SceneImage2D.d.ts.map +1 -1
- package/dist/lib/image/SceneImage2D.js +3 -9
- package/index.ts +1 -1
- package/lib/image/SceneImage2D.ts +4 -10
- 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.314');
|
|
2
2
|
export { Timeline } from './lib/base/Timeline';
|
|
3
3
|
export { ControllerBase } from './lib/controllers/ControllerBase';
|
|
4
4
|
export { FirstPersonController } from './lib/controllers/FirstPersonController';
|
|
@@ -80,7 +80,7 @@ export declare class SceneImage2D extends BitmapImage2D {
|
|
|
80
80
|
*/
|
|
81
81
|
dispose(): void;
|
|
82
82
|
unload(): void;
|
|
83
|
-
|
|
83
|
+
copyTo(target: SceneImage2D): void;
|
|
84
84
|
/**
|
|
85
85
|
* Provides a fast routine to perform pixel manipulation between images with
|
|
86
86
|
* no stretching, rotation, or color effects. This method copies a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SceneImage2D.d.ts","sourceRoot":"","sources":["../../../lib/image/SceneImage2D.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAIzD,OAAO,EACN,cAAc,EACd,MAAM,EACN,SAAS,EACT,KAAK,EAML,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,KAAK,EACb,aAAa,EAGb,OAAO,EACP,MAAM,eAAe,CAAC;AAQvB;;GAEG;AACH,qBAAa,YAAa,SAAQ,aAAa;IAC9C,OAAc,SAAS,EAA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,SAAS,CAAC,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,iBAAiB;IAS3D,OAAO,CAAC,iBAAiB,CAAS;IAC3B,KAAK;IA0BZ;;OAEG;IACI,UAAU,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM;IAM/C;;OAEG;IACI,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM;IAM7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuEG;IAGI,IAAI,CAAC,MAAM,EAAE,aAAa,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,cAAc,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,SAAS,EAAE,SAAS,CAAC,EAAE,OAAO;IAC3I,IAAI,CAAC,MAAM,EAAE,aAAa,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,cAAc,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,SAAS,EAAE,SAAS,CAAC,EAAE,OAAO;IAkBlJ,OAAO,CAAC,MAAM,CAAC,sBAAsB;IAiBrC,OAAO,CAAC,aAAa;IAwFrB,OAAO,CAAC,cAAc;IAwJf,KAAK;IAEL,KAAK,IAAI,YAAY;CAe5B"}
|
|
@@ -201,7 +201,6 @@ var SceneImage2D = /** @class */ (function (_super) {
|
|
|
201
201
|
*/
|
|
202
202
|
SceneImage2D.prototype.dispose = function () {
|
|
203
203
|
this._clearFromDispose = true;
|
|
204
|
-
this.dropAllReferences();
|
|
205
204
|
this.unmarkToUnload();
|
|
206
205
|
this.unuseWeakRef();
|
|
207
206
|
// drop buffer, because is big
|
|
@@ -223,8 +222,8 @@ var SceneImage2D = /** @class */ (function (_super) {
|
|
|
223
222
|
}
|
|
224
223
|
_super.prototype.unload.call(this);
|
|
225
224
|
};
|
|
226
|
-
SceneImage2D.prototype.
|
|
227
|
-
|
|
225
|
+
SceneImage2D.prototype.copyTo = function (target) {
|
|
226
|
+
target.copyPixels(this, target.rect, new Point(0, 0));
|
|
228
227
|
};
|
|
229
228
|
/**
|
|
230
229
|
* Provides a fast routine to perform pixel manipulation between images with
|
|
@@ -267,7 +266,6 @@ var SceneImage2D = /** @class */ (function (_super) {
|
|
|
267
266
|
*/
|
|
268
267
|
SceneImage2D.prototype.copyPixels = function (source, sourceRect, destPoint, alphaBitmapData, alphaPoint, mergeAlpha) {
|
|
269
268
|
this._lastUsedFill = null;
|
|
270
|
-
this.dropAllReferences();
|
|
271
269
|
this.unmarkToUnload();
|
|
272
270
|
// need drop alpha from source when target is not has alpha
|
|
273
271
|
mergeAlpha = this.transparent !== source.transparent || mergeAlpha;
|
|
@@ -318,7 +316,6 @@ var SceneImage2D = /** @class */ (function (_super) {
|
|
|
318
316
|
};
|
|
319
317
|
SceneImage2D.prototype.threshold = function (source, sourceRect, destPoint, operation, threshold, color, mask, copySource) {
|
|
320
318
|
this._lastUsedFill = null;
|
|
321
|
-
this.dropAllReferences();
|
|
322
319
|
this.unmarkToUnload();
|
|
323
320
|
if (this._initalFillColor !== null)
|
|
324
321
|
this.fillRect(this._rect, this._initalFillColor);
|
|
@@ -329,13 +326,11 @@ var SceneImage2D = /** @class */ (function (_super) {
|
|
|
329
326
|
if (!Settings.USE_UNSAFE_FILTERS || !filter || !filter.filterName) {
|
|
330
327
|
return false;
|
|
331
328
|
}
|
|
332
|
-
this.dropAllReferences(false);
|
|
333
329
|
var result = this._stage.filterManager.applyFilter(source, this, sourceRect, destPoint, filter.filterName, filter);
|
|
334
330
|
this._imageDataDirty = result;
|
|
335
331
|
return result;
|
|
336
332
|
};
|
|
337
333
|
SceneImage2D.prototype.colorTransform = function (rect, colorTransform) {
|
|
338
|
-
this.dropAllReferences();
|
|
339
334
|
this.unmarkToUnload();
|
|
340
335
|
this._lastUsedFill = null;
|
|
341
336
|
this._stage.colorTransform(this, this, rect, colorTransform);
|
|
@@ -400,7 +395,6 @@ var SceneImage2D = /** @class */ (function (_super) {
|
|
|
400
395
|
};
|
|
401
396
|
SceneImage2D.prototype.draw = function (source, matrix, colorTransform, blendMode, clipRect, smoothing) {
|
|
402
397
|
/* eslint-enable */
|
|
403
|
-
this.dropAllReferences();
|
|
404
398
|
this.unmarkToUnload();
|
|
405
399
|
if (source instanceof DisplayObject) {
|
|
406
400
|
this._drawAsDisplay(source, matrix, colorTransform, blendMode, clipRect, smoothing);
|
|
@@ -603,7 +597,7 @@ var SceneImage2D = /** @class */ (function (_super) {
|
|
|
603
597
|
SceneImage2D.prototype.reset = function () { };
|
|
604
598
|
SceneImage2D.prototype.clone = function () {
|
|
605
599
|
var image = SceneImage2D.getImage(this.width, this.height, this.transparent, null, false, this._stage, false);
|
|
606
|
-
|
|
600
|
+
this.copyTo(image);
|
|
607
601
|
return image;
|
|
608
602
|
};
|
|
609
603
|
SceneImage2D.assetType = '[image SceneImage2D]';
|
package/index.ts
CHANGED
|
@@ -258,7 +258,6 @@ export class SceneImage2D extends BitmapImage2D {
|
|
|
258
258
|
public dispose(): void {
|
|
259
259
|
this._clearFromDispose = true;
|
|
260
260
|
|
|
261
|
-
this.dropAllReferences();
|
|
262
261
|
this.unmarkToUnload();
|
|
263
262
|
this.unuseWeakRef();
|
|
264
263
|
|
|
@@ -285,8 +284,8 @@ export class SceneImage2D extends BitmapImage2D {
|
|
|
285
284
|
super.unload();
|
|
286
285
|
}
|
|
287
286
|
|
|
288
|
-
|
|
289
|
-
|
|
287
|
+
public copyTo(target: SceneImage2D): void {
|
|
288
|
+
target.copyPixels(this, target.rect, new Point(0,0));
|
|
290
289
|
}
|
|
291
290
|
|
|
292
291
|
/**
|
|
@@ -333,7 +332,6 @@ export class SceneImage2D extends BitmapImage2D {
|
|
|
333
332
|
alphaBitmapData?: BitmapImage2D, alphaPoint?: Point, mergeAlpha?: boolean): void {
|
|
334
333
|
|
|
335
334
|
this._lastUsedFill = null;
|
|
336
|
-
this.dropAllReferences();
|
|
337
335
|
this.unmarkToUnload();
|
|
338
336
|
|
|
339
337
|
// need drop alpha from source when target is not has alpha
|
|
@@ -431,7 +429,6 @@ export class SceneImage2D extends BitmapImage2D {
|
|
|
431
429
|
): void {
|
|
432
430
|
|
|
433
431
|
this._lastUsedFill = null;
|
|
434
|
-
this.dropAllReferences();
|
|
435
432
|
this.unmarkToUnload();
|
|
436
433
|
|
|
437
434
|
if (this._initalFillColor !== null)
|
|
@@ -446,8 +443,6 @@ export class SceneImage2D extends BitmapImage2D {
|
|
|
446
443
|
return false;
|
|
447
444
|
}
|
|
448
445
|
|
|
449
|
-
this.dropAllReferences(false);
|
|
450
|
-
|
|
451
446
|
const result = this._stage.filterManager.applyFilter (
|
|
452
447
|
source,
|
|
453
448
|
this,
|
|
@@ -460,7 +455,6 @@ export class SceneImage2D extends BitmapImage2D {
|
|
|
460
455
|
}
|
|
461
456
|
|
|
462
457
|
public colorTransform(rect: Rectangle, colorTransform: ColorTransform): void {
|
|
463
|
-
this.dropAllReferences();
|
|
464
458
|
this.unmarkToUnload();
|
|
465
459
|
|
|
466
460
|
this._lastUsedFill = null;
|
|
@@ -622,7 +616,6 @@ export class SceneImage2D extends BitmapImage2D {
|
|
|
622
616
|
{
|
|
623
617
|
/* eslint-enable */
|
|
624
618
|
|
|
625
|
-
this.dropAllReferences();
|
|
626
619
|
this.unmarkToUnload();
|
|
627
620
|
|
|
628
621
|
if (source instanceof DisplayObject) {
|
|
@@ -906,7 +899,8 @@ export class SceneImage2D extends BitmapImage2D {
|
|
|
906
899
|
false
|
|
907
900
|
);
|
|
908
901
|
|
|
909
|
-
|
|
902
|
+
this.copyTo(image);
|
|
903
|
+
|
|
910
904
|
return image;
|
|
911
905
|
}
|
|
912
906
|
}
|