@galacean/engine 1.2.0-alpha.5 → 1.2.0-alpha.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/browser.js CHANGED
@@ -8397,15 +8397,6 @@
8397
8397
  ]);
8398
8398
  return ShaderPart;
8399
8399
  }();
8400
- /**
8401
- * Shader data grouping.
8402
- */ var ShaderDataGroup;
8403
- (function(ShaderDataGroup) {
8404
- ShaderDataGroup[ShaderDataGroup[/** Scene group. */ "Scene"] = 0] = "Scene";
8405
- ShaderDataGroup[ShaderDataGroup[/** Camera group. */ "Camera"] = 1] = "Camera";
8406
- ShaderDataGroup[ShaderDataGroup[/** Renderer group. */ "Renderer"] = 2] = "Renderer";
8407
- ShaderDataGroup[ShaderDataGroup[/** material group. */ "Material"] = 3] = "Material";
8408
- })(ShaderDataGroup || (ShaderDataGroup = {}));
8409
8400
  /**
8410
8401
  * Color Space.
8411
8402
  */ exports.ColorSpace = void 0;
@@ -8612,6 +8603,15 @@
8612
8603
  this.constUniforms = [];
8613
8604
  this.textureUniforms = [];
8614
8605
  };
8606
+ /**
8607
+ * Shader data grouping.
8608
+ */ var ShaderDataGroup;
8609
+ (function(ShaderDataGroup) {
8610
+ ShaderDataGroup[ShaderDataGroup[/** Scene group. */ "Scene"] = 0] = "Scene";
8611
+ ShaderDataGroup[ShaderDataGroup[/** Camera group. */ "Camera"] = 1] = "Camera";
8612
+ ShaderDataGroup[ShaderDataGroup[/** Renderer group. */ "Renderer"] = 2] = "Renderer";
8613
+ ShaderDataGroup[ShaderDataGroup[/** material group. */ "Material"] = 3] = "Material";
8614
+ })(ShaderDataGroup || (ShaderDataGroup = {}));
8615
8615
  /**
8616
8616
  * Shader program, corresponding to the GPU shader program.
8617
8617
  * @internal
@@ -8907,6 +8907,7 @@
8907
8907
  break;
8908
8908
  case gl.SAMPLER_2D:
8909
8909
  case gl.SAMPLER_CUBE:
8910
+ case gl.UNSIGNED_INT_SAMPLER_2D:
8910
8911
  case gl.SAMPLER_2D_ARRAY:
8911
8912
  case gl.SAMPLER_2D_SHADOW:
8912
8913
  var defaultTexture;
@@ -8917,6 +8918,9 @@
8917
8918
  case gl.SAMPLER_CUBE:
8918
8919
  defaultTexture = _this._engine._magentaTextureCube;
8919
8920
  break;
8921
+ case gl.UNSIGNED_INT_SAMPLER_2D:
8922
+ defaultTexture = _this._engine._uintMagentaTexture2D;
8923
+ break;
8920
8924
  case gl.SAMPLER_2D_ARRAY:
8921
8925
  defaultTexture = _this._engine._magentaTexture2DArray;
8922
8926
  break;
@@ -9995,6 +9999,55 @@
9995
9999
  ]);
9996
10000
  return GraphicsResource;
9997
10001
  }(ReferResource);
10002
+ /**
10003
+ * The filter mode of the texture.
10004
+ */ exports.TextureFilterMode = void 0;
10005
+ (function(TextureFilterMode) {
10006
+ TextureFilterMode[TextureFilterMode[/** Point filtering. */ "Point"] = 0] = "Point";
10007
+ TextureFilterMode[TextureFilterMode[/** Bilinear filtering. */ "Bilinear"] = 1] = "Bilinear";
10008
+ TextureFilterMode[TextureFilterMode[/** Trilinear filtering. */ "Trilinear"] = 2] = "Trilinear";
10009
+ })(exports.TextureFilterMode || (exports.TextureFilterMode = {}));
10010
+ /**
10011
+ * Texture format enumeration.
10012
+ */ exports.TextureFormat = void 0;
10013
+ (function(TextureFormat) {
10014
+ TextureFormat[TextureFormat[/** RGB format, 8 bits per channel. */ "R8G8B8"] = 0] = "R8G8B8";
10015
+ TextureFormat[TextureFormat[/** RGBA format, 8 bits per channel. */ "R8G8B8A8"] = 1] = "R8G8B8A8";
10016
+ TextureFormat[TextureFormat[/** RGBA format, 4 bits per channel. */ "R4G4B4A4"] = 2] = "R4G4B4A4";
10017
+ TextureFormat[TextureFormat[/** RGBA format, 5 bits in R channel, 5 bits in G channel, 5 bits in B channel, 1 bit in A channel. */ "R5G5B5A1"] = 3] = "R5G5B5A1";
10018
+ TextureFormat[TextureFormat[/** RGB format, 5 bits in R channel, 6 bits in G channel, 5 bits in B channel. */ "R5G6B5"] = 4] = "R5G6B5";
10019
+ TextureFormat[TextureFormat[/** Transparent format, 8 bits. */ "Alpha8"] = 5] = "Alpha8";
10020
+ TextureFormat[TextureFormat[/** Luminance/alpha in RGB channel, alpha in A channel. */ "LuminanceAlpha"] = 6] = "LuminanceAlpha";
10021
+ TextureFormat[TextureFormat[/** RGBA format, 16 bits per channel. */ "R16G16B16A16"] = 7] = "R16G16B16A16";
10022
+ TextureFormat[TextureFormat[/** RGBA format, 32 bits per channel. */ "R32G32B32A32"] = 8] = "R32G32B32A32";
10023
+ TextureFormat[TextureFormat[/** RGBA unsigned integer format, 32 bits per channel. */ "R32G32B32A32_UInt"] = 9] = "R32G32B32A32_UInt";
10024
+ TextureFormat[TextureFormat[/** RGB compressed format, 4 bits per pixel. */ "BC1"] = 10] = "BC1";
10025
+ TextureFormat[TextureFormat[/** RGBA compressed format, 8 bits per pixel. */ "BC3"] = 11] = "BC3";
10026
+ TextureFormat[TextureFormat[/** RGB(A) compressed format, 128 bits per 4x4 pixel block. */ "BC7"] = 12] = "BC7";
10027
+ TextureFormat[TextureFormat[/** RGB compressed format, 4 bits per pixel. */ "ETC1_RGB"] = 13] = "ETC1_RGB";
10028
+ TextureFormat[TextureFormat[/** RGB compressed format, 4 bits per pixel. */ "ETC2_RGB"] = 14] = "ETC2_RGB";
10029
+ TextureFormat[TextureFormat[/** RGBA compressed format, 5 bits per pixel, 4 bit in RGB, 1 bit in A. */ "ETC2_RGBA5"] = 15] = "ETC2_RGBA5";
10030
+ TextureFormat[TextureFormat[/** RGB compressed format, 8 bits per pixel. */ "ETC2_RGBA8"] = 16] = "ETC2_RGBA8";
10031
+ TextureFormat[TextureFormat[/** RGB compressed format, 2 bits per pixel. */ "PVRTC_RGB2"] = 17] = "PVRTC_RGB2";
10032
+ TextureFormat[TextureFormat[/** RGBA compressed format, 2 bits per pixel. */ "PVRTC_RGBA2"] = 18] = "PVRTC_RGBA2";
10033
+ TextureFormat[TextureFormat[/** RGB compressed format, 4 bits per pixel. */ "PVRTC_RGB4"] = 19] = "PVRTC_RGB4";
10034
+ TextureFormat[TextureFormat[/** RGBA compressed format, 4 bits per pixel. */ "PVRTC_RGBA4"] = 20] = "PVRTC_RGBA4";
10035
+ TextureFormat[TextureFormat[/** RGB(A) compressed format, 128 bits per 4x4 pixel block. */ "ASTC_4x4"] = 21] = "ASTC_4x4";
10036
+ TextureFormat[TextureFormat[/** RGB(A) compressed format, 128 bits per 5x5 pixel block. */ "ASTC_5x5"] = 22] = "ASTC_5x5";
10037
+ TextureFormat[TextureFormat[/** RGB(A) compressed format, 128 bits per 6x6 pixel block. */ "ASTC_6x6"] = 23] = "ASTC_6x6";
10038
+ TextureFormat[TextureFormat[/** RGB(A) compressed format, 128 bits per 8x8 pixel block. */ "ASTC_8x8"] = 24] = "ASTC_8x8";
10039
+ TextureFormat[TextureFormat[/** RGB(A) compressed format, 128 bits per 10x10 pixel block. */ "ASTC_10x10"] = 25] = "ASTC_10x10";
10040
+ TextureFormat[TextureFormat[/** RGB(A) compressed format, 128 bits per 12x12 pixel block. */ "ASTC_12x12"] = 26] = "ASTC_12x12";
10041
+ TextureFormat[TextureFormat[/** Automatic depth format, engine will automatically select the supported precision. */ "Depth"] = 27] = "Depth";
10042
+ TextureFormat[TextureFormat[/** Automatic depth stencil format, engine will automatically select the supported precision. */ "DepthStencil"] = 28] = "DepthStencil";
10043
+ TextureFormat[TextureFormat[/** 16-bit depth format. */ "Depth16"] = 29] = "Depth16";
10044
+ TextureFormat[TextureFormat[/** 24-bit depth format. */ "Depth24"] = 30] = "Depth24";
10045
+ TextureFormat[TextureFormat[/** 32-bit depth format. */ "Depth32"] = 31] = "Depth32";
10046
+ TextureFormat[TextureFormat[/** 16-bit depth + 8-bit stencil format. */ "Depth24Stencil8"] = 32] = "Depth24Stencil8";
10047
+ TextureFormat[TextureFormat[/** 32-bit depth + 8-bit stencil format. */ "Depth32Stencil8"] = 33] = "Depth32Stencil8";
10048
+ TextureFormat[TextureFormat[/** @deprecated Use `TextureFormat.BC1` instead. */ "DXT1"] = 34] = "DXT1";
10049
+ TextureFormat[TextureFormat[/** @deprecated Use `TextureFormat.BC3` instead. */ "DXT5"] = 35] = "DXT5";
10050
+ })(exports.TextureFormat || (exports.TextureFormat = {}));
9998
10051
  /**
9999
10052
  * The base class of texture, contains some common functions of texture-related classes.
10000
10053
  */ var Texture = /*#__PURE__*/ function(GraphicsResource1) {
@@ -10051,6 +10104,12 @@
10051
10104
  _proto._getMipmapCount = function _getMipmapCount() {
10052
10105
  return this._mipmap ? Math.floor(Math.log2(Math.max(this._width, this._height))) + 1 : 1;
10053
10106
  };
10107
+ _proto._isIntFormat = function _isIntFormat() {
10108
+ if (exports.TextureFormat.R32G32B32A32_UInt === this._format) {
10109
+ return true;
10110
+ }
10111
+ return false;
10112
+ };
10054
10113
  _create_class$2(Texture, [
10055
10114
  {
10056
10115
  key: "format",
@@ -10127,6 +10186,11 @@
10127
10186
  },
10128
10187
  set: function set(value) {
10129
10188
  if (value === this._filterMode) return;
10189
+ if (value !== exports.TextureFilterMode.Point && this._isIntFormat()) {
10190
+ value = exports.TextureFilterMode.Point;
10191
+ Logger.warn("Int or UInt format texture only support TextureFilterMode.Point");
10192
+ return;
10193
+ }
10130
10194
  this._filterMode = value;
10131
10195
  this._platformTexture.filterMode = value;
10132
10196
  }
@@ -12401,54 +12465,6 @@
12401
12465
  TextureDepthCompareFunction[TextureDepthCompareFunction[/** pass if the compare value is greater than or equal to the sample value. */ "GreaterEqual"] = 6] = "GreaterEqual";
12402
12466
  TextureDepthCompareFunction[TextureDepthCompareFunction[/** always pass. */ "Always"] = 7] = "Always";
12403
12467
  })(exports.TextureDepthCompareFunction || (exports.TextureDepthCompareFunction = {}));
12404
- /**
12405
- * The filter mode of the texture.
12406
- */ exports.TextureFilterMode = void 0;
12407
- (function(TextureFilterMode) {
12408
- TextureFilterMode[TextureFilterMode[/** Point filtering. */ "Point"] = 0] = "Point";
12409
- TextureFilterMode[TextureFilterMode[/** Bilinear filtering. */ "Bilinear"] = 1] = "Bilinear";
12410
- TextureFilterMode[TextureFilterMode[/** Trilinear filtering. */ "Trilinear"] = 2] = "Trilinear";
12411
- })(exports.TextureFilterMode || (exports.TextureFilterMode = {}));
12412
- /**
12413
- * Texture format enumeration.
12414
- */ exports.TextureFormat = void 0;
12415
- (function(TextureFormat) {
12416
- TextureFormat[TextureFormat[/** RGB format, 8 bits per channel. */ "R8G8B8"] = 0] = "R8G8B8";
12417
- TextureFormat[TextureFormat[/** RGBA format, 8 bits per channel. */ "R8G8B8A8"] = 1] = "R8G8B8A8";
12418
- TextureFormat[TextureFormat[/** RGBA format, 4 bits per channel. */ "R4G4B4A4"] = 2] = "R4G4B4A4";
12419
- TextureFormat[TextureFormat[/** RGBA format, 5 bits in R channel, 5 bits in G channel, 5 bits in B channel, 1 bit in A channel. */ "R5G5B5A1"] = 3] = "R5G5B5A1";
12420
- TextureFormat[TextureFormat[/** RGB format, 5 bits in R channel, 6 bits in G channel, 5 bits in B channel. */ "R5G6B5"] = 4] = "R5G6B5";
12421
- TextureFormat[TextureFormat[/** Transparent format, 8 bits. */ "Alpha8"] = 5] = "Alpha8";
12422
- TextureFormat[TextureFormat[/** Luminance/alpha in RGB channel, alpha in A channel. */ "LuminanceAlpha"] = 6] = "LuminanceAlpha";
12423
- TextureFormat[TextureFormat[/** RGBA format, 16 bits per channel. */ "R16G16B16A16"] = 7] = "R16G16B16A16";
12424
- TextureFormat[TextureFormat[/** RGBA format, 32 bits per channel. */ "R32G32B32A32"] = 8] = "R32G32B32A32";
12425
- TextureFormat[TextureFormat[/** RGB compressed format, 4 bits per pixel. */ "BC1"] = 9] = "BC1";
12426
- TextureFormat[TextureFormat[/** RGBA compressed format, 8 bits per pixel. */ "BC3"] = 10] = "BC3";
12427
- TextureFormat[TextureFormat[/** RGB(A) compressed format, 128 bits per 4x4 pixel block. */ "BC7"] = 11] = "BC7";
12428
- TextureFormat[TextureFormat[/** RGB compressed format, 4 bits per pixel. */ "ETC1_RGB"] = 12] = "ETC1_RGB";
12429
- TextureFormat[TextureFormat[/** RGB compressed format, 4 bits per pixel. */ "ETC2_RGB"] = 13] = "ETC2_RGB";
12430
- TextureFormat[TextureFormat[/** RGBA compressed format, 5 bits per pixel, 4 bit in RGB, 1 bit in A. */ "ETC2_RGBA5"] = 14] = "ETC2_RGBA5";
12431
- TextureFormat[TextureFormat[/** RGB compressed format, 8 bits per pixel. */ "ETC2_RGBA8"] = 15] = "ETC2_RGBA8";
12432
- TextureFormat[TextureFormat[/** RGB compressed format, 2 bits per pixel. */ "PVRTC_RGB2"] = 16] = "PVRTC_RGB2";
12433
- TextureFormat[TextureFormat[/** RGBA compressed format, 2 bits per pixel. */ "PVRTC_RGBA2"] = 17] = "PVRTC_RGBA2";
12434
- TextureFormat[TextureFormat[/** RGB compressed format, 4 bits per pixel. */ "PVRTC_RGB4"] = 18] = "PVRTC_RGB4";
12435
- TextureFormat[TextureFormat[/** RGBA compressed format, 4 bits per pixel. */ "PVRTC_RGBA4"] = 19] = "PVRTC_RGBA4";
12436
- TextureFormat[TextureFormat[/** RGB(A) compressed format, 128 bits per 4x4 pixel block. */ "ASTC_4x4"] = 20] = "ASTC_4x4";
12437
- TextureFormat[TextureFormat[/** RGB(A) compressed format, 128 bits per 5x5 pixel block. */ "ASTC_5x5"] = 21] = "ASTC_5x5";
12438
- TextureFormat[TextureFormat[/** RGB(A) compressed format, 128 bits per 6x6 pixel block. */ "ASTC_6x6"] = 22] = "ASTC_6x6";
12439
- TextureFormat[TextureFormat[/** RGB(A) compressed format, 128 bits per 8x8 pixel block. */ "ASTC_8x8"] = 23] = "ASTC_8x8";
12440
- TextureFormat[TextureFormat[/** RGB(A) compressed format, 128 bits per 10x10 pixel block. */ "ASTC_10x10"] = 24] = "ASTC_10x10";
12441
- TextureFormat[TextureFormat[/** RGB(A) compressed format, 128 bits per 12x12 pixel block. */ "ASTC_12x12"] = 25] = "ASTC_12x12";
12442
- TextureFormat[TextureFormat[/** Automatic depth format, engine will automatically select the supported precision. */ "Depth"] = 26] = "Depth";
12443
- TextureFormat[TextureFormat[/** Automatic depth stencil format, engine will automatically select the supported precision. */ "DepthStencil"] = 27] = "DepthStencil";
12444
- TextureFormat[TextureFormat[/** 16-bit depth format. */ "Depth16"] = 28] = "Depth16";
12445
- TextureFormat[TextureFormat[/** 24-bit depth format. */ "Depth24"] = 29] = "Depth24";
12446
- TextureFormat[TextureFormat[/** 32-bit depth format. */ "Depth32"] = 30] = "Depth32";
12447
- TextureFormat[TextureFormat[/** 16-bit depth + 8-bit stencil format. */ "Depth24Stencil8"] = 31] = "Depth24Stencil8";
12448
- TextureFormat[TextureFormat[/** 32-bit depth + 8-bit stencil format. */ "Depth32Stencil8"] = 32] = "Depth32Stencil8";
12449
- TextureFormat[TextureFormat[/** @deprecated Use `TextureFormat.BC1` instead. */ "DXT1"] = 33] = "DXT1";
12450
- TextureFormat[TextureFormat[/** @deprecated Use `TextureFormat.BC3` instead. */ "DXT5"] = 34] = "DXT5";
12451
- })(exports.TextureFormat || (exports.TextureFormat = {}));
12452
12468
  /**
12453
12469
  * Texture usage.
12454
12470
  */ exports.TextureUsage = void 0;
@@ -12628,7 +12644,7 @@
12628
12644
  _this._mipmapCount = _this._getMipmapCount();
12629
12645
  _this._isDepthTexture = format == exports.TextureFormat.Depth || format == exports.TextureFormat.DepthStencil || format == exports.TextureFormat.Depth16 || format == exports.TextureFormat.Depth24 || format == exports.TextureFormat.Depth32 || format == exports.TextureFormat.Depth24Stencil8 || format == exports.TextureFormat.Depth32Stencil8;
12630
12646
  _this._platformTexture = engine._hardwareRenderer.createPlatformTexture2D(_assert_this_initialized(_this));
12631
- _this.filterMode = exports.TextureFilterMode.Bilinear;
12647
+ _this.filterMode = _this._isIntFormat() ? exports.TextureFilterMode.Point : exports.TextureFilterMode.Bilinear;
12632
12648
  _this.wrapModeU = _this.wrapModeV = exports.TextureWrapMode.Repeat;
12633
12649
  return _this;
12634
12650
  };
