@galacean/engine 2.0.0-alpha.13 → 2.0.0-alpha.14
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 +60 -23
- package/dist/browser.js.map +1 -1
- package/dist/browser.min.js +1 -1
- package/dist/browser.min.js.map +1 -1
- package/dist/bundled.module.js +60 -23
- package/dist/bundled.module.js.map +1 -1
- package/dist/bundled.module.min.js +1 -1
- package/dist/bundled.module.min.js.map +1 -1
- package/dist/main.js +1 -1
- package/dist/module.js +1 -1
- package/package.json +5 -5
package/dist/bundled.module.js
CHANGED
|
@@ -6729,6 +6729,14 @@ SystemInfo._initialize();
|
|
|
6729
6729
|
return this._height;
|
|
6730
6730
|
}
|
|
6731
6731
|
},
|
|
6732
|
+
{
|
|
6733
|
+
key: "colorTextures",
|
|
6734
|
+
get: /**
|
|
6735
|
+
* Render color textures.
|
|
6736
|
+
*/ function get() {
|
|
6737
|
+
return this._colorTextures;
|
|
6738
|
+
}
|
|
6739
|
+
},
|
|
6732
6740
|
{
|
|
6733
6741
|
key: "colorTextureCount",
|
|
6734
6742
|
get: /**
|
|
@@ -28931,6 +28939,7 @@ PrimitiveChunk.subMeshPool = new ReturnableObjectPool(SubMesh, 10);
|
|
|
28931
28939
|
/** AudioClip, include ogg, wav and mp3. */ AssetType["Audio"] = "Audio";
|
|
28932
28940
|
/** Project asset. */ AssetType["Project"] = "project";
|
|
28933
28941
|
/** PhysicsMaterial. */ AssetType["PhysicsMaterial"] = "PhysicsMaterial";
|
|
28942
|
+
/** RenderTarget. */ AssetType["RenderTarget"] = "RenderTarget";
|
|
28934
28943
|
return AssetType;
|
|
28935
28944
|
}({});
|
|
28936
28945
|
var SafeLoopArray = /*#__PURE__*/ function() {
|
|
@@ -44106,7 +44115,7 @@ var GLBuffer = /*#__PURE__*/ function() {
|
|
|
44106
44115
|
return {
|
|
44107
44116
|
internalFormat: isSRGBColorSpace ? gl.SRGB8 : isWebGL2 ? gl.RGB8 : gl.RGB,
|
|
44108
44117
|
baseFormat: isSRGBColorSpace ? isWebGL2 ? gl.RGB : gl.SRGB8 : gl.RGB,
|
|
44109
|
-
readFormat: gl.RGB,
|
|
44118
|
+
readFormat: isWebGL2 ? gl.RGBA : gl.RGB,
|
|
44110
44119
|
dataType: gl.UNSIGNED_BYTE,
|
|
44111
44120
|
isCompressed: false,
|
|
44112
44121
|
alignment: 1
|
|
@@ -44181,6 +44190,7 @@ var GLBuffer = /*#__PURE__*/ function() {
|
|
|
44181
44190
|
return {
|
|
44182
44191
|
internalFormat: gl.R11F_G11F_B10F,
|
|
44183
44192
|
baseFormat: gl.RGB,
|
|
44193
|
+
readFormat: gl.RGBA,
|
|
44184
44194
|
dataType: gl.FLOAT,
|
|
44185
44195
|
isCompressed: false,
|
|
44186
44196
|
alignment: 4
|
|
@@ -46231,9 +46241,7 @@ var ReflectionParser = /*#__PURE__*/ function() {
|
|
|
46231
46241
|
for(var key in item.props)_this = this, _loop(key);
|
|
46232
46242
|
}
|
|
46233
46243
|
return Promise.all(promises).then(function() {
|
|
46234
|
-
|
|
46235
|
-
if (handle) return handle(instance, item);
|
|
46236
|
-
else return instance;
|
|
46244
|
+
return instance;
|
|
46237
46245
|
});
|
|
46238
46246
|
};
|
|
46239
46247
|
_proto.parseMethod = function parseMethod(instance, methodName, methodParams) {
|
|
@@ -46336,9 +46344,6 @@ var ReflectionParser = /*#__PURE__*/ function() {
|
|
|
46336
46344
|
return Promise.resolve(entity);
|
|
46337
46345
|
}
|
|
46338
46346
|
};
|
|
46339
|
-
ReflectionParser.registerCustomParseComponent = function registerCustomParseComponent(componentType, handle) {
|
|
46340
|
-
this.customParseComponentHandles[componentType] = handle;
|
|
46341
|
-
};
|
|
46342
46347
|
ReflectionParser._isClass = function _isClass(value) {
|
|
46343
46348
|
return value["class"] !== undefined;
|
|
46344
46349
|
};
|
|
@@ -46359,7 +46364,6 @@ var ReflectionParser = /*#__PURE__*/ function() {
|
|
|
46359
46364
|
};
|
|
46360
46365
|
return ReflectionParser;
|
|
46361
46366
|
}();
|
|
46362
|
-
ReflectionParser.customParseComponentHandles = new Map();
|
|
46363
46367
|
var Texture2DDecoder = /*#__PURE__*/ function() {
|
|
46364
46368
|
function Texture2DDecoder() {}
|
|
46365
46369
|
Texture2DDecoder.decode = function decode(engine, bufferReader, restoredTexture) {
|
|
@@ -52013,6 +52017,53 @@ PhysicsMaterialLoader = __decorate([
|
|
|
52013
52017
|
"physMat"
|
|
52014
52018
|
])
|
|
52015
52019
|
], PhysicsMaterialLoader);
|
|
52020
|
+
var RenderTargetLoader = /*#__PURE__*/ function(Loader) {
|
|
52021
|
+
_inherits(RenderTargetLoader, Loader);
|
|
52022
|
+
function RenderTargetLoader() {
|
|
52023
|
+
return Loader.apply(this, arguments) || this;
|
|
52024
|
+
}
|
|
52025
|
+
var _proto = RenderTargetLoader.prototype;
|
|
52026
|
+
_proto.load = function load(item, resourceManager) {
|
|
52027
|
+
var engine = resourceManager.engine;
|
|
52028
|
+
return resourceManager // @ts-ignore
|
|
52029
|
+
._request(item.url, _extends({}, item, {
|
|
52030
|
+
type: "json"
|
|
52031
|
+
})).then(function(data) {
|
|
52032
|
+
var width = data.width, height = data.height, colorFormats = data.colorFormats, depthFormat = data.depthFormat, antiAliasing = data.antiAliasing, autoGenerateMipmaps = data.autoGenerateMipmaps;
|
|
52033
|
+
var colorTextureProps = data.colorTextures;
|
|
52034
|
+
var colorTextures = colorFormats.map(function(format, i) {
|
|
52035
|
+
var props = colorTextureProps == null ? void 0 : colorTextureProps[i];
|
|
52036
|
+
var _props_mipmap;
|
|
52037
|
+
var mipmap = (_props_mipmap = props == null ? void 0 : props.mipmap) != null ? _props_mipmap : true;
|
|
52038
|
+
var _props_isSRGBColorSpace;
|
|
52039
|
+
var isSRGB = (_props_isSRGBColorSpace = props == null ? void 0 : props.isSRGBColorSpace) != null ? _props_isSRGBColorSpace : format === TextureFormat.R8G8B8A8;
|
|
52040
|
+
var texture = new Texture2D(engine, width, height, format, mipmap, isSRGB);
|
|
52041
|
+
if (props) {
|
|
52042
|
+
if (props.filterMode != null) texture.filterMode = props.filterMode;
|
|
52043
|
+
if (props.wrapModeU != null) texture.wrapModeU = props.wrapModeU;
|
|
52044
|
+
if (props.wrapModeV != null) texture.wrapModeV = props.wrapModeV;
|
|
52045
|
+
if (props.anisoLevel != null) texture.anisoLevel = props.anisoLevel;
|
|
52046
|
+
}
|
|
52047
|
+
return texture;
|
|
52048
|
+
});
|
|
52049
|
+
var depth = depthFormat === -1 ? null : depthFormat;
|
|
52050
|
+
var rt = new RenderTarget(engine, width, height, colorTextures, depth, antiAliasing);
|
|
52051
|
+
if (autoGenerateMipmaps != null) rt.autoGenerateMipmaps = autoGenerateMipmaps;
|
|
52052
|
+
// Notify pending sub-asset requests for colorTextures
|
|
52053
|
+
for(var i = 0, n = colorTextures.length; i < n; i++){
|
|
52054
|
+
// @ts-ignore
|
|
52055
|
+
resourceManager._onSubAssetSuccess(item.url, "colorTextures[" + i + "]", colorTextures[i]);
|
|
52056
|
+
}
|
|
52057
|
+
return rt;
|
|
52058
|
+
});
|
|
52059
|
+
};
|
|
52060
|
+
return RenderTargetLoader;
|
|
52061
|
+
}(Loader);
|
|
52062
|
+
RenderTargetLoader = __decorate([
|
|
52063
|
+
resourceLoader(AssetType.RenderTarget, [
|
|
52064
|
+
"renderTarget"
|
|
52065
|
+
])
|
|
52066
|
+
], RenderTargetLoader);
|
|
52016
52067
|
var SceneLoader = /*#__PURE__*/ function(Loader) {
|
|
52017
52068
|
_inherits(SceneLoader, Loader);
|
|
52018
52069
|
function SceneLoader() {
|
|
@@ -52153,20 +52204,6 @@ SceneLoader = __decorate([
|
|
|
52153
52204
|
"scene"
|
|
52154
52205
|
], true)
|
|
52155
52206
|
], SceneLoader);
|
|
52156
|
-
ReflectionParser.registerCustomParseComponent("TextRenderer", /*#__PURE__*/ _async_to_generator(function(instance, item) {
|
|
52157
|
-
var props;
|
|
52158
|
-
return __generator(this, function(_state) {
|
|
52159
|
-
props = item.props;
|
|
52160
|
-
if (!props.font) {
|
|
52161
|
-
// @ts-ignore
|
|
52162
|
-
instance.font = Font.createFromOS(instance.engine, props.fontFamily || "Arial");
|
|
52163
|
-
}
|
|
52164
|
-
return [
|
|
52165
|
-
2,
|
|
52166
|
-
instance
|
|
52167
|
-
];
|
|
52168
|
-
});
|
|
52169
|
-
}));
|
|
52170
52207
|
var KHR_lights_punctual = /*#__PURE__*/ function(GLTFExtensionParser) {
|
|
52171
52208
|
_inherits(KHR_lights_punctual, GLTFExtensionParser);
|
|
52172
52209
|
function KHR_lights_punctual() {
|
|
@@ -52661,7 +52698,7 @@ EXT_texture_webp = __decorate([
|
|
|
52661
52698
|
], EXT_texture_webp);
|
|
52662
52699
|
|
|
52663
52700
|
//@ts-ignore
|
|
52664
|
-
var version = "2.0.0-alpha.
|
|
52701
|
+
var version = "2.0.0-alpha.14";
|
|
52665
52702
|
console.log("Galacean Engine Version: " + version);
|
|
52666
52703
|
for(var key in CoreObjects){
|
|
52667
52704
|
Loader.registerClass(key, CoreObjects[key]);
|