@galacean/effects-core 2.5.2 → 2.5.4
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/index.js +16 -17
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +16 -17
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
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.5.
|
|
6
|
+
* Version: v2.5.4
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
@@ -5923,8 +5923,8 @@ function initGLContext() {
|
|
|
5923
5923
|
copy(WebGLRenderingContext);
|
|
5924
5924
|
copy(WebGLRenderingContext.prototype);
|
|
5925
5925
|
} else {
|
|
5926
|
-
initErrors.push(// iOS 16 lockdown mode
|
|
5927
|
-
"iOS16 lockdown mode, WebGL Constants not in global");
|
|
5926
|
+
initErrors.push(isIOS() ? // iOS 16 lockdown mode
|
|
5927
|
+
"iOS16 lockdown mode, WebGL Constants not in global" : "WebGL Constants not in global, please check your environment");
|
|
5928
5928
|
}
|
|
5929
5929
|
if (!initErrors.length && !("HALF_FLOAT" in glContext)) {
|
|
5930
5930
|
// @ts-expect-error set default value
|
|
@@ -6544,7 +6544,9 @@ function _loadVideo() {
|
|
|
6544
6544
|
return [
|
|
6545
6545
|
2,
|
|
6546
6546
|
new Promise(function(resolve, reject) {
|
|
6547
|
-
var pending = video.play()
|
|
6547
|
+
var pending = video.play().catch(function(e) {
|
|
6548
|
+
reject(e);
|
|
6549
|
+
});
|
|
6548
6550
|
if (pending) {
|
|
6549
6551
|
void pending.then(function() {
|
|
6550
6552
|
return resolve(video);
|
|
@@ -14286,7 +14288,11 @@ function buildEasingCurve(leftKeyframe, rightKeyframe) {
|
|
|
14286
14288
|
if (BezierMap[str]) {
|
|
14287
14289
|
bezEasing = BezierMap[str];
|
|
14288
14290
|
} else {
|
|
14289
|
-
|
|
14291
|
+
if (decimalEqual(valueInterval, 0)) {
|
|
14292
|
+
bezEasing = new BezierEasing();
|
|
14293
|
+
} else {
|
|
14294
|
+
bezEasing = new BezierEasing(x1, y1, x2, y2);
|
|
14295
|
+
}
|
|
14290
14296
|
BezierMap[str] = bezEasing;
|
|
14291
14297
|
}
|
|
14292
14298
|
return {
|
|
@@ -21428,8 +21434,6 @@ var LateUpdateTickData = /*#__PURE__*/ function(TickData) {
|
|
|
21428
21434
|
/**
|
|
21429
21435
|
* 是否开启后处理
|
|
21430
21436
|
*/ _this.postProcessingEnabled = false;
|
|
21431
|
-
// TODO: 待优化
|
|
21432
|
-
_this.assigned = false;
|
|
21433
21437
|
/**
|
|
21434
21438
|
* 销毁状态位
|
|
21435
21439
|
*/ _this.destroyed = false;
|
|
@@ -21495,7 +21499,6 @@ var LateUpdateTickData = /*#__PURE__*/ function(TickData) {
|
|
|
21495
21499
|
aspect: width / height
|
|
21496
21500
|
}));
|
|
21497
21501
|
_this.url = scene.url;
|
|
21498
|
-
_this.assigned = true;
|
|
21499
21502
|
_this.interactive = true;
|
|
21500
21503
|
_this.handleItemMessage = handleItemMessage;
|
|
21501
21504
|
_this.createRenderFrame();
|
|
@@ -21667,7 +21670,7 @@ var LateUpdateTickData = /*#__PURE__*/ function(TickData) {
|
|
|
21667
21670
|
* 合成更新,针对所有 item 的更新
|
|
21668
21671
|
* @param deltaTime - 更新的时间步长
|
|
21669
21672
|
*/ _proto.update = function update(deltaTime) {
|
|
21670
|
-
if (
|
|
21673
|
+
if (this.getPaused()) {
|
|
21671
21674
|
return;
|
|
21672
21675
|
}
|
|
21673
21676
|
// scene VFXItem components lifetime function.
|
|
@@ -26375,14 +26378,10 @@ var TextComponentBase = /*#__PURE__*/ function() {
|
|
|
26375
26378
|
_proto.getLineCount = function getLineCount(text, init) {
|
|
26376
26379
|
var context = this.context;
|
|
26377
26380
|
var _this_textLayout = this.textLayout, letterSpace = _this_textLayout.letterSpace, overflow = _this_textLayout.overflow;
|
|
26378
|
-
var fontScale = init ? this.textStyle.fontSize / 10
|
|
26379
|
-
var width = this.textLayout.width + this.textStyle.fontOffset;
|
|
26381
|
+
var fontScale = init ? this.textStyle.fontSize / 10 * this.textStyle.fontScale : this.textStyle.fontScale;
|
|
26382
|
+
var width = (this.textLayout.width + this.textStyle.fontOffset) * this.textStyle.fontScale;
|
|
26380
26383
|
var lineCount = 1;
|
|
26381
26384
|
var x = 0;
|
|
26382
|
-
//设置context.font的字号
|
|
26383
|
-
// if (context) {
|
|
26384
|
-
// context.font = this.getFontDesc(this.textStyle.fontSize);
|
|
26385
|
-
// }
|
|
26386
26385
|
for(var i = 0; i < text.length; i++){
|
|
26387
26386
|
var _context_measureText;
|
|
26388
26387
|
var str = text[i];
|
|
@@ -28571,7 +28570,7 @@ function getStandardSpriteContent(sprite, transform) {
|
|
|
28571
28570
|
return ret;
|
|
28572
28571
|
}
|
|
28573
28572
|
|
|
28574
|
-
var version$1 = "2.5.
|
|
28573
|
+
var version$1 = "2.5.4";
|
|
28575
28574
|
var v0 = /^(\d+)\.(\d+)\.(\d+)(-(\w+)\.\d+)?$/;
|
|
28576
28575
|
var standardVersion = /^(\d+)\.(\d+)$/;
|
|
28577
28576
|
var reverseParticle = false;
|
|
@@ -31821,7 +31820,7 @@ registerPlugin("sprite", SpriteLoader, VFXItem);
|
|
|
31821
31820
|
registerPlugin("particle", ParticleLoader, VFXItem);
|
|
31822
31821
|
registerPlugin("cal", CalculateLoader, VFXItem);
|
|
31823
31822
|
registerPlugin("interact", InteractLoader, VFXItem);
|
|
31824
|
-
var version = "2.5.
|
|
31823
|
+
var version = "2.5.4";
|
|
31825
31824
|
logger.info("Core version: " + version + ".");
|
|
31826
31825
|
|
|
31827
31826
|
export { AbstractPlugin, ActivationPlayable, ActivationPlayableAsset, ActivationTrack, AnimationClip, AnimationClipPlayable, Asset, AssetLoader, AssetManager, AssetService, BYTES_TYPE_MAP, BaseRenderComponent, Behaviour, BezierCurve, BezierCurvePath, BezierCurveQuat, BinaryAsset, COMPRESSED_TEXTURE, COPY_FRAGMENT_SHADER, COPY_MESH_SHADER_ID, COPY_VERTEX_SHADER, CalculateLoader, Camera, CameraController, CameraVFXItemLoader, ColorCurve, ColorPropertyPlayableAsset, ColorPropertyTrack, Component, Composition, CompositionComponent, DEFAULT_FONTS, DEFAULT_FPS, Database, Deferred, DestroyOptions, Downloader, EFFECTS_COPY_MESH_NAME, EVENT_TYPE_CLICK, EVENT_TYPE_TOUCH_END, EVENT_TYPE_TOUCH_MOVE, EVENT_TYPE_TOUCH_START, EffectComponent, EffectsObject, EffectsPackage, Ellipse, Engine, EventEmitter, EventSystem, Fake3DAnimationMode, Fake3DComponent, FilterMode, Float16ArrayWrapper, FloatPropertyPlayableAsset, FloatPropertyTrack, Framebuffer, GLSLVersion, GPUCapability, Geometry, GlobalUniforms, GradientValue, GraphicsPath, HELP_LINK, HitTestType, InteractComponent, InteractLoader, InteractMesh, Item, KTXTexture, LineSegments, LinearValue, MaskMode, MaskProcessor, Material, MaterialDataBlock, MaterialRenderType, MaterialTrack, Mesh, MeshCollider, ObjectBindingTrack, OrderType, PLAYER_OPTIONS_ENV_EDITOR, POST_PROCESS_SETTINGS, ParticleBehaviourPlayable, ParticleBehaviourPlayableAsset, ParticleLoader, ParticleMesh, ParticleSystem, ParticleSystemRenderer, ParticleTrack, PassTextureCache, PathSegments, PluginSystem, PolyStar, Polygon, PostProcessVolume, PropertyTrack, RENDER_PASS_NAME_PREFIX, RENDER_PREFER_LOOKUP_TEXTURE, RUNTIME_ENV, RandomSetValue, RandomValue, RandomVectorValue, RenderFrame, RenderPass, RenderPassAttachmentStorageType, RenderPassDestroyAttachmentType, RenderPassPriorityNormal, RenderPassPriorityPostprocess, RenderPassPriorityPrepare, RenderTargetHandle, RenderTextureFormat, Renderbuffer, Renderer, RendererComponent, RuntimeClip, SEMANTIC_MAIN_PRE_COLOR_ATTACHMENT_0, SEMANTIC_MAIN_PRE_COLOR_ATTACHMENT_SIZE_0, SEMANTIC_PRE_COLOR_ATTACHMENT_0, SEMANTIC_PRE_COLOR_ATTACHMENT_SIZE_0, SPRITE_VERTEX_STRIDE, Scene, SemanticMap, SerializationHelper, Shader, ShaderCompileResultStatus, ShaderFactory, ShaderType, ShaderVariant, ShapeComponent, ShapePath, SpriteColorPlayableAsset, SpriteColorTrack, SpriteComponent, SpriteLoader, StarType, StaticValue, SubCompositionPlayableAsset, SubCompositionTrack, TEMPLATE_USE_OFFSCREEN_CANVAS, TangentMode, TextComponent, TextComponentBase, TextLayout, TextLoader, TextStyle, Texture, TextureFactory, TextureLoadAction, TextureSourceType, TextureStoreAction, Ticker, TimelineAsset, TimelineClip, TimelinePlayable, TrackAsset, TrackSortWrapper, TrackType, Transform, TransformAnimationPlayable, TransformPlayableAsset, TransformTrack, VFXItem, ValueGetter, Vector2Curve, Vector2PropertyPlayableAsset, Vector2PropertyTrack, Vector4Curve, Vector4PropertyPlayableAsset, Vector4PropertyTrack, WeightedMode, addByOrder, addItem, addItemWithOrder, applyMixins, assertExist, asserts, base64ToFile, blend, buildLine, calculateTranslation, canvasPool, closePointEps, colorGradingFrag, colorStopsFromGradient, colorToArr$1 as colorToArr, combineImageTemplate, createCopyShader, createGLContext, createKeyFrameMeta, createShape, createValueGetter, curveEps, decimalEqual, defaultPlugins, deserializeMipmapTexture, earcut, effectsClass, effectsClassStore, enlargeBuffer, ensureFixedNumber, ensureVec3, findPreviousRenderPass, gaussianDown_frag as gaussianDownFrag, gaussianDownHFrag, gaussianDownVFrag, gaussianUpFrag, generateEmptyTypedArray, generateGUID, generateHalfFloatTexture, generateTransparentTexture, generateWhiteTexture, getBackgroundImage, getColorFromGradientStops, getConfig, getDefaultTextureFactory, getGeometryByShape, getGeometryTriangles, getKTXTextureOptions, getKeyFrameMetaByRawValue, getMergedStore, getParticleMeshShader, getPixelRatio, getPreMultiAlpha, getStandardComposition, getStandardImage, getStandardItem, getStandardJSON, getTextureSize, glContext, glType2VertexFormatType, gpuTimer, imageDataFromColor, imageDataFromGradient, initErrors, initGLContext, integrate, interpolateColor, isAlipayMiniApp, isAndroid, isArray, isCanvas, isFunction, isIOS, isIOSByUA, isMiniProgram, isObject, isOpenHarmony, isSimulatorCellPhone, isString, isUniformStruct, isUniformStructArray, isValidFontFamily, isWebGL2, isWechatMiniApp, itemFrag, itemFrame_frag as itemFrameFrag, itemVert, loadAVIFOptional, loadBinary, loadBlob, loadImage, loadMedia, loadVideo, loadWebPOptional, logger, index as math, maxSpriteMeshItemCount, modifyMaxKeyframeShader, nearestPowerOfTwo, noop, normalizeColor, numberToFix, oldBezierKeyFramesToNew, parsePercent$1 as parsePercent, particleFrag, particleOriginTranslateMap$1 as particleOriginTranslateMap, particleUniformTypeMap, particleVert, passRenderLevel, pluginLoaderMap, randomInRange, registerPlugin, removeItem, rotateVec2, screenMeshVert, serialize, setBlendMode, setConfig, setDefaultTextureFactory, setMaskMode, setMaxSpriteMeshItemCount, setRayFromCamera, setSideMode, setSpriteMeshMaxItemCountByGPU, sortByOrder, index$1 as spec, thresholdFrag, throwDestroyedError, trailVert, translatePoint, trianglesFromRect, unregisterPlugin, valIfUndefined, value, valueDefine, vecFill, vecMulCombine, version, vertexFormatType2GLType };
|