@@ -24051,6 +24067,26 @@
24051
24067
  this._magentaTexture2D = magentaTexture2D;
24052
24068
  this._magentaTextureCube = magentaTextureCube;
24053
24069
  if (hardwareRenderer.isWebGL2) {
24070
+ var magentaPixel32 = new Uint32Array([
24071
+ 255,
24072
+ 0,
24073
+ 255,
24074
+ 255
24075
+ ]);
24076
+ var uintMagentaTexture2D = new Texture2D(this, 1, 1, exports.TextureFormat.R32G32B32A32_UInt, false);
24077
+ uintMagentaTexture2D.setPixelBuffer(magentaPixel32);
24078
+ uintMagentaTexture2D.isGCIgnored = true;
24079
+ this.resourceManager.addContentRestorer(new /*#__PURE__*/ (function(ContentRestorer) {
24080
+ var _class = function _class() {
24081
+ return ContentRestorer.call(this, uintMagentaTexture2D);
24082
+ };
24083
+ _inherits$2(_class, ContentRestorer);
24084
+ var _proto = _class.prototype;
24085
+ _proto.restoreContent = function restoreContent() {
24086
+ this.resource.setPixelBuffer(magentaPixel32);
24087
+ };
24088
+ return _class;
24089
+ }(ContentRestorer))());
24054
24090
  var magentaTexture2DArray = new Texture2DArray(this, 1, 1, 1, exports.TextureFormat.R8G8B8A8, false);
24055
24091
  magentaTexture2DArray.setPixelBuffer(0, magentaPixel);
24056
24092
  magentaTexture2DArray.isGCIgnored = true;
@@ -24065,6 +24101,7 @@
24065
24101
  };
