@galacean/effects-core 2.6.0-alpha.0 → 2.6.0-beta.0
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/composition.d.ts +0 -1
- package/dist/events/types.d.ts +12 -1
- package/dist/index.js +157 -78
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +157 -79
- package/dist/index.mjs.map +1 -1
- package/dist/plugins/animation-graph/nodes/index.d.ts +2 -1
- package/dist/plugins/animation-graph/nodes/layer-blend-node.d.ts +27 -0
- package/dist/plugins/animation-graph/pose.d.ts +1 -0
- package/dist/plugins/particle/particle-system.d.ts +0 -3
- package/dist/vfx-item.d.ts +0 -5
- package/package.json +2 -2
- /package/dist/plugins/animation-graph/nodes/{blend-1d-node.d.ts → blend-node.d.ts} +0 -0
package/dist/composition.d.ts
CHANGED
package/dist/events/types.d.ts
CHANGED
|
@@ -5,11 +5,12 @@ import type { Region } from '../plugins';
|
|
|
5
5
|
*/
|
|
6
6
|
export type ItemEvent = {
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* 元素点击事件(编辑器设置交互行为“消息通知”)
|
|
9
9
|
*/
|
|
10
10
|
['click']: [region: Region];
|
|
11
11
|
/**
|
|
12
12
|
* 元素消息事件(元素创建/销毁时触发)
|
|
13
|
+
* 注意:仅对交互元素有效
|
|
13
14
|
*/
|
|
14
15
|
['message']: [message: Omit<MessageItem, 'compositionId'>];
|
|
15
16
|
};
|
|
@@ -26,6 +27,16 @@ export type CompositionEvent<C> = {
|
|
|
26
27
|
compositionId: string;
|
|
27
28
|
}
|
|
28
29
|
];
|
|
30
|
+
/**
|
|
31
|
+
* 合成开始播放事件
|
|
32
|
+
*/
|
|
33
|
+
['play']: [playInfo: {
|
|
34
|
+
time: number;
|
|
35
|
+
}];
|
|
36
|
+
/**
|
|
37
|
+
* 合成暂停事件
|
|
38
|
+
*/
|
|
39
|
+
['pause']: [];
|
|
29
40
|
/**
|
|
30
41
|
* 合成结束事件
|
|
31
42
|
* 合成行为为循环时每次循环结束都会触发
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Description: Galacean Effects runtime core for the web
|
|
4
4
|
* Author: Ant Group CO., Ltd.
|
|
5
5
|
* Contributors: 燃然,飂兮,十弦,云垣,茂安,意绮
|
|
6
|
-
* Version: v2.6.0-
|
|
6
|
+
* Version: v2.6.0-beta.0
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
'use strict';
|
|
@@ -1727,6 +1727,7 @@ var NodeDataType;
|
|
|
1727
1727
|
NodeDataType["AnimationClipNodeData"] = "AnimationClipNodeData";
|
|
1728
1728
|
NodeDataType["BlendNodeData"] = "BlendNodeData";
|
|
1729
1729
|
NodeDataType["ApplyAdditiveNodeData"] = "ApplyAdditiveNodeData";
|
|
1730
|
+
NodeDataType["LayerBlendNodeData"] = "LayerBlendNodeData";
|
|
1730
1731
|
NodeDataType["StateMachineNodeData"] = "StateMachineNodeData";
|
|
1731
1732
|
NodeDataType["TransitionNodeData"] = "TransitionNodeData";
|
|
1732
1733
|
NodeDataType["StateNodeData"] = "StateNodeData";
|
|
@@ -4193,6 +4194,17 @@ var Pose = /*#__PURE__*/ function() {
|
|
|
4193
4194
|
this.floatPropertyValues[animatedObjectIndex] = value;
|
|
4194
4195
|
}
|
|
4195
4196
|
};
|
|
4197
|
+
_proto.copyFrom = function copyFrom(pose) {
|
|
4198
|
+
for(var i = 0; i < this.parentSpaceTransforms.length; i++){
|
|
4199
|
+
this.parentSpaceTransforms[i].copyFrom(pose.parentSpaceTransforms[i]);
|
|
4200
|
+
}
|
|
4201
|
+
for(var i1 = 0; i1 < this.colorPropertyValues.length; i1++){
|
|
4202
|
+
this.colorPropertyValues[i1].copyFrom(pose.colorPropertyValues[i1]);
|
|
4203
|
+
}
|
|
4204
|
+
for(var i2 = 0; i2 < this.floatPropertyValues.length; i2++){
|
|
4205
|
+
this.floatPropertyValues[i2] = pose.floatPropertyValues[i2];
|
|
4206
|
+
}
|
|
4207
|
+
};
|
|
4196
4208
|
return Pose;
|
|
4197
4209
|
}();
|
|
4198
4210
|
|
|
@@ -4732,6 +4744,109 @@ var ControlParameterTriggerNode = /*#__PURE__*/ function(BoolValueNode) {
|
|
|
4732
4744
|
return ControlParameterTriggerNode;
|
|
4733
4745
|
}(BoolValueNode);
|
|
4734
4746
|
|
|
4747
|
+
exports.LayerBlendNodeData = /*#__PURE__*/ function(GraphNodeData) {
|
|
4748
|
+
_inherits(LayerBlendNodeData, GraphNodeData);
|
|
4749
|
+
function LayerBlendNodeData() {
|
|
4750
|
+
var _this;
|
|
4751
|
+
_this = GraphNodeData.apply(this, arguments) || this;
|
|
4752
|
+
_this.baseNodeIndex = InvalidIndex;
|
|
4753
|
+
_this.layerDatas = [];
|
|
4754
|
+
return _this;
|
|
4755
|
+
}
|
|
4756
|
+
var _proto = LayerBlendNodeData.prototype;
|
|
4757
|
+
_proto.instantiate = function instantiate(context) {
|
|
4758
|
+
var node = this.createNode(LayerBlendNode, context);
|
|
4759
|
+
node.baseLayerNode = context.getNode(this.baseNodeIndex);
|
|
4760
|
+
for(var _iterator = _create_for_of_iterator_helper_loose(this.layerDatas), _step; !(_step = _iterator()).done;){
|
|
4761
|
+
var layerData = _step.value;
|
|
4762
|
+
node.layers.push({
|
|
4763
|
+
inputNode: context.getNode(layerData.inputNodeIndex),
|
|
4764
|
+
weightValueNode: context.getNode(layerData.weightValueNodeIndex),
|
|
4765
|
+
weight: 0
|
|
4766
|
+
});
|
|
4767
|
+
}
|
|
4768
|
+
};
|
|
4769
|
+
_proto.load = function load(data) {
|
|
4770
|
+
GraphNodeData.prototype.load.call(this, data);
|
|
4771
|
+
var _data_baseNodeIndex;
|
|
4772
|
+
this.baseNodeIndex = (_data_baseNodeIndex = data.baseNodeIndex) != null ? _data_baseNodeIndex : InvalidIndex;
|
|
4773
|
+
if (data.layerDatas) {
|
|
4774
|
+
for(var _iterator = _create_for_of_iterator_helper_loose(data.layerDatas), _step; !(_step = _iterator()).done;){
|
|
4775
|
+
var layerData = _step.value;
|
|
4776
|
+
this.layerDatas.push(_extends({
|
|
4777
|
+
inputNodeIndex: InvalidIndex,
|
|
4778
|
+
weightValueNodeIndex: InvalidIndex
|
|
4779
|
+
}, layerData));
|
|
4780
|
+
}
|
|
4781
|
+
}
|
|
4782
|
+
};
|
|
4783
|
+
return LayerBlendNodeData;
|
|
4784
|
+
}(GraphNodeData);
|
|
4785
|
+
exports.LayerBlendNodeData = __decorate([
|
|
4786
|
+
nodeDataClass(NodeDataType.LayerBlendNodeData)
|
|
4787
|
+
], exports.LayerBlendNodeData);
|
|
4788
|
+
var LayerBlendNode = /*#__PURE__*/ function(PoseNode) {
|
|
4789
|
+
_inherits(LayerBlendNode, PoseNode);
|
|
4790
|
+
function LayerBlendNode() {
|
|
4791
|
+
var _this;
|
|
4792
|
+
_this = PoseNode.apply(this, arguments) || this;
|
|
4793
|
+
_this.baseLayerNode = null;
|
|
4794
|
+
_this.layers = [];
|
|
4795
|
+
return _this;
|
|
4796
|
+
}
|
|
4797
|
+
var _proto = LayerBlendNode.prototype;
|
|
4798
|
+
_proto.initializeInternal = function initializeInternal(context) {
|
|
4799
|
+
var //-------------------------------------------------------------------------
|
|
4800
|
+
_this_baseLayerNode;
|
|
4801
|
+
PoseNode.prototype.initializeInternal.call(this, context);
|
|
4802
|
+
//-------------------------------------------------------------------------
|
|
4803
|
+
this.layerNodeResult = new PoseResult(context.skeleton);
|
|
4804
|
+
(_this_baseLayerNode = this.baseLayerNode) == null ? void 0 : _this_baseLayerNode.initialize(context);
|
|
4805
|
+
for(var _iterator = _create_for_of_iterator_helper_loose(this.layers), _step; !(_step = _iterator()).done;){
|
|
4806
|
+
var layer = _step.value;
|
|
4807
|
+
var _layer_inputNode, _layer_weightValueNode;
|
|
4808
|
+
(_layer_inputNode = layer.inputNode) == null ? void 0 : _layer_inputNode.initialize(context);
|
|
4809
|
+
(_layer_weightValueNode = layer.weightValueNode) == null ? void 0 : _layer_weightValueNode.initialize(context);
|
|
4810
|
+
}
|
|
4811
|
+
};
|
|
4812
|
+
_proto.shutdownInternal = function shutdownInternal(context) {
|
|
4813
|
+
var _this_baseLayerNode;
|
|
4814
|
+
(_this_baseLayerNode = this.baseLayerNode) == null ? void 0 : _this_baseLayerNode.shutdown(context);
|
|
4815
|
+
for(var _iterator = _create_for_of_iterator_helper_loose(this.layers), _step; !(_step = _iterator()).done;){
|
|
4816
|
+
var layer = _step.value;
|
|
4817
|
+
var _layer_inputNode, _layer_weightValueNode;
|
|
4818
|
+
(_layer_inputNode = layer.inputNode) == null ? void 0 : _layer_inputNode.shutdown(context);
|
|
4819
|
+
(_layer_weightValueNode = layer.weightValueNode) == null ? void 0 : _layer_weightValueNode.shutdown(context);
|
|
4820
|
+
}
|
|
4821
|
+
PoseNode.prototype.shutdownInternal.call(this, context);
|
|
4822
|
+
};
|
|
4823
|
+
_proto.evaluate = function evaluate(context, result) {
|
|
4824
|
+
if (!(this.baseLayerNode && this.baseLayerNode.isValid())) {
|
|
4825
|
+
return result;
|
|
4826
|
+
}
|
|
4827
|
+
this.markNodeActive(context);
|
|
4828
|
+
this.previousTime = this.baseLayerNode.getCurrentTime();
|
|
4829
|
+
result = this.baseLayerNode.evaluate(context, result);
|
|
4830
|
+
this.currentTime = this.baseLayerNode.getCurrentTime();
|
|
4831
|
+
this.duration = this.baseLayerNode.getDuration();
|
|
4832
|
+
this.updateLayers(context, result);
|
|
4833
|
+
return result;
|
|
4834
|
+
};
|
|
4835
|
+
_proto.updateLayers = function updateLayers(context, result) {
|
|
4836
|
+
for(var _iterator = _create_for_of_iterator_helper_loose(this.layers), _step; !(_step = _iterator()).done;){
|
|
4837
|
+
var layer = _step.value;
|
|
4838
|
+
if (layer.inputNode && layer.weightValueNode) {
|
|
4839
|
+
this.layerNodeResult.pose.copyFrom(result.pose);
|
|
4840
|
+
layer.inputNode.evaluate(context, this.layerNodeResult);
|
|
4841
|
+
var layerWeight = layer.weightValueNode.getValue(context);
|
|
4842
|
+
Blender.localBlend(result.pose, this.layerNodeResult.pose, layerWeight, result.pose);
|
|
4843
|
+
}
|
|
4844
|
+
}
|
|
4845
|
+
return result;
|
|
4846
|
+
};
|
|
4847
|
+
return LayerBlendNode;
|
|
4848
|
+
}(PoseNode);
|
|
4849
|
+
|
|
4735
4850
|
exports.EqualNodeData = /*#__PURE__*/ function(GraphNodeData) {
|
|
4736
4851
|
_inherits(EqualNodeData, GraphNodeData);
|
|
4737
4852
|
function EqualNodeData() {
|
|
@@ -8186,8 +8301,8 @@ function initGLContext() {
|
|
|
8186
8301
|
copy(WebGLRenderingContext);
|
|
8187
8302
|
copy(WebGLRenderingContext.prototype);
|
|
8188
8303
|
} else {
|
|
8189
|
-
initErrors.push(// iOS 16 lockdown mode
|
|
8190
|
-
"iOS16 lockdown mode, WebGL Constants not in global");
|
|
8304
|
+
initErrors.push(isIOS() ? // iOS 16 lockdown mode
|
|
8305
|
+
"iOS16 lockdown mode, WebGL Constants not in global" : "WebGL Constants not in global, please check your environment");
|
|
8191
8306
|
}
|
|
8192
8307
|
if (!initErrors.length && !("HALF_FLOAT" in glContext)) {
|
|
8193
8308
|
// @ts-expect-error set default value
|
|
@@ -8796,7 +8911,9 @@ function _loadVideo() {
|
|
|
8796
8911
|
return [
|
|
8797
8912
|
2,
|
|
8798
8913
|
new Promise(function(resolve, reject) {
|
|
8799
|
-
var pending = video.play()
|
|
8914
|
+
var pending = video.play().catch(function(e) {
|
|
8915
|
+
reject(e);
|
|
8916
|
+
});
|
|
8800
8917
|
if (pending) {
|
|
8801
8918
|
void pending.then(function() {
|
|
8802
8919
|
return resolve(video);
|
|
@@ -15179,8 +15296,7 @@ var singleSplits = [
|
|
|
15179
15296
|
* 设置当前图层的颜色
|
|
15180
15297
|
* @since 2.5.0
|
|
15181
15298
|
*/ function set(value) {
|
|
15182
|
-
this.
|
|
15183
|
-
this.material.setColor("_Color", this._color);
|
|
15299
|
+
this.setColor(value);
|
|
15184
15300
|
}
|
|
15185
15301
|
}
|
|
15186
15302
|
]);
|
|
@@ -16538,7 +16654,11 @@ function buildEasingCurve(leftKeyframe, rightKeyframe) {
|
|
|
16538
16654
|
if (BezierMap[str]) {
|
|
16539
16655
|
bezEasing = BezierMap[str];
|
|
16540
16656
|
} else {
|
|
16541
|
-
|
|
16657
|
+
if (decimalEqual(valueInterval, 0)) {
|
|
16658
|
+
bezEasing = new BezierEasing();
|
|
16659
|
+
} else {
|
|
16660
|
+
bezEasing = new BezierEasing(x1, y1, x2, y2);
|
|
16661
|
+
}
|
|
16542
16662
|
BezierMap[str] = bezEasing;
|
|
16543
16663
|
}
|
|
16544
16664
|
return {
|
|
@@ -18961,12 +19081,23 @@ var seed$3 = 1;
|
|
|
18961
19081
|
return transformData;
|
|
18962
19082
|
};
|
|
18963
19083
|
_proto.fromData = function fromData(data) {
|
|
18964
|
-
var
|
|
18965
|
-
|
|
18966
|
-
|
|
18967
|
-
|
|
18968
|
-
|
|
18969
|
-
|
|
19084
|
+
var transformProps = {};
|
|
19085
|
+
transformProps.position = new Vector3().copyFrom(data.position);
|
|
19086
|
+
//@ts-expect-error
|
|
19087
|
+
if (data.quat) {
|
|
19088
|
+
//@ts-expect-error
|
|
19089
|
+
transformProps.quat = new Quaternion(data.quat.x, data.quat.y, data.quat.z, data.quat.w);
|
|
19090
|
+
} else {
|
|
19091
|
+
transformProps.rotation = new Euler(data.eulerHint.x, data.eulerHint.y, data.eulerHint.z);
|
|
19092
|
+
}
|
|
19093
|
+
transformProps.scale = new Vector3().copyFrom(data.scale);
|
|
19094
|
+
if (data.size) {
|
|
19095
|
+
transformProps.size = new Vector2().copyFrom(data.size);
|
|
19096
|
+
}
|
|
19097
|
+
if (data.anchor) {
|
|
19098
|
+
transformProps.anchor = new Vector2().copyFrom(data.anchor);
|
|
19099
|
+
}
|
|
19100
|
+
this.setTransform(transformProps);
|
|
18970
19101
|
};
|
|
18971
19102
|
_proto.dispose = function dispose() {};
|
|
18972
19103
|
_proto.updateTRSCache = function updateTRSCache() {
|
|
@@ -21386,44 +21517,6 @@ exports.ParticleSystem = /*#__PURE__*/ function(Component) {
|
|
|
21386
21517
|
_proto.setVisible = function setVisible(visible) {
|
|
21387
21518
|
this.renderer.setVisible(visible);
|
|
21388
21519
|
};
|
|
21389
|
-
_proto.setOpacity = function setOpacity(opacity) {
|
|
21390
|
-
var _material_getVector4;
|
|
21391
|
-
var material = this.renderer.particleMesh.mesh.material;
|
|
21392
|
-
var geometry = this.renderer.particleMesh.mesh.geometry;
|
|
21393
|
-
var originalColor = ((_material_getVector4 = material.getVector4("uOpacityOverLifetimeValue")) == null ? void 0 : _material_getVector4.toArray()) || [
|
|
21394
|
-
1,
|
|
21395
|
-
1,
|
|
21396
|
-
1,
|
|
21397
|
-
1
|
|
21398
|
-
];
|
|
21399
|
-
material.setVector4("uOpacityOverLifetimeValue", new Vector4(originalColor[0], originalColor[1], originalColor[2], opacity));
|
|
21400
|
-
var data = geometry.getAttributeData("aColor") || [];
|
|
21401
|
-
for(var i = 0; i < data.length; i += 32){
|
|
21402
|
-
data[i * 8 + 7] = opacity;
|
|
21403
|
-
}
|
|
21404
|
-
};
|
|
21405
|
-
/**
|
|
21406
|
-
* @internal
|
|
21407
|
-
*/ _proto.setColor = function setColor(r, g, b, a) {
|
|
21408
|
-
var _material_getVector4;
|
|
21409
|
-
var material = this.renderer.particleMesh.mesh.material;
|
|
21410
|
-
var geometry = this.renderer.particleMesh.mesh.geometry;
|
|
21411
|
-
var originalColor = ((_material_getVector4 = material.getVector4("uOpacityOverLifetimeValue")) == null ? void 0 : _material_getVector4.toArray()) || [
|
|
21412
|
-
1,
|
|
21413
|
-
1,
|
|
21414
|
-
1,
|
|
21415
|
-
1
|
|
21416
|
-
];
|
|
21417
|
-
material.setVector4("uOpacityOverLifetimeValue", new Vector4(originalColor[0], originalColor[1], originalColor[2], a));
|
|
21418
|
-
var data = geometry.getAttributeData("aColor") || [];
|
|
21419
|
-
for(var i = 0; i < data.length; i += 32){
|
|
21420
|
-
data[i * 8 + 4] = r;
|
|
21421
|
-
data[i * 8 + 5] = g;
|
|
21422
|
-
data[i * 8 + 6] = b;
|
|
21423
|
-
data[i * 8 + 7] = a;
|
|
21424
|
-
}
|
|
21425
|
-
};
|
|
21426
|
-
_proto.setParentTransform = function setParentTransform(transform) {};
|
|
21427
21520
|
_proto.getTextures = function getTextures() {
|
|
21428
21521
|
return this.renderer.getTextures();
|
|
21429
21522
|
};
|
|
@@ -23751,8 +23844,6 @@ var LateUpdateTickData = /*#__PURE__*/ function(TickData) {
|
|
|
23751
23844
|
/**
|
|
23752
23845
|
* 是否开启后处理
|
|
23753
23846
|
*/ _this.postProcessingEnabled = false;
|
|
23754
|
-
// TODO: 待优化
|
|
23755
|
-
_this.assigned = false;
|
|
23756
23847
|
/**
|
|
23757
23848
|
* 销毁状态位
|
|
23758
23849
|
*/ _this.destroyed = false;
|
|
@@ -23820,7 +23911,6 @@ var LateUpdateTickData = /*#__PURE__*/ function(TickData) {
|
|
|
23820
23911
|
aspect: width / height
|
|
23821
23912
|
}));
|
|
23822
23913
|
_this.url = scene.url;
|
|
23823
|
-
_this.assigned = true;
|
|
23824
23914
|
_this.interactive = true;
|
|
23825
23915
|
_this.handleItemMessage = handleItemMessage;
|
|
23826
23916
|
_this.createRenderFrame();
|
|
@@ -23889,6 +23979,7 @@ var LateUpdateTickData = /*#__PURE__*/ function(TickData) {
|
|
|
23889
23979
|
* 暂停合成的播放
|
|
23890
23980
|
*/ _proto.pause = function pause() {
|
|
23891
23981
|
this.paused = true;
|
|
23982
|
+
this.emit("pause");
|
|
23892
23983
|
};
|
|
23893
23984
|
/**
|
|
23894
23985
|
*
|
|
@@ -23907,6 +23998,9 @@ var LateUpdateTickData = /*#__PURE__*/ function(TickData) {
|
|
|
23907
23998
|
*/ _proto.gotoAndPlay = function gotoAndPlay(time) {
|
|
23908
23999
|
this.setTime(time);
|
|
23909
24000
|
this.resume();
|
|
24001
|
+
this.emit("play", {
|
|
24002
|
+
time: time
|
|
24003
|
+
});
|
|
23910
24004
|
};
|
|
23911
24005
|
/**
|
|
23912
24006
|
* 跳转合成到指定时间并暂停
|
|
@@ -23941,7 +24035,7 @@ var LateUpdateTickData = /*#__PURE__*/ function(TickData) {
|
|
|
23941
24035
|
this.forwardTime(time + this.startTime);
|
|
23942
24036
|
this.setSpeed(speed);
|
|
23943
24037
|
if (pause) {
|
|
23944
|
-
this.
|
|
24038
|
+
this.paused = true;
|
|
23945
24039
|
}
|
|
23946
24040
|
this.emit("goto", {
|
|
23947
24041
|
time: time
|
|
@@ -24000,7 +24094,7 @@ var LateUpdateTickData = /*#__PURE__*/ function(TickData) {
|
|
|
24000
24094
|
* 合成更新,针对所有 item 的更新
|
|
24001
24095
|
* @param deltaTime - 更新的时间步长
|
|
24002
24096
|
*/ _proto.update = function update(deltaTime) {
|
|
24003
|
-
if (
|
|
24097
|
+
if (this.getPaused()) {
|
|
24004
24098
|
return;
|
|
24005
24099
|
}
|
|
24006
24100
|
// scene VFXItem components lifetime function.
|
|
@@ -24633,10 +24727,13 @@ exports.VFXItem = /*#__PURE__*/ function(EffectsObject) {
|
|
|
24633
24727
|
* @param {number} b
|
|
24634
24728
|
* @param {number} a
|
|
24635
24729
|
* @internal
|
|
24730
|
+
* @deprecated 2.6.0 Please use `Component.setColor` instead
|
|
24636
24731
|
*/ _proto.setColor = function setColor(r, g, b, a) {};
|
|
24637
24732
|
/**
|
|
24638
24733
|
* 设置元素的透明度
|
|
24639
24734
|
* @param opacity - 透明度值,范围 [0,1]
|
|
24735
|
+
* @internal
|
|
24736
|
+
* @deprecated 2.6.0 Please use `Component.setColor` instead
|
|
24640
24737
|
*/ _proto.setOpacity = function setOpacity(opacity) {};
|
|
24641
24738
|
/**
|
|
24642
24739
|
* 激活或停用 VFXItem
|
|
@@ -24839,27 +24936,8 @@ exports.VFXItem = /*#__PURE__*/ function(EffectsObject) {
|
|
|
24839
24936
|
this.id = id.toString(); // TODO 老数据 id 是 number,需要转换
|
|
24840
24937
|
this.name = name;
|
|
24841
24938
|
this.start = delay ? delay : this.start;
|
|
24842
|
-
var transformProps = {};
|
|
24843
24939
|
if (transform) {
|
|
24844
|
-
|
|
24845
|
-
// FIXME: transform.rotation待删除
|
|
24846
|
-
//@ts-expect-error
|
|
24847
|
-
if (transform.quat) {
|
|
24848
|
-
//@ts-expect-error
|
|
24849
|
-
transformProps.quat = new Quaternion(transform.quat.x, transform.quat.y, transform.quat.z, transform.quat.w);
|
|
24850
|
-
} else {
|
|
24851
|
-
var _transform_eulerHint;
|
|
24852
|
-
//@ts-expect-error
|
|
24853
|
-
transformProps.rotation = new Euler().copyFrom((_transform_eulerHint = transform.eulerHint) != null ? _transform_eulerHint : transform.rotation);
|
|
24854
|
-
}
|
|
24855
|
-
transformProps.scale = new Vector3().copyFrom(transform.scale);
|
|
24856
|
-
if (transform.size) {
|
|
24857
|
-
transformProps.size = new Vector2().copyFrom(transform.size);
|
|
24858
|
-
}
|
|
24859
|
-
if (transform.anchor) {
|
|
24860
|
-
transformProps.anchor = new Vector2().copyFrom(transform.anchor);
|
|
24861
|
-
}
|
|
24862
|
-
this.transform.setTransform(transformProps);
|
|
24940
|
+
this.transform.fromData(transform);
|
|
24863
24941
|
}
|
|
24864
24942
|
this.transform.name = this.name;
|
|
24865
24943
|
this.transform.engine = this.engine;
|
|
@@ -30968,7 +31046,7 @@ function getStandardSpriteContent(sprite, transform) {
|
|
|
30968
31046
|
return ret;
|
|
30969
31047
|
}
|
|
30970
31048
|
|
|
30971
|
-
var version$1 = "2.6.0-
|
|
31049
|
+
var version$1 = "2.6.0-beta.0";
|
|
30972
31050
|
var v0 = /^(\d+)\.(\d+)\.(\d+)(-(\w+)\.\d+)?$/;
|
|
30973
31051
|
var standardVersion = /^(\d+)\.(\d+)$/;
|
|
30974
31052
|
var reverseParticle = false;
|
|
@@ -34218,7 +34296,7 @@ registerPlugin("sprite", SpriteLoader, exports.VFXItem);
|
|
|
34218
34296
|
registerPlugin("particle", ParticleLoader, exports.VFXItem);
|
|
34219
34297
|
registerPlugin("cal", CalculateLoader, exports.VFXItem);
|
|
34220
34298
|
registerPlugin("interact", InteractLoader, exports.VFXItem);
|
|
34221
|
-
var version = "2.6.0-
|
|
34299
|
+
var version = "2.6.0-beta.0";
|
|
34222
34300
|
logger.info("Core version: " + version + ".");
|
|
34223
34301
|
|
|
34224
34302
|
exports.AbstractPlugin = AbstractPlugin;
|
|
@@ -34290,6 +34368,7 @@ exports.InteractLoader = InteractLoader;
|
|
|
34290
34368
|
exports.InteractMesh = InteractMesh;
|
|
34291
34369
|
exports.InvalidIndex = InvalidIndex;
|
|
34292
34370
|
exports.KTXTexture = KTXTexture;
|
|
34371
|
+
exports.LayerBlendNode = LayerBlendNode;
|
|
34293
34372
|
exports.LineSegments = LineSegments;
|
|
34294
34373
|
exports.LinearValue = LinearValue;
|
|
34295
34374
|
exports.MaskProcessor = MaskProcessor;
|