@galacean/engine 1.5.15 → 1.5.16
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 +38 -26
- package/dist/browser.js.map +1 -1
- package/dist/browser.min.js +1 -1
- package/dist/browser.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
|
@@ -13697,7 +13697,7 @@
|
|
|
13697
13697
|
Logger.error("mipLevel only take effect in WebGL2.0");
|
|
13698
13698
|
}
|
|
13699
13699
|
var ignoreClearFlags;
|
|
13700
|
-
if (this._cameraType !== CameraType$1.Normal && !this._renderTarget
|
|
13700
|
+
if (this._cameraType !== CameraType$1.Normal && !this._renderTarget) {
|
|
13701
13701
|
ignoreClearFlags = engine.xrManager._getCameraIgnoreClearFlags(this._cameraType);
|
|
13702
13702
|
}
|
|
13703
13703
|
this._renderPipeline.render(context, cubeFace, mipLevel, ignoreClearFlags);
|
|
@@ -13831,6 +13831,9 @@
|
|
|
13831
13831
|
width = canvas.width;
|
|
13832
13832
|
height = canvas.height;
|
|
13833
13833
|
}
|
|
13834
|
+
this._adjustPixelViewport(width, height);
|
|
13835
|
+
};
|
|
13836
|
+
_proto._adjustPixelViewport = function _adjustPixelViewport(width, height) {
|
|
13834
13837
|
var viewport = this._viewport;
|
|
13835
13838
|
this._pixelViewport.set(viewport.x * width, viewport.y * height, viewport.z * width, viewport.w * height);
|
|
13836
13839
|
!this._customAspectRatio && this._dispatchModify(CameraModifyFlags.AspectRatio);
|
|
@@ -19040,7 +19043,8 @@
|
|
|
19040
19043
|
} else {
|
|
19041
19044
|
uberShaderData.disableMacro(TonemappingEffect._enableMacro);
|
|
19042
19045
|
}
|
|
19043
|
-
|
|
19046
|
+
var viewport = destTarget === camera.renderTarget ? camera.viewport : undefined;
|
|
19047
|
+
Blitter.blitTexture(camera.engine, srcTexture, destTarget, 0, viewport, this._uberMaterial, undefined);
|
|
19044
19048
|
};
|
|
19045
19049
|
/**
|
|
19046
19050
|
* @inheritdoc
|
|
@@ -19078,7 +19082,7 @@
|
|
|
19078
19082
|
uberShaderData.disableMacro(BloomEffect._hqMacro);
|
|
19079
19083
|
}
|
|
19080
19084
|
uberShaderData.setTexture(BloomEffect._dirtTextureProp, dirtTexture.value);
|
|
19081
|
-
if (dirtTexture) {
|
|
19085
|
+
if (dirtTexture.value) {
|
|
19082
19086
|
uberShaderData.enableMacro(BloomEffect._dirtMacro);
|
|
19083
19087
|
} else {
|
|
19084
19088
|
uberShaderData.disableMacro(BloomEffect._dirtMacro);
|
|
@@ -19216,11 +19220,12 @@
|
|
|
19216
19220
|
var enableFXAA = camera.antiAliasing === AntiAliasing.FXAA;
|
|
19217
19221
|
// Should convert to sRGB when FXAA is enabled or camera's render target is not set
|
|
19218
19222
|
var sourceTexture = this._inputRenderTarget.getColorTexture();
|
|
19219
|
-
var outputRenderTarget = enableFXAA ? this._srgbRenderTarget : renderTarget;
|
|
19220
|
-
Blitter.blitTexture(engine, sourceTexture, outputRenderTarget, 0, viewport, this._sRGBmaterial);
|
|
19221
19223
|
if (enableFXAA) {
|
|
19224
|
+
Blitter.blitTexture(engine, sourceTexture, this._srgbRenderTarget, 0, undefined, this._sRGBmaterial);
|
|
19222
19225
|
var sRGBTexture = this._srgbRenderTarget.getColorTexture();
|
|
19223
19226
|
Blitter.blitTexture(engine, sRGBTexture, renderTarget, 0, viewport, this._antiAliasingMaterial);
|
|
19227
|
+
} else {
|
|
19228
|
+
Blitter.blitTexture(engine, sourceTexture, renderTarget, 0, viewport, this._sRGBmaterial);
|
|
19224
19229
|
}
|
|
19225
19230
|
};
|
|
19226
19231
|
_proto.release = function release() {
|
|
@@ -43737,7 +43742,7 @@
|
|
|
43737
43742
|
var yStart = flipY ? srcHeight - viewport.y * srcHeight - copyHeight : viewport.y * srcHeight;
|
|
43738
43743
|
var _srcRT__platformRenderTarget__frameBuffer;
|
|
43739
43744
|
// @ts-ignore
|
|
43740
|
-
var frameBuffer = (_srcRT__platformRenderTarget__frameBuffer = srcRT == null ? void 0 : srcRT._platformRenderTarget._frameBuffer) != null ? _srcRT__platformRenderTarget__frameBuffer :
|
|
43745
|
+
var frameBuffer = (_srcRT__platformRenderTarget__frameBuffer = srcRT == null ? void 0 : srcRT._platformRenderTarget._frameBuffer) != null ? _srcRT__platformRenderTarget__frameBuffer : this._mainFrameBuffer;
|
|
43741
43746
|
// @ts-ignore
|
|
43742
43747
|
gl.bindFramebuffer(gl.FRAMEBUFFER, frameBuffer);
|
|
43743
43748
|
// @ts-ignore
|
|
@@ -44965,6 +44970,25 @@
|
|
|
44965
44970
|
/** start parse the scene or prefab or others */ _proto.start = function start() {
|
|
44966
44971
|
this._parseEntities().then(this._organizeEntities).then(this._parseComponents).then(this._parseAddedComponents).then(this._parseComponentsPropsAndMethods).then(this._parsePrefabModification).then(this._parsePrefabRemovedEntities).then(this._parsePrefabRemovedComponents).then(this._clearAndResolve).then(this._resolve).catch(this._reject);
|
|
44967
44972
|
};
|
|
44973
|
+
_proto._applyEntityData = function _applyEntityData(entity, entityConfig) {
|
|
44974
|
+
if (entityConfig === void 0) entityConfig = {};
|
|
44975
|
+
var _entityConfig_isActive;
|
|
44976
|
+
entity.isActive = (_entityConfig_isActive = entityConfig.isActive) != null ? _entityConfig_isActive : entity.isActive;
|
|
44977
|
+
var _entityConfig_name;
|
|
44978
|
+
entity.name = (_entityConfig_name = entityConfig.name) != null ? _entityConfig_name : entity.name;
|
|
44979
|
+
var transform = entity.transform;
|
|
44980
|
+
var transformConfig = entityConfig.transform;
|
|
44981
|
+
if (transformConfig) {
|
|
44982
|
+
this._reflectionParser.parsePropsAndMethods(transform, transformConfig);
|
|
44983
|
+
} else {
|
|
44984
|
+
var position = entityConfig.position, rotation = entityConfig.rotation, scale = entityConfig.scale;
|
|
44985
|
+
if (position) transform.position.copyFrom(position);
|
|
44986
|
+
if (rotation) transform.rotation.copyFrom(rotation);
|
|
44987
|
+
if (scale) transform.scale.copyFrom(scale);
|
|
44988
|
+
}
|
|
44989
|
+
if (entityConfig.layer) entity.layer = entityConfig.layer;
|
|
44990
|
+
return entity;
|
|
44991
|
+
};
|
|
44968
44992
|
_proto._parseEntities = function _parseEntities() {
|
|
44969
44993
|
var _this = this;
|
|
44970
44994
|
var entitiesConfig = this.data.entities;
|
|
@@ -45175,25 +45199,6 @@
|
|
|
45175
45199
|
this._addComponentPlugin(componentId, component);
|
|
45176
45200
|
}
|
|
45177
45201
|
};
|
|
45178
|
-
_proto._applyEntityData = function _applyEntityData(entity, entityConfig) {
|
|
45179
|
-
if (entityConfig === void 0) entityConfig = {};
|
|
45180
|
-
var _entityConfig_isActive;
|
|
45181
|
-
entity.isActive = (_entityConfig_isActive = entityConfig.isActive) != null ? _entityConfig_isActive : entity.isActive;
|
|
45182
|
-
var _entityConfig_name;
|
|
45183
|
-
entity.name = (_entityConfig_name = entityConfig.name) != null ? _entityConfig_name : entity.name;
|
|
45184
|
-
var transform = entity.transform;
|
|
45185
|
-
var transformConfig = entityConfig.transform;
|
|
45186
|
-
if (transformConfig) {
|
|
45187
|
-
this._reflectionParser.parsePropsAndMethods(transform, transformConfig);
|
|
45188
|
-
} else {
|
|
45189
|
-
var position = entityConfig.position, rotation = entityConfig.rotation, scale = entityConfig.scale;
|
|
45190
|
-
if (position) transform.position.copyFrom(position);
|
|
45191
|
-
if (rotation) transform.rotation.copyFrom(rotation);
|
|
45192
|
-
if (scale) transform.scale.copyFrom(scale);
|
|
45193
|
-
}
|
|
45194
|
-
if (entityConfig.layer) entity.layer = entityConfig.layer;
|
|
45195
|
-
return entity;
|
|
45196
|
-
};
|
|
45197
45202
|
_proto._generateInstanceContext = function _generateInstanceContext(entity, context, path) {
|
|
45198
45203
|
var entityMap = context.entityMap, components = context.components;
|
|
45199
45204
|
var componentsMap = {};
|
|
@@ -49232,6 +49237,13 @@
|
|
|
49232
49237
|
return _this;
|
|
49233
49238
|
}
|
|
49234
49239
|
var _proto = PrefabParser.prototype;
|
|
49240
|
+
_proto._applyEntityData = function _applyEntityData(entity, entityConfig) {
|
|
49241
|
+
if (entityConfig === void 0) entityConfig = {};
|
|
49242
|
+
HierarchyParser.prototype._applyEntityData.call(this, entity, entityConfig);
|
|
49243
|
+
// @ts-ignore
|
|
49244
|
+
entity._markAsTemplate(this.context.resource);
|
|
49245
|
+
return entity;
|
|
49246
|
+
};
|
|
49235
49247
|
_proto._handleRootEntity = function _handleRootEntity(id) {
|
|
49236
49248
|
this.prefabResource._root = this.context.entityMap.get(id);
|
|
49237
49249
|
};
|
|
@@ -51244,7 +51256,7 @@
|
|
|
51244
51256
|
], EXT_texture_webp);
|
|
51245
51257
|
|
|
51246
51258
|
//@ts-ignore
|
|
51247
|
-
var version = "1.5.
|
|
51259
|
+
var version = "1.5.16";
|
|
51248
51260
|
console.log("Galacean Engine Version: " + version);
|
|
51249
51261
|
for(var key in CoreObjects){
|
|
51250
51262
|
Loader.registerClass(key, CoreObjects[key]);
|