@realsee/five 6.6.0-alpha.1 → 6.6.0-alpha.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/docs/assets/hierarchy.js +1 -0
- package/docs/assets/icons.js +1 -1
- package/docs/assets/icons.svg +1 -1
- package/docs/assets/main.js +5 -5
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/assets/style.css +1440 -1255
- package/docs/classes/five.AnimationFrameLoop.html +16 -16
- package/docs/classes/five.Camera.html +41 -41
- package/docs/classes/five.Fetcher.html +5 -5
- package/docs/classes/five.Five.html +211 -211
- package/docs/classes/five.InternalWebGLRenderer.html +2 -2
- package/docs/classes/five.Model.html +73 -74
- package/docs/classes/five.ModelScene.html +35 -36
- package/docs/classes/five.Motion.html +17 -17
- package/docs/classes/five.NetworkSubscribe.html +35 -35
- package/docs/classes/five.PBMContainer.html +17 -17
- package/docs/classes/five.PBMCustomShader.html +11 -11
- package/docs/classes/five.PBMGroup.html +4 -4
- package/docs/classes/five.PBMMesh.html +2 -2
- package/docs/classes/five.PBMMeshMaterial.html +84 -84
- package/docs/classes/five.PBMPointCloud.html +3 -3
- package/docs/classes/five.PBMPointCloudMaterial.html +40 -40
- package/docs/classes/five.PBMSkinnedMesh.html +4 -4
- package/docs/classes/five.PanoCircleMesh.html +20 -20
- package/docs/classes/five.PanoCircleMeshCustom.html +20 -20
- package/docs/classes/five.PanoCircleMeshSolid.html +20 -20
- package/docs/classes/five.Parameter.html +114 -114
- package/docs/classes/five.Scene.html +9 -9
- package/docs/classes/five.Subscribe.html +37 -37
- package/docs/classes/five.TextureLoader.html +4 -4
- package/docs/classes/five.Tile.html +34 -34
- package/docs/classes/five.Tile3DModel.html +91 -91
- package/docs/classes/five.TileCache.html +8 -8
- package/docs/classes/five.TileNode.html +9 -9
- package/docs/classes/five.TileRequestScheduler.html +4 -4
- package/docs/classes/five.Tileset.html +37 -37
- package/docs/classes/five.Trajectory.html +8 -8
- package/docs/classes/five.TrajectoryNode.html +7 -7
- package/docs/classes/five.Work.html +42 -42
- package/docs/classes/five.WorkResolvedObserver.html +40 -40
- package/docs/classes/five.XRButton.html +3 -3
- package/docs/classes/gltf-loader.DDSLoader.html +3 -0
- package/docs/classes/gltf-loader.DRACOLoader.html +8 -0
- package/docs/classes/gltf-loader.GLTFLoader.html +19 -0
- package/docs/classes/gltf-loader.GLTFObject.html +9 -0
- package/docs/classes/gltf-loader.GLTFParser.html +6 -0
- package/docs/classes/gltf-loader.THREEGLTFLoader.html +8 -0
- package/docs/classes/line.Line.html +10 -10
- package/docs/classes/line.LineGeometry.html +17 -17
- package/docs/classes/line.LineMaterial.html +8 -8
- package/docs/classes/line.LineSegmentsGeometry.html +15 -15
- package/docs/classes/line.THREE_Line2.html +4 -4
- package/docs/classes/line.THREE_LineSegments2.html +4 -4
- package/docs/classes/plugins.BasePlugin.Controller.html +39 -0
- package/docs/classes/plugins.CSS3DRenderer.html +6 -0
- package/docs/classes/plugins.OrbitControls.html +41 -0
- package/docs/classes/plugins.RoundedBoxGeometry.html +3 -0
- package/docs/classes/react.Store.html +20 -20
- package/docs/classes/sticker.Sticker.html +17 -17
- package/docs/classes/vfx.Airflow.html +8 -8
- package/docs/classes/vfx.Flame.html +10 -10
- package/docs/classes/vfx.Particle.html +78 -78
- package/docs/classes/vfx.ParticleGPU.html +19 -0
- package/docs/classes/vfx.SpotLight.html +7 -7
- package/docs/documents/coordinate.html +4 -4
- package/docs/documents/five.FivePlugin.plugins.html +15 -15
- package/docs/documents/five.Pose.coordinate.html +4 -4
- package/docs/documents/plugins.html +15 -15
- package/docs/documents/react-component.html +32 -0
- package/docs/enums/five.VolumePlaneIntersect.html +4 -4
- package/docs/enums/plugins.BackgroundPluginType.WarningCodeType.html +2 -0
- package/docs/functions/five.coordinatesToVector.html +2 -0
- package/docs/functions/five.createDebugBoundingMesh.html +1 -1
- package/docs/functions/five.createWorks.html +1 -1
- package/docs/functions/five.defaultImageURLTransform.html +2 -2
- package/docs/functions/five.getViewportScale.html +1 -1
- package/docs/functions/five.headingToLongitude.html +4 -0
- package/docs/functions/five.imageSupport.html +1 -1
- package/docs/functions/five.isBoundingVolume.html +1 -1
- package/docs/functions/five.isPanoId.html +1 -1
- package/docs/functions/five.loadAt3d.html +1 -1
- package/docs/functions/five.loadB3dm.html +1 -1
- package/docs/functions/five.loadDome.html +1 -1
- package/docs/functions/five.loadDomez.html +1 -1
- package/docs/functions/five.loadFbx.html +1 -1
- package/docs/functions/five.loadGltf.html +1 -1
- package/docs/functions/five.loadPbm.html +1 -1
- package/docs/functions/five.loadPly.html +1 -1
- package/docs/functions/five.loadPnts.html +1 -1
- package/docs/functions/five.loadX3p.html +1 -1
- package/docs/functions/five.longitudeToHeading.html +4 -0
- package/docs/functions/five.makeBoundingVolume.html +1 -1
- package/docs/functions/five.panoEqual.html +1 -1
- package/docs/functions/five.panoParse.html +1 -1
- package/docs/functions/five.panoStringify.html +1 -1
- package/docs/functions/five.parseWork.html +2 -2
- package/docs/functions/five.vectorToCoordinates.html +2 -0
- package/docs/functions/five.workToJson.html +1 -1
- package/docs/functions/plugins.BackgroundPlugin.html +1 -0
- package/docs/functions/plugins.ItemMaskPlugin.html +1 -0
- package/docs/functions/plugins.OrientationPlugin.html +1 -0
- package/docs/functions/plugins.PanoAnimePlugin.html +1 -0
- package/docs/functions/plugins.TrajectoryPlugin.html +1 -0
- package/docs/functions/react.createFiveFeature.html +1 -1
- package/docs/functions/react.createFiveProvider.html +5 -5
- package/docs/functions/react.createStore.html +12 -12
- package/docs/functions/react.unsafe__useFiveInstance.html +4 -4
- package/docs/functions/react.useFiveAction.html +8 -8
- package/docs/functions/react.useFiveCameraDirection.html +3 -3
- package/docs/functions/react.useFiveCameraRaycaster.html +3 -3
- package/docs/functions/react.useFiveCurrentObserver.html +4 -4
- package/docs/functions/react.useFiveCurrentState.html +4 -4
- package/docs/functions/react.useFiveEventCallback.html +3 -3
- package/docs/functions/react.useFiveFloor.html +4 -4
- package/docs/functions/react.useFiveHelper.html +4 -4
- package/docs/functions/react.useFiveModelIntersectRaycaster.html +4 -4
- package/docs/functions/react.useFiveModelReadyState.html +3 -3
- package/docs/functions/react.useFiveProject2d.html +4 -4
- package/docs/functions/react.useFiveSceneEffect.html +4 -4
- package/docs/functions/react.useFiveState.html +1 -1
- package/docs/functions/react.useFiveWork.html +5 -5
- package/docs/functions/react.withFive.html +1 -1
- package/docs/functions/vue.unsafe__useFiveInject.html +4 -4
- package/docs/functions/vue.useFiveAction.html +10 -10
- package/docs/functions/vue.useFiveCameraDirection.html +3 -3
- package/docs/functions/vue.useFiveCameraRaycaster.html +3 -3
- package/docs/functions/vue.useFiveCurrentObserver.html +4 -4
- package/docs/functions/vue.useFiveCurrentState.html +4 -4
- package/docs/functions/vue.useFiveEventCallback.html +3 -3
- package/docs/functions/vue.useFiveFloor.html +4 -4
- package/docs/functions/vue.useFiveHelper.html +4 -4
- package/docs/functions/vue.useFiveModel.html +2 -2
- package/docs/functions/vue.useFiveModelBounding.html +2 -2
- package/docs/functions/vue.useFiveModelIntersectRaycaster.html +4 -4
- package/docs/functions/vue.useFiveModelReadyState.html +3 -3
- package/docs/functions/vue.useFiveProject2d.html +4 -4
- package/docs/functions/vue.useFiveScene.html +2 -2
- package/docs/functions/vue.useFiveState.html +4 -4
- package/docs/functions/vue.useFiveWorks.html +5 -5
- package/docs/hierarchy.html +1 -1
- package/docs/index.html +17 -17
- package/docs/interfaces/five.AddableObject.html +9 -9
- package/docs/interfaces/five.AjaxOptions.html +9 -9
- package/docs/interfaces/five.AnimationFrame.html +5 -5
- package/docs/interfaces/five.AnimationFrameContext.html +3 -3
- package/docs/interfaces/five.BaseEvent.html +5 -5
- package/docs/interfaces/five.BoundingVolume.html +15 -15
- package/docs/interfaces/five.BoxBoundingVolume.html +18 -0
- package/docs/interfaces/five.CameraPose.html +6 -6
- package/docs/interfaces/five.CullingVolume.html +9 -0
- package/docs/interfaces/five.Draco.html +12 -0
- package/docs/interfaces/five.EventCallback.html +255 -255
- package/docs/interfaces/five.FiveInitArgs.html +85 -85
- package/docs/interfaces/five.FiveLoadOptions.html +13 -13
- package/docs/interfaces/five.FloorplanControllerCustomInitArgs.html +17 -17
- package/docs/interfaces/five.GestureEvent.html +19 -19
- package/docs/interfaces/five.ImageOptions.html +14 -14
- package/docs/interfaces/five.ImageURLMappings.html +1 -1
- package/docs/interfaces/five.ImageURLOptions.html +15 -15
- package/docs/interfaces/five.IntersectEvent.html +8 -8
- package/docs/interfaces/five.IntersectMesh.html +2 -0
- package/docs/interfaces/five.IntersectMeshInterface.html +3 -3
- package/docs/interfaces/five.Intersection.html +6 -5
- package/docs/interfaces/five.KTX2.html +9 -0
- package/docs/interfaces/five.LoosePanoWork.html +10 -10
- package/docs/interfaces/five.LooseWork.html +15 -15
- package/docs/interfaces/five.LooseWorkInitial.html +11 -11
- package/docs/interfaces/five.LooseWorkModel.html +6 -6
- package/docs/interfaces/five.LooseWorkObserver.html +16 -16
- package/docs/interfaces/five.LooseWorkPanorama.html +13 -13
- package/docs/interfaces/five.LooseWorkVideo.html +4 -4
- package/docs/interfaces/five.LooseWorkWithExtrinsics.html +13 -13
- package/docs/interfaces/five.MapviewControllerCustomInitArgs.html +17 -17
- package/docs/interfaces/five.ModeChangeEvent.html +9 -9
- package/docs/interfaces/five.ModelControllerCustomInitArgs.html +18 -18
- package/docs/interfaces/five.ModelEvent.html +8 -8
- package/docs/interfaces/five.ModelLike.html +3 -3
- package/docs/interfaces/five.ModelSceneEvent.html +6 -6
- package/docs/interfaces/five.MotionKeyframe.html +4 -4
- package/docs/interfaces/five.MovePanoOptions.html +24 -24
- package/docs/interfaces/five.NetworkAbortError.html +1 -0
- package/docs/interfaces/five.NetworkFirbiddenError.html +1 -0
- package/docs/interfaces/five.NetworkOptions.html +7 -7
- package/docs/interfaces/five.NetworkProxyError.html +1 -0
- package/docs/interfaces/five.NetworkResourceEvent.html +9 -9
- package/docs/interfaces/five.NetworkResponseError.html +2 -0
- package/docs/interfaces/five.NetworkTimeoutError.html +1 -0
- package/docs/interfaces/five.ObjectEvent.html +6 -6
- package/docs/interfaces/five.PBMClipperParameter.html +3 -3
- package/docs/interfaces/five.PBMCustomShaderInitArgs.html +6 -6
- package/docs/interfaces/five.PBMCustomShaderSlots.html +3 -3
- package/docs/interfaces/five.PBMMaterial.html +1 -0
- package/docs/interfaces/five.PBMMeshMaterialParameters.html +28 -28
- package/docs/interfaces/five.PBMPanoDepth.html +9 -9
- package/docs/interfaces/five.PBMPanoPicture.html +11 -11
- package/docs/interfaces/five.PBMPointCloudMaterialParameters.html +28 -28
- package/docs/interfaces/five.PBMRefinedScreen.html +6 -6
- package/docs/interfaces/five.PanoCircleMeshCustomOptions.html +9 -9
- package/docs/interfaces/five.PanoCircleMeshInterface.html +20 -20
- package/docs/interfaces/five.PanoCircleMeshOptions.html +3 -3
- package/docs/interfaces/five.PanoCircleMeshSolidOptions.html +3 -3
- package/docs/interfaces/five.PanoEvent.html +11 -11
- package/docs/interfaces/five.PanoTextureEvent.html +9 -9
- package/docs/interfaces/five.PanoramaControllerCustomInitArgs.html +38 -38
- package/docs/interfaces/five.PanoramaLikeControllerCustomInitArgs.html +18 -18
- package/docs/interfaces/five.ParameterMaterialValue.html +73 -73
- package/docs/interfaces/five.ParameterTilesetValue.html +31 -31
- package/docs/interfaces/five.ParameterValue.html +103 -103
- package/docs/interfaces/five.Pose.html +13 -13
- package/docs/interfaces/five.RegionBoundingVolume.html +21 -0
- package/docs/interfaces/five.RenderEvent.html +6 -6
- package/docs/interfaces/five.ResolvedParameterValue.html +105 -105
- package/docs/interfaces/five.SphereBoundingVolume.html +17 -0
- package/docs/interfaces/five.State.html +19 -19
- package/docs/interfaces/five.StateEvent.html +7 -7
- package/docs/interfaces/five.TextureOptions.html +16 -16
- package/docs/interfaces/five.Tile3DModelLoaderOptions.html +12 -12
- package/docs/interfaces/five.TileHeader.html +9 -9
- package/docs/interfaces/five.TilesetHeader.html +20 -20
- package/docs/interfaces/five.TilesetOptions.html +12 -12
- package/docs/interfaces/five.TopviewControllerCustomInitArgs.html +9 -9
- package/docs/interfaces/five.TrajectoryHeader.html +5 -5
- package/docs/interfaces/five.VRPanoramaControllerCustomInitArgs.html +34 -34
- package/docs/interfaces/five.ViewLayer.html +90 -90
- package/docs/interfaces/five.Viewport.html +11 -11
- package/docs/interfaces/five.WebXRAxesParams.html +4 -4
- package/docs/interfaces/five.WebXRControllerParams.html +2 -2
- package/docs/interfaces/five.WorkCubeImage.html +8 -8
- package/docs/interfaces/five.WorkImage.html +13 -13
- package/docs/interfaces/five.WorkInitial.html +17 -17
- package/docs/interfaces/five.WorkInitialJson.html +8 -8
- package/docs/interfaces/five.WorkJson.html +12 -12
- package/docs/interfaces/five.WorkModel.html +12 -12
- package/docs/interfaces/five.WorkModelJson.html +5 -5
- package/docs/interfaces/five.WorkModelLayer.html +6 -6
- package/docs/interfaces/five.WorkModelLayerJson.html +5 -5
- package/docs/interfaces/five.WorkObserver.html +34 -34
- package/docs/interfaces/five.WorkObserverJson.html +8 -8
- package/docs/interfaces/five.WorkPanoramaJson.html +14 -14
- package/docs/interfaces/five.WorkPanoramasJson.html +3 -3
- package/docs/interfaces/five.WorkTile.html +14 -14
- package/docs/interfaces/five.WorkVideo.html +9 -9
- package/docs/interfaces/five.WorksEvent.html +9 -9
- package/docs/interfaces/five.XRControllerEvent.html +8 -8
- package/docs/interfaces/five.XRGestureEvent.html +11 -11
- package/docs/interfaces/five.XRPanoramaControllerCustomInitArgs.html +34 -34
- package/docs/interfaces/five.XRSessionEvent.html +7 -7
- package/docs/interfaces/gltf-loader.DDS.html +7 -0
- package/docs/interfaces/gltf-loader.GLTF.html +13 -0
- package/docs/interfaces/gltf-loader.GLTFReference.html +3 -0
- package/docs/interfaces/gltf-loader.THREEGLTF.html +8 -0
- package/docs/interfaces/plugins.BackgroundPluginController.html +37 -0
- package/docs/interfaces/plugins.BackgroundPluginType.Config.html +1 -0
- package/docs/interfaces/plugins.BackgroundPluginType.EventMap.html +20 -0
- package/docs/interfaces/plugins.BackgroundPluginType.Params.html +3 -0
- package/docs/interfaces/plugins.BackgroundPluginType.PluginDataItem.html +1 -0
- package/docs/interfaces/plugins.BasePlugin.BaseOptions.html +3 -0
- package/docs/interfaces/plugins.BasePlugin.Config.html +5 -0
- package/docs/interfaces/plugins.BasePlugin.State.html +8 -0
- package/docs/interfaces/plugins.BasePlugin.StateChangeParams.html +7 -0
- package/docs/interfaces/plugins.ItemMaskController.html +35 -0
- package/docs/interfaces/plugins.ItemMaskPluginType.Config.html +2 -0
- package/docs/interfaces/plugins.ItemMaskPluginType.EventMap.html +10 -0
- package/docs/interfaces/plugins.ItemMaskPluginType.ItemType.html +13 -0
- package/docs/interfaces/plugins.ItemMaskPluginType.MaskType.html +4 -0
- package/docs/interfaces/plugins.ItemMaskPluginType.Params.html +4 -0
- package/docs/interfaces/plugins.ItemMaskPluginType.State.html +14 -0
- package/docs/interfaces/plugins.Keyframe.html +3 -0
- package/docs/interfaces/plugins.OrientationPluginController.html +46 -0
- package/docs/interfaces/plugins.OrientationPluginType.Config.html +4 -0
- package/docs/interfaces/plugins.OrientationPluginType.EventMap.html +10 -0
- package/docs/interfaces/plugins.OrientationPluginType.Params.html +4 -0
- package/docs/interfaces/plugins.OrientationPluginType.State.html +10 -0
- package/docs/interfaces/plugins.PanoAnimeController.html +32 -0
- package/docs/interfaces/plugins.PanoAnimePluginType.Config.html +2 -0
- package/docs/interfaces/plugins.PanoAnimePluginType.EventMap.html +11 -0
- package/docs/interfaces/plugins.PanoAnimePluginType.Params.html +4 -0
- package/docs/interfaces/plugins.PanoAnimePluginType.State.html +8 -0
- package/docs/interfaces/plugins.PlayingState.html +3 -0
- package/docs/interfaces/plugins.PluginTemplateType.Config.html +3 -0
- package/docs/interfaces/plugins.PluginTemplateType.EventMap.html +10 -0
- package/docs/interfaces/plugins.PluginTemplateType.Params.html +4 -0
- package/docs/interfaces/plugins.PluginTemplateType.State.html +8 -0
- package/docs/interfaces/plugins.TrajectoryController.html +50 -0
- package/docs/interfaces/react.FiveActionReactCallbacks.html +27 -27
- package/docs/interfaces/react.FiveCanvasProps.html +5 -5
- package/docs/interfaces/react.FiveInjectionTypes.html +153 -146
- package/docs/interfaces/react.PropTypeOfFiveFeatures.html +2 -2
- package/docs/interfaces/sticker.IntersectionLike.html +7 -7
- package/docs/interfaces/vfx.ParticleArgs.html +67 -67
- package/docs/interfaces/vfx.ParticleGPUArgs.html +60 -0
- package/docs/interfaces/vfx.ParticleGPUTweenKeyframe.html +3 -0
- package/docs/interfaces/vfx.ParticleTweenKeyframe.html +3 -3
- package/docs/interfaces/vue.FiveActionVueCallbacks.html +30 -30
- package/docs/modules/five.html +1 -232
- package/docs/modules/gltf-loader.html +1 -0
- package/docs/modules/line.html +1 -8
- package/docs/modules/plugins.BackgroundPluginType.html +1 -0
- package/docs/modules/plugins.BasePlugin.html +1 -0
- package/docs/modules/plugins.ItemMaskPluginType.html +1 -0
- package/docs/modules/plugins.OrientationPluginType.html +1 -0
- package/docs/modules/plugins.PanoAnimePluginType.html +1 -0
- package/docs/modules/plugins.PluginTemplateType.html +1 -0
- package/docs/modules/plugins.html +1 -0
- package/docs/modules/react.html +1 -37
- package/docs/modules/sticker.html +1 -3
- package/docs/modules/vfx.html +1 -8
- package/docs/modules/vue.html +1 -24
- package/docs/modules.html +1 -0
- package/docs/types/five.AjaxResponseType.html +1 -1
- package/docs/types/five.AjaxResponseTypeMapping.html +1 -1
- package/docs/types/five.AnimationFrameLoopType.html +1 -1
- package/docs/types/five.BoundingVolumeJson.html +1 -1
- package/docs/types/five.BoxBoundingVolumeJson.html +2 -1
- package/docs/types/five.ControllerCustomInitTypes.html +8 -1
- package/docs/types/five.ControllerEventTypes.html +66 -33
- package/docs/types/five.CubeFace.html +1 -1
- package/docs/types/five.EventTypes.html +26 -26
- package/docs/types/five.FivePlugin.html +4 -4
- package/docs/types/five.FivePluginInit.html +3 -3
- package/docs/types/five.FivePluginInstance.html +3 -3
- package/docs/types/five.GestureTypes.html +1 -1
- package/docs/types/five.LegacyEventType.html +149 -86
- package/docs/types/five.LoadResultType.html +12 -1
- package/docs/types/five.Mode.html +9 -9
- package/docs/types/five.Models.html +11 -11
- package/docs/types/five.MotionCircle.html +2 -2
- package/docs/types/five.MotionConfig.html +1 -1
- package/docs/types/five.MotionInitalValue.html +1 -1
- package/docs/types/five.MotionValue.html +1 -1
- package/docs/types/five.MovePanoEffect.html +3 -3
- package/docs/types/five.NetWorkMeta.html +8 -1
- package/docs/types/five.NetworkError.html +1 -1
- package/docs/types/five.NetworkErrorCallback.html +1 -1
- package/docs/types/five.NetworkProgressCallback.html +1 -1
- package/docs/types/five.NetworkResponse.html +3 -1
- package/docs/types/five.NetworkState.html +1 -1
- package/docs/types/five.NetworkSuccessCallback.html +1 -1
- package/docs/types/five.NetworkType.html +1 -1
- package/docs/types/five.PBMAlphaMode.html +1 -1
- package/docs/types/five.PBMColorStyle.html +1 -1
- package/docs/types/five.PBMFloorStyle.html +1 -1
- package/docs/types/five.PBMMeshShaderType.html +1 -1
- package/docs/types/five.PBMPointBack.html +1 -1
- package/docs/types/five.PBMPointCloudShaderType.html +1 -1
- package/docs/types/five.PBMPointShape.html +1 -1
- package/docs/types/five.PBMPointSize.html +1 -1
- package/docs/types/five.PBMTransition.html +1 -1
- package/docs/types/five.Pano.html +3 -1
- package/docs/types/five.PanoId.html +1 -1
- package/docs/types/five.ParseOptions.html +11 -6
- package/docs/types/five.PostProcessingType.html +1 -1
- package/docs/types/five.RegionBoundingVolumeJson.html +2 -1
- package/docs/types/five.Scissor.html +2 -2
- package/docs/types/five.SphereBoundingVolumeJson.html +2 -1
- package/docs/types/five.SubscribeEventMap.html +1 -1
- package/docs/types/five.Tile3dOptions.html +1 -1
- package/docs/types/five.TileCacheOptions.html +3 -1
- package/docs/types/five.TileContentData.html +6 -1
- package/docs/types/five.TileRequestOrder.html +1 -1
- package/docs/types/five.TileRequestSchedulerOptions.html +4 -1
- package/docs/types/five.TilesetFrameState.html +22 -1
- package/docs/types/five.TrajectoryContentData.html +7 -1
- package/docs/types/five.WebXRControllerKey.html +1 -1
- package/docs/types/five.WebXRControllerType.html +1 -1
- package/docs/types/five.Works.html +1 -1
- package/docs/types/line.LineMaterialParameters.html +8 -1
- package/docs/types/plugins.BackgroundPluginType.Mirror.html +1 -0
- package/docs/types/plugins.BackgroundPluginType.Mode.html +1 -0
- package/docs/types/plugins.BackgroundPluginType.PluginData.html +1 -0
- package/docs/types/plugins.BackgroundPluginType.State.html +2 -0
- package/docs/types/plugins.BasePlugin.EventMap.html +10 -0
- package/docs/types/plugins.ItemMaskPluginType.PluginData.html +3 -0
- package/docs/types/plugins.ItemMaskPluginType.ServerData.html +3 -0
- package/docs/types/plugins.OrientationPluginType.PluginData.html +1 -0
- package/docs/types/plugins.OrientationPluginType.ServerData.html +1 -0
- package/docs/types/plugins.PanoAnimePluginType.PluginData.html +1 -0
- package/docs/types/plugins.PanoAnimePluginType.ServerData.html +1 -0
- package/docs/types/plugins.PluginTemplateType.PluginData.html +1 -0
- package/docs/types/plugins.PluginTemplateType.ServerData.html +2 -0
- package/docs/types/react.FiveInjectionActionFeature.html +1 -1
- package/docs/types/react.FiveInjectionDataFeature.html +1 -1
- package/docs/types/react.FiveInjectionFeature.html +1 -1
- package/docs/types/react.FiveProviderPropTypes.html +11 -1
- package/docs/types/react.FiveProviderType.html +1 -1
- package/docs/types/react.StoreActionMapHanlder.html +1 -1
- package/docs/types/react.StoreActionMapType.html +1 -1
- package/docs/types/react.StoreProviderType.html +1 -1
- package/docs/types/react.StoreValueMapType.html +1 -1
- package/docs/types/vfx.ParticleGPUType.html +1 -0
- package/docs/types/vfx.ParticleType.html +1 -1
- package/docs/types/vue.FiveModelIntersectRaycaster.html +1 -1
- package/docs/types/vue.FiveProviderComponent.html +1 -1
- package/docs/types/vue.Project2d.html +1 -1
- package/docs/variables/five.PROXY_CONTROLLER_EVENT_NAMES.html +1 -1
- package/docs/variables/five.controllersDefaultInitArgs.html +1 -1
- package/docs/variables/five.draco.html +1 -0
- package/docs/variables/five.ktx2.html +1 -0
- package/docs/variables/react.FiveCanvas.html +6 -0
- package/docs/variables/react.INJECTION_PROPNAME.html +1 -1
- package/docs/variables/react.useFiveScene.html +7 -0
- package/docs/variables/vue.FiveCanvas.html +7 -7
- package/docs/variables/vue.FiveProvider.html +5 -5
- package/five/index.d.ts +44 -13
- package/five/index.js +94 -92
- package/five/index.mjs +6436 -6366
- package/gltf-loader/index.js +5 -5
- package/gltf-loader/index.mjs +160 -172
- package/line/index.js +4 -4
- package/line/index.mjs +15 -15
- package/package.json +4 -7
- package/plugins/index.js +10 -10
- package/plugins/index.mjs +42 -42
- package/react/index.d.ts +46 -37
- package/react/index.js +3 -3
- package/react/index.mjs +8 -8
- package/shader-lib/index.js +7 -7
- package/shader-lib/index.mjs +14 -14
- package/sticker/index.js +3 -3
- package/sticker/index.mjs +9 -9
- package/umd/five-gltf-loader.js +5 -5
- package/umd/five-line.js +4 -4
- package/umd/five-plugins.js +10 -10
- package/umd/five-react.js +3 -3
- package/umd/five-shader-lib.js +8 -8
- package/umd/five-sticker.js +3 -3
- package/umd/five-vfx.js +126 -19
- package/umd/five-vue.js +3 -3
- package/umd/five.js +95 -93
- package/vfx/index.d.ts +99 -0
- package/vfx/index.js +126 -19
- package/vfx/index.mjs +335 -129
- package/vue/index.js +2 -2
- package/vue/index.mjs +2 -2
- package/work-downloader/index.js +3 -3
- package/work-downloader/index.mjs +91 -84
- package/docs/classes/five.BoxBoundingVolume.html +0 -19
- package/docs/classes/five.CullingVolume.html +0 -13
- package/docs/classes/five.Draco.html +0 -13
- package/docs/classes/five.IntersectMesh.html +0 -4
- package/docs/classes/five.KTX2.html +0 -10
- package/docs/classes/five.NetworkAbortError.html +0 -2
- package/docs/classes/five.NetworkFirbiddenError.html +0 -2
- package/docs/classes/five.NetworkProxyError.html +0 -2
- package/docs/classes/five.NetworkResponseError.html +0 -3
- package/docs/classes/five.NetworkTimeoutError.html +0 -2
- package/docs/classes/five.PBMMaterial.html +0 -2
- package/docs/classes/five.RegionBoundingVolume.html +0 -22
- package/docs/classes/five.SphereBoundingVolume.html +0 -18
- package/docs/classes/gltf_loader.DDSLoader.html +0 -3
- package/docs/classes/gltf_loader.DRACOLoader.html +0 -8
- package/docs/classes/gltf_loader.GLTFLoader.html +0 -19
- package/docs/classes/gltf_loader.GLTFObject.html +0 -9
- package/docs/classes/gltf_loader.GLTFParser.html +0 -6
- package/docs/classes/gltf_loader.THREEGLTFLoader.html +0 -8
- package/docs/classes/plugins-1.BackgroundPluginController.html +0 -38
- package/docs/classes/plugins-1.BasePlugin.Controller.html +0 -39
- package/docs/classes/plugins-1.CSS3DRenderer.html +0 -6
- package/docs/classes/plugins-1.ItemMaskController.html +0 -36
- package/docs/classes/plugins-1.OrbitControls.html +0 -41
- package/docs/classes/plugins-1.OrientationPluginController.html +0 -47
- package/docs/classes/plugins-1.PanoAnimeController.html +0 -33
- package/docs/classes/plugins-1.RoundedBoxGeometry.html +0 -3
- package/docs/classes/plugins-1.TrajectoryController.html +0 -51
- package/docs/documents/react_component.html +0 -32
- package/docs/enums/plugins-1.BackgroundPluginType.WarningCodeType.html +0 -2
- package/docs/functions/plugins-1.BackgroundPlugin.html +0 -1
- package/docs/functions/plugins-1.ItemMaskPlugin.html +0 -1
- package/docs/functions/plugins-1.OrientationPlugin.html +0 -1
- package/docs/functions/plugins-1.PanoAnimePlugin.html +0 -1
- package/docs/functions/plugins-1.TrajectoryPlugin.html +0 -1
- package/docs/functions/react.FiveCanvas.html +0 -6
- package/docs/functions/react.useFiveScene.html +0 -7
- package/docs/interfaces/gltf_loader.DDS.html +0 -7
- package/docs/interfaces/gltf_loader.GLTF.html +0 -13
- package/docs/interfaces/gltf_loader.GLTFReference.html +0 -3
- package/docs/interfaces/gltf_loader.THREEGLTF.html +0 -8
- package/docs/interfaces/plugins-1.BackgroundPluginType.Config.html +0 -1
- package/docs/interfaces/plugins-1.BackgroundPluginType.EventMap.html +0 -20
- package/docs/interfaces/plugins-1.BackgroundPluginType.Params.html +0 -3
- package/docs/interfaces/plugins-1.BackgroundPluginType.PluginDataItem.html +0 -1
- package/docs/interfaces/plugins-1.BasePlugin.BaseOptions.html +0 -3
- package/docs/interfaces/plugins-1.BasePlugin.Config.html +0 -5
- package/docs/interfaces/plugins-1.BasePlugin.State.html +0 -8
- package/docs/interfaces/plugins-1.BasePlugin.StateChangeParams.html +0 -7
- package/docs/interfaces/plugins-1.ItemMaskPluginType.Config.html +0 -2
- package/docs/interfaces/plugins-1.ItemMaskPluginType.EventMap.html +0 -10
- package/docs/interfaces/plugins-1.ItemMaskPluginType.ItemType.html +0 -13
- package/docs/interfaces/plugins-1.ItemMaskPluginType.MaskType.html +0 -4
- package/docs/interfaces/plugins-1.ItemMaskPluginType.Params.html +0 -4
- package/docs/interfaces/plugins-1.ItemMaskPluginType.State.html +0 -14
- package/docs/interfaces/plugins-1.Keyframe.html +0 -3
- package/docs/interfaces/plugins-1.OrientationPluginType.Config.html +0 -4
- package/docs/interfaces/plugins-1.OrientationPluginType.EventMap.html +0 -10
- package/docs/interfaces/plugins-1.OrientationPluginType.Params.html +0 -4
- package/docs/interfaces/plugins-1.OrientationPluginType.State.html +0 -10
- package/docs/interfaces/plugins-1.PanoAnimePluginType.Config.html +0 -2
- package/docs/interfaces/plugins-1.PanoAnimePluginType.EventMap.html +0 -11
- package/docs/interfaces/plugins-1.PanoAnimePluginType.Params.html +0 -4
- package/docs/interfaces/plugins-1.PanoAnimePluginType.State.html +0 -8
- package/docs/interfaces/plugins-1.PlayingState.html +0 -3
- package/docs/interfaces/plugins-1.PluginTemplateType.Config.html +0 -3
- package/docs/interfaces/plugins-1.PluginTemplateType.EventMap.html +0 -10
- package/docs/interfaces/plugins-1.PluginTemplateType.Params.html +0 -4
- package/docs/interfaces/plugins-1.PluginTemplateType.State.html +0 -8
- package/docs/modules/gltf_loader.html +0 -11
- package/docs/modules/plugins-1.BackgroundPluginType.html +0 -10
- package/docs/modules/plugins-1.BasePlugin.html +0 -7
- package/docs/modules/plugins-1.ItemMaskPluginType.html +0 -9
- package/docs/modules/plugins-1.OrientationPluginType.html +0 -7
- package/docs/modules/plugins-1.PanoAnimePluginType.html +0 -7
- package/docs/modules/plugins-1.PluginTemplateType.html +0 -7
- package/docs/modules/plugins-1.html +0 -22
- package/docs/types/plugins-1.BackgroundPluginType.Mirror.html +0 -1
- package/docs/types/plugins-1.BackgroundPluginType.Mode.html +0 -1
- package/docs/types/plugins-1.BackgroundPluginType.PluginData.html +0 -1
- package/docs/types/plugins-1.BackgroundPluginType.State.html +0 -1
- package/docs/types/plugins-1.BasePlugin.EventMap.html +0 -6
- package/docs/types/plugins-1.ItemMaskPluginType.PluginData.html +0 -1
- package/docs/types/plugins-1.ItemMaskPluginType.ServerData.html +0 -1
- package/docs/types/plugins-1.OrientationPluginType.PluginData.html +0 -1
- package/docs/types/plugins-1.OrientationPluginType.ServerData.html +0 -1
- package/docs/types/plugins-1.PanoAnimePluginType.PluginData.html +0 -1
- package/docs/types/plugins-1.PanoAnimePluginType.ServerData.html +0 -1
- package/docs/types/plugins-1.PluginTemplateType.PluginData.html +0 -1
- package/docs/types/plugins-1.PluginTemplateType.ServerData.html +0 -1
- package/docs/variables/five.draco-1.html +0 -1
- package/docs/variables/five.ktx2-1.html +0 -1
package/vfx/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* @realsee/five
|
|
4
|
-
* Generated: 8/
|
|
5
|
-
* Version: 6.6.0-alpha.
|
|
4
|
+
* Generated: 2025/8/18
|
|
5
|
+
* Version: 6.6.0-alpha.3
|
|
6
6
|
* Terms:
|
|
7
7
|
* Realsee SDK License Agreement
|
|
8
8
|
* Update: July 28, 2021
|
|
@@ -253,23 +253,23 @@
|
|
|
253
253
|
* writing and signed by Realsee. You and Realsee hereto confirm that this
|
|
254
254
|
* Agreement and all related documents shall be drafted in English.
|
|
255
255
|
*/import * as n from "three";
|
|
256
|
-
var
|
|
257
|
-
return
|
|
256
|
+
var ae = function(o, i) {
|
|
257
|
+
return ae = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) {
|
|
258
258
|
e.__proto__ = t;
|
|
259
259
|
} || function(e, t) {
|
|
260
260
|
for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
|
|
261
|
-
},
|
|
261
|
+
}, ae(o, i);
|
|
262
262
|
};
|
|
263
|
-
function
|
|
263
|
+
function Y(o, i) {
|
|
264
264
|
if (typeof i != "function" && i !== null)
|
|
265
265
|
throw new TypeError("Class extends value " + String(i) + " is not a constructor or null");
|
|
266
|
-
|
|
266
|
+
ae(o, i);
|
|
267
267
|
function e() {
|
|
268
268
|
this.constructor = o;
|
|
269
269
|
}
|
|
270
270
|
o.prototype = i === null ? Object.create(i) : (e.prototype = i.prototype, new e());
|
|
271
271
|
}
|
|
272
|
-
var
|
|
272
|
+
var be = `
|
|
273
273
|
uniform vec3 uColor1;
|
|
274
274
|
uniform vec3 uColor2;
|
|
275
275
|
uniform float uOpacity;
|
|
@@ -289,7 +289,7 @@ void main() {
|
|
|
289
289
|
color.g = color.g * (1.0 + gradient * vNoise);
|
|
290
290
|
gl_FragColor = vec4(color, alpha * uOpacity);
|
|
291
291
|
}
|
|
292
|
-
`,
|
|
292
|
+
`, le = `
|
|
293
293
|
// Simplex 4D Noise
|
|
294
294
|
// by Ian McEwan, Ashima Arts
|
|
295
295
|
//
|
|
@@ -393,11 +393,11 @@ float simplexNoise(vec4 v) {
|
|
|
393
393
|
+ dot(m1*m1, vec2( dot( p3, x3 ), dot( p4, x4 ) ) ) ) ;
|
|
394
394
|
|
|
395
395
|
}
|
|
396
|
-
`,
|
|
396
|
+
`, se = `
|
|
397
397
|
float scale(float value, float fromMin, float fromMax, float toMin, float toMax) {
|
|
398
398
|
return toMin + (value - fromMin) * (toMax - toMin) / (fromMax - fromMin);
|
|
399
399
|
}
|
|
400
|
-
`,
|
|
400
|
+
`, Ae = `
|
|
401
401
|
uniform float uTime;
|
|
402
402
|
uniform float uNoise;
|
|
403
403
|
uniform float uSpeed;
|
|
@@ -405,8 +405,8 @@ uniform float uSpeed;
|
|
|
405
405
|
varying vec3 vPosition;
|
|
406
406
|
varying float vNoise;
|
|
407
407
|
|
|
408
|
-
`.concat(
|
|
409
|
-
`).concat(
|
|
408
|
+
`.concat(le, `
|
|
409
|
+
`).concat(se, `
|
|
410
410
|
|
|
411
411
|
float fbm(vec4 x) {
|
|
412
412
|
float v = 0.0;
|
|
@@ -429,13 +429,13 @@ void main() {
|
|
|
429
429
|
|
|
430
430
|
gl_Position = projectionMatrix * modelViewMatrix * vec4(vPosition, 1.0);
|
|
431
431
|
}
|
|
432
|
-
`),
|
|
433
|
-
for (var
|
|
434
|
-
|
|
435
|
-
var
|
|
432
|
+
`), Pe = new n.SphereBufferGeometry(1, 300, 300), xe = [];
|
|
433
|
+
for (var Q = 0; Q < 2; Q++)
|
|
434
|
+
xe.push(new n.Vector2(Math.sin(Q) / 2 + 1, Q * 2 - 0.8));
|
|
435
|
+
var Te = new n.LatheBufferGeometry(xe, 300), je = (
|
|
436
436
|
/** @class */
|
|
437
|
-
function(o) {
|
|
438
|
-
|
|
437
|
+
(function(o) {
|
|
438
|
+
Y(i, o);
|
|
439
439
|
function i(e) {
|
|
440
440
|
var t = o.call(this) || this;
|
|
441
441
|
t.needsRender = !0;
|
|
@@ -445,11 +445,11 @@ var se = new n.LatheBufferGeometry(re, 300), fe = (
|
|
|
445
445
|
else
|
|
446
446
|
switch (e) {
|
|
447
447
|
case "ring":
|
|
448
|
-
r =
|
|
448
|
+
r = Te;
|
|
449
449
|
break;
|
|
450
450
|
case "circle":
|
|
451
451
|
default:
|
|
452
|
-
r =
|
|
452
|
+
r = Pe;
|
|
453
453
|
break;
|
|
454
454
|
}
|
|
455
455
|
t.uniforms = {
|
|
@@ -474,24 +474,24 @@ var se = new n.LatheBufferGeometry(re, 300), fe = (
|
|
|
474
474
|
}, t.defines = {
|
|
475
475
|
FRAGMENTATION_DEGREE: 2
|
|
476
476
|
};
|
|
477
|
-
var
|
|
477
|
+
var u = new n.Mesh(r, new n.ShaderMaterial({
|
|
478
478
|
uniforms: t.uniforms,
|
|
479
479
|
defines: t.defines,
|
|
480
|
-
vertexShader:
|
|
481
|
-
fragmentShader:
|
|
480
|
+
vertexShader: Ae,
|
|
481
|
+
fragmentShader: be,
|
|
482
482
|
transparent: !0,
|
|
483
483
|
depthWrite: !1,
|
|
484
484
|
side: n.BackSide
|
|
485
485
|
})), a = new n.Mesh(r, new n.ShaderMaterial({
|
|
486
486
|
uniforms: t.uniforms,
|
|
487
487
|
defines: t.defines,
|
|
488
|
-
vertexShader:
|
|
489
|
-
fragmentShader:
|
|
488
|
+
vertexShader: Ae,
|
|
489
|
+
fragmentShader: be,
|
|
490
490
|
transparent: !0,
|
|
491
491
|
depthWrite: !1,
|
|
492
492
|
side: n.FrontSide
|
|
493
493
|
}));
|
|
494
|
-
return
|
|
494
|
+
return u.scale.setScalar(0.1), a.scale.setScalar(0.1), t.add(u), t.add(a), t;
|
|
495
495
|
}
|
|
496
496
|
return i.prototype.setTime = function(e) {
|
|
497
497
|
this.startTime === void 0 && (this.startTime = e), this.uniforms.uTime.value = (e - this.startTime) / 1e3, this.needsRender = !0;
|
|
@@ -552,8 +552,8 @@ var se = new n.LatheBufferGeometry(re, 300), fe = (
|
|
|
552
552
|
enumerable: !1,
|
|
553
553
|
configurable: !0
|
|
554
554
|
}), i;
|
|
555
|
-
}(n.Group)
|
|
556
|
-
),
|
|
555
|
+
})(n.Group)
|
|
556
|
+
), Me = `
|
|
557
557
|
uniform vec3 uLightColor;
|
|
558
558
|
uniform vec3 uSpotPosition;
|
|
559
559
|
uniform float uAttenuation;
|
|
@@ -573,7 +573,7 @@ void main() {
|
|
|
573
573
|
intensity = intensity * angleIntensity * vNoise;
|
|
574
574
|
gl_FragColor = vec4( uLightColor, intensity );
|
|
575
575
|
}
|
|
576
|
-
`,
|
|
576
|
+
`, ze = `
|
|
577
577
|
|
|
578
578
|
uniform float uTime;
|
|
579
579
|
|
|
@@ -581,8 +581,8 @@ varying vec3 vNormal;
|
|
|
581
581
|
varying vec3 vWorldPosition;
|
|
582
582
|
varying float vNoise;
|
|
583
583
|
|
|
584
|
-
`.concat(
|
|
585
|
-
`).concat(
|
|
584
|
+
`.concat(le, `
|
|
585
|
+
`).concat(se, `
|
|
586
586
|
|
|
587
587
|
void main(){
|
|
588
588
|
|
|
@@ -594,14 +594,14 @@ void main(){
|
|
|
594
594
|
|
|
595
595
|
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
|
|
596
596
|
}
|
|
597
|
-
`),
|
|
597
|
+
`), Ge = (
|
|
598
598
|
/** @class */
|
|
599
|
-
function(o) {
|
|
600
|
-
|
|
599
|
+
(function(o) {
|
|
600
|
+
Y(i, o);
|
|
601
601
|
function i(e, t, r) {
|
|
602
602
|
e === void 0 && (e = 1), t === void 0 && (t = 0.1), r === void 0 && (r = 0.2);
|
|
603
|
-
var
|
|
604
|
-
|
|
603
|
+
var u = o.call(this) || this;
|
|
604
|
+
u.needsRender = !0, u.uniforms = {
|
|
605
605
|
uTime: {
|
|
606
606
|
value: 0
|
|
607
607
|
},
|
|
@@ -612,7 +612,7 @@ void main(){
|
|
|
612
612
|
value: 2
|
|
613
613
|
},
|
|
614
614
|
uSpotPosition: {
|
|
615
|
-
value:
|
|
615
|
+
value: u.position
|
|
616
616
|
},
|
|
617
617
|
uLightColor: {
|
|
618
618
|
value: new n.Color(16777215)
|
|
@@ -620,15 +620,15 @@ void main(){
|
|
|
620
620
|
};
|
|
621
621
|
var a = new n.CylinderBufferGeometry(t, r, e, 64, 20, !0);
|
|
622
622
|
a.applyMatrix4(new n.Matrix4().makeTranslation(0, -e / 2, 0)), a.applyMatrix4(new n.Matrix4().makeRotationX(-Math.PI / 2));
|
|
623
|
-
var
|
|
624
|
-
uniforms:
|
|
625
|
-
vertexShader:
|
|
626
|
-
fragmentShader:
|
|
623
|
+
var s = new n.Mesh(a, new n.ShaderMaterial({
|
|
624
|
+
uniforms: u.uniforms,
|
|
625
|
+
vertexShader: ze,
|
|
626
|
+
fragmentShader: Me,
|
|
627
627
|
transparent: !0,
|
|
628
628
|
side: n.FrontSide,
|
|
629
629
|
depthWrite: !1
|
|
630
630
|
}));
|
|
631
|
-
return
|
|
631
|
+
return u.add(s), u;
|
|
632
632
|
}
|
|
633
633
|
return i.prototype.setTime = function(e) {
|
|
634
634
|
this.startTime === void 0 && (this.startTime = e), this.uniforms.uTime.value = (e - this.startTime) / 1e3, this.needsRender = !0;
|
|
@@ -660,8 +660,8 @@ void main(){
|
|
|
660
660
|
enumerable: !1,
|
|
661
661
|
configurable: !0
|
|
662
662
|
}), i;
|
|
663
|
-
}(n.Group)
|
|
664
|
-
),
|
|
663
|
+
})(n.Group)
|
|
664
|
+
), Se = `
|
|
665
665
|
uniform vec3 uColor;
|
|
666
666
|
uniform float uOpacity;
|
|
667
667
|
varying vec3 vPosition;
|
|
@@ -671,7 +671,7 @@ void main() {
|
|
|
671
671
|
float gradient = mix(0.0, 1.0, 1.0 + vPosition.y);
|
|
672
672
|
gl_FragColor = vec4(uColor, vNoise * gradient * uOpacity);
|
|
673
673
|
}
|
|
674
|
-
`,
|
|
674
|
+
`, we = `
|
|
675
675
|
|
|
676
676
|
uniform float uTime;
|
|
677
677
|
uniform float uSpeed;
|
|
@@ -680,8 +680,8 @@ uniform float uExpand;
|
|
|
680
680
|
varying float vNoise;
|
|
681
681
|
varying vec3 vPosition;
|
|
682
682
|
|
|
683
|
-
`.concat(
|
|
684
|
-
`).concat(
|
|
683
|
+
`.concat(le, `
|
|
684
|
+
`).concat(se, `
|
|
685
685
|
|
|
686
686
|
void main(){
|
|
687
687
|
|
|
@@ -694,16 +694,16 @@ void main(){
|
|
|
694
694
|
|
|
695
695
|
gl_Position = projectionMatrix * modelViewMatrix * transformed;
|
|
696
696
|
}
|
|
697
|
-
`),
|
|
698
|
-
|
|
699
|
-
var
|
|
697
|
+
`), ue = new n.PlaneBufferGeometry(1, 1, 200, 200);
|
|
698
|
+
ue.translate(0, -0.5, 0);
|
|
699
|
+
var Ie = (
|
|
700
700
|
/** @class */
|
|
701
|
-
function(o) {
|
|
702
|
-
|
|
701
|
+
(function(o) {
|
|
702
|
+
Y(i, o);
|
|
703
703
|
function i() {
|
|
704
704
|
var e = o.call(this) || this;
|
|
705
705
|
e.needsRender = !0;
|
|
706
|
-
var t = e.outer = new n.Mesh(
|
|
706
|
+
var t = e.outer = new n.Mesh(ue, new n.ShaderMaterial({
|
|
707
707
|
uniforms: {
|
|
708
708
|
uTime: {
|
|
709
709
|
value: 0
|
|
@@ -724,12 +724,12 @@ var me = (
|
|
|
724
724
|
value: 1
|
|
725
725
|
}
|
|
726
726
|
},
|
|
727
|
-
vertexShader:
|
|
728
|
-
fragmentShader:
|
|
727
|
+
vertexShader: we,
|
|
728
|
+
fragmentShader: Se,
|
|
729
729
|
transparent: !0,
|
|
730
730
|
side: n.DoubleSide,
|
|
731
731
|
depthWrite: !1
|
|
732
|
-
})), r = e.inner = new n.Mesh(
|
|
732
|
+
})), r = e.inner = new n.Mesh(ue, new n.ShaderMaterial({
|
|
733
733
|
uniforms: {
|
|
734
734
|
uTime: {
|
|
735
735
|
value: 0
|
|
@@ -750,8 +750,8 @@ var me = (
|
|
|
750
750
|
value: 0.1
|
|
751
751
|
}
|
|
752
752
|
},
|
|
753
|
-
vertexShader:
|
|
754
|
-
fragmentShader:
|
|
753
|
+
vertexShader: we,
|
|
754
|
+
fragmentShader: Se,
|
|
755
755
|
transparent: !0,
|
|
756
756
|
side: n.DoubleSide,
|
|
757
757
|
depthWrite: !1
|
|
@@ -799,45 +799,45 @@ var me = (
|
|
|
799
799
|
enumerable: !1,
|
|
800
800
|
configurable: !0
|
|
801
801
|
}), i;
|
|
802
|
-
}(n.Group)
|
|
802
|
+
})(n.Group)
|
|
803
803
|
);
|
|
804
|
-
function
|
|
804
|
+
function q(o, i) {
|
|
805
805
|
return o + i * (Math.random() - 0.5);
|
|
806
806
|
}
|
|
807
|
-
function
|
|
807
|
+
function K(o, i) {
|
|
808
808
|
var e = new n.Vector3(Math.random() - 0.5, Math.random() - 0.5, Math.random() - 0.5);
|
|
809
809
|
return new n.Vector3().addVectors(o, new n.Vector3().multiplyVectors(i, e));
|
|
810
810
|
}
|
|
811
|
-
function
|
|
811
|
+
function te(o, i, e) {
|
|
812
812
|
return o * e + i * e * e / 2;
|
|
813
813
|
}
|
|
814
|
-
function
|
|
815
|
-
return new n.Vector3(
|
|
814
|
+
function Ve(o, i, e) {
|
|
815
|
+
return new n.Vector3(te(o.x, i.x, e), te(o.y, i.y, e), te(o.z, i.z, e));
|
|
816
816
|
}
|
|
817
|
-
function
|
|
817
|
+
function oe(o, i) {
|
|
818
818
|
for (var e = o.times.length, t = 0; t < e && i > o.times[t]; )
|
|
819
819
|
t++;
|
|
820
820
|
if (t == 0)
|
|
821
821
|
return o.values[0];
|
|
822
822
|
if (t == e)
|
|
823
823
|
return o.values[e - 1];
|
|
824
|
-
var r = (i - o.times[t - 1]) / (o.times[t] - o.times[t - 1]),
|
|
825
|
-
return typeof o.values[0] == "number" ?
|
|
824
|
+
var r = (i - o.times[t - 1]) / (o.times[t] - o.times[t - 1]), u = o.values[t - 1], a = o.values[t];
|
|
825
|
+
return typeof o.values[0] == "number" ? u + r * (a - u) : u.clone().lerp(a, r);
|
|
826
826
|
}
|
|
827
|
-
var
|
|
827
|
+
var De = (
|
|
828
828
|
/** @class */
|
|
829
|
-
function() {
|
|
830
|
-
function o(i, e, t, r,
|
|
831
|
-
this.birthTime = i, this.deathAge = e, this.position = t.clone(), this.velocity = r.clone(), this.acceleration =
|
|
829
|
+
(function() {
|
|
830
|
+
function o(i, e, t, r, u, a, s, c, f, m, h, d, y, b) {
|
|
831
|
+
this.birthTime = i, this.deathAge = e, this.position = t.clone(), this.velocity = r.clone(), this.acceleration = u.clone(), this.angle = a, this.angleVelocity = s, this.angleAcceleration = c, this.color = f, this.colorTween = m, this.size = h, this.sizeTween = d, this.opacity = y, this.opacityTween = b;
|
|
832
832
|
}
|
|
833
833
|
return o.prototype.getAlive = function(i) {
|
|
834
834
|
return this.deathAge > i - this.birthTime;
|
|
835
835
|
}, o.prototype.getState = function(i) {
|
|
836
|
-
var e = this.getAlive(i), t = Math.min(this.deathAge, i - this.birthTime), r =
|
|
837
|
-
return { alive: e, age: t, position: r, angle:
|
|
836
|
+
var e = this.getAlive(i), t = Math.min(this.deathAge, i - this.birthTime), r = Ve(this.velocity, this.acceleration, t).add(this.position), u = te(this.angleVelocity, this.angleAcceleration, t) + this.angle, a = (this.sizeTween ? oe(this.sizeTween, t) : 0) + this.size, s = (this.colorTween ? oe(this.colorTween, t) : new n.Vector3()).add(this.color), c = new n.Color().setHSL(s.x, s.y, s.z), f = (this.opacityTween ? oe(this.opacityTween, t) : 0) + this.opacity;
|
|
837
|
+
return { alive: e, age: t, position: r, angle: u, size: a, color: c, opacity: f };
|
|
838
838
|
}, o;
|
|
839
|
-
}()
|
|
840
|
-
),
|
|
839
|
+
})()
|
|
840
|
+
), Re = `
|
|
841
841
|
attribute vec3 color;
|
|
842
842
|
attribute float opacity;
|
|
843
843
|
attribute float size;
|
|
@@ -863,7 +863,7 @@ void main() {
|
|
|
863
863
|
gl_PointSize = size * ( 300.0 / length( mvPosition.xyz ) );
|
|
864
864
|
gl_Position = projectionMatrix * mvPosition;
|
|
865
865
|
}
|
|
866
|
-
`,
|
|
866
|
+
`, Ne = `
|
|
867
867
|
varying vec4 vColor;
|
|
868
868
|
|
|
869
869
|
#if defined(USE_MAP)
|
|
@@ -887,27 +887,27 @@ void main() {
|
|
|
887
887
|
gl_FragColor = vColor * rotatedTexture;
|
|
888
888
|
#endif
|
|
889
889
|
}
|
|
890
|
-
`,
|
|
890
|
+
`, Xe = (
|
|
891
891
|
/** @class */
|
|
892
|
-
function(o) {
|
|
893
|
-
|
|
892
|
+
(function(o) {
|
|
893
|
+
Y(i, o);
|
|
894
894
|
function i(e) {
|
|
895
|
-
var t = this, r,
|
|
896
|
-
|
|
897
|
-
var
|
|
895
|
+
var t = this, r, u, a, s, c, f, m, h, d, y, b, S, g, _, C, B, E, F, P, T, M, z, V, D, R, N, U, O, j, G, I, X, H, k, v, p, w, x, A = new n.BufferGeometry();
|
|
896
|
+
A.setAttribute("position", new n.BufferAttribute(new Float32Array(), 3)), A.setAttribute("alive", new n.BufferAttribute(new Float32Array(), 1)), A.setAttribute("color", new n.BufferAttribute(new Float32Array(), 3)), A.setAttribute("opacity", new n.BufferAttribute(new Float32Array(), 1)), A.setAttribute("size", new n.BufferAttribute(new Float32Array(), 1)), A.setAttribute("angle", new n.BufferAttribute(new Float32Array(), 1));
|
|
897
|
+
var Z = new n.ShaderMaterial({
|
|
898
898
|
uniforms: {
|
|
899
899
|
map: { value: (r = e.texture) !== null && r !== void 0 ? r : null }
|
|
900
900
|
},
|
|
901
901
|
defines: {
|
|
902
902
|
USE_MAP: !!e.texture
|
|
903
903
|
},
|
|
904
|
-
vertexShader:
|
|
905
|
-
fragmentShader:
|
|
904
|
+
vertexShader: Re,
|
|
905
|
+
fragmentShader: Ne,
|
|
906
906
|
transparent: !0,
|
|
907
|
-
blending: (
|
|
907
|
+
blending: (u = e.blending) !== null && u !== void 0 ? u : n.NormalBlending,
|
|
908
908
|
depthWrite: !1
|
|
909
909
|
});
|
|
910
|
-
return t = o.call(this,
|
|
910
|
+
return t = o.call(this, A, Z) || this, t.instances = [], t.needsRender = !0, t.birthTime = Date.now() / 1e3, t.disposed = !1, t.paused = !1, t.positionBase = (s = (a = e.positionBase) === null || a === void 0 ? void 0 : a.clone()) !== null && s !== void 0 ? s : new n.Vector3(), t.positionStyle = (c = e.positionStyle) !== null && c !== void 0 ? c : "CUBE", t.positionCubeSpread = (m = (f = e.positionCubeSpread) === null || f === void 0 ? void 0 : f.clone()) !== null && m !== void 0 ? m : new n.Vector3(), t.positionSphereSpread = (h = e.positionSphereSpread) !== null && h !== void 0 ? h : 0, t.velocityStyle = (d = e.velocityStyle) !== null && d !== void 0 ? d : "CUBE", t.velocityCubeBase = (b = (y = e.velocityCubeBase) === null || y === void 0 ? void 0 : y.clone()) !== null && b !== void 0 ? b : new n.Vector3(), t.velocityCubeSpread = (g = (S = e.velocityCubeSpread) === null || S === void 0 ? void 0 : S.clone()) !== null && g !== void 0 ? g : new n.Vector3(), t.velocitySphereBase = (_ = e.velocitySphereBase) !== null && _ !== void 0 ? _ : 0, t.velocitySphereSpread = (C = e.velocitySphereSpread) !== null && C !== void 0 ? C : 0, t.accelerationBase = (E = (B = e.accelerationBase) === null || B === void 0 ? void 0 : B.clone()) !== null && E !== void 0 ? E : new n.Vector3(), t.accelerationSpread = (P = (F = e.accelerationSpread) === null || F === void 0 ? void 0 : F.clone()) !== null && P !== void 0 ? P : new n.Vector3(), t.angleBase = (T = e.angleBase) !== null && T !== void 0 ? T : 0, t.angleSpread = (M = e.angleSpread) !== null && M !== void 0 ? M : 0, t.angleVelocityBase = (z = e.angleVelocityBase) !== null && z !== void 0 ? z : 0, t.angleVelocitySpread = (V = e.angleVelocitySpread) !== null && V !== void 0 ? V : 0, t.angleAccelerationBase = (D = e.angleAccelerationBase) !== null && D !== void 0 ? D : 0, t.angleAccelerationSpread = (R = e.angleAccelerationSpread) !== null && R !== void 0 ? R : 0, t.sizeBase = (N = e.sizeBase) !== null && N !== void 0 ? N : 0.1, t.sizeSpread = (U = e.sizeSpread) !== null && U !== void 0 ? U : 0, t.sizeTween = (O = e.sizeTween) !== null && O !== void 0 ? O : null, t.colorBase = (G = (j = e.colorBase) === null || j === void 0 ? void 0 : j.clone()) !== null && G !== void 0 ? G : new n.Vector3(), t.colorSpread = (X = (I = e.colorSpread) === null || I === void 0 ? void 0 : I.clone()) !== null && X !== void 0 ? X : new n.Vector3(), t.colorTween = (H = e.colorTween) !== null && H !== void 0 ? H : null, t.opacityBase = ((k = e.opacityBase) !== null && k !== void 0 ? k : e.opacityTween) ? 0 : 1, t.opacitySpread = (v = e.opacitySpread) !== null && v !== void 0 ? v : 0, t.opacityTween = (p = e.opacityTween) !== null && p !== void 0 ? p : null, t.particlesPerSecond = (w = e.particlesPerSecond) !== null && w !== void 0 ? w : 60, t.particleDeathAge = (x = e.particleDeathAge) !== null && x !== void 0 ? x : 1, t;
|
|
911
911
|
}
|
|
912
912
|
return Object.defineProperty(i.prototype, "texture", {
|
|
913
913
|
/** 贴图素材 */
|
|
@@ -933,29 +933,29 @@ void main() {
|
|
|
933
933
|
var t = this.positionBase.clone();
|
|
934
934
|
switch (this.positionStyle) {
|
|
935
935
|
case "CUBE": {
|
|
936
|
-
t =
|
|
936
|
+
t = K(this.positionBase, this.positionCubeSpread);
|
|
937
937
|
break;
|
|
938
938
|
}
|
|
939
939
|
case "SPHERE": {
|
|
940
|
-
var r = 2 * Math.random() - 1,
|
|
941
|
-
t = new n.Vector3().addVectors(this.positionBase,
|
|
940
|
+
var r = 2 * Math.random() - 1, u = Math.PI * 2 * Math.random(), a = Math.sqrt(1 - r * r), s = new n.Vector3(a * Math.cos(u), a * Math.sin(u), r);
|
|
941
|
+
t = new n.Vector3().addVectors(this.positionBase, s.multiplyScalar(this.positionSphereSpread));
|
|
942
942
|
break;
|
|
943
943
|
}
|
|
944
944
|
}
|
|
945
|
-
var
|
|
945
|
+
var c = new n.Vector3();
|
|
946
946
|
switch (this.velocityStyle) {
|
|
947
947
|
case "CUBE": {
|
|
948
|
-
|
|
948
|
+
c = K(this.velocityCubeBase, this.velocityCubeSpread);
|
|
949
949
|
break;
|
|
950
950
|
}
|
|
951
951
|
case "SPHERE": {
|
|
952
|
-
var
|
|
953
|
-
|
|
952
|
+
var f = new n.Vector3().subVectors(t, this.positionBase), m = q(this.velocitySphereBase, this.velocitySphereSpread);
|
|
953
|
+
c = f.normalize().multiplyScalar(m);
|
|
954
954
|
break;
|
|
955
955
|
}
|
|
956
956
|
}
|
|
957
|
-
var
|
|
958
|
-
return
|
|
957
|
+
var h = new De(e, this.particleDeathAge, t, c, K(this.accelerationBase, this.accelerationSpread), q(this.angleBase, this.angleSpread), q(this.angleVelocityBase, this.angleVelocitySpread), q(this.angleAccelerationBase, this.angleAccelerationSpread), K(this.colorBase, this.colorSpread), this.colorTween, q(this.sizeBase, this.sizeSpread), this.sizeTween, q(this.opacityBase, this.opacitySpread), this.opacityTween);
|
|
958
|
+
return h;
|
|
959
959
|
}, i.prototype.pause = function() {
|
|
960
960
|
this.paused !== !0 && (this.paused = !0, this.birthTime = Date.now() / 1e3);
|
|
961
961
|
}, i.prototype.play = function() {
|
|
@@ -965,54 +965,54 @@ void main() {
|
|
|
965
965
|
e /= 1e3;
|
|
966
966
|
var t = e - this.birthTime, r = Math.ceil(this.particlesPerSecond * this.particleDeathAge);
|
|
967
967
|
if (this.geometry.attributes.position.count < r) {
|
|
968
|
-
var
|
|
969
|
-
|
|
970
|
-
var a = new n.BufferAttribute(
|
|
968
|
+
var u = new Float32Array(r * 3);
|
|
969
|
+
u.set(this.geometry.attributes.position.array, 0);
|
|
970
|
+
var a = new n.BufferAttribute(u, 3);
|
|
971
971
|
a.needsUpdate = !0, this.geometry.setAttribute("position", a);
|
|
972
972
|
}
|
|
973
973
|
if (this.geometry.attributes.alive.count < r) {
|
|
974
|
-
var
|
|
975
|
-
|
|
976
|
-
var a = new n.BufferAttribute(
|
|
974
|
+
var s = new Float32Array(r);
|
|
975
|
+
s.set(this.geometry.attributes.alive.array, 0);
|
|
976
|
+
var a = new n.BufferAttribute(s, 1);
|
|
977
977
|
a.needsUpdate = !0, this.geometry.setAttribute("alive", a);
|
|
978
978
|
}
|
|
979
979
|
if (this.geometry.attributes.color.count < r) {
|
|
980
|
-
var
|
|
981
|
-
|
|
982
|
-
var a = new n.BufferAttribute(
|
|
980
|
+
var c = new Float32Array(r * 3);
|
|
981
|
+
c.set(this.geometry.attributes.color.array, 0);
|
|
982
|
+
var a = new n.BufferAttribute(c, 3);
|
|
983
983
|
a.needsUpdate = !0, this.geometry.setAttribute("color", a);
|
|
984
984
|
}
|
|
985
985
|
if (this.geometry.attributes.opacity.count < r) {
|
|
986
|
-
var
|
|
987
|
-
|
|
988
|
-
var a = new n.BufferAttribute(
|
|
986
|
+
var f = new Float32Array(r);
|
|
987
|
+
f.set(this.geometry.attributes.opacity.array, 0);
|
|
988
|
+
var a = new n.BufferAttribute(f, 1);
|
|
989
989
|
a.needsUpdate = !0, this.geometry.setAttribute("opacity", a);
|
|
990
990
|
}
|
|
991
991
|
if (this.geometry.attributes.size.count < r) {
|
|
992
|
-
var
|
|
993
|
-
|
|
994
|
-
var a = new n.BufferAttribute(
|
|
992
|
+
var m = new Float32Array(r);
|
|
993
|
+
m.set(this.geometry.attributes.size.array, 0);
|
|
994
|
+
var a = new n.BufferAttribute(m, 1);
|
|
995
995
|
a.needsUpdate = !0, this.geometry.setAttribute("size", a);
|
|
996
996
|
}
|
|
997
997
|
if (this.geometry.attributes.angle.count < r) {
|
|
998
|
-
var
|
|
999
|
-
|
|
1000
|
-
var a = new n.BufferAttribute(
|
|
998
|
+
var h = new Float32Array(r);
|
|
999
|
+
h.set(this.geometry.attributes.angle.array, 0);
|
|
1000
|
+
var a = new n.BufferAttribute(h, 1);
|
|
1001
1001
|
a.needsUpdate = !0, this.geometry.setAttribute("angle", a);
|
|
1002
1002
|
}
|
|
1003
1003
|
this.instances.length < r && (this.instances.length = r);
|
|
1004
|
-
for (var
|
|
1005
|
-
var
|
|
1006
|
-
if (
|
|
1007
|
-
var
|
|
1008
|
-
if (t >
|
|
1009
|
-
var
|
|
1010
|
-
this.instances[
|
|
1004
|
+
for (var d = 0; d < this.instances.length; d++) {
|
|
1005
|
+
var y = this.instances[d];
|
|
1006
|
+
if (d < r && this.paused === !1 && (y === void 0 || y.getAlive(e) === !1)) {
|
|
1007
|
+
var b = this.particleDeathAge / r * d;
|
|
1008
|
+
if (t > b) {
|
|
1009
|
+
var S = e - (t - b) % this.particleDeathAge;
|
|
1010
|
+
this.instances[d] = y = this.createInstance(S);
|
|
1011
1011
|
}
|
|
1012
1012
|
}
|
|
1013
|
-
if (
|
|
1014
|
-
var
|
|
1015
|
-
this.geometry.attributes.position.setXYZ(
|
|
1013
|
+
if (y) {
|
|
1014
|
+
var g = y.getState(e), u = g.position, s = g.alive, c = g.color, f = g.opacity, m = g.size, h = g.angle;
|
|
1015
|
+
this.geometry.attributes.position.setXYZ(d, u.x, u.y, u.z), this.geometry.attributes.position.needsUpdate = !0, this.geometry.attributes.alive.setX(d, s ? 1 : 0), this.geometry.attributes.alive.needsUpdate = !0, this.geometry.attributes.color.setXYZ(d, c.r, c.g, c.b), this.geometry.attributes.color.needsUpdate = !0, this.geometry.attributes.opacity.setX(d, f), this.geometry.attributes.opacity.needsUpdate = !0, this.geometry.attributes.size.setX(d, m), this.geometry.attributes.size.needsUpdate = !0, this.geometry.attributes.angle.setX(d, h), this.geometry.attributes.angle.needsUpdate = !0;
|
|
1016
1016
|
}
|
|
1017
1017
|
}
|
|
1018
1018
|
this.geometry.computeBoundingBox(), this.geometry.boundingSphere || (this.geometry.boundingSphere = new n.Sphere()), this.geometry.boundingBox.getBoundingSphere(this.geometry.boundingSphere), this.needsRender = !0;
|
|
@@ -1021,11 +1021,217 @@ void main() {
|
|
|
1021
1021
|
var e;
|
|
1022
1022
|
this.disposed = !0, this.geometry.dispose(), (e = this.texture) === null || e === void 0 || e.dispose(), this.material.dispose();
|
|
1023
1023
|
}, i;
|
|
1024
|
-
}(n.Points)
|
|
1024
|
+
})(n.Points)
|
|
1025
|
+
);
|
|
1026
|
+
function $(o, i) {
|
|
1027
|
+
return o + i * (Math.random() - 0.5);
|
|
1028
|
+
}
|
|
1029
|
+
function ee(o, i) {
|
|
1030
|
+
var e = new n.Vector3(Math.random() - 0.5, Math.random() - 0.5, Math.random() - 0.5);
|
|
1031
|
+
return new n.Vector3().addVectors(o, new n.Vector3().multiplyVectors(i, e));
|
|
1032
|
+
}
|
|
1033
|
+
var Ue = `
|
|
1034
|
+
// 粒子初始属性
|
|
1035
|
+
attribute vec3 initialVelocity;
|
|
1036
|
+
attribute vec3 acceleration;
|
|
1037
|
+
attribute float birthTime;
|
|
1038
|
+
attribute float lifeTime;
|
|
1039
|
+
attribute float initialSize;
|
|
1040
|
+
attribute float sizeGrowth;
|
|
1041
|
+
attribute vec3 initialColor;
|
|
1042
|
+
attribute float initialOpacity;
|
|
1043
|
+
attribute float initialAngle;
|
|
1044
|
+
attribute float angleVelocity;
|
|
1045
|
+
attribute float particleIndex;
|
|
1046
|
+
|
|
1047
|
+
// 全局uniform参数
|
|
1048
|
+
uniform float uTime;
|
|
1049
|
+
|
|
1050
|
+
// 传递给fragment shader的变量
|
|
1051
|
+
varying vec4 vColor;
|
|
1052
|
+
varying float vAngle;
|
|
1053
|
+
|
|
1054
|
+
// 简单噪声函数
|
|
1055
|
+
float random(vec2 st) {
|
|
1056
|
+
return fract(sin(dot(st.xy, vec2(12.9898,78.233))) * 43758.5453123);
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
// HSL转RGB函数
|
|
1060
|
+
vec3 hsl2rgb(vec3 c) {
|
|
1061
|
+
vec3 rgb = clamp(abs(mod(c.x*6.0+vec3(0.0,4.0,2.0), 6.0)-3.0)-1.0, 0.0, 1.0);
|
|
1062
|
+
return c.z + c.y * (rgb-0.5)*(1.0-abs(2.0*c.z-1.0));
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
void main() {
|
|
1066
|
+
// 计算粒子的实际年龄,考虑循环重生
|
|
1067
|
+
float totalCycleTime = lifeTime;
|
|
1068
|
+
float adjustedTime = uTime + birthTime;
|
|
1069
|
+
float cycleTime = mod(adjustedTime, totalCycleTime);
|
|
1070
|
+
float age = cycleTime;
|
|
1071
|
+
float normalizedAge = clamp(age / lifeTime, 0.0, 1.0);
|
|
1072
|
+
|
|
1073
|
+
// 如果粒子年龄超过生命周期,让它重新开始
|
|
1074
|
+
if (age > lifeTime) {
|
|
1075
|
+
age = 0.0;
|
|
1076
|
+
normalizedAge = 0.0;
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1079
|
+
// 计算当前位置(物理模拟)
|
|
1080
|
+
vec3 currentVelocity = initialVelocity + acceleration * age;
|
|
1081
|
+
|
|
1082
|
+
vec3 currentPosition = position + currentVelocity * age;
|
|
1083
|
+
|
|
1084
|
+
// 计算当前大小(随时间变化)
|
|
1085
|
+
float currentSize = initialSize + sizeGrowth * normalizedAge;
|
|
1086
|
+
|
|
1087
|
+
// 计算当前角度
|
|
1088
|
+
vAngle = initialAngle + angleVelocity * age;
|
|
1089
|
+
|
|
1090
|
+
// 计算当前颜色和透明度(生命周期渐变)
|
|
1091
|
+
vec3 currentColor = initialColor;
|
|
1092
|
+
float currentOpacity = initialOpacity;
|
|
1093
|
+
|
|
1094
|
+
// 生命周期透明度渐变(出生和死亡时渐变)
|
|
1095
|
+
if (normalizedAge < 0.1) {
|
|
1096
|
+
currentOpacity *= normalizedAge / 0.1; // 淡入
|
|
1097
|
+
} else if (normalizedAge > 0.8) {
|
|
1098
|
+
currentOpacity *= (1.0 - normalizedAge) / 0.2; // 淡出
|
|
1099
|
+
}
|
|
1100
|
+
|
|
1101
|
+
// 将HSL颜色转换为RGB
|
|
1102
|
+
vec3 rgbColor = hsl2rgb(currentColor);
|
|
1103
|
+
vColor = vec4(rgbColor, currentOpacity);
|
|
1104
|
+
|
|
1105
|
+
// 计算最终位置和大小
|
|
1106
|
+
vec4 mvPosition = modelViewMatrix * vec4(currentPosition, 1.0);
|
|
1107
|
+
gl_PointSize = currentSize * (300.0 / length(mvPosition.xyz));
|
|
1108
|
+
gl_Position = projectionMatrix * mvPosition;
|
|
1109
|
+
}
|
|
1110
|
+
`, Oe = `
|
|
1111
|
+
varying vec4 vColor;
|
|
1112
|
+
varying float vAngle;
|
|
1113
|
+
|
|
1114
|
+
#if defined(USE_MAP)
|
|
1115
|
+
uniform sampler2D map;
|
|
1116
|
+
#endif
|
|
1117
|
+
|
|
1118
|
+
void main() {
|
|
1119
|
+
// 如果粒子透明度为0,直接丢弃
|
|
1120
|
+
if (vColor.a <= 0.0) {
|
|
1121
|
+
discard;
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1124
|
+
gl_FragColor = vColor;
|
|
1125
|
+
|
|
1126
|
+
#if defined(USE_MAP)
|
|
1127
|
+
float c = cos(vAngle);
|
|
1128
|
+
float s = sin(vAngle);
|
|
1129
|
+
|
|
1130
|
+
// 旋转UV坐标以旋转纹理
|
|
1131
|
+
vec2 rotatedUV = vec2(
|
|
1132
|
+
c * (gl_PointCoord.x - 0.5) + s * (gl_PointCoord.y - 0.5) + 0.5,
|
|
1133
|
+
c * (gl_PointCoord.y - 0.5) - s * (gl_PointCoord.x - 0.5) + 0.5
|
|
1134
|
+
);
|
|
1135
|
+
|
|
1136
|
+
vec4 textureColor = texture2D(map, rotatedUV);
|
|
1137
|
+
gl_FragColor = vColor * textureColor;
|
|
1138
|
+
#endif
|
|
1139
|
+
}
|
|
1140
|
+
`, He = (
|
|
1141
|
+
/** @class */
|
|
1142
|
+
(function(o) {
|
|
1143
|
+
Y(i, o);
|
|
1144
|
+
function i(e) {
|
|
1145
|
+
for (var t = this, r, u, a, s, c, f, m, h, d, y, b, S, g, _, C, B, E, F, P, T, M, z, V, D, R, N, U, O, j, G, I, X, H, k, v = Math.ceil(((r = e.particlesPerSecond) !== null && r !== void 0 ? r : 60) * ((u = e.particleDeathAge) !== null && u !== void 0 ? u : 1)), p = new n.BufferGeometry(), w = new Float32Array(v * 3), x = new Float32Array(v * 3), A = new Float32Array(v * 3), Z = new Float32Array(v), ce = new Float32Array(v), de = new Float32Array(v), ve = new Float32Array(v), J = new Float32Array(v * 3), fe = new Float32Array(v), pe = new Float32Array(v), me = new Float32Array(v), he = new Float32Array(v), l = 0; l < v; l++) {
|
|
1146
|
+
var _e = ((a = e.particleDeathAge) !== null && a !== void 0 ? a : 1) / v * l;
|
|
1147
|
+
Z[l] = _e, ce[l] = (s = e.particleDeathAge) !== null && s !== void 0 ? s : 1, he[l] = l;
|
|
1148
|
+
var L = (f = (c = e.positionBase) === null || c === void 0 ? void 0 : c.clone()) !== null && f !== void 0 ? f : new n.Vector3();
|
|
1149
|
+
switch ((m = e.positionStyle) !== null && m !== void 0 ? m : "CUBE") {
|
|
1150
|
+
case "CUBE": {
|
|
1151
|
+
L = ee((h = e.positionBase) !== null && h !== void 0 ? h : new n.Vector3(), (d = e.positionCubeSpread) !== null && d !== void 0 ? d : new n.Vector3());
|
|
1152
|
+
break;
|
|
1153
|
+
}
|
|
1154
|
+
case "SPHERE": {
|
|
1155
|
+
var ne = 2 * Math.random() - 1, ye = Math.PI * 2 * Math.random(), ge = Math.sqrt(1 - ne * ne), Ce = new n.Vector3(ge * Math.cos(ye), ge * Math.sin(ye), ne);
|
|
1156
|
+
L = new n.Vector3().addVectors((y = e.positionBase) !== null && y !== void 0 ? y : new n.Vector3(), Ce.multiplyScalar((b = e.positionSphereSpread) !== null && b !== void 0 ? b : 0));
|
|
1157
|
+
break;
|
|
1158
|
+
}
|
|
1159
|
+
}
|
|
1160
|
+
w[l * 3] = L.x, w[l * 3 + 1] = L.y, w[l * 3 + 2] = L.z;
|
|
1161
|
+
var W = new n.Vector3();
|
|
1162
|
+
switch ((S = e.velocityStyle) !== null && S !== void 0 ? S : "CUBE") {
|
|
1163
|
+
case "CUBE": {
|
|
1164
|
+
W = ee((g = e.velocityCubeBase) !== null && g !== void 0 ? g : new n.Vector3(), (_ = e.velocityCubeSpread) !== null && _ !== void 0 ? _ : new n.Vector3());
|
|
1165
|
+
break;
|
|
1166
|
+
}
|
|
1167
|
+
case "SPHERE": {
|
|
1168
|
+
var Be = new n.Vector3().subVectors(L, (C = e.positionBase) !== null && C !== void 0 ? C : new n.Vector3()), Ee = $((B = e.velocitySphereBase) !== null && B !== void 0 ? B : 0, (E = e.velocitySphereSpread) !== null && E !== void 0 ? E : 0);
|
|
1169
|
+
W = Be.normalize().multiplyScalar(Ee);
|
|
1170
|
+
break;
|
|
1171
|
+
}
|
|
1172
|
+
}
|
|
1173
|
+
x[l * 3] = W.x, x[l * 3 + 1] = W.y, x[l * 3 + 2] = W.z;
|
|
1174
|
+
var ie = ee((F = e.accelerationBase) !== null && F !== void 0 ? F : new n.Vector3(), (P = e.accelerationSpread) !== null && P !== void 0 ? P : new n.Vector3());
|
|
1175
|
+
A[l * 3] = ie.x, A[l * 3 + 1] = ie.y, A[l * 3 + 2] = ie.z, de[l] = $((T = e.sizeBase) !== null && T !== void 0 ? T : 0.1, (M = e.sizeSpread) !== null && M !== void 0 ? M : 0), ve[l] = (z = e.sizeGrowth) !== null && z !== void 0 ? z : 0;
|
|
1176
|
+
var re = ee((V = e.colorBase) !== null && V !== void 0 ? V : new n.Vector3(), (D = e.colorSpread) !== null && D !== void 0 ? D : new n.Vector3());
|
|
1177
|
+
J[l * 3] = re.x, J[l * 3 + 1] = re.y, J[l * 3 + 2] = re.z, fe[l] = $((R = e.opacityBase) !== null && R !== void 0 ? R : 1, (N = e.opacitySpread) !== null && N !== void 0 ? N : 0), pe[l] = $((U = e.angleBase) !== null && U !== void 0 ? U : 0, (O = e.angleSpread) !== null && O !== void 0 ? O : 0), me[l] = $((j = e.angleVelocityBase) !== null && j !== void 0 ? j : 0, (G = e.angleVelocitySpread) !== null && G !== void 0 ? G : 0);
|
|
1178
|
+
}
|
|
1179
|
+
p.setAttribute("position", new n.BufferAttribute(w, 3)), p.setAttribute("initialVelocity", new n.BufferAttribute(x, 3)), p.setAttribute("acceleration", new n.BufferAttribute(A, 3)), p.setAttribute("birthTime", new n.BufferAttribute(Z, 1)), p.setAttribute("lifeTime", new n.BufferAttribute(ce, 1)), p.setAttribute("initialSize", new n.BufferAttribute(de, 1)), p.setAttribute("sizeGrowth", new n.BufferAttribute(ve, 1)), p.setAttribute("initialColor", new n.BufferAttribute(J, 3)), p.setAttribute("initialOpacity", new n.BufferAttribute(fe, 1)), p.setAttribute("initialAngle", new n.BufferAttribute(pe, 1)), p.setAttribute("angleVelocity", new n.BufferAttribute(me, 1)), p.setAttribute("particleIndex", new n.BufferAttribute(he, 1));
|
|
1180
|
+
var Fe = new n.ShaderMaterial({
|
|
1181
|
+
uniforms: {
|
|
1182
|
+
map: { value: (I = e.texture) !== null && I !== void 0 ? I : null },
|
|
1183
|
+
uTime: { value: 0 }
|
|
1184
|
+
},
|
|
1185
|
+
defines: {
|
|
1186
|
+
USE_MAP: !!e.texture
|
|
1187
|
+
},
|
|
1188
|
+
vertexShader: Ue,
|
|
1189
|
+
fragmentShader: Oe,
|
|
1190
|
+
transparent: !0,
|
|
1191
|
+
blending: (X = e.blending) !== null && X !== void 0 ? X : n.NormalBlending,
|
|
1192
|
+
depthWrite: !1
|
|
1193
|
+
});
|
|
1194
|
+
return t = o.call(this, p, Fe) || this, t.needsRender = !0, t.startTime = Date.now() / 1e3, t.disposed = !1, t.paused = !1, t.particleCount = v, t.particlesPerSecond = (H = e.particlesPerSecond) !== null && H !== void 0 ? H : 60, t.particleDeathAge = (k = e.particleDeathAge) !== null && k !== void 0 ? k : 1, t;
|
|
1195
|
+
}
|
|
1196
|
+
return Object.defineProperty(i.prototype, "texture", {
|
|
1197
|
+
/** 贴图素材 */
|
|
1198
|
+
get: function() {
|
|
1199
|
+
return this.material.uniforms.map.value;
|
|
1200
|
+
},
|
|
1201
|
+
set: function(e) {
|
|
1202
|
+
this.material.uniforms.map.value = e, e === null ? this.material.defines.USE_MAP !== !1 && (this.material.defines.USE_MAP = !1, this.material.needsUpdate = !0) : this.material.defines.USE_MAP !== !0 && (this.material.defines.USE_MAP = !0, this.material.needsUpdate = !0);
|
|
1203
|
+
},
|
|
1204
|
+
enumerable: !1,
|
|
1205
|
+
configurable: !0
|
|
1206
|
+
}), Object.defineProperty(i.prototype, "blending", {
|
|
1207
|
+
/** 材质混合方式 */
|
|
1208
|
+
get: function() {
|
|
1209
|
+
return this.material.blending;
|
|
1210
|
+
},
|
|
1211
|
+
set: function(e) {
|
|
1212
|
+
this.material.blending = e;
|
|
1213
|
+
},
|
|
1214
|
+
enumerable: !1,
|
|
1215
|
+
configurable: !0
|
|
1216
|
+
}), i.prototype.pause = function() {
|
|
1217
|
+
this.paused !== !0 && (this.paused = !0, this.startTime = Date.now() / 1e3);
|
|
1218
|
+
}, i.prototype.play = function() {
|
|
1219
|
+
this.paused !== !1 && (this.paused = !1, this.startTime = Date.now() / 1e3);
|
|
1220
|
+
}, i.prototype.setTime = function(e) {
|
|
1221
|
+
if (!(this.disposed || this.paused)) {
|
|
1222
|
+
var t = e / 1e3, r = t - this.startTime;
|
|
1223
|
+
this.material.uniforms.uTime.value = r, this.needsRender = !0;
|
|
1224
|
+
}
|
|
1225
|
+
}, i.prototype.dispose = function() {
|
|
1226
|
+
var e;
|
|
1227
|
+
this.disposed = !0, this.geometry.dispose(), (e = this.texture) === null || e === void 0 || e.dispose(), this.material.dispose();
|
|
1228
|
+
}, i;
|
|
1229
|
+
})(n.Points)
|
|
1025
1230
|
);
|
|
1026
1231
|
export {
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1232
|
+
Ie as Airflow,
|
|
1233
|
+
je as Flame,
|
|
1234
|
+
Xe as Particle,
|
|
1235
|
+
He as ParticleGPU,
|
|
1236
|
+
Ge as SpotLight
|
|
1031
1237
|
};
|