24066
24102
  return _class;
24067
24103
  }(ContentRestorer))());
24104
+ this._uintMagentaTexture2D = uintMagentaTexture2D;
24068
24105
  this._magentaTexture2DArray = magentaTexture2DArray;
24069
24106
  }
24070
24107
  };
@@ -24296,8 +24333,8 @@
24296
24333
  set: function set(value) {
24297
24334
  if (this._width !== value) {
24298
24335
  this._width = value;
24336
+ this._onWidthChanged(value);
24299
24337
  this._sizeUpdateFlagManager.dispatch();
24300
- this._onSizeChanged(value, this._width);
24301
24338
  }
24302
24339
  }
24303
24340
  },
@@ -24311,8 +24348,8 @@
24311
24348
  set: function set(value) {
24312
24349
  if (this._height !== value) {
24313
24350
  this._height = value;
24351
+ this._onHeightChange(value);
24314
24352
  this._sizeUpdateFlagManager.dispatch();
24315
- this._onSizeChanged(this._width, value);
24316
24353
  }
24317
24354
  }
24318
24355
  }
@@ -34549,7 +34586,8 @@
34549
34586
  var transform = this._renderer.entity.transform;
34550
34587
  var shape = this.emission.shape;
34551
34588
  for(var i = 0; i < count; i++){
34552
- if (shape) {
34589
+ var _shape;
34590
+ if ((_shape = shape) == null ? void 0 : _shape.enabled) {
34553
34591
  shape._generatePositionAndDirection(this.emission._shapeRand, time, position, direction);
34554
34592
  var positionScale = this.main._getPositionScale();
34555
34593
  position.multiply(positionScale);
@@ -35126,7 +35164,7 @@
35126
35164
  * Base class for all particle shapes.
35127
35165
  */ var BaseShape = /*#__PURE__*/ function() {
35128
35166
  var BaseShape = function BaseShape() {
35129
- /** Specifies whether the ShapeModule is enabled or disabled. */ this.enable = true;
35167
+ /** Specifies whether the ShapeModule is enabled or disabled. */ this.enabled = true;
35130
35168
  /** Randomizes the starting direction of particles. */ this.randomDirectionAmount = 0;
35131
35169
  };
35132
35170
  var _proto = BaseShape.prototype;
@@ -36100,8 +36138,10 @@
36100
36138
  if (pixelRatio === void 0) pixelRatio = window.devicePixelRatio;
36101
36139
  var webCanvas = this._webCanvas;
36102
36140
  if (typeof OffscreenCanvas === "undefined" || !_instanceof1$1(webCanvas, OffscreenCanvas)) {
36103
- this.width = webCanvas.clientWidth * pixelRatio;
36104
- this.height = webCanvas.clientHeight * pixelRatio;
36141
+ var exportWidth = webCanvas.clientWidth * pixelRatio;
36142
+ var exportHeight = webCanvas.clientHeight * pixelRatio;
36143
+ this.width = exportWidth;
36144
+ this.height = exportHeight;
36105
36145
  }
36106
36146
  };
36107
36147
  /**
@@ -36112,9 +36152,11 @@
36112
36152
  this._scale.set(x, y);
36113
36153
  this.scale = this._scale;
36114
36154
  };
36115
- _proto._onSizeChanged = function _onSizeChanged(width, height) {
36116
- this._webCanvas.width = width;
36117
- this._webCanvas.height = height;
36155
+ _proto._onWidthChanged = function _onWidthChanged(value) {
36156
+ this._webCanvas.width = value;
36157
+ };
36158
+ _proto._onHeightChange = function _onHeightChange(value) {
36159
+ this._webCanvas.height = value;
36118
36160
  };
36119
36161
  _create_class$1(WebCanvas, [
36120
36162
  {
@@ -36860,6 +36902,13 @@
36860
36902
  dataType: gl.FLOAT,
36861
36903
  isCompressed: false
36862
36904
  };
36905
+ case exports.TextureFormat.R32G32B32A32_UInt:
36906
+ return {
36907
+ internalFormat: isWebGL2 ? gl.RGBA32UI : gl.NONE,
36908
+ baseFormat: gl.RGBA_INTEGER,
36909
+ dataType: gl.UNSIGNED_INT,
36910
+ isCompressed: false
36911
+ };
36863
36912
  case exports.TextureFormat.BC1:
36864
36913
  return {
36865
36914
  internalFormat: exports.GLCompressedTextureInternalFormat.RGB_S3TC_DXT1_EXT,
@@ -37101,6 +37150,7 @@
37101
37150
  return false;
37102
37151
  }
37103
37152
  break;
37153
+ case exports.TextureFormat.R32G32B32A32_UInt:
37104
37154
  case exports.TextureFormat.Depth24:
37105
37155
  case exports.TextureFormat.Depth32:
37106
37156
  case exports.TextureFormat.Depth32Stencil8:
@@ -38994,6 +39044,7 @@
38994
39044
  }
38995
39045
  };
38996
39046
  _proto._applyEntityData = function _applyEntityData(entity, entityConfig) {
39047
+ if (entityConfig === void 0) entityConfig = {};
38997
39048
  var _entityConfig_isActive;
38998
39049
  entity.isActive = (_entityConfig_isActive = entityConfig.isActive) != null ? _entityConfig_isActive : entity.isActive;
38999
39050
  var _entityConfig_name;
@@ -39006,12 +39057,18 @@
39006
39057
  };
39007
39058
  _proto._traverseAddEntityToMap = function _traverseAddEntityToMap(entity, context, path) {
39008
39059
  var entityMap = context.entityMap, components = context.components;
39060
+ var componentsMap = {};
39061
+ var componentIndexMap = {};
39009
39062
  entityMap.set(path, entity);
39010
39063
  // @ts-ignore
39011
39064
  entity._components.forEach(function(component) {
39012
39065
  // @ts-ignore
39013
39066
  var name = Loader.getClassName(component.constructor);
39014
- components.set(path + ":" + name, component);
39067
+ if (!componentsMap[name]) {
39068
+ componentsMap[name] = entity.getComponents(component.constructor, []);
39069
+ componentIndexMap[name] = 0;
39070
+ }
39071
+ components.set(path + ":" + name + "/" + componentIndexMap[name]++, component);
39015
39072
  });
39016
39073
  for(var i = 0; i < entity.children.length; i++){
39017
39074
  var child = entity.children[i];
@@ -44676,7 +44733,7 @@
44676
44733
  ], KHR_materials_anisotropy);
44677
44734
 
44678
44735
  //@ts-ignore
44679
- var version = "1.2.0-alpha.5";
44736
+ var version = "1.2.0-alpha.9";
44680
44737
  console.log("Galacean engine version: " + version);
44681
44738
  for(var key in CoreObjects){
44682
44739
  Loader.registerClass(key, CoreObjects[key]);