@galacean/engine-core 1.0.0-beta.11 → 1.0.0-beta.12
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/main.js +19 -1
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +19 -1
- package/dist/module.js +20 -2
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
- package/types/texture/Texture.d.ts +6 -0
- package/types/texture/Texture2D.d.ts +3 -1
- package/types/texture/enums/TextureUsage.d.ts +9 -0
- package/types/texture/index.d.ts +1 -0
package/dist/main.js
CHANGED
|
@@ -798,6 +798,14 @@ __decorate([
|
|
|
798
798
|
TextureFormat[TextureFormat[/** 32-bit depth + 8-bit stencil format. */ "Depth32Stencil8"] = 31] = "Depth32Stencil8";
|
|
799
799
|
})(exports.TextureFormat || (exports.TextureFormat = {}));
|
|
800
800
|
|
|
801
|
+
/**
|
|
802
|
+
* Texture usage.
|
|
803
|
+
*/ exports.TextureUsage = void 0;
|
|
804
|
+
(function(TextureUsage) {
|
|
805
|
+
TextureUsage[TextureUsage[/** The content of the texture is intended to be specified once. */ "Static"] = 0] = "Static";
|
|
806
|
+
TextureUsage[TextureUsage[/** The content of the texture is intended to be updated frequently, with better performance. */ "Dynamic"] = 1] = "Dynamic";
|
|
807
|
+
})(exports.TextureUsage || (exports.TextureUsage = {}));
|
|
808
|
+
|
|
801
809
|
/**
|
|
802
810
|
* Wrapping mode of the texture.
|
|
803
811
|
*/ exports.TextureWrapMode = void 0;
|
|
@@ -938,6 +946,14 @@ var Logger = {
|
|
|
938
946
|
return this._height;
|
|
939
947
|
}
|
|
940
948
|
},
|
|
949
|
+
{
|
|
950
|
+
key: "usage",
|
|
951
|
+
get: /**
|
|
952
|
+
* The usage of the texture.
|
|
953
|
+
*/ function get() {
|
|
954
|
+
return this._usage;
|
|
955
|
+
}
|
|
956
|
+
},
|
|
941
957
|
{
|
|
942
958
|
key: "wrapModeU",
|
|
943
959
|
get: /**
|
|
@@ -1181,14 +1197,16 @@ var Logger = {
|
|
|
1181
1197
|
* Two-dimensional texture.
|
|
1182
1198
|
*/ var Texture2D = /*#__PURE__*/ function(Texture) {
|
|
1183
1199
|
_inherits(Texture2D, Texture);
|
|
1184
|
-
function Texture2D(engine, width, height, format, mipmap) {
|
|
1200
|
+
function Texture2D(engine, width, height, format, mipmap, usage) {
|
|
1185
1201
|
if (format === void 0) format = exports.TextureFormat.R8G8B8A8;
|
|
1186
1202
|
if (mipmap === void 0) mipmap = true;
|
|
1203
|
+
if (usage === void 0) usage = exports.TextureUsage.Static;
|
|
1187
1204
|
var _this;
|
|
1188
1205
|
_this = Texture.call(this, engine) || this;
|
|
1189
1206
|
_this._mipmap = mipmap;
|
|
1190
1207
|
_this._width = width;
|
|
1191
1208
|
_this._height = height;
|
|
1209
|
+
_this._usage = usage;
|
|
1192
1210
|
_this._format = format;
|
|
1193
1211
|
_this._mipmapCount = _this._getMipmapCount();
|
|
1194
1212
|
_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;
|