@galacean/effects-threejs 2.6.0-alpha.1 → 2.6.0-beta.1
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/index.js +25 -11
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +2 -2
- package/dist/index.min.js.map +1 -1
- package/dist/index.mjs +25 -11
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Description: Galacean Effects runtime threejs plugin for the web
|
|
4
4
|
* Author: Ant Group CO., Ltd.
|
|
5
5
|
* Contributors: 燃然,飂兮,十弦,云垣,茂安,意绮
|
|
6
|
-
* Version: v2.6.0-
|
|
6
|
+
* Version: v2.6.0-beta.1
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
'use strict';
|
|
@@ -1099,7 +1099,8 @@ function _inherits(subClass, superClass) {
|
|
|
1099
1099
|
JSONSceneVersion["3_1"] = "3.1";
|
|
1100
1100
|
JSONSceneVersion["3_2"] = "3.2";
|
|
1101
1101
|
JSONSceneVersion["3_3"] = "3.3";
|
|
1102
|
-
JSONSceneVersion["
|
|
1102
|
+
JSONSceneVersion["3_4"] = "3.4";
|
|
1103
|
+
JSONSceneVersion["LATEST"] = "3.4";
|
|
1103
1104
|
})(JSONSceneVersion || (JSONSceneVersion = {}));
|
|
1104
1105
|
|
|
1105
1106
|
/*********************************************/ /* 元素属性参数类型 */ /*********************************************/ /**
|
|
@@ -5605,7 +5606,7 @@ var Skeleton = /*#__PURE__*/ function() {
|
|
|
5605
5606
|
};
|
|
5606
5607
|
_proto.addRecordedProperty = function addRecordedProperty(path, className, property, type) {
|
|
5607
5608
|
var totalPath = path + className + property;
|
|
5608
|
-
if (this.pathToObjectIndex.get(totalPath)) {
|
|
5609
|
+
if (this.pathToObjectIndex.get(totalPath) !== undefined) {
|
|
5609
5610
|
return;
|
|
5610
5611
|
}
|
|
5611
5612
|
var targetBone = this.findTarget(path);
|
|
@@ -8322,8 +8323,8 @@ function initGLContext() {
|
|
|
8322
8323
|
copy(WebGLRenderingContext);
|
|
8323
8324
|
copy(WebGLRenderingContext.prototype);
|
|
8324
8325
|
} else {
|
|
8325
|
-
initErrors.push(// iOS 16 lockdown mode
|
|
8326
|
-
"iOS16 lockdown mode, WebGL Constants not in global");
|
|
8326
|
+
initErrors.push(isIOS() ? // iOS 16 lockdown mode
|
|
8327
|
+
"iOS16 lockdown mode, WebGL Constants not in global" : "WebGL Constants not in global, please check your environment");
|
|
8327
8328
|
}
|
|
8328
8329
|
if (!initErrors.length && !("HALF_FLOAT" in glContext)) {
|
|
8329
8330
|
// @ts-expect-error set default value
|
|
@@ -8932,7 +8933,9 @@ function _loadVideo() {
|
|
|
8932
8933
|
return [
|
|
8933
8934
|
2,
|
|
8934
8935
|
new Promise(function(resolve, reject) {
|
|
8935
|
-
var pending = video.play()
|
|
8936
|
+
var pending = video.play().catch(function(e) {
|
|
8937
|
+
reject(e);
|
|
8938
|
+
});
|
|
8936
8939
|
if (pending) {
|
|
8937
8940
|
void pending.then(function() {
|
|
8938
8941
|
return resolve(video);
|
|
@@ -23998,6 +24001,7 @@ var LateUpdateTickData = /*#__PURE__*/ function(TickData) {
|
|
|
23998
24001
|
* 暂停合成的播放
|
|
23999
24002
|
*/ _proto.pause = function pause() {
|
|
24000
24003
|
this.paused = true;
|
|
24004
|
+
this.emit("pause");
|
|
24001
24005
|
};
|
|
24002
24006
|
/**
|
|
24003
24007
|
*
|
|
@@ -24016,6 +24020,9 @@ var LateUpdateTickData = /*#__PURE__*/ function(TickData) {
|
|
|
24016
24020
|
*/ _proto.gotoAndPlay = function gotoAndPlay(time) {
|
|
24017
24021
|
this.setTime(time);
|
|
24018
24022
|
this.resume();
|
|
24023
|
+
this.emit("play", {
|
|
24024
|
+
time: time
|
|
24025
|
+
});
|
|
24019
24026
|
};
|
|
24020
24027
|
/**
|
|
24021
24028
|
* 跳转合成到指定时间并暂停
|
|
@@ -24050,7 +24057,7 @@ var LateUpdateTickData = /*#__PURE__*/ function(TickData) {
|
|
|
24050
24057
|
this.forwardTime(time + this.startTime);
|
|
24051
24058
|
this.setSpeed(speed);
|
|
24052
24059
|
if (pause) {
|
|
24053
|
-
this.
|
|
24060
|
+
this.paused = true;
|
|
24054
24061
|
}
|
|
24055
24062
|
this.emit("goto", {
|
|
24056
24063
|
time: time
|
|
@@ -25489,7 +25496,11 @@ exports.SpriteComponent = /*#__PURE__*/ function(BaseRenderComponent) {
|
|
|
25489
25496
|
dy
|
|
25490
25497
|
]);
|
|
25491
25498
|
}
|
|
25492
|
-
this.time
|
|
25499
|
+
this.time = time + dt / 1000;
|
|
25500
|
+
};
|
|
25501
|
+
_proto.onDisable = function onDisable() {
|
|
25502
|
+
BaseRenderComponent.prototype.onDisable.call(this);
|
|
25503
|
+
this.time = 0;
|
|
25493
25504
|
};
|
|
25494
25505
|
_proto.onDestroy = function onDestroy() {
|
|
25495
25506
|
var texture = this.renderer.texture;
|
|
@@ -31061,7 +31072,7 @@ function getStandardSpriteContent(sprite, transform) {
|
|
|
31061
31072
|
return ret;
|
|
31062
31073
|
}
|
|
31063
31074
|
|
|
31064
|
-
var version$2 = "2.6.0-
|
|
31075
|
+
var version$2 = "2.6.0-beta.1";
|
|
31065
31076
|
var v0 = /^(\d+)\.(\d+)\.(\d+)(-(\w+)\.\d+)?$/;
|
|
31066
31077
|
var standardVersion = /^(\d+)\.(\d+)$/;
|
|
31067
31078
|
var reverseParticle = false;
|
|
@@ -34311,7 +34322,7 @@ registerPlugin("sprite", SpriteLoader, exports.VFXItem);
|
|
|
34311
34322
|
registerPlugin("particle", ParticleLoader, exports.VFXItem);
|
|
34312
34323
|
registerPlugin("cal", CalculateLoader, exports.VFXItem);
|
|
34313
34324
|
registerPlugin("interact", InteractLoader, exports.VFXItem);
|
|
34314
|
-
var version$1 = "2.6.0-
|
|
34325
|
+
var version$1 = "2.6.0-beta.1";
|
|
34315
34326
|
logger.info("Core version: " + version$1 + ".");
|
|
34316
34327
|
|
|
34317
34328
|
var _obj;
|
|
@@ -35704,6 +35715,9 @@ var ThreeRenderer = /*#__PURE__*/ function(Renderer) {
|
|
|
35704
35715
|
});
|
|
35705
35716
|
};
|
|
35706
35717
|
_proto.resume = function resume() {
|
|
35718
|
+
this.dispatchEvent({
|
|
35719
|
+
type: "resume"
|
|
35720
|
+
});
|
|
35707
35721
|
this.compositions.forEach(function(composition) {
|
|
35708
35722
|
composition.resume();
|
|
35709
35723
|
});
|
|
@@ -35913,7 +35927,7 @@ setMaxSpriteMeshItemCount(8);
|
|
|
35913
35927
|
*/ Mesh.create = function(engine, props) {
|
|
35914
35928
|
return new ThreeMesh(engine, props);
|
|
35915
35929
|
};
|
|
35916
|
-
var version = "2.6.0-
|
|
35930
|
+
var version = "2.6.0-beta.1";
|
|
35917
35931
|
logger.info("THREEJS plugin version: " + version + ".");
|
|
35918
35932
|
|
|
35919
35933
|
exports.AbstractPlugin = AbstractPlugin;
|