@galacean/engine 1.6.0-alpha.1 → 1.6.0-alpha.2
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 +48 -35
- 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
|
@@ -12574,7 +12574,7 @@
|
|
|
12574
12574
|
_inherits$2(Transform, Component);
|
|
12575
12575
|
function Transform(entity) {
|
|
12576
12576
|
var _this;
|
|
12577
|
-
_this = Component.call(this, entity) || this, _this._position = new Vector3(), _this._rotation = new Vector3(), _this._rotationQuaternion = new Quaternion(), _this._scale = new Vector3(1, 1, 1), _this._localUniformScaling = true, _this._worldPosition = new Vector3(), _this._worldRotation = new Vector3(), _this._worldRotationQuaternion = new Quaternion(), _this._worldUniformScaling = true, _this._lossyWorldScale = new Vector3(1, 1, 1), _this._localMatrix = new Matrix(), _this._worldMatrix = new Matrix(), _this._worldForward = null, _this._worldRight = null, _this._worldUp = null, _this._isParentDirty = true, _this._parentTransformCache = null, _this._dirtyFlag =
|
|
12577
|
+
_this = Component.call(this, entity) || this, _this._position = new Vector3(), _this._rotation = new Vector3(), _this._rotationQuaternion = new Quaternion(), _this._scale = new Vector3(1, 1, 1), _this._localUniformScaling = true, _this._worldPosition = new Vector3(), _this._worldRotation = new Vector3(), _this._worldRotationQuaternion = new Quaternion(), _this._worldUniformScaling = true, _this._lossyWorldScale = new Vector3(1, 1, 1), _this._localMatrix = new Matrix(), _this._worldMatrix = new Matrix(), _this._worldForward = null, _this._worldRight = null, _this._worldUp = null, _this._isParentDirty = true, _this._parentTransformCache = null, _this._dirtyFlag = 510;
|
|
12578
12578
|
_this._onPositionChanged = _this._onPositionChanged.bind(_this);
|
|
12579
12579
|
_this._onWorldPositionChanged = _this._onWorldPositionChanged.bind(_this);
|
|
12580
12580
|
_this._onRotationChanged = _this._onRotationChanged.bind(_this);
|
|
@@ -12739,11 +12739,23 @@
|
|
|
12739
12739
|
/**
|
|
12740
12740
|
* @internal
|
|
12741
12741
|
*/ _proto._cloneTo = function _cloneTo(target, srcRoot, targetRoot) {
|
|
12742
|
-
target._position.
|
|
12743
|
-
|
|
12744
|
-
|
|
12742
|
+
var position = target._position, rotation = target._rotation, scale = target._scale;
|
|
12743
|
+
// @ts-ignore
|
|
12744
|
+
position._onValueChanged = rotation._onValueChanged = scale._onValueChanged = null;
|
|
12745
|
+
position.copyFrom(this.position);
|
|
12746
|
+
rotation.copyFrom(this.rotation);
|
|
12747
|
+
scale.copyFrom(this.scale);
|
|
12748
|
+
// @ts-ignore
|
|
12749
|
+
position._onValueChanged = target._onPositionChanged;
|
|
12750
|
+
// @ts-ignore
|
|
12751
|
+
rotation._onValueChanged = target._onRotationChanged;
|
|
12752
|
+
// @ts-ignore
|
|
12753
|
+
scale._onValueChanged = target._onScaleChanged;
|
|
12754
|
+
};
|
|
12755
|
+
_proto._onLocalMatrixChanging = function _onLocalMatrixChanging() {
|
|
12756
|
+
this._setDirtyFlagFalse(64);
|
|
12745
12757
|
};
|
|
12746
|
-
_proto.
|
|
12758
|
+
_proto._onWorldMatrixChanging = function _onWorldMatrixChanging() {
|
|
12747
12759
|
this._setDirtyFlagFalse(128);
|
|
12748
12760
|
};
|
|
12749
12761
|
_proto._isContainDirtyFlags = function _isContainDirtyFlags(targetDirtyFlags) {
|
|
@@ -13193,9 +13205,9 @@
|
|
|
13193
13205
|
// @ts-ignore
|
|
13194
13206
|
position._onValueChanged = rotationQuaternion._onValueChanged = scale._onValueChanged = null;
|
|
13195
13207
|
value.decompose(position, rotationQuaternion, scale);
|
|
13196
|
-
this._onLocalMatrixChanging
|
|
13208
|
+
this._onLocalMatrixChanging();
|
|
13197
13209
|
this._setDirtyFlagTrue(1);
|
|
13198
|
-
this._setDirtyFlagFalse(
|
|
13210
|
+
this._setDirtyFlagFalse(2);
|
|
13199
13211
|
// @ts-ignore
|
|
13200
13212
|
position._onValueChanged = this._onPositionChanged;
|
|
13201
13213
|
// @ts-ignore
|
|
@@ -13240,7 +13252,7 @@
|
|
|
13240
13252
|
this._localMatrix.copyFrom(value);
|
|
13241
13253
|
}
|
|
13242
13254
|
this.localMatrix = this._localMatrix;
|
|
13243
|
-
this.
|
|
13255
|
+
this._onWorldMatrixChanging();
|
|
13244
13256
|
}
|
|
13245
13257
|
},
|
|
13246
13258
|
{
|
|
@@ -13289,40 +13301,40 @@
|
|
|
13289
13301
|
Transform._tempMat41 = new Matrix();
|
|
13290
13302
|
Transform._tempMat42 = new Matrix();
|
|
13291
13303
|
__decorate$1([
|
|
13292
|
-
|
|
13304
|
+
ignoreClone
|
|
13293
13305
|
], Transform.prototype, "_position", void 0);
|
|
13294
13306
|
__decorate$1([
|
|
13295
|
-
|
|
13307
|
+
ignoreClone
|
|
13296
13308
|
], Transform.prototype, "_rotation", void 0);
|
|
13297
13309
|
__decorate$1([
|
|
13298
|
-
|
|
13310
|
+
ignoreClone
|
|
13299
13311
|
], Transform.prototype, "_rotationQuaternion", void 0);
|
|
13300
13312
|
__decorate$1([
|
|
13301
|
-
|
|
13313
|
+
ignoreClone
|
|
13302
13314
|
], Transform.prototype, "_scale", void 0);
|
|
13303
13315
|
__decorate$1([
|
|
13304
13316
|
assignmentClone
|
|
13305
13317
|
], Transform.prototype, "_localUniformScaling", void 0);
|
|
13306
13318
|
__decorate$1([
|
|
13307
|
-
|
|
13319
|
+
ignoreClone
|
|
13308
13320
|
], Transform.prototype, "_worldPosition", void 0);
|
|
13309
13321
|
__decorate$1([
|
|
13310
|
-
|
|
13322
|
+
ignoreClone
|
|
13311
13323
|
], Transform.prototype, "_worldRotation", void 0);
|
|
13312
13324
|
__decorate$1([
|
|
13313
|
-
|
|
13325
|
+
ignoreClone
|
|
13314
13326
|
], Transform.prototype, "_worldRotationQuaternion", void 0);
|
|
13315
13327
|
__decorate$1([
|
|
13316
|
-
|
|
13328
|
+
ignoreClone
|
|
13317
13329
|
], Transform.prototype, "_worldUniformScaling", void 0);
|
|
13318
13330
|
__decorate$1([
|
|
13319
|
-
|
|
13331
|
+
ignoreClone
|
|
13320
13332
|
], Transform.prototype, "_lossyWorldScale", void 0);
|
|
13321
13333
|
__decorate$1([
|
|
13322
|
-
|
|
13334
|
+
ignoreClone
|
|
13323
13335
|
], Transform.prototype, "_localMatrix", void 0);
|
|
13324
13336
|
__decorate$1([
|
|
13325
|
-
|
|
13337
|
+
ignoreClone
|
|
13326
13338
|
], Transform.prototype, "_worldMatrix", void 0);
|
|
13327
13339
|
__decorate$1([
|
|
13328
13340
|
ignoreClone
|
|
@@ -13339,6 +13351,9 @@
|
|
|
13339
13351
|
__decorate$1([
|
|
13340
13352
|
ignoreClone
|
|
13341
13353
|
], Transform.prototype, "_parentTransformCache", void 0);
|
|
13354
|
+
__decorate$1([
|
|
13355
|
+
ignoreClone
|
|
13356
|
+
], Transform.prototype, "_dirtyFlag", void 0);
|
|
13342
13357
|
__decorate$1([
|
|
13343
13358
|
ignoreClone
|
|
13344
13359
|
], Transform.prototype, "_onPositionChanged", null);
|
|
@@ -13383,6 +13398,7 @@
|
|
|
13383
13398
|
/** WorldMatrix | WorldPosition | WorldScale */ TransformModifyFlags[TransformModifyFlags["WmWpWs"] = 164] = "WmWpWs";
|
|
13384
13399
|
/** WorldMatrix | WorldPosition | WorldEuler | WorldQuat | WorldScale */ TransformModifyFlags[TransformModifyFlags["WmWpWeWqWs"] = 188] = "WmWpWeWqWs";
|
|
13385
13400
|
/** WorldMatrix | WorldPosition | WorldEuler | WorldQuat | WorldScale | WorldUniformScaling */ TransformModifyFlags[TransformModifyFlags["WmWpWeWqWsWus"] = 444] = "WmWpWeWqWsWus";
|
|
13401
|
+
/** LocalQuat | LocalMatrix | WorldMatrix | WorldPosition | WorldEuler | WorldQuat | WorldScale | WorldUniformScaling */ TransformModifyFlags[TransformModifyFlags["LqLmWmWpWeWqWsWus"] = 510] = "LqLmWmWpWeWqWsWus";
|
|
13386
13402
|
return TransformModifyFlags;
|
|
13387
13403
|
}({});
|
|
13388
13404
|
/**
|
|
@@ -15833,9 +15849,9 @@
|
|
|
15833
15849
|
// projection[0][0] is at index 0 (X scaling)
|
|
15834
15850
|
// projection[1][1] is at index 5 (Y scaling)
|
|
15835
15851
|
// The inverse values we need are:
|
|
15836
|
-
var
|
|
15852
|
+
var invProjectionScaleX = 1.0 / projectionScaleX;
|
|
15837
15853
|
var invProjectionScaleY = 1.0 / projectionScaleY;
|
|
15838
|
-
var invProjScaleXY = this._invProjScaleXY.set(
|
|
15854
|
+
var invProjScaleXY = this._invProjScaleXY.set(invProjectionScaleX * 2.0, invProjectionScaleY * 2.0);
|
|
15839
15855
|
shaderData.setVector2(ScalableAmbientObscurancePass._invProjScaleXYProp, invProjScaleXY);
|
|
15840
15856
|
var quality = ambientOcclusion.quality, radius = ambientOcclusion.radius;
|
|
15841
15857
|
this._updateBlurKernel(shaderData, quality);
|
|
@@ -15881,9 +15897,6 @@
|
|
|
15881
15897
|
this._blurRenderTarget = null;
|
|
15882
15898
|
}
|
|
15883
15899
|
this._depthRenderTarget = null;
|
|
15884
|
-
var material = this._material;
|
|
15885
|
-
material._addReferCount(-1);
|
|
15886
|
-
material.destroy();
|
|
15887
15900
|
};
|
|
15888
15901
|
_proto._updateBlurKernel = function _updateBlurKernel(blurShaderData, quality) {
|
|
15889
15902
|
if (quality === this._quality) {
|
|
@@ -23905,7 +23918,7 @@
|
|
|
23905
23918
|
continue;
|
|
23906
23919
|
}
|
|
23907
23920
|
if (material.destroyed || material.shader.destroyed) {
|
|
23908
|
-
material = this.engine.
|
|
23921
|
+
material = this.engine._basicResources.meshMagentaMaterial;
|
|
23909
23922
|
}
|
|
23910
23923
|
var subRenderElement = subRenderElementPool.get();
|
|
23911
23924
|
subRenderElement.set(this, material, mesh._primitive, subMeshes[i1]);
|
|
@@ -27875,6 +27888,8 @@
|
|
|
27875
27888
|
this.spriteDefaultMaterial = this._create2DMaterial(engine, Shader.find("Sprite"));
|
|
27876
27889
|
this.textDefaultMaterial = this._create2DMaterial(engine, Shader.find("Text"));
|
|
27877
27890
|
this.spriteMaskDefaultMaterial = this._createSpriteMaskMaterial(engine);
|
|
27891
|
+
this.meshMagentaMaterial = this._createMagentaMaterial(engine, "unlit");
|
|
27892
|
+
this.particleMagentaMaterial = this._createMagentaMaterial(engine, "particle-shader");
|
|
27878
27893
|
}
|
|
27879
27894
|
var _proto = BasicResources.prototype;
|
|
27880
27895
|
/**
|
|
@@ -27980,6 +27995,12 @@
|
|
|
27980
27995
|
material.isGCIgnored = true;
|
|
27981
27996
|
return material;
|
|
27982
27997
|
};
|
|
27998
|
+
_proto._createMagentaMaterial = function _createMagentaMaterial(engine, shaderName) {
|
|
27999
|
+
var material = new Material(engine, Shader.find(shaderName));
|
|
28000
|
+
material.isGCIgnored = true;
|
|
28001
|
+
material.shaderData.setColor("material_BaseColor", new Color(1.0, 0.0, 1.01, 1.0));
|
|
28002
|
+
return material;
|
|
28003
|
+
};
|
|
27983
28004
|
_proto._createSpriteMaskMaterial = function _createSpriteMaskMaterial(engine) {
|
|
27984
28005
|
var material = new Material(engine, Shader.find("SpriteMask"));
|
|
27985
28006
|
material.isGCIgnored = true;
|
|
@@ -30826,14 +30847,6 @@
|
|
|
30826
30847
|
if (!hardwareRenderer.canIUse(GLCapabilityType.sRGB)) {
|
|
30827
30848
|
_this._macroCollection.enable(Engine._noSRGBSupportMacro);
|
|
30828
30849
|
}
|
|
30829
|
-
var meshMagentaMaterial = new Material(_this, Shader.find("unlit"));
|
|
30830
|
-
meshMagentaMaterial.isGCIgnored = true;
|
|
30831
|
-
meshMagentaMaterial.shaderData.setColor("material_BaseColor", new Color(1.0, 0.0, 1.01, 1.0));
|
|
30832
|
-
_this._meshMagentaMaterial = meshMagentaMaterial;
|
|
30833
|
-
var particleMagentaMaterial = new Material(_this, Shader.find("particle-shader"));
|
|
30834
|
-
particleMagentaMaterial.isGCIgnored = true;
|
|
30835
|
-
particleMagentaMaterial.shaderData.setColor("material_BaseColor", new Color(1.0, 0.0, 1.01, 1.0));
|
|
30836
|
-
_this._particleMagentaMaterial = particleMagentaMaterial;
|
|
30837
30850
|
_this._basicResources = new BasicResources(_this);
|
|
30838
30851
|
_this._particleBufferUtils = new ParticleBufferUtils(_this);
|
|
30839
30852
|
var uberPass = new PostProcessUberPass(_this);
|
|
@@ -37099,7 +37112,7 @@
|
|
|
37099
37112
|
return;
|
|
37100
37113
|
}
|
|
37101
37114
|
if (material.destroyed || material.shader.destroyed) {
|
|
37102
|
-
material = this.engine.
|
|
37115
|
+
material = this.engine._basicResources.particleMagentaMaterial;
|
|
37103
37116
|
}
|
|
37104
37117
|
var engine = this._engine;
|
|
37105
37118
|
var renderElement = engine._renderElementPool.get();
|
|
@@ -51568,7 +51581,7 @@
|
|
|
51568
51581
|
], EXT_texture_webp);
|
|
51569
51582
|
|
|
51570
51583
|
//@ts-ignore
|
|
51571
|
-
var version = "1.6.0-alpha.
|
|
51584
|
+
var version = "1.6.0-alpha.2";
|
|
51572
51585
|
console.log("Galacean Engine Version: " + version);
|
|
51573
51586
|
for(var key in CoreObjects){
|
|
51574
51587
|
Loader.registerClass(key, CoreObjects[key]);
|