@galacean/effects-core 2.0.2 → 2.0.3
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/README.md +1 -1
- package/dist/asset-loader.d.ts +0 -1
- package/dist/comp-vfx-item.d.ts +0 -1
- package/dist/components/component.d.ts +0 -2
- package/dist/components/effect-component.d.ts +0 -1
- package/dist/composition.d.ts +0 -20
- package/dist/effects-object.d.ts +0 -1
- package/dist/effects-package.d.ts +0 -1
- package/dist/index.js +19 -15
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +19 -15
- package/dist/index.mjs.map +1 -1
- package/dist/plugins/cal/calculate-item.d.ts +0 -9
- package/dist/plugins/cal/calculate-vfx-item.d.ts +0 -52
- package/dist/plugins/cal/playable-graph.d.ts +0 -101
- package/dist/plugins/interact/interact-item.d.ts +0 -1
- package/dist/plugins/particle/particle-system-renderer.d.ts +0 -1
- package/dist/plugins/particle/particle-system.d.ts +0 -4
- package/dist/plugins/particle/particle-vfx-item.d.ts +1 -12
- package/dist/plugins/sprite/sprite-item.d.ts +3 -1
- package/dist/plugins/text/text-item.d.ts +0 -1
- package/dist/plugins/timeline/track.d.ts +1 -57
- package/dist/vfx-item.d.ts +0 -9
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/asset-loader.d.ts
CHANGED
package/dist/comp-vfx-item.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ import { EffectsObject } from '../effects-object';
|
|
|
2
2
|
import type { VFXItem } from '../vfx-item';
|
|
3
3
|
/**
|
|
4
4
|
* @since 2.0.0
|
|
5
|
-
* @internal
|
|
6
5
|
*/
|
|
7
6
|
export declare abstract class Component extends EffectsObject {
|
|
8
7
|
name: string;
|
|
@@ -21,7 +20,6 @@ export declare abstract class Component extends EffectsObject {
|
|
|
21
20
|
}
|
|
22
21
|
/**
|
|
23
22
|
* @since 2.0.0
|
|
24
|
-
* @internal
|
|
25
23
|
*/
|
|
26
24
|
export declare abstract class Behaviour extends Component {
|
|
27
25
|
isAwakeCalled: boolean;
|
package/dist/composition.d.ts
CHANGED
|
@@ -362,31 +362,11 @@ export declare class Composition extends EventEmitter<CompositionEvent<Compositi
|
|
|
362
362
|
* @param type - 交互类型
|
|
363
363
|
*/
|
|
364
364
|
removeInteractiveItem(item: VFXItem, type: spec.InteractType): void;
|
|
365
|
-
/**
|
|
366
|
-
* 销毁插件 Item 中保存的纹理数组
|
|
367
|
-
* @internal
|
|
368
|
-
* @param textures - 需要销毁的数组
|
|
369
|
-
*/
|
|
370
|
-
destroyTextures(textures: (Texture | null | undefined)[]): void;
|
|
371
|
-
/**
|
|
372
|
-
* 销毁 Item
|
|
373
|
-
* @internal
|
|
374
|
-
* @param item - 需要销毁的 item
|
|
375
|
-
*/
|
|
376
|
-
destroyItem(item: VFXItem): void;
|
|
377
365
|
lost(e: Event): void;
|
|
378
366
|
/**
|
|
379
367
|
* 合成对象销毁
|
|
380
368
|
*/
|
|
381
369
|
dispose(): void;
|
|
382
|
-
/**
|
|
383
|
-
* 编辑器使用的 transform 修改方法
|
|
384
|
-
* @internal
|
|
385
|
-
* @param scale - 缩放比例
|
|
386
|
-
* @param dx - x偏移量
|
|
387
|
-
* @param dy - y偏移量
|
|
388
|
-
*/
|
|
389
|
-
setEditorTransform(scale: number, dx: number, dy: number): void;
|
|
390
370
|
/**
|
|
391
371
|
* 合成整体在水平方向移动 x 像素,垂直方向移动 y 像素
|
|
392
372
|
*/
|
package/dist/effects-object.d.ts
CHANGED
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.0.
|
|
6
|
+
* Version: v2.0.3
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
'use strict';
|
|
@@ -4569,7 +4569,6 @@ function getDirectStore(target) {
|
|
|
4569
4569
|
|
|
4570
4570
|
/**
|
|
4571
4571
|
* @since 2.0.0
|
|
4572
|
-
* @internal
|
|
4573
4572
|
*/ var EffectsObject = /*#__PURE__*/ function() {
|
|
4574
4573
|
function EffectsObject(engine) {
|
|
4575
4574
|
this.engine = engine;
|
|
@@ -4605,7 +4604,6 @@ function getDirectStore(target) {
|
|
|
4605
4604
|
|
|
4606
4605
|
/**
|
|
4607
4606
|
* @since 2.0.0
|
|
4608
|
-
* @internal
|
|
4609
4607
|
*/ var Component = /*#__PURE__*/ function(EffectsObject) {
|
|
4610
4608
|
_inherits(Component, EffectsObject);
|
|
4611
4609
|
function Component() {
|
|
@@ -4640,7 +4638,6 @@ function getDirectStore(target) {
|
|
|
4640
4638
|
}(EffectsObject);
|
|
4641
4639
|
/**
|
|
4642
4640
|
* @since 2.0.0
|
|
4643
|
-
* @internal
|
|
4644
4641
|
*/ var Behaviour = /*#__PURE__*/ function(Component) {
|
|
4645
4642
|
_inherits(Behaviour, Component);
|
|
4646
4643
|
function Behaviour() {
|
|
@@ -13904,13 +13901,17 @@ var SpriteColorPlayable = /*#__PURE__*/ function(Playable) {
|
|
|
13904
13901
|
if (!_instanceof1(boundObject, exports.VFXItem)) {
|
|
13905
13902
|
return;
|
|
13906
13903
|
}
|
|
13904
|
+
if (!this.spriteComponent) {
|
|
13905
|
+
this.spriteComponent = boundObject.getComponent(exports.SpriteComponent);
|
|
13906
|
+
}
|
|
13907
13907
|
if (!this.spriteMaterial) {
|
|
13908
|
-
this.spriteMaterial =
|
|
13908
|
+
this.spriteMaterial = this.spriteComponent.material;
|
|
13909
13909
|
var startColor = this.spriteMaterial.getVector4("_Color");
|
|
13910
13910
|
if (startColor) {
|
|
13911
13911
|
this.startColor = startColor.toArray();
|
|
13912
13912
|
}
|
|
13913
13913
|
}
|
|
13914
|
+
this.spriteComponent.setAnimationTime(this.time);
|
|
13914
13915
|
var colorInc = vecFill(tempColor, 1);
|
|
13915
13916
|
var colorChanged;
|
|
13916
13917
|
var life = this.time / boundObject.duration;
|
|
@@ -13970,7 +13971,6 @@ exports.SpriteComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
13970
13971
|
_this = RendererComponent.call(this, engine) || this;
|
|
13971
13972
|
_this.cachePrefix = "-";
|
|
13972
13973
|
_this.frameAnimationLoop = false;
|
|
13973
|
-
_this.frameAnimationTime = 0;
|
|
13974
13974
|
_this.color = [
|
|
13975
13975
|
1,
|
|
13976
13976
|
1,
|
|
@@ -13978,6 +13978,8 @@ exports.SpriteComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
13978
13978
|
1
|
|
13979
13979
|
];
|
|
13980
13980
|
_this.visible = true;
|
|
13981
|
+
_this.isManualTimeSet = false;
|
|
13982
|
+
_this.frameAnimationTime = 0;
|
|
13981
13983
|
_this.getHitTestParams = function(force) {
|
|
13982
13984
|
var ui = _this.interaction;
|
|
13983
13985
|
if (force || ui) {
|
|
@@ -14060,6 +14062,12 @@ exports.SpriteComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
14060
14062
|
this.renderer.texture = texture;
|
|
14061
14063
|
this.material.setTexture("uSampler0", texture);
|
|
14062
14064
|
};
|
|
14065
|
+
/**
|
|
14066
|
+
* @internal
|
|
14067
|
+
*/ _proto.setAnimationTime = function setAnimationTime(time) {
|
|
14068
|
+
this.frameAnimationTime = time;
|
|
14069
|
+
this.isManualTimeSet = true;
|
|
14070
|
+
};
|
|
14063
14071
|
_proto.render = function render(renderer) {
|
|
14064
14072
|
if (!this.getVisible()) {
|
|
14065
14073
|
return;
|
|
@@ -14074,12 +14082,12 @@ exports.SpriteComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
14074
14082
|
};
|
|
14075
14083
|
_proto.start = function start() {
|
|
14076
14084
|
this.item.getHitTestParams = this.getHitTestParams;
|
|
14077
|
-
if (this.item.endBehavior === EndBehavior.restart) {
|
|
14078
|
-
this.frameAnimationLoop = true;
|
|
14079
|
-
}
|
|
14080
14085
|
};
|
|
14081
14086
|
_proto.update = function update(dt) {
|
|
14082
|
-
this.
|
|
14087
|
+
if (!this.isManualTimeSet) {
|
|
14088
|
+
this.frameAnimationTime += dt / 1000;
|
|
14089
|
+
this.isManualTimeSet = false;
|
|
14090
|
+
}
|
|
14083
14091
|
var time = this.frameAnimationTime;
|
|
14084
14092
|
var duration = this.item.duration;
|
|
14085
14093
|
if (time > duration && this.frameAnimationLoop) {
|
|
@@ -16474,7 +16482,6 @@ function getTrailMeshShader(trails, particleMaxCount, name, gpuCapability, env)
|
|
|
16474
16482
|
|
|
16475
16483
|
/**
|
|
16476
16484
|
* @since 2.0.0
|
|
16477
|
-
* @internal
|
|
16478
16485
|
*/ var ParticleSystemRenderer = /*#__PURE__*/ function(RendererComponent) {
|
|
16479
16486
|
_inherits(ParticleSystemRenderer, RendererComponent);
|
|
16480
16487
|
function ParticleSystemRenderer(engine, particleMeshProps, trailMeshProps) {
|
|
@@ -19338,7 +19345,6 @@ function compareTracks(a, b) {
|
|
|
19338
19345
|
|
|
19339
19346
|
/**
|
|
19340
19347
|
* @since 2.0.0
|
|
19341
|
-
* @internal
|
|
19342
19348
|
*/ var CompositionComponent = /*#__PURE__*/ function(Behaviour) {
|
|
19343
19349
|
_inherits(CompositionComponent, Behaviour);
|
|
19344
19350
|
function CompositionComponent() {
|
|
@@ -21627,7 +21633,6 @@ var SerializationHelper = /*#__PURE__*/ function() {
|
|
|
21627
21633
|
|
|
21628
21634
|
/**
|
|
21629
21635
|
* @since 2.0.0
|
|
21630
|
-
* @internal
|
|
21631
21636
|
*/ var AssetLoader = /*#__PURE__*/ function() {
|
|
21632
21637
|
function AssetLoader(engine) {
|
|
21633
21638
|
this.engine = engine;
|
|
@@ -27113,7 +27118,6 @@ var FBGeometryDataT = /*#__PURE__*/ function() {
|
|
|
27113
27118
|
|
|
27114
27119
|
/**
|
|
27115
27120
|
* @since 2.0.0
|
|
27116
|
-
* @internal
|
|
27117
27121
|
*/ var EffectsPackage = /*#__PURE__*/ function() {
|
|
27118
27122
|
function EffectsPackage() {
|
|
27119
27123
|
this.exportObjectDatas = [];
|
|
@@ -27661,7 +27665,7 @@ registerPlugin("sprite", SpriteLoader, exports.VFXItem, true);
|
|
|
27661
27665
|
registerPlugin("particle", ParticleLoader, exports.VFXItem, true);
|
|
27662
27666
|
registerPlugin("cal", CalculateLoader, exports.VFXItem, true);
|
|
27663
27667
|
registerPlugin("interact", InteractLoader, exports.VFXItem, true);
|
|
27664
|
-
var version = "2.0.
|
|
27668
|
+
var version = "2.0.3";
|
|
27665
27669
|
logger.info("Core version: " + version + ".");
|
|
27666
27670
|
|
|
27667
27671
|
exports.AbstractPlugin = AbstractPlugin;
|