@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/browser.js
CHANGED
|
@@ -6735,6 +6735,14 @@
|
|
|
6735
6735
|
return this._height;
|
|
6736
6736
|
}
|
|
6737
6737
|
},
|
|
6738
|
+
{
|
|
6739
|
+
key: "colorTextures",
|
|
6740
|
+
get: /**
|
|
6741
|
+
* Render color textures.
|
|
6742
|
+
*/ function get() {
|
|
6743
|
+
return this._colorTextures;
|
|
6744
|
+
}
|
|
6745
|
+
},
|
|
6738
6746
|
{
|
|
6739
6747
|
key: "colorTextureCount",
|
|
6740
6748
|
get: /**
|
|
@@ -28937,6 +28945,7 @@
|
|
|
28937
28945
|
/** AudioClip, include ogg, wav and mp3. */ AssetType["Audio"] = "Audio";
|
|
28938
28946
|
/** Project asset. */ AssetType["Project"] = "project";
|
|
28939
28947
|
/** PhysicsMaterial. */ AssetType["PhysicsMaterial"] = "PhysicsMaterial";
|
|
28948
|
+
/** RenderTarget. */ AssetType["RenderTarget"] = "RenderTarget";
|
|
28940
28949
|
return AssetType;
|
|
28941
28950
|
}({});
|
|
28942
28951
|
var SafeLoopArray = /*#__PURE__*/ function() {
|
|
@@ -44112,7 +44121,7 @@
|
|
|
44112
44121
|
return {
|
|
44113
44122
|
internalFormat: isSRGBColorSpace ? gl.SRGB8 : isWebGL2 ? gl.RGB8 : gl.RGB,
|
|
44114
44123
|
baseFormat: isSRGBColorSpace ? isWebGL2 ? gl.RGB : gl.SRGB8 : gl.RGB,
|
|
44115
|
-
readFormat: gl.RGB,
|
|
44124
|
+
readFormat: isWebGL2 ? gl.RGBA : gl.RGB,
|
|
44116
44125
|
dataType: gl.UNSIGNED_BYTE,
|
|
44117
44126
|
isCompressed: false,
|
|
44118
44127
|
alignment: 1
|
|
@@ -44187,6 +44196,7 @@
|
|
|
44187
44196
|
return {
|
|
44188
44197
|
internalFormat: gl.R11F_G11F_B10F,
|
|
44189
44198
|
baseFormat: gl.RGB,
|
|
44199
|
+
readFormat: gl.RGBA,
|
|
44190
44200
|
dataType: gl.FLOAT,
|
|
44191
44201
|
isCompressed: false,
|
|
44192
44202
|
alignment: 4
|
|
@@ -46237,9 +46247,7 @@
|
|
|
46237
46247
|
for(var key in item.props)_this = this, _loop(key);
|
|
46238
46248
|
}
|
|
46239
46249
|
return Promise.all(promises).then(function() {
|
|
46240
|
-
|
|
46241
|
-
if (handle) return handle(instance, item);
|
|
46242
|
-
else return instance;
|
|
46250
|
+
return instance;
|
|
46243
46251
|
});
|
|
46244
46252
|
};
|
|
46245
46253
|
_proto.parseMethod = function parseMethod(instance, methodName, methodParams) {
|
|
@@ -46342,9 +46350,6 @@
|
|
|
46342
46350
|
return Promise.resolve(entity);
|
|
46343
46351
|
}
|
|
46344
46352
|
};
|
|
46345
|
-
ReflectionParser.registerCustomParseComponent = function registerCustomParseComponent(componentType, handle) {
|
|
46346
|
-
this.customParseComponentHandles[componentType] = handle;
|
|
46347
|
-
};
|
|
46348
46353
|
ReflectionParser._isClass = function _isClass(value) {
|
|
46349
46354
|
return value["class"] !== undefined;
|
|
46350
46355
|
};
|
|
@@ -46365,7 +46370,6 @@
|
|
|
46365
46370
|
};
|
|
46366
46371
|
return ReflectionParser;
|
|
46367
46372
|
}();
|
|
46368
|
-
ReflectionParser.customParseComponentHandles = new Map();
|
|
46369
46373
|
exports.Texture2DDecoder = /*#__PURE__*/ function() {
|
|
46370
46374
|
function Texture2DDecoder() {}
|
|
46371
46375
|
Texture2DDecoder.decode = function decode(engine, bufferReader, restoredTexture) {
|
|
@@ -52019,6 +52023,53 @@
|
|
|
52019
52023
|
"physMat"
|
|
52020
52024
|
])
|
|
52021
52025
|
], PhysicsMaterialLoader);
|
|
52026
|
+
var RenderTargetLoader = /*#__PURE__*/ function(Loader) {
|
|
52027
|
+
_inherits(RenderTargetLoader, Loader);
|
|
52028
|
+
function RenderTargetLoader() {
|
|
52029
|
+
return Loader.apply(this, arguments) || this;
|
|
52030
|
+
}
|
|
52031
|
+
var _proto = RenderTargetLoader.prototype;
|
|
52032
|
+
_proto.load = function load(item, resourceManager) {
|
|
52033
|
+
var engine = resourceManager.engine;
|
|
52034
|
+
return resourceManager // @ts-ignore
|
|
52035
|
+
._request(item.url, _extends({}, item, {
|
|
52036
|
+
type: "json"
|
|
52037
|
+
})).then(function(data) {
|
|
52038
|
+
var width = data.width, height = data.height, colorFormats = data.colorFormats, depthFormat = data.depthFormat, antiAliasing = data.antiAliasing, autoGenerateMipmaps = data.autoGenerateMipmaps;
|
|
52039
|
+
var colorTextureProps = data.colorTextures;
|
|
52040
|
+
var colorTextures = colorFormats.map(function(format, i) {
|
|
52041
|
+
var props = colorTextureProps == null ? void 0 : colorTextureProps[i];
|
|
52042
|
+
var _props_mipmap;
|
|
52043
|
+
var mipmap = (_props_mipmap = props == null ? void 0 : props.mipmap) != null ? _props_mipmap : true;
|
|
52044
|
+
var _props_isSRGBColorSpace;
|
|
52045
|
+
var isSRGB = (_props_isSRGBColorSpace = props == null ? void 0 : props.isSRGBColorSpace) != null ? _props_isSRGBColorSpace : format === TextureFormat.R8G8B8A8;
|
|
52046
|
+
var texture = new Texture2D(engine, width, height, format, mipmap, isSRGB);
|
|
52047
|
+
if (props) {
|
|
52048
|
+
if (props.filterMode != null) texture.filterMode = props.filterMode;
|
|
52049
|
+
if (props.wrapModeU != null) texture.wrapModeU = props.wrapModeU;
|
|
52050
|
+
if (props.wrapModeV != null) texture.wrapModeV = props.wrapModeV;
|
|
52051
|
+
if (props.anisoLevel != null) texture.anisoLevel = props.anisoLevel;
|
|
52052
|
+
}
|
|
52053
|
+
return texture;
|
|
52054
|
+
});
|
|
52055
|
+
var depth = depthFormat === -1 ? null : depthFormat;
|
|
52056
|
+
var rt = new RenderTarget(engine, width, height, colorTextures, depth, antiAliasing);
|
|
52057
|
+
if (autoGenerateMipmaps != null) rt.autoGenerateMipmaps = autoGenerateMipmaps;
|
|
52058
|
+
// Notify pending sub-asset requests for colorTextures
|
|
52059
|
+
for(var i = 0, n = colorTextures.length; i < n; i++){
|
|
52060
|
+
// @ts-ignore
|
|
52061
|
+
resourceManager._onSubAssetSuccess(item.url, "colorTextures[" + i + "]", colorTextures[i]);
|
|
52062
|
+
}
|
|
52063
|
+
return rt;
|
|
52064
|
+
});
|
|
52065
|
+
};
|
|
52066
|
+
return RenderTargetLoader;
|
|
52067
|
+
}(Loader);
|
|
52068
|
+
RenderTargetLoader = __decorate([
|
|
52069
|
+
resourceLoader(AssetType.RenderTarget, [
|
|
52070
|
+
"renderTarget"
|
|
52071
|
+
])
|
|
52072
|
+
], RenderTargetLoader);
|
|
52022
52073
|
var SceneLoader = /*#__PURE__*/ function(Loader) {
|
|
52023
52074
|
_inherits(SceneLoader, Loader);
|
|
52024
52075
|
function SceneLoader() {
|
|
@@ -52159,20 +52210,6 @@
|
|
|
52159
52210
|
"scene"
|
|
52160
52211
|
], true)
|
|
52161
52212
|
], SceneLoader);
|
|
52162
|
-
ReflectionParser.registerCustomParseComponent("TextRenderer", /*#__PURE__*/ _async_to_generator(function(instance, item) {
|
|
52163
|
-
var props;
|
|
52164
|
-
return __generator(this, function(_state) {
|
|
52165
|
-
props = item.props;
|
|
52166
|
-
if (!props.font) {
|
|
52167
|
-
// @ts-ignore
|
|
52168
|
-
instance.font = Font.createFromOS(instance.engine, props.fontFamily || "Arial");
|
|
52169
|
-
}
|
|
52170
|
-
return [
|
|
52171
|
-
2,
|
|
52172
|
-
instance
|
|
52173
|
-
];
|
|
52174
|
-
});
|
|
52175
|
-
}));
|
|
52176
52213
|
var KHR_lights_punctual = /*#__PURE__*/ function(GLTFExtensionParser) {
|
|
52177
52214
|
_inherits(KHR_lights_punctual, GLTFExtensionParser);
|
|
52178
52215
|
function KHR_lights_punctual() {
|
|
@@ -52667,7 +52704,7 @@
|
|
|
52667
52704
|
], EXT_texture_webp);
|
|
52668
52705
|
|
|
52669
52706
|
//@ts-ignore
|
|
52670
|
-
var version = "2.0.0-alpha.
|
|
52707
|
+
var version = "2.0.0-alpha.14";
|
|
52671
52708
|
console.log("Galacean Engine Version: " + version);
|
|
52672
52709
|
for(var key in CoreObjects){
|
|
52673
52710
|
Loader.registerClass(key, CoreObjects[key]);
|