@galacean/effects-threejs 2.1.0-alpha.11 → 2.1.0-alpha.12
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 +16 -10
- 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 +16 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
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.1.0-alpha.
|
|
6
|
+
* Version: v2.1.0-alpha.12
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import * as THREE from 'three';
|
|
@@ -16390,6 +16390,7 @@ var InteractComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
16390
16390
|
0
|
|
16391
16391
|
]
|
|
16392
16392
|
};
|
|
16393
|
+
_this.duringPlay = false;
|
|
16393
16394
|
/** 是否响应点击和拖拽交互事件 */ _this._interactive = true;
|
|
16394
16395
|
_this.getHitTestParams = function(force) {
|
|
16395
16396
|
if (!_this.clickable) {
|
|
@@ -16454,7 +16455,10 @@ var InteractComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
16454
16455
|
_proto.onDisable = function onDisable() {
|
|
16455
16456
|
if (this.item && this.item.composition) {
|
|
16456
16457
|
var _this_previewContent;
|
|
16457
|
-
|
|
16458
|
+
if (this.duringPlay) {
|
|
16459
|
+
this.item.composition.removeInteractiveItem(this.item, this.item.props.content.options.type);
|
|
16460
|
+
this.duringPlay = false;
|
|
16461
|
+
}
|
|
16458
16462
|
this.clickable = false;
|
|
16459
16463
|
(_this_previewContent = this.previewContent) == null ? void 0 : _this_previewContent.mesh.dispose();
|
|
16460
16464
|
this.endDragTarget();
|
|
@@ -16465,15 +16469,15 @@ var InteractComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
16465
16469
|
if (type === InteractType.CLICK) {
|
|
16466
16470
|
this.clickable = true;
|
|
16467
16471
|
}
|
|
16468
|
-
var options = this.item.props.content.options;
|
|
16469
|
-
if (this.item.composition) {
|
|
16470
|
-
this.item.composition.addInteractiveItem(this.item, options.type);
|
|
16471
|
-
}
|
|
16472
16472
|
};
|
|
16473
16473
|
_proto.onUpdate = function onUpdate(dt) {
|
|
16474
16474
|
var _this_previewContent;
|
|
16475
|
-
|
|
16476
|
-
|
|
16475
|
+
this.duringPlay = true;
|
|
16476
|
+
// trigger messageBegin when item enter
|
|
16477
|
+
if (this.item.time > 0 && this.item.time - dt / 1000 <= 0) {
|
|
16478
|
+
var _this_item_composition;
|
|
16479
|
+
var options = this.item.props.content.options;
|
|
16480
|
+
(_this_item_composition = this.item.composition) == null ? void 0 : _this_item_composition.addInteractiveItem(this.item, options.type);
|
|
16477
16481
|
}
|
|
16478
16482
|
(_this_previewContent = this.previewContent) == null ? void 0 : _this_previewContent.updateMesh();
|
|
16479
16483
|
if (!this.dragEvent || !this.bouncingArg) {
|
|
@@ -24609,6 +24613,8 @@ var TextComponent = /*#__PURE__*/ function(BaseRenderComponent) {
|
|
|
24609
24613
|
/**
|
|
24610
24614
|
* 文本行数
|
|
24611
24615
|
*/ _this.lineCount = 0;
|
|
24616
|
+
_this.SCALE_FACTOR = 0.1;
|
|
24617
|
+
_this.ALPHA_FIX_VALUE = 1 / 255;
|
|
24612
24618
|
_this.name = "MText" + seed$2++;
|
|
24613
24619
|
_this.geometry = _this.createGeometry(glContext.TRIANGLES);
|
|
24614
24620
|
if (props) {
|
|
@@ -31130,7 +31136,7 @@ registerPlugin("sprite", SpriteLoader, VFXItem, true);
|
|
|
31130
31136
|
registerPlugin("particle", ParticleLoader, VFXItem, true);
|
|
31131
31137
|
registerPlugin("cal", CalculateLoader, VFXItem, true);
|
|
31132
31138
|
registerPlugin("interact", InteractLoader, VFXItem, true);
|
|
31133
|
-
var version$1 = "2.1.0-alpha.
|
|
31139
|
+
var version$1 = "2.1.0-alpha.12";
|
|
31134
31140
|
logger.info("Core version: " + version$1 + ".");
|
|
31135
31141
|
|
|
31136
31142
|
var _obj;
|
|
@@ -32774,7 +32780,7 @@ setMaxSpriteMeshItemCount(8);
|
|
|
32774
32780
|
*/ Mesh.create = function(engine, props) {
|
|
32775
32781
|
return new ThreeMesh(engine, props);
|
|
32776
32782
|
};
|
|
32777
|
-
var version = "2.1.0-alpha.
|
|
32783
|
+
var version = "2.1.0-alpha.12";
|
|
32778
32784
|
logger.info("THREEJS plugin version: " + version + ".");
|
|
32779
32785
|
|
|
32780
32786
|
export { AbstractPlugin, ActivationPlayable, ActivationPlayableAsset, ActivationTrack, AnimationClip, AnimationClipPlayable, Asset, AssetLoader, AssetManager, BYTES_TYPE_MAP, BaseRenderComponent, Behaviour, BezierCurve, BezierCurvePath, BezierCurveQuat, BinaryAsset, COMPRESSED_TEXTURE, CONSTANT_MAP_BLEND, CONSTANT_MAP_DEPTH, CONSTANT_MAP_STENCIL_FUNC, CONSTANT_MAP_STENCIL_OP, COPY_FRAGMENT_SHADER, COPY_MESH_SHADER_ID, COPY_VERTEX_SHADER, CalculateLoader, Camera, CameraController, CameraVFXItemLoader, ColorCurve, ColorPropertyTrack, Component, Composition, CompositionComponent, CompositionSourceManager, DEFAULT_FONTS, DEFAULT_FPS, Database, DestroyOptions, Downloader, EFFECTS_COPY_MESH_NAME, EVENT_TYPE_CLICK, EVENT_TYPE_TOUCH_END, EVENT_TYPE_TOUCH_MOVE, EVENT_TYPE_TOUCH_START, EffectComponent, EffectsObject, EffectsPackage, Engine, EventEmitter, EventSystem, Fake3DAnimationMode, Fake3DComponent, FilterMode, Float16ArrayWrapper, FloatPropertyPlayableAsset, FloatPropertyTrack, Framebuffer, GLSLVersion, GPUCapability, Geometry, GlobalUniforms, GradientValue, HELP_LINK, HitTestType, InteractComponent, InteractLoader, InteractMesh, Item, KTXTexture, LineSegments, LinearValue, Material, MaterialDataBlock, MaterialRenderType, MaterialTrack, Mesh, MeshCollider, ObjectBindingTrack, OrderType, PLAYER_OPTIONS_ENV_EDITOR, POST_PROCESS_SETTINGS, ParticleBehaviourPlayable, ParticleBehaviourPlayableAsset, ParticleLoader, ParticleMesh, ParticleSystem, ParticleSystemRenderer, PassTextureCache, PathSegments, PluginSystem, 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, ShapeConnectType, ShapePointType, ShapePrimitiveType, SpriteColorPlayableAsset, SpriteColorTrack, SpriteComponent, SpriteLoader, StaticValue, SubCompositionPlayableAsset, SubCompositionTrack, TEMPLATE_USE_OFFSCREEN_CANVAS, TEXTURE_UNIFORM_MAP, TextComponent, TextComponentBase, TextLayout, TextLoader, TextStyle, Texture, TextureFactory, TextureLoadAction, TextureSourceType, TextureStoreAction, ThreeComposition, ThreeDisplayObject, ThreeEngine, ThreeMaterial, ThreeSpriteComponent, ThreeTextComponent, ThreeTexture, Ticker, TimelineAsset, TimelineClip, TimelinePlayable, TrackAsset, TrackSortWrapper, TrackType, Transform, TransformAnimationPlayable, TransformPlayableAsset, TransformTrack, VFXItem, ValueGetter, Vector4Curve, Vector4PropertyTrack, addByOrder, addItem, addItemWithOrder, applyMixins, assertExist, asserts, base64ToFile, blend, calculateTranslation, canvasPool, colorGradingFrag, colorStopsFromGradient, colorToArr$1 as colorToArr, combineImageTemplate, createCopyShader, createGLContext, createKeyFrameMeta, createShape, createValueGetter, 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, getImageItemRenderInfo, 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, isSimulatorCellPhone, isString, isUniformStruct, isUniformStructArray, isValidFontFamily, isWebGL2, isWechatMiniApp, itemFrag, itemFrameFrag, itemVert, loadAVIFOptional, loadBinary, loadBlob, loadImage, loadMedia, loadVideo, loadWebPOptional, logger, index as math, maxSpriteMeshItemCount, modifyMaxKeyframeShader, nearestPowerOfTwo, noop, normalizeColor, numberToFix, 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, setUniformValue, sortByOrder, index$1 as spec, spriteMeshShaderFromFilter, spriteMeshShaderFromRenderInfo, spriteMeshShaderIdFromRenderInfo, thresholdFrag, throwDestroyedError, trailVert, translatePoint, trianglesFromRect, unregisterPlugin, valIfUndefined, value, valueDefine, vecFill, vecMulCombine, version, vertexFormatType2GLType };
|