@galacean/engine 1.5.14 → 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 +49 -31
- 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() {
|
|
@@ -26490,11 +26495,7 @@
|
|
|
26490
26495
|
], args));
|
|
26491
26496
|
this._components.push(component);
|
|
26492
26497
|
// @todo: temporary solution
|
|
26493
|
-
if (_instanceof1$2(component, Transform))
|
|
26494
|
-
var transform = this._transform;
|
|
26495
|
-
this._transform = component;
|
|
26496
|
-
transform == null ? void 0 : transform.destroy();
|
|
26497
|
-
}
|
|
26498
|
+
if (_instanceof1$2(component, Transform)) this._setTransform(component);
|
|
26498
26499
|
component._setActive(true, ActiveChangeFlag.All);
|
|
26499
26500
|
return component;
|
|
26500
26501
|
};
|
|
@@ -26923,6 +26924,16 @@
|
|
|
26923
26924
|
}
|
|
26924
26925
|
}
|
|
26925
26926
|
};
|
|
26927
|
+
_proto._setTransform = function _setTransform(value) {
|
|
26928
|
+
var _this__transform;
|
|
26929
|
+
(_this__transform = this._transform) == null ? void 0 : _this__transform.destroy();
|
|
26930
|
+
this._transform = value;
|
|
26931
|
+
var children = this._children;
|
|
26932
|
+
for(var i = 0, n = children.length; i < n; i++){
|
|
26933
|
+
var _children_i_transform;
|
|
26934
|
+
(_children_i_transform = children[i].transform) == null ? void 0 : _children_i_transform._parentChange();
|
|
26935
|
+
}
|
|
26936
|
+
};
|
|
26926
26937
|
/**
|
|
26927
26938
|
* @deprecated
|
|
26928
26939
|
*/ _proto.getInvModelMatrix = function getInvModelMatrix() {
|
|
@@ -43731,7 +43742,7 @@
|
|
|
43731
43742
|
var yStart = flipY ? srcHeight - viewport.y * srcHeight - copyHeight : viewport.y * srcHeight;
|
|
43732
43743
|
var _srcRT__platformRenderTarget__frameBuffer;
|
|
43733
43744
|
// @ts-ignore
|
|
43734
|
-
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;
|
|
43735
43746
|
// @ts-ignore
|
|
43736
43747
|
gl.bindFramebuffer(gl.FRAMEBUFFER, frameBuffer);
|
|
43737
43748
|
// @ts-ignore
|
|
@@ -44959,6 +44970,25 @@
|
|
|
44959
44970
|
/** start parse the scene or prefab or others */ _proto.start = function start() {
|
|
44960
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);
|
|
44961
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
|
+
};
|
|
44962
44992
|
_proto._parseEntities = function _parseEntities() {
|
|
44963
44993
|
var _this = this;
|
|
44964
44994
|
var entitiesConfig = this.data.entities;
|
|
@@ -45169,25 +45199,6 @@
|
|
|
45169
45199
|
this._addComponentPlugin(componentId, component);
|
|
45170
45200
|
}
|
|
45171
45201
|
};
|
|
45172
|
-
_proto._applyEntityData = function _applyEntityData(entity, entityConfig) {
|
|
45173
|
-
if (entityConfig === void 0) entityConfig = {};
|
|
45174
|
-
var _entityConfig_isActive;
|
|
45175
|
-
entity.isActive = (_entityConfig_isActive = entityConfig.isActive) != null ? _entityConfig_isActive : entity.isActive;
|
|
45176
|
-
var _entityConfig_name;
|
|
45177
|
-
entity.name = (_entityConfig_name = entityConfig.name) != null ? _entityConfig_name : entity.name;
|
|
45178
|
-
var transform = entity.transform;
|
|
45179
|
-
var transformConfig = entityConfig.transform;
|
|
45180
|
-
if (transformConfig) {
|
|
45181
|
-
this._reflectionParser.parsePropsAndMethods(transform, transformConfig);
|
|
45182
|
-
} else {
|
|
45183
|
-
var position = entityConfig.position, rotation = entityConfig.rotation, scale = entityConfig.scale;
|
|
45184
|
-
if (position) transform.position.copyFrom(position);
|
|
45185
|
-
if (rotation) transform.rotation.copyFrom(rotation);
|
|
45186
|
-
if (scale) transform.scale.copyFrom(scale);
|
|
45187
|
-
}
|
|
45188
|
-
if (entityConfig.layer) entity.layer = entityConfig.layer;
|
|
45189
|
-
return entity;
|
|
45190
|
-
};
|
|
45191
45202
|
_proto._generateInstanceContext = function _generateInstanceContext(entity, context, path) {
|
|
45192
45203
|
var entityMap = context.entityMap, components = context.components;
|
|
45193
45204
|
var componentsMap = {};
|
|
@@ -49226,6 +49237,13 @@
|
|
|
49226
49237
|
return _this;
|
|
49227
49238
|
}
|
|
49228
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
|
+
};
|
|
49229
49247
|
_proto._handleRootEntity = function _handleRootEntity(id) {
|
|
49230
49248
|
this.prefabResource._root = this.context.entityMap.get(id);
|
|
49231
49249
|
};
|
|
@@ -51238,7 +51256,7 @@
|
|
|
51238
51256
|
], EXT_texture_webp);
|
|
51239
51257
|
|
|
51240
51258
|
//@ts-ignore
|
|
51241
|
-
var version = "1.5.
|
|
51259
|
+
var version = "1.5.16";
|
|
51242
51260
|
console.log("Galacean Engine Version: " + version);
|
|
51243
51261
|
for(var key in CoreObjects){
|
|
51244
51262
|
Loader.registerClass(key, CoreObjects[key]);
|