@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.d.ts
CHANGED
|
@@ -240,6 +240,105 @@ export declare interface ParticleArgs {
|
|
|
240
240
|
particleDeathAge: number;
|
|
241
241
|
}
|
|
242
242
|
|
|
243
|
+
export declare class ParticleGPU extends THREE_2.Points<THREE_2.BufferGeometry, THREE_2.ShaderMaterial> {
|
|
244
|
+
needsRender: boolean;
|
|
245
|
+
paused: boolean;
|
|
246
|
+
private disposed;
|
|
247
|
+
private startTime;
|
|
248
|
+
private particleCount;
|
|
249
|
+
particlesPerSecond: number;
|
|
250
|
+
particleDeathAge: number;
|
|
251
|
+
constructor(args: Partial<ParticleGPUArgs>);
|
|
252
|
+
/** 贴图素材 */
|
|
253
|
+
get texture(): THREE_2.Texture | null;
|
|
254
|
+
set texture(value: THREE_2.Texture | null);
|
|
255
|
+
/** 材质混合方式 */
|
|
256
|
+
get blending(): THREE_2.Blending;
|
|
257
|
+
set blending(value: THREE_2.Blending);
|
|
258
|
+
/** 暂停 */
|
|
259
|
+
pause(): void;
|
|
260
|
+
/** 开始 */
|
|
261
|
+
play(): void;
|
|
262
|
+
/**
|
|
263
|
+
* 通过 Five 默认调用的 setTime 方法
|
|
264
|
+
* @param time - 毫秒
|
|
265
|
+
*/
|
|
266
|
+
setTime(time: number): void;
|
|
267
|
+
/** 析构 */
|
|
268
|
+
dispose(): void;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* GPU粒子系统初始化参数
|
|
273
|
+
*/
|
|
274
|
+
export declare interface ParticleGPUArgs {
|
|
275
|
+
/** 粒子的初始位置坐标 */
|
|
276
|
+
positionBase: THREE_2.Vector3;
|
|
277
|
+
/** 粒子坐标的抖动计算形式 */
|
|
278
|
+
positionStyle: ParticleGPUType;
|
|
279
|
+
/** 粒子坐标的抖动`CUBE`计算形式下的扩散值 */
|
|
280
|
+
positionCubeSpread: THREE_2.Vector3;
|
|
281
|
+
/** 粒子坐标的抖动`SPHERE`计算形式下的扩散值 */
|
|
282
|
+
positionSphereSpread: number;
|
|
283
|
+
/** 粒子速度的抖动计算形式 */
|
|
284
|
+
velocityStyle: ParticleGPUType;
|
|
285
|
+
/** 粒子速度的`CUBE`计算形式下的速度值 */
|
|
286
|
+
velocityCubeBase: THREE_2.Vector3;
|
|
287
|
+
/** 粒子速度的`CUBE`计算形式下的扩散值 */
|
|
288
|
+
velocityCubeSpread: THREE_2.Vector3;
|
|
289
|
+
/** 粒子速度的`SPHERE`计算形式下的速度值 */
|
|
290
|
+
velocitySphereBase: number;
|
|
291
|
+
/** 粒子速度的`SPHERE`计算形式下的扩散值 */
|
|
292
|
+
velocitySphereSpread: number;
|
|
293
|
+
/** 粒子加速度 */
|
|
294
|
+
accelerationBase: THREE_2.Vector3;
|
|
295
|
+
/** 粒子加速度扩散值 */
|
|
296
|
+
accelerationSpread: THREE_2.Vector3;
|
|
297
|
+
/** 旋转角度初始值 */
|
|
298
|
+
angleBase: number;
|
|
299
|
+
/** 旋转角度初始值的扩散值 */
|
|
300
|
+
angleSpread: number;
|
|
301
|
+
/** 旋转角度速度值 */
|
|
302
|
+
angleVelocityBase: number;
|
|
303
|
+
/** 旋转角度速度值的扩散值 */
|
|
304
|
+
angleVelocitySpread: number;
|
|
305
|
+
/** 粒子大小 */
|
|
306
|
+
sizeBase: number;
|
|
307
|
+
/** 粒子大小的扩散值 */
|
|
308
|
+
sizeSpread: number;
|
|
309
|
+
/** 粒子大小增长率 */
|
|
310
|
+
sizeGrowth: number;
|
|
311
|
+
/** 颜色(hsl) */
|
|
312
|
+
colorBase: THREE_2.Vector3;
|
|
313
|
+
/** 颜色(hsl)的扩散值 */
|
|
314
|
+
colorSpread: THREE_2.Vector3;
|
|
315
|
+
/** 透明度 */
|
|
316
|
+
opacityBase: number;
|
|
317
|
+
/** 透明度的扩散值 */
|
|
318
|
+
opacitySpread: number;
|
|
319
|
+
/** 贴图素材 */
|
|
320
|
+
texture: THREE_2.Texture;
|
|
321
|
+
/** 材质混合方式 */
|
|
322
|
+
blending: THREE_2.Blending;
|
|
323
|
+
/** 一秒产生多少粒子 */
|
|
324
|
+
particlesPerSecond: number;
|
|
325
|
+
/** 粒子存活时长 */
|
|
326
|
+
particleDeathAge: number;
|
|
327
|
+
/** 重力 */
|
|
328
|
+
gravity: THREE_2.Vector3;
|
|
329
|
+
/** 噪声强度 */
|
|
330
|
+
noiseStrength: number;
|
|
331
|
+
/** 阻尼系数 */
|
|
332
|
+
damping: number;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
export declare interface ParticleGPUTweenKeyframe<T extends (number | THREE_2.Vector3)> {
|
|
336
|
+
times: number[];
|
|
337
|
+
values: T[];
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
export declare type ParticleGPUType = 'CUBE' | 'SPHERE';
|
|
341
|
+
|
|
243
342
|
export declare interface ParticleTweenKeyframe<T extends (number | THREE_2.Vector3)> {
|
|
244
343
|
times: number[];
|
|
245
344
|
values: T[];
|
package/vfx/index.js
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
|
|
@@ -252,7 +252,7 @@
|
|
|
252
252
|
* No amendment to or modification of this Agreement will be binding unless in
|
|
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
|
-
*/"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
255
|
+
*/"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Fe=require("three");function Te(r){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const e in r)if(e!=="default"){const t=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(i,e,t.get?t:{enumerable:!0,get:()=>r[e]})}}return i.default=r,Object.freeze(i)}const n=Te(Fe);var ae=function(r,i){return ae=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},ae(r,i)};function Y(r,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");ae(r,i);function e(){this.constructor=r}r.prototype=i===null?Object.create(i):(e.prototype=i.prototype,new e)}var be=`
|
|
256
256
|
uniform vec3 uColor1;
|
|
257
257
|
uniform vec3 uColor2;
|
|
258
258
|
uniform float uOpacity;
|
|
@@ -272,7 +272,7 @@ void main() {
|
|
|
272
272
|
color.g = color.g * (1.0 + gradient * vNoise);
|
|
273
273
|
gl_FragColor = vec4(color, alpha * uOpacity);
|
|
274
274
|
}
|
|
275
|
-
`,
|
|
275
|
+
`,le=`
|
|
276
276
|
// Simplex 4D Noise
|
|
277
277
|
// by Ian McEwan, Ashima Arts
|
|
278
278
|
//
|
|
@@ -376,11 +376,11 @@ float simplexNoise(vec4 v) {
|
|
|
376
376
|
+ dot(m1*m1, vec2( dot( p3, x3 ), dot( p4, x4 ) ) ) ) ;
|
|
377
377
|
|
|
378
378
|
}
|
|
379
|
-
`,
|
|
379
|
+
`,se=`
|
|
380
380
|
float scale(float value, float fromMin, float fromMax, float toMin, float toMax) {
|
|
381
381
|
return toMin + (value - fromMin) * (toMax - toMin) / (fromMax - fromMin);
|
|
382
382
|
}
|
|
383
|
-
`,
|
|
383
|
+
`,Ae=`
|
|
384
384
|
uniform float uTime;
|
|
385
385
|
uniform float uNoise;
|
|
386
386
|
uniform float uSpeed;
|
|
@@ -388,8 +388,8 @@ uniform float uSpeed;
|
|
|
388
388
|
varying vec3 vPosition;
|
|
389
389
|
varying float vNoise;
|
|
390
390
|
|
|
391
|
-
`.concat(
|
|
392
|
-
`).concat(
|
|
391
|
+
`.concat(le,`
|
|
392
|
+
`).concat(se,`
|
|
393
393
|
|
|
394
394
|
float fbm(vec4 x) {
|
|
395
395
|
float v = 0.0;
|
|
@@ -412,7 +412,7 @@ void main() {
|
|
|
412
412
|
|
|
413
413
|
gl_Position = projectionMatrix * modelViewMatrix * vec4(vPosition, 1.0);
|
|
414
414
|
}
|
|
415
|
-
`),
|
|
415
|
+
`),Me=new n.SphereBufferGeometry(1,300,300),xe=[];for(var Q=0;Q<2;Q++)xe.push(new n.Vector2(Math.sin(Q)/2+1,Q*2-.8));var ze=new n.LatheBufferGeometry(xe,300),Ve=(function(r){Y(i,r);function i(e){var t=r.call(this)||this;t.needsRender=!0;var o;if(e instanceof n.BufferGeometry)o=e;else switch(e){case"ring":o=ze;break;case"circle":default:o=Me;break}t.uniforms={uTime:{value:0},uColor1:{value:new n.Color("rgb(255, 177, 20)")},uColor2:{value:new n.Color("rgb(255, 0, 0)")},uNoise:{value:1.2},uSpeed:{value:1},uOpacity:{value:1}},t.defines={FRAGMENTATION_DEGREE:2};var u=new n.Mesh(o,new n.ShaderMaterial({uniforms:t.uniforms,defines:t.defines,vertexShader:Ae,fragmentShader:be,transparent:!0,depthWrite:!1,side:n.BackSide})),a=new n.Mesh(o,new n.ShaderMaterial({uniforms:t.uniforms,defines:t.defines,vertexShader:Ae,fragmentShader:be,transparent:!0,depthWrite:!1,side:n.FrontSide}));return u.scale.setScalar(.1),a.scale.setScalar(.1),t.add(u),t.add(a),t}return i.prototype.setTime=function(e){this.startTime===void 0&&(this.startTime=e),this.uniforms.uTime.value=(e-this.startTime)/1e3,this.needsRender=!0},Object.defineProperty(i.prototype,"color1",{get:function(){return this.uniforms.uColor1.value},set:function(e){this.uniforms.uColor1.value=e,this.needsRender=!0},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"color2",{get:function(){return this.uniforms.uColor2.value},set:function(e){this.uniforms.uColor2.value=e,this.needsRender=!0},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"speed",{get:function(){return this.uniforms.uSpeed.value},set:function(e){this.uniforms.uSpeed.value=e},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"noise",{get:function(){return this.uniforms.uSpeed.value},set:function(e){this.uniforms.uSpeed.value=e,this.needsRender=!0},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"opacity",{get:function(){return this.uniforms.opacity.value},set:function(e){this.uniforms.uOpacity.value=e,this.needsRender=!0},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"fragmentationDegree",{get:function(){return this.defines.FRAGMENTATION_DEGREE},set:function(e){this.defines.FRAGMENTATION_DEGREE=e,this.traverse(function(t){t instanceof n.Mesh&&t.material instanceof n.ShaderMaterial&&(t.material.needsUpdate=!0)}),this.needsRender=!0},enumerable:!1,configurable:!0}),i})(n.Group),De=`
|
|
416
416
|
uniform vec3 uLightColor;
|
|
417
417
|
uniform vec3 uSpotPosition;
|
|
418
418
|
uniform float uAttenuation;
|
|
@@ -432,7 +432,7 @@ void main() {
|
|
|
432
432
|
intensity = intensity * angleIntensity * vNoise;
|
|
433
433
|
gl_FragColor = vec4( uLightColor, intensity );
|
|
434
434
|
}
|
|
435
|
-
`,
|
|
435
|
+
`,Re=`
|
|
436
436
|
|
|
437
437
|
uniform float uTime;
|
|
438
438
|
|
|
@@ -440,8 +440,8 @@ varying vec3 vNormal;
|
|
|
440
440
|
varying vec3 vWorldPosition;
|
|
441
441
|
varying float vNoise;
|
|
442
442
|
|
|
443
|
-
`.concat(
|
|
444
|
-
`).concat(
|
|
443
|
+
`.concat(le,`
|
|
444
|
+
`).concat(se,`
|
|
445
445
|
|
|
446
446
|
void main(){
|
|
447
447
|
|
|
@@ -453,7 +453,7 @@ void main(){
|
|
|
453
453
|
|
|
454
454
|
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
|
|
455
455
|
}
|
|
456
|
-
`),
|
|
456
|
+
`),Ne=(function(r){Y(i,r);function i(e,t,o){e===void 0&&(e=1),t===void 0&&(t=.1),o===void 0&&(o=.2);var u=r.call(this)||this;u.needsRender=!0,u.uniforms={uTime:{value:0},uAttenuation:{value:e*.9},uAnglePower:{value:2},uSpotPosition:{value:u.position},uLightColor:{value:new n.Color(16777215)}};var a=new n.CylinderBufferGeometry(t,o,e,64,20,!0);a.applyMatrix4(new n.Matrix4().makeTranslation(0,-e/2,0)),a.applyMatrix4(new n.Matrix4().makeRotationX(-Math.PI/2));var s=new n.Mesh(a,new n.ShaderMaterial({uniforms:u.uniforms,vertexShader:Re,fragmentShader:De,transparent:!0,side:n.FrontSide,depthWrite:!1}));return u.add(s),u}return i.prototype.setTime=function(e){this.startTime===void 0&&(this.startTime=e),this.uniforms.uTime.value=(e-this.startTime)/1e3,this.needsRender=!0},Object.defineProperty(i.prototype,"attenuation",{get:function(){return this.uniforms.uAttenuation.value},set:function(e){this.uniforms.uAttenuation.value=e,this.needsRender=!0},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"anglePower",{get:function(){return this.uniforms.uAnglePower.value},set:function(e){this.uniforms.uAnglePower.value=e,this.needsRender=!0},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"color",{get:function(){return this.uniforms.uLightColor.value},set:function(e){this.uniforms.uLightColor.value=e,this.needsRender=!0},enumerable:!1,configurable:!0}),i})(n.Group),Se=`
|
|
457
457
|
uniform vec3 uColor;
|
|
458
458
|
uniform float uOpacity;
|
|
459
459
|
varying vec3 vPosition;
|
|
@@ -463,7 +463,7 @@ void main() {
|
|
|
463
463
|
float gradient = mix(0.0, 1.0, 1.0 + vPosition.y);
|
|
464
464
|
gl_FragColor = vec4(uColor, vNoise * gradient * uOpacity);
|
|
465
465
|
}
|
|
466
|
-
`,
|
|
466
|
+
`,we=`
|
|
467
467
|
|
|
468
468
|
uniform float uTime;
|
|
469
469
|
uniform float uSpeed;
|
|
@@ -472,8 +472,8 @@ uniform float uExpand;
|
|
|
472
472
|
varying float vNoise;
|
|
473
473
|
varying vec3 vPosition;
|
|
474
474
|
|
|
475
|
-
`.concat(
|
|
476
|
-
`).concat(
|
|
475
|
+
`.concat(le,`
|
|
476
|
+
`).concat(se,`
|
|
477
477
|
|
|
478
478
|
void main(){
|
|
479
479
|
|
|
@@ -486,7 +486,7 @@ void main(){
|
|
|
486
486
|
|
|
487
487
|
gl_Position = projectionMatrix * modelViewMatrix * transformed;
|
|
488
488
|
}
|
|
489
|
-
`),
|
|
489
|
+
`),ue=new n.PlaneBufferGeometry(1,1,200,200);ue.translate(0,-.5,0);var Oe=(function(r){Y(i,r);function i(){var e=r.call(this)||this;e.needsRender=!0;var t=e.outer=new n.Mesh(ue,new n.ShaderMaterial({uniforms:{uTime:{value:0},uSpeed:{value:.75},uScale:{value:2},uExpand:{value:1.2},uColor:{value:new n.Color(.5,.5,.9)},uOpacity:{value:1}},vertexShader:we,fragmentShader:Se,transparent:!0,side:n.DoubleSide,depthWrite:!1})),o=e.inner=new n.Mesh(ue,new n.ShaderMaterial({uniforms:{uTime:{value:0},uSpeed:{value:2},uScale:{value:20},uExpand:{value:1.2},uColor:{value:new n.Color(1,1,1)},uOpacity:{value:.1}},vertexShader:we,fragmentShader:Se,transparent:!0,side:n.DoubleSide,depthWrite:!1}));return t.rotateX(-Math.PI/2),o.rotateX(-Math.PI/2),e.add(t),e.add(o),e}return i.prototype.setTime=function(e){this.startTime===void 0&&(this.startTime=e);var t=(e-this.startTime)/1e3;this.inner.material.uniforms.uTime.value=t,this.outer.material.uniforms.uTime.value=t,this.needsRender=!0},Object.defineProperty(i.prototype,"expand",{get:function(){return this.outer.material.uniforms.uExpand.value},set:function(e){this.outer.material.uniforms.uExpand.value=e,this.inner.material.uniforms.uExpand.value=e,this.needsRender=!0},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"speed",{get:function(){return this.inner.material.uniforms.speed.value},set:function(e){this.inner.material.uniforms.speed.value=e,this.needsRender=!0},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"color",{get:function(){return this.outer.material.uniforms.color.value},set:function(e){this.outer.material.uniforms.color.value=e,this.needsRender=!0},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"flowColor",{get:function(){return this.inner.material.uniforms.color.value},set:function(e){this.inner.material.uniforms.color.value=e,this.needsRender=!0},enumerable:!1,configurable:!0}),i})(n.Group);function q(r,i){return r+i*(Math.random()-.5)}function K(r,i){var e=new n.Vector3(Math.random()-.5,Math.random()-.5,Math.random()-.5);return new n.Vector3().addVectors(r,new n.Vector3().multiplyVectors(i,e))}function te(r,i,e){return r*e+i*e*e/2}function Ue(r,i,e){return new n.Vector3(te(r.x,i.x,e),te(r.y,i.y,e),te(r.z,i.z,e))}function oe(r,i){for(var e=r.times.length,t=0;t<e&&i>r.times[t];)t++;if(t==0)return r.values[0];if(t==e)return r.values[e-1];var o=(i-r.times[t-1])/(r.times[t]-r.times[t-1]),u=r.values[t-1],a=r.values[t];return typeof r.values[0]=="number"?u+o*(a-u):u.clone().lerp(a,o)}var je=(function(){function r(i,e,t,o,u,a,s,c,f,m,h,d,y,b){this.birthTime=i,this.deathAge=e,this.position=t.clone(),this.velocity=o.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}return r.prototype.getAlive=function(i){return this.deathAge>i-this.birthTime},r.prototype.getState=function(i){var e=this.getAlive(i),t=Math.min(this.deathAge,i-this.birthTime),o=Ue(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;return{alive:e,age:t,position:o,angle:u,size:a,color:c,opacity:f}},r})(),Ge=`
|
|
490
490
|
attribute vec3 color;
|
|
491
491
|
attribute float opacity;
|
|
492
492
|
attribute float size;
|
|
@@ -512,7 +512,7 @@ void main() {
|
|
|
512
512
|
gl_PointSize = size * ( 300.0 / length( mvPosition.xyz ) );
|
|
513
513
|
gl_Position = projectionMatrix * mvPosition;
|
|
514
514
|
}
|
|
515
|
-
`,
|
|
515
|
+
`,Ie=`
|
|
516
516
|
varying vec4 vColor;
|
|
517
517
|
|
|
518
518
|
#if defined(USE_MAP)
|
|
@@ -536,4 +536,111 @@ void main() {
|
|
|
536
536
|
gl_FragColor = vColor * rotatedTexture;
|
|
537
537
|
#endif
|
|
538
538
|
}
|
|
539
|
-
`,
|
|
539
|
+
`,He=(function(r){Y(i,r);function i(e){var t=this,o,u,a,s,c,f,m,h,d,y,b,S,g,_,C,E,B,P,F,T,M,z,V,D,R,N,O,U,j,G,I,H,X,k,v,p,w,x,A=new n.BufferGeometry;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));var Z=new n.ShaderMaterial({uniforms:{map:{value:(o=e.texture)!==null&&o!==void 0?o:null}},defines:{USE_MAP:!!e.texture},vertexShader:Ge,fragmentShader:Ie,transparent:!0,blending:(u=e.blending)!==null&&u!==void 0?u:n.NormalBlending,depthWrite:!1});return t=r.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=(B=(E=e.accelerationBase)===null||E===void 0?void 0:E.clone())!==null&&B!==void 0?B:new n.Vector3,t.accelerationSpread=(F=(P=e.accelerationSpread)===null||P===void 0?void 0:P.clone())!==null&&F!==void 0?F: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:.1,t.sizeSpread=(O=e.sizeSpread)!==null&&O!==void 0?O:0,t.sizeTween=(U=e.sizeTween)!==null&&U!==void 0?U: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=(H=(I=e.colorSpread)===null||I===void 0?void 0:I.clone())!==null&&H!==void 0?H:new n.Vector3,t.colorTween=(X=e.colorTween)!==null&&X!==void 0?X: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}return Object.defineProperty(i.prototype,"texture",{get:function(){return this.material.uniforms.map.value},set:function(e){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)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"blending",{get:function(){return this.material.blending},set:function(e){this.material.blending=e},enumerable:!1,configurable:!0}),i.prototype.createInstance=function(e){var t=this.positionBase.clone();switch(this.positionStyle){case"CUBE":{t=K(this.positionBase,this.positionCubeSpread);break}case"SPHERE":{var o=2*Math.random()-1,u=Math.PI*2*Math.random(),a=Math.sqrt(1-o*o),s=new n.Vector3(a*Math.cos(u),a*Math.sin(u),o);t=new n.Vector3().addVectors(this.positionBase,s.multiplyScalar(this.positionSphereSpread));break}}var c=new n.Vector3;switch(this.velocityStyle){case"CUBE":{c=K(this.velocityCubeBase,this.velocityCubeSpread);break}case"SPHERE":{var f=new n.Vector3().subVectors(t,this.positionBase),m=q(this.velocitySphereBase,this.velocitySphereSpread);c=f.normalize().multiplyScalar(m);break}}var h=new je(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);return h},i.prototype.pause=function(){this.paused!==!0&&(this.paused=!0,this.birthTime=Date.now()/1e3)},i.prototype.play=function(){this.paused!==!1&&(this.paused=!1,this.birthTime=Date.now()/1e3)},i.prototype.setTime=function(e){if(!this.disposed){e/=1e3;var t=e-this.birthTime,o=Math.ceil(this.particlesPerSecond*this.particleDeathAge);if(this.geometry.attributes.position.count<o){var u=new Float32Array(o*3);u.set(this.geometry.attributes.position.array,0);var a=new n.BufferAttribute(u,3);a.needsUpdate=!0,this.geometry.setAttribute("position",a)}if(this.geometry.attributes.alive.count<o){var s=new Float32Array(o);s.set(this.geometry.attributes.alive.array,0);var a=new n.BufferAttribute(s,1);a.needsUpdate=!0,this.geometry.setAttribute("alive",a)}if(this.geometry.attributes.color.count<o){var c=new Float32Array(o*3);c.set(this.geometry.attributes.color.array,0);var a=new n.BufferAttribute(c,3);a.needsUpdate=!0,this.geometry.setAttribute("color",a)}if(this.geometry.attributes.opacity.count<o){var f=new Float32Array(o);f.set(this.geometry.attributes.opacity.array,0);var a=new n.BufferAttribute(f,1);a.needsUpdate=!0,this.geometry.setAttribute("opacity",a)}if(this.geometry.attributes.size.count<o){var m=new Float32Array(o);m.set(this.geometry.attributes.size.array,0);var a=new n.BufferAttribute(m,1);a.needsUpdate=!0,this.geometry.setAttribute("size",a)}if(this.geometry.attributes.angle.count<o){var h=new Float32Array(o);h.set(this.geometry.attributes.angle.array,0);var a=new n.BufferAttribute(h,1);a.needsUpdate=!0,this.geometry.setAttribute("angle",a)}this.instances.length<o&&(this.instances.length=o);for(var d=0;d<this.instances.length;d++){var y=this.instances[d];if(d<o&&this.paused===!1&&(y===void 0||y.getAlive(e)===!1)){var b=this.particleDeathAge/o*d;if(t>b){var S=e-(t-b)%this.particleDeathAge;this.instances[d]=y=this.createInstance(S)}}if(y){var g=y.getState(e),u=g.position,s=g.alive,c=g.color,f=g.opacity,m=g.size,h=g.angle;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}}this.geometry.computeBoundingBox(),this.geometry.boundingSphere||(this.geometry.boundingSphere=new n.Sphere),this.geometry.boundingBox.getBoundingSphere(this.geometry.boundingSphere),this.needsRender=!0}},i.prototype.dispose=function(){var e;this.disposed=!0,this.geometry.dispose(),(e=this.texture)===null||e===void 0||e.dispose(),this.material.dispose()},i})(n.Points);function $(r,i){return r+i*(Math.random()-.5)}function ee(r,i){var e=new n.Vector3(Math.random()-.5,Math.random()-.5,Math.random()-.5);return new n.Vector3().addVectors(r,new n.Vector3().multiplyVectors(i,e))}var Xe=`
|
|
540
|
+
// 粒子初始属性
|
|
541
|
+
attribute vec3 initialVelocity;
|
|
542
|
+
attribute vec3 acceleration;
|
|
543
|
+
attribute float birthTime;
|
|
544
|
+
attribute float lifeTime;
|
|
545
|
+
attribute float initialSize;
|
|
546
|
+
attribute float sizeGrowth;
|
|
547
|
+
attribute vec3 initialColor;
|
|
548
|
+
attribute float initialOpacity;
|
|
549
|
+
attribute float initialAngle;
|
|
550
|
+
attribute float angleVelocity;
|
|
551
|
+
attribute float particleIndex;
|
|
552
|
+
|
|
553
|
+
// 全局uniform参数
|
|
554
|
+
uniform float uTime;
|
|
555
|
+
|
|
556
|
+
// 传递给fragment shader的变量
|
|
557
|
+
varying vec4 vColor;
|
|
558
|
+
varying float vAngle;
|
|
559
|
+
|
|
560
|
+
// 简单噪声函数
|
|
561
|
+
float random(vec2 st) {
|
|
562
|
+
return fract(sin(dot(st.xy, vec2(12.9898,78.233))) * 43758.5453123);
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
// HSL转RGB函数
|
|
566
|
+
vec3 hsl2rgb(vec3 c) {
|
|
567
|
+
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);
|
|
568
|
+
return c.z + c.y * (rgb-0.5)*(1.0-abs(2.0*c.z-1.0));
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
void main() {
|
|
572
|
+
// 计算粒子的实际年龄,考虑循环重生
|
|
573
|
+
float totalCycleTime = lifeTime;
|
|
574
|
+
float adjustedTime = uTime + birthTime;
|
|
575
|
+
float cycleTime = mod(adjustedTime, totalCycleTime);
|
|
576
|
+
float age = cycleTime;
|
|
577
|
+
float normalizedAge = clamp(age / lifeTime, 0.0, 1.0);
|
|
578
|
+
|
|
579
|
+
// 如果粒子年龄超过生命周期,让它重新开始
|
|
580
|
+
if (age > lifeTime) {
|
|
581
|
+
age = 0.0;
|
|
582
|
+
normalizedAge = 0.0;
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
// 计算当前位置(物理模拟)
|
|
586
|
+
vec3 currentVelocity = initialVelocity + acceleration * age;
|
|
587
|
+
|
|
588
|
+
vec3 currentPosition = position + currentVelocity * age;
|
|
589
|
+
|
|
590
|
+
// 计算当前大小(随时间变化)
|
|
591
|
+
float currentSize = initialSize + sizeGrowth * normalizedAge;
|
|
592
|
+
|
|
593
|
+
// 计算当前角度
|
|
594
|
+
vAngle = initialAngle + angleVelocity * age;
|
|
595
|
+
|
|
596
|
+
// 计算当前颜色和透明度(生命周期渐变)
|
|
597
|
+
vec3 currentColor = initialColor;
|
|
598
|
+
float currentOpacity = initialOpacity;
|
|
599
|
+
|
|
600
|
+
// 生命周期透明度渐变(出生和死亡时渐变)
|
|
601
|
+
if (normalizedAge < 0.1) {
|
|
602
|
+
currentOpacity *= normalizedAge / 0.1; // 淡入
|
|
603
|
+
} else if (normalizedAge > 0.8) {
|
|
604
|
+
currentOpacity *= (1.0 - normalizedAge) / 0.2; // 淡出
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
// 将HSL颜色转换为RGB
|
|
608
|
+
vec3 rgbColor = hsl2rgb(currentColor);
|
|
609
|
+
vColor = vec4(rgbColor, currentOpacity);
|
|
610
|
+
|
|
611
|
+
// 计算最终位置和大小
|
|
612
|
+
vec4 mvPosition = modelViewMatrix * vec4(currentPosition, 1.0);
|
|
613
|
+
gl_PointSize = currentSize * (300.0 / length(mvPosition.xyz));
|
|
614
|
+
gl_Position = projectionMatrix * mvPosition;
|
|
615
|
+
}
|
|
616
|
+
`,ke=`
|
|
617
|
+
varying vec4 vColor;
|
|
618
|
+
varying float vAngle;
|
|
619
|
+
|
|
620
|
+
#if defined(USE_MAP)
|
|
621
|
+
uniform sampler2D map;
|
|
622
|
+
#endif
|
|
623
|
+
|
|
624
|
+
void main() {
|
|
625
|
+
// 如果粒子透明度为0,直接丢弃
|
|
626
|
+
if (vColor.a <= 0.0) {
|
|
627
|
+
discard;
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
gl_FragColor = vColor;
|
|
631
|
+
|
|
632
|
+
#if defined(USE_MAP)
|
|
633
|
+
float c = cos(vAngle);
|
|
634
|
+
float s = sin(vAngle);
|
|
635
|
+
|
|
636
|
+
// 旋转UV坐标以旋转纹理
|
|
637
|
+
vec2 rotatedUV = vec2(
|
|
638
|
+
c * (gl_PointCoord.x - 0.5) + s * (gl_PointCoord.y - 0.5) + 0.5,
|
|
639
|
+
c * (gl_PointCoord.y - 0.5) - s * (gl_PointCoord.x - 0.5) + 0.5
|
|
640
|
+
);
|
|
641
|
+
|
|
642
|
+
vec4 textureColor = texture2D(map, rotatedUV);
|
|
643
|
+
gl_FragColor = vColor * textureColor;
|
|
644
|
+
#endif
|
|
645
|
+
}
|
|
646
|
+
`,Le=(function(r){Y(i,r);function i(e){for(var t=this,o,u,a,s,c,f,m,h,d,y,b,S,g,_,C,E,B,P,F,T,M,z,V,D,R,N,O,U,j,G,I,H,X,k,v=Math.ceil(((o=e.particlesPerSecond)!==null&&o!==void 0?o: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++){var _e=((a=e.particleDeathAge)!==null&&a!==void 0?a:1)/v*l;Z[l]=_e,ce[l]=(s=e.particleDeathAge)!==null&&s!==void 0?s:1,he[l]=l;var L=(f=(c=e.positionBase)===null||c===void 0?void 0:c.clone())!==null&&f!==void 0?f:new n.Vector3;switch((m=e.positionStyle)!==null&&m!==void 0?m:"CUBE"){case"CUBE":{L=ee((h=e.positionBase)!==null&&h!==void 0?h:new n.Vector3,(d=e.positionCubeSpread)!==null&&d!==void 0?d:new n.Vector3);break}case"SPHERE":{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);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));break}}w[l*3]=L.x,w[l*3+1]=L.y,w[l*3+2]=L.z;var W=new n.Vector3;switch((S=e.velocityStyle)!==null&&S!==void 0?S:"CUBE"){case"CUBE":{W=ee((g=e.velocityCubeBase)!==null&&g!==void 0?g:new n.Vector3,(_=e.velocityCubeSpread)!==null&&_!==void 0?_:new n.Vector3);break}case"SPHERE":{var Ee=new n.Vector3().subVectors(L,(C=e.positionBase)!==null&&C!==void 0?C:new n.Vector3),Be=$((E=e.velocitySphereBase)!==null&&E!==void 0?E:0,(B=e.velocitySphereSpread)!==null&&B!==void 0?B:0);W=Ee.normalize().multiplyScalar(Be);break}}x[l*3]=W.x,x[l*3+1]=W.y,x[l*3+2]=W.z;var ie=ee((P=e.accelerationBase)!==null&&P!==void 0?P:new n.Vector3,(F=e.accelerationSpread)!==null&&F!==void 0?F:new n.Vector3);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:.1,(M=e.sizeSpread)!==null&&M!==void 0?M:0),ve[l]=(z=e.sizeGrowth)!==null&&z!==void 0?z:0;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);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]=$((O=e.angleBase)!==null&&O!==void 0?O:0,(U=e.angleSpread)!==null&&U!==void 0?U:0),me[l]=$((j=e.angleVelocityBase)!==null&&j!==void 0?j:0,(G=e.angleVelocitySpread)!==null&&G!==void 0?G:0)}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));var Pe=new n.ShaderMaterial({uniforms:{map:{value:(I=e.texture)!==null&&I!==void 0?I:null},uTime:{value:0}},defines:{USE_MAP:!!e.texture},vertexShader:Xe,fragmentShader:ke,transparent:!0,blending:(H=e.blending)!==null&&H!==void 0?H:n.NormalBlending,depthWrite:!1});return t=r.call(this,p,Pe)||this,t.needsRender=!0,t.startTime=Date.now()/1e3,t.disposed=!1,t.paused=!1,t.particleCount=v,t.particlesPerSecond=(X=e.particlesPerSecond)!==null&&X!==void 0?X:60,t.particleDeathAge=(k=e.particleDeathAge)!==null&&k!==void 0?k:1,t}return Object.defineProperty(i.prototype,"texture",{get:function(){return this.material.uniforms.map.value},set:function(e){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)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"blending",{get:function(){return this.material.blending},set:function(e){this.material.blending=e},enumerable:!1,configurable:!0}),i.prototype.pause=function(){this.paused!==!0&&(this.paused=!0,this.startTime=Date.now()/1e3)},i.prototype.play=function(){this.paused!==!1&&(this.paused=!1,this.startTime=Date.now()/1e3)},i.prototype.setTime=function(e){if(!(this.disposed||this.paused)){var t=e/1e3,o=t-this.startTime;this.material.uniforms.uTime.value=o,this.needsRender=!0}},i.prototype.dispose=function(){var e;this.disposed=!0,this.geometry.dispose(),(e=this.texture)===null||e===void 0||e.dispose(),this.material.dispose()},i})(n.Points);exports.Airflow=Oe;exports.Flame=Ve;exports.Particle=He;exports.ParticleGPU=Le;exports.SpotLight=Ne;
|