@realsee/five 6.0.0-alpha.9 → 6.0.0-alpha.91
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/README.md +1 -1
- package/TERMS.txt +0 -2
- package/docs/assets/highlight.css +20 -20
- package/docs/assets/main.js +59 -52
- package/docs/assets/navigation.js +1 -0
- package/docs/assets/search.js +1 -1
- package/docs/assets/style.css +805 -825
- package/docs/classes/five.AnimationFrameLoop.html +16 -15
- package/docs/classes/five.BoxBoundingVolume.html +19 -1
- package/docs/classes/five.Camera.html +38 -11
- package/docs/classes/five.CullingVolume.html +13 -1
- package/docs/classes/five.Fetcher.html +5 -0
- package/docs/classes/five.Five.html +237 -290
- package/docs/classes/five.InternalWebGLRenderer.html +2 -1
- package/docs/classes/five.IntersectMesh.html +4 -1
- package/docs/classes/five.Model.html +70 -55
- package/docs/classes/five.ModelViewLayer.html +13 -0
- package/docs/classes/five.NetworkAbortError.html +2 -0
- package/docs/classes/five.NetworkFirbiddenError.html +2 -0
- package/docs/classes/five.NetworkResponseError.html +3 -0
- package/docs/classes/five.NetworkSubscribe.html +42 -56
- package/docs/classes/five.NetworkTimeoutError.html +2 -0
- package/docs/classes/five.PBMContainer.html +12 -13
- package/docs/classes/five.PBMGroup.html +3 -3
- package/docs/classes/five.PBMMesh.html +4 -5
- package/docs/classes/five.PBMMeshMaterial.html +50 -45
- package/docs/classes/five.PanoCircleMesh.html +30 -7
- package/docs/classes/five.PanoCircleMeshCustom.html +30 -7
- package/docs/classes/five.PanoCircleMeshSolid.html +30 -7
- package/docs/classes/five.RegionBoundingVolume.html +22 -1
- package/docs/classes/five.RequestScheduler.html +13 -12
- package/docs/classes/five.Scene.html +5 -3
- package/docs/classes/five.SphereBoundingVolume.html +18 -1
- package/docs/classes/five.Subscribe.html +43 -62
- package/docs/classes/five.TextureLoader.html +5 -1
- package/docs/classes/five.Tile.html +30 -1
- package/docs/classes/five.Tile3DModel.html +28 -1
- package/docs/classes/five.TileCubeTextureTarget.html +9 -1
- package/docs/classes/five.TileNode.html +5 -1
- package/docs/classes/five.Tileset.html +31 -5
- package/docs/classes/five.TilesetCache.html +8 -1
- package/docs/classes/five.TilesetTraverser.html +19 -1
- package/docs/classes/five.Work.html +33 -28
- package/docs/classes/five.XRButton.html +3 -1
- package/docs/classes/gltf_loader.DDSLoader.html +3 -1
- package/docs/classes/gltf_loader.DRACOLoader.html +8 -1
- package/docs/classes/gltf_loader.GLTFLoader.html +18 -17
- package/docs/classes/gltf_loader.GLTFObject.html +8 -6
- package/docs/classes/gltf_loader.GLTFParser.html +6 -1
- package/docs/classes/gltf_loader.THREEGLTFLoader.html +8 -1
- package/docs/classes/line.Line.html +10 -1
- package/docs/classes/line.LineGeometry.html +14 -1
- package/docs/classes/line.LineMaterial.html +8 -1
- package/docs/classes/line.LineSegmentsGeometry.html +12 -1
- package/docs/classes/line.THREE_Line2.html +4 -1
- package/docs/classes/line.THREE_LineSegments2.html +4 -1
- package/docs/classes/plugins.BasePlugin.Controller.html +38 -0
- package/docs/classes/plugins.ItemMaskController.html +37 -0
- package/docs/classes/react.Store.html +23 -29
- package/docs/classes/sticker.Sticker.html +25 -32
- package/docs/classes/vfx.Airflow.html +8 -1
- package/docs/classes/vfx.Flame.html +10 -1
- package/docs/classes/vfx.Particle.html +79 -82
- package/docs/classes/vfx.SpotLight.html +7 -1
- package/docs/enums/five.VolumePlaneIntersect.html +4 -1
- package/docs/functions/five.defaultImageURLTransform.html +5 -0
- package/docs/functions/five.getViewportScale.html +1 -0
- package/docs/functions/five.imageSupport.html +1 -0
- package/docs/functions/five.isPanoId.html +1 -0
- package/docs/functions/five.loadAt3d.html +1 -0
- package/docs/functions/five.loadB3dm.html +1 -0
- package/docs/functions/five.loadDome.html +1 -0
- package/docs/functions/five.loadDomez.html +1 -0
- package/docs/functions/five.loadPbm.html +1 -0
- package/docs/functions/five.loadPnts.html +1 -0
- package/docs/functions/five.panoEqual.html +1 -0
- package/docs/functions/five.panoParse.html +1 -0
- package/docs/functions/five.panoStringify.html +1 -0
- package/docs/functions/five.parseWork.html +7 -0
- package/docs/functions/plugins.ItemMaskPlugin.html +1 -0
- package/docs/functions/react.FiveCanvas-1.html +6 -0
- package/docs/functions/react.createFiveFeature.html +1 -0
- package/docs/functions/react.createFiveProvider.html +9 -0
- package/docs/functions/react.createStore.html +15 -0
- package/docs/functions/react.unsafe__useFiveInstance.html +5 -0
- package/docs/functions/react.useFiveAction.html +19 -0
- package/docs/functions/react.useFiveCameraDirection.html +3 -0
- package/docs/functions/react.useFiveCameraRaycaster.html +3 -0
- package/docs/functions/react.useFiveCurrentObserver.html +5 -0
- package/docs/functions/react.useFiveCurrentState.html +5 -0
- package/docs/functions/react.useFiveEventCallback.html +5 -0
- package/docs/functions/react.useFiveFloor.html +5 -0
- package/docs/functions/react.useFiveHelper.html +5 -0
- package/docs/functions/react.useFiveModelIntersectRaycaster.html +7 -0
- package/docs/functions/react.useFiveModelReadyState.html +4 -0
- package/docs/functions/react.useFiveProject2d.html +7 -0
- package/docs/functions/react.useFiveScene.html +2 -0
- package/docs/functions/react.useFiveSceneEffect.html +5 -0
- package/docs/functions/react.useFiveState.html +1 -0
- package/docs/functions/react.useFiveWork.html +8 -0
- package/docs/functions/react.withFive.html +1 -0
- package/docs/functions/vue.unsafe__useFiveInject.html +5 -0
- package/docs/functions/vue.useFiveAction.html +25 -0
- package/docs/functions/vue.useFiveCameraDirection.html +3 -0
- package/docs/functions/vue.useFiveCameraRaycaster.html +3 -0
- package/docs/functions/vue.useFiveCurrentObserver.html +5 -0
- package/docs/functions/vue.useFiveCurrentState.html +5 -0
- package/docs/functions/vue.useFiveEventCallback.html +5 -0
- package/docs/functions/vue.useFiveFloor.html +5 -0
- package/docs/functions/vue.useFiveHelper.html +5 -0
- package/docs/functions/vue.useFiveModel.html +2 -0
- package/docs/functions/vue.useFiveModelBounding.html +2 -0
- package/docs/functions/vue.useFiveModelIntersectRaycaster.html +7 -0
- package/docs/functions/vue.useFiveModelReadyState.html +4 -0
- package/docs/functions/vue.useFiveProject2d.html +7 -0
- package/docs/functions/vue.useFiveScene.html +2 -0
- package/docs/functions/vue.useFiveState.html +5 -0
- package/docs/functions/vue.useFiveWorks.html +8 -0
- package/docs/index.html +35 -79
- package/docs/interfaces/five.AddableObject.html +9 -9
- package/docs/interfaces/five.AjaxOptions.html +11 -0
- package/docs/interfaces/five.AnimationFrame.html +5 -1
- package/docs/interfaces/five.BaseEvent.html +5 -1
- package/docs/interfaces/five.BoundingVolume.html +15 -1
- package/docs/interfaces/five.CameraPose.html +6 -1
- package/docs/interfaces/five.ClipperParameter.html +3 -1
- package/docs/interfaces/five.EventCallback.html +355 -462
- package/docs/interfaces/five.FiveInitArgs.html +82 -86
- package/docs/interfaces/five.FiveLoadOptions.html +36 -0
- package/docs/interfaces/five.FloorplanControllerCustomInitArgs.html +17 -15
- package/docs/interfaces/five.GestureEvent.html +19 -1
- package/docs/interfaces/five.ImageOptions.html +16 -18
- package/docs/interfaces/five.ImageURLMappings.html +1 -1
- package/docs/interfaces/five.ImageURLOptions.html +15 -15
- package/docs/interfaces/five.IntersectEvent.html +8 -1
- package/docs/interfaces/five.IntersectMeshInterface.html +3 -3
- package/docs/interfaces/five.Intersection.html +3 -7
- package/docs/interfaces/five.MapviewControllerCustomInitArgs.html +15 -11
- package/docs/interfaces/five.ModeChangeEvent.html +9 -1
- package/docs/interfaces/five.ModelControllerCustomInitArgs.html +18 -18
- package/docs/interfaces/five.ModelEvent.html +8 -1
- package/docs/interfaces/five.ModelsEvent.html +6 -1
- package/docs/interfaces/five.MotionKeyframe.html +4 -1
- package/docs/interfaces/five.MovePanoOptions.html +24 -35
- package/docs/interfaces/five.NetworkOptions.html +9 -9
- package/docs/interfaces/five.NetworkResourceEvent.html +9 -1
- package/docs/interfaces/five.ObjectEvent.html +6 -1
- package/docs/interfaces/five.PBMPanoPicture.html +7 -7
- package/docs/interfaces/five.PBMParameters.html +42 -43
- package/docs/interfaces/five.PanoCircleMeshCustomOptions.html +9 -1
- package/docs/interfaces/five.PanoCircleMeshInterface.html +21 -10
- package/docs/interfaces/five.PanoCircleMeshOptions.html +3 -1
- package/docs/interfaces/five.PanoCircleMeshSolidOptions.html +3 -1
- package/docs/interfaces/five.PanoEvent.html +11 -1
- package/docs/interfaces/five.PanoTextureEvent.html +9 -1
- package/docs/interfaces/five.PanoramaControllerCustomInitArgs.html +32 -32
- package/docs/interfaces/five.PanoramaLikeControllerCustomInitArgs.html +18 -18
- package/docs/interfaces/five.Pose.html +15 -32
- package/docs/interfaces/five.RenderEvent.html +7 -1
- package/docs/interfaces/five.Scissor.html +11 -12
- package/docs/interfaces/five.State.html +20 -21
- package/docs/interfaces/five.StateEvent.html +7 -1
- package/docs/interfaces/five.SubscribeMixinType.emit.html +1 -1
- package/docs/interfaces/five.SubscribeMixinType.hasListener.html +1 -1
- package/docs/interfaces/five.SubscribeMixinType.off.html +1 -1
- package/docs/interfaces/five.SubscribeMixinType.on.html +1 -1
- package/docs/interfaces/five.SubscribeMixinType.once.html +1 -1
- package/docs/interfaces/five.SubscribeMixinType.waitUnitl.html +1 -1
- package/docs/interfaces/five.TextureOptions.html +18 -20
- package/docs/interfaces/five.Tile3DModelLoaderOptions.html +6 -3
- package/docs/interfaces/five.TileCubeNode.html +7 -1
- package/docs/interfaces/five.TileCubeTree.html +2 -1
- package/docs/interfaces/five.TileHeader.html +9 -1
- package/docs/interfaces/five.TilesetHeader.html +5 -1
- package/docs/interfaces/five.TilesetOptions.html +5 -1
- package/docs/interfaces/five.TopviewControllerCustomInitArgs.html +9 -9
- package/docs/interfaces/five.VRPanoramaControllerCustomInitArgs.html +28 -28
- package/docs/interfaces/five.WebXRAxesParams.html +4 -1
- package/docs/interfaces/five.WebXRControllerParams.html +2 -1
- package/docs/interfaces/five.WorkCubeImage.html +15 -13
- package/docs/interfaces/five.WorkImage.html +20 -21
- package/docs/interfaces/five.WorkInitial.html +17 -17
- package/docs/interfaces/five.WorkModel.html +12 -13
- package/docs/interfaces/five.WorkObserver.html +40 -39
- package/docs/interfaces/five.WorkResolvedObserver.html +41 -37
- package/docs/interfaces/five.WorkTile.html +10 -1
- package/docs/interfaces/five.WorkVideo.html +8 -9
- package/docs/interfaces/five.WorksEvent.html +9 -1
- package/docs/interfaces/five.XRControllerEvent.html +8 -1
- package/docs/interfaces/five.XRGestureEvent.html +11 -1
- package/docs/interfaces/five.XRPanoramaControllerCustomInitArgs.html +28 -28
- package/docs/interfaces/five.XRSessionEvent.html +7 -1
- package/docs/interfaces/gltf_loader.DDS.html +7 -1
- package/docs/interfaces/gltf_loader.GLTF.html +10 -4
- package/docs/interfaces/gltf_loader.GLTFReference.html +3 -1
- package/docs/interfaces/gltf_loader.THREEGLTF.html +8 -1
- 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.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/react.FiveActionReactCallbacks.html +27 -37
- package/docs/interfaces/react.FiveInjectionTypes.html +112 -138
- package/docs/interfaces/react.PropTypeOfFiveFeatures.html +2 -1
- package/docs/interfaces/sticker.IntersectionLike.html +7 -8
- package/docs/interfaces/vfx.ParticleArgs.html +67 -68
- package/docs/interfaces/vfx.ParticleTweenKeyframe.html +3 -1
- package/docs/interfaces/vue.FiveActionVueCallbacks.html +31 -42
- package/docs/modules/five.SubscribeMixinType.html +7 -1
- package/docs/modules/five.html +171 -643
- package/docs/modules/gltf_loader.html +11 -1
- package/docs/modules/line.html +8 -1
- package/docs/modules/plugins.BasePlugin.html +6 -0
- package/docs/modules/plugins.ItemMaskPluginType.html +9 -0
- package/docs/modules/plugins.html +5 -0
- package/docs/modules/react.FiveCanvas.html +8 -0
- package/docs/modules/react.html +37 -130
- package/docs/modules/sticker.html +3 -1
- package/docs/modules/vfx.html +8 -1
- package/docs/modules/vue.html +24 -115
- package/docs/types/five.AjaxResponseType.html +1 -0
- package/docs/types/five.AjaxResponseTypeMapping.html +1 -0
- package/docs/types/five.BoundingVolumeJson.html +1 -0
- package/docs/types/five.BoxBoundingVolumeJson.html +1 -0
- package/docs/types/five.ControllerCustomInitTypes.html +1 -0
- package/docs/types/five.ControllerEventTypes.html +32 -0
- package/docs/types/five.CoordinatesSystemTransformer.html +1 -0
- package/docs/types/five.EventTypes.html +26 -0
- package/docs/types/five.FivePlugin.html +71 -0
- package/docs/types/five.FivePluginInit.html +3 -0
- package/docs/types/five.FivePluginInstance.html +3 -0
- package/docs/types/five.GestureTypes.html +1 -0
- package/docs/types/five.LegacyEventType.html +203 -0
- package/docs/types/five.LooseWork.html +1 -0
- package/docs/types/five.LooseWorkInitial.html +1 -0
- package/docs/types/five.LooseWorkModel.html +1 -0
- package/docs/types/five.LooseWorkObserver.html +1 -0
- package/docs/types/five.LooseWorkPanorama.html +1 -0
- package/docs/types/five.LooseWorkVideo.html +1 -0
- package/docs/types/five.LooseWorkWithExtrinsics.html +2 -0
- package/docs/types/five.Mirror.html +1 -0
- package/docs/types/five.Mode.html +10 -0
- package/docs/types/five.ModelMaterialValues.html +1 -0
- package/docs/types/five.Models.html +13 -0
- package/docs/types/five.MotionValue.html +1 -0
- package/docs/types/five.MovePanoEffect.html +9 -0
- package/docs/types/five.NetWorkMeta.html +1 -0
- package/docs/types/five.NetworkError.html +1 -0
- package/docs/types/five.NetworkErrorCallback.html +1 -0
- package/docs/types/five.NetworkProgressCallback.html +1 -0
- package/docs/types/five.NetworkResponse.html +1 -0
- package/docs/types/five.NetworkState.html +1 -0
- package/docs/types/five.NetworkSuccessCallback.html +1 -0
- package/docs/types/five.NetworkType.html +1 -0
- package/docs/types/five.Pano.html +1 -0
- package/docs/types/five.PanoId.html +1 -0
- package/docs/types/five.ParseWorkOptions.html +6 -0
- package/docs/types/five.ParsedResultType.html +1 -0
- package/docs/types/five.PostProcessingType.html +1 -0
- package/docs/types/five.RegionBoundingVolumeJson.html +1 -0
- package/docs/types/five.RequestResult.html +1 -0
- package/docs/types/five.SphereBoundingVolumeJson.html +1 -0
- package/docs/types/five.SubscribeEventMap.html +1 -0
- package/docs/types/five.TileContentData.html +1 -0
- package/docs/types/five.TilesetFrameState.html +1 -0
- package/docs/types/five.WebXRControllerKey.html +1 -0
- package/docs/types/five.WebXRControllerType.html +1 -0
- package/docs/types/five.Works.html +1 -0
- package/docs/types/line.LineMaterialParameters.html +1 -0
- package/docs/types/plugins.BasePlugin.EventMap.html +6 -0
- package/docs/types/plugins.ItemMaskPluginType.PluginData.html +1 -0
- package/docs/types/plugins.ItemMaskPluginType.ServerData.html +1 -0
- package/docs/types/react.FiveInjectionActionFeature.html +1 -0
- package/docs/types/react.FiveInjectionDataFeature.html +1 -0
- package/docs/types/react.FiveInjectionFeature.html +1 -0
- package/docs/types/react.FiveProviderPropTypes.html +1 -0
- package/docs/types/react.FiveProviderType.html +1 -0
- package/docs/types/react.StoreActionMapHanlder.html +1 -0
- package/docs/types/react.StoreActionMapType.html +1 -0
- package/docs/types/react.StoreProviderType.html +1 -0
- package/docs/types/react.StoreValueMapType.html +1 -0
- package/docs/types/vfx.ParticleType.html +1 -0
- package/docs/types/vue.FiveModelIntersectRaycaster.html +1 -0
- package/docs/types/vue.FiveProviderComponent.html +1 -0
- package/docs/types/vue.Project2d.html +1 -0
- package/docs/variables/five.PROXY_CONTROLLER_EVENT_NAMES.html +1 -0
- package/docs/variables/five.defaultPbmParameters.html +1 -0
- package/docs/variables/react.INJECTION_PROPNAME.html +1 -0
- package/docs/variables/vue.FiveCanvas.html +8 -0
- package/docs/variables/vue.FiveProvider.html +8 -0
- package/five/index.d.ts +481 -351
- package/five/index.js +1879 -218
- package/five/index.mjs +23126 -0
- package/gltf-loader/index.js +204 -203
- package/gltf-loader/index.mjs +1708 -0
- package/line/index.js +396 -202
- package/line/index.mjs +776 -0
- package/package.json +48 -12
- package/plugins/index.d.ts +253 -0
- package/plugins/index.js +350 -0
- package/plugins/index.mjs +796 -0
- package/react/index.d.ts +35 -44
- package/react/index.js +198 -203
- package/react/index.mjs +1072 -0
- package/scripts/five-staticify.js +183 -2
- package/sticker/index.js +198 -203
- package/sticker/index.mjs +399 -0
- package/umd/five-gltf-loader.js +261 -1
- package/umd/five-line.js +454 -1
- package/umd/five-plugins.js +350 -0
- package/umd/five-react.js +255 -1
- package/umd/five-sticker.js +255 -1
- package/umd/five-vfx.js +539 -1
- package/umd/five-vue.js +255 -1
- package/umd/five.js +2023 -2
- package/vfx/index.js +481 -202
- package/vfx/index.mjs +1032 -0
- package/vue/index.d.ts +1 -1
- package/vue/index.js +198 -203
- package/vue/index.mjs +574 -0
- package/docs/assets/icons.css +0 -1043
- package/docs/assets/icons.png +0 -0
- package/docs/assets/icons@2x.png +0 -0
- package/docs/assets/widgets.png +0 -0
- package/docs/assets/widgets@2x.png +0 -0
- package/docs/classes/five.BVH.html +0 -10
- package/docs/classes/five.BVHIntersect.html +0 -1
- package/docs/classes/five.BVHNode.html +0 -7
- package/docs/classes/five.BVHVector3.html +0 -1
- package/docs/classes/five.Clipper.html +0 -1
- package/docs/classes/five.PBMMaterialReferenceCache.html +0 -1
- package/docs/enums/five.PBMPointColorType.html +0 -1
- package/docs/enums/five.PBMPointShapeType.html +0 -1
- package/docs/enums/five.PBMPointSizeType.html +0 -1
- package/docs/interfaces/five.DepthPanoramaControllerCustomInitArgs.html +0 -26
- package/docs/interfaces/five.ModelLodOptions.html +0 -1
- package/docs/interfaces/five.WorkOptions.html +0 -15
- package/docs/modules.html +0 -1
- package/exporters/staticify.js +0 -210
- package/scripts/five-plugin-init.js +0 -83
- package/scripts/five-quick-start-init.js +0 -80
- package/scripts/five-react-component-init.js +0 -83
- package/templates/plugin/README.md +0 -38
- package/templates/plugin/devtools/external-five.js +0 -5
- package/templates/plugin/devtools/external-three.js +0 -5
- package/templates/plugin/devtools/tsconfig.build.json +0 -18
- package/templates/plugin/devtools/webpack.bundle.js +0 -44
- package/templates/plugin/devtools/webpack.example.js +0 -39
- package/templates/plugin/docs/.gitkeep +0 -0
- package/templates/plugin/examples/data.json +0 -507
- package/templates/plugin/examples/index.html +0 -28
- package/templates/plugin/examples/index.ts +0 -12
- package/templates/plugin/lib/index.ts +0 -30
- package/templates/plugin/package.json +0 -32
- package/templates/plugin/tsconfig.json +0 -26
- package/templates/quick-start/README.md +0 -47
- package/templates/quick-start/assets/work.json +0 -507
- package/templates/quick-start/index.html +0 -54
- package/templates/quick-start/index.tsx +0 -123
- package/templates/quick-start/package.json +0 -25
- package/templates/quick-start/tsconfig.json +0 -27
- package/templates/quick-start/webpack.config.js +0 -45
- package/templates/quick-start/webpack.production.js +0 -42
- package/templates/react-component/README.md +0 -32
- package/templates/react-component/devtools/external-five.js +0 -5
- package/templates/react-component/devtools/external-react.js +0 -5
- package/templates/react-component/devtools/external-three.js +0 -5
- package/templates/react-component/devtools/tsconfig.build.json +0 -19
- package/templates/react-component/devtools/webpack.bundle.js +0 -44
- package/templates/react-component/devtools/webpack.example.js +0 -39
- package/templates/react-component/docs/.gitkeep +0 -0
- package/templates/react-component/examples/data.json +0 -507
- package/templates/react-component/examples/index.html +0 -17
- package/templates/react-component/examples/index.tsx +0 -62
- package/templates/react-component/lib/index.tsx +0 -157
- package/templates/react-component/package.json +0 -38
- package/templates/react-component/tsconfig.json +0 -27
- package/umd/five-gltf-loader.js.LICENSE.txt +0 -14
- package/umd/five-line.js.LICENSE.txt +0 -14
- package/umd/five-react.js.LICENSE.txt +0 -14
- package/umd/five-sticker.js.LICENSE.txt +0 -14
- package/umd/five.js.LICENSE.txt +0 -100
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import * as ReactDOM from "react-dom";
|
|
4
|
-
import { Five, Mode, State, Work, parseWork } from "@realsee/five";
|
|
5
|
-
import {
|
|
6
|
-
createFiveProvider,
|
|
7
|
-
FiveCanvas,
|
|
8
|
-
useFiveCurrentState,
|
|
9
|
-
useFiveWork
|
|
10
|
-
} from "@realsee/five/react";
|
|
11
|
-
|
|
12
|
-
const FiveProvider = createFiveProvider({
|
|
13
|
-
imageOptions: { size: 1024 },
|
|
14
|
-
onlyRenderIfNeeds: true,
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
const Viewport: React.FC = () => {
|
|
18
|
-
return <div className="viewport">
|
|
19
|
-
<FiveCanvas width={512} height={512}></FiveCanvas>
|
|
20
|
-
</div>
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
const Controller: React.FC = () => {
|
|
24
|
-
return <div className="controller">
|
|
25
|
-
<h1>Five Quick Start</h1>
|
|
26
|
-
<ModeChangePanel/>
|
|
27
|
-
<CameraPanel/>
|
|
28
|
-
<PanoPanel/>
|
|
29
|
-
</div>
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
const MODE_LABELS: Partial<Record<Mode, string>> = {
|
|
33
|
-
[Five.Mode.Panorama]: "全景游走模式",
|
|
34
|
-
[Five.Mode.Floorplan]: "模型总览模式",
|
|
35
|
-
[Five.Mode.Topview]: "户型图模式",
|
|
36
|
-
[Five.Mode.Model]: "模型游走模式",
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
const ModeChangePanel: React.FC = () => {
|
|
40
|
-
|
|
41
|
-
const [state, setState] = useFiveCurrentState();
|
|
42
|
-
|
|
43
|
-
const changeMode = React.useCallback((mode: Mode) => setState({ mode }), []);
|
|
44
|
-
return <div className="panel">
|
|
45
|
-
<div className="label">模态切换:</div>
|
|
46
|
-
<div className="content">
|
|
47
|
-
<div>{MODE_LABELS[state.mode]}</div>
|
|
48
|
-
<div>
|
|
49
|
-
<button onClick={() => changeMode(Five.Mode.Panorama)}>{MODE_LABELS[Five.Mode.Panorama]}</button>
|
|
50
|
-
<button onClick={() => changeMode(Five.Mode.Floorplan)}>{MODE_LABELS[Five.Mode.Floorplan]}</button>
|
|
51
|
-
<button onClick={() => changeMode(Five.Mode.Topview)}>{MODE_LABELS[Five.Mode.Topview]}</button>
|
|
52
|
-
<button onClick={() => changeMode(Five.Mode.Model)}>{MODE_LABELS[Five.Mode.Model]}</button>
|
|
53
|
-
</div>
|
|
54
|
-
</div>
|
|
55
|
-
</div>
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
const CameraPanel: React.FC = () => {
|
|
59
|
-
const [state, setState] = useFiveCurrentState();
|
|
60
|
-
return <div className="panel">
|
|
61
|
-
<div className="label">相机控制:</div>
|
|
62
|
-
<div className="content">
|
|
63
|
-
<div>
|
|
64
|
-
水平角: {state.longitude.toFixed(2)}(弧度)
|
|
65
|
-
</div>
|
|
66
|
-
<div>
|
|
67
|
-
俯仰角: {state.latitude.toFixed(2)}(弧度)
|
|
68
|
-
</div>
|
|
69
|
-
<div>
|
|
70
|
-
可视角度: {state.fov.toFixed(0)}(角度)
|
|
71
|
-
</div>
|
|
72
|
-
<div>
|
|
73
|
-
<button onMouseDown={() => setState({ longitude: state.longitude + 0.01 })}>向左</button>
|
|
74
|
-
<button onMouseDown={() => setState({ latitude: state.latitude - 0.01 })}>向上</button>
|
|
75
|
-
<button onMouseDown={() => setState({ latitude: state.latitude + 0.01 })}>向下</button>
|
|
76
|
-
<button onMouseDown={() => setState({ longitude: state.longitude - 0.01 })}>向右</button>
|
|
77
|
-
<button onMouseDown={() => setState({ fov: state.fov + 1 })}>可视角度+</button>
|
|
78
|
-
<button onMouseDown={() => setState({ fov: state.fov - 1 })}>可视角度-</button>
|
|
79
|
-
</div>
|
|
80
|
-
</div>
|
|
81
|
-
</div>
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
const PanoPanel: React.FC = () => {
|
|
85
|
-
const [ work ] = useFiveWork();
|
|
86
|
-
const [currentState, setState] = useFiveCurrentState();
|
|
87
|
-
const [panos, setPanos] = React.useState<State[]>(() => [currentState]);
|
|
88
|
-
return <div className="panel">
|
|
89
|
-
<div className="label">存储快照:</div>
|
|
90
|
-
<div className="content">
|
|
91
|
-
{panos.map((state, index) => {
|
|
92
|
-
return <button key={index} onClick={() => setState(state)}>快照{index + 1}</button>
|
|
93
|
-
})}
|
|
94
|
-
<button onClick={() => setPanos(panos.concat(currentState))}>+</button>
|
|
95
|
-
</div>
|
|
96
|
-
</div>
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
const App: React.FC = () => {
|
|
100
|
-
|
|
101
|
-
const [work, setWork] = React.useState<Work>();
|
|
102
|
-
|
|
103
|
-
const loadWork = React.useCallback((url: string) => {
|
|
104
|
-
fetch(url)
|
|
105
|
-
.then(res => res.json())
|
|
106
|
-
.then(data => setWork(parseWork(data)));
|
|
107
|
-
}, []);
|
|
108
|
-
|
|
109
|
-
React.useEffect(() => {
|
|
110
|
-
loadWork("./assets/work.json");
|
|
111
|
-
}, []);
|
|
112
|
-
|
|
113
|
-
if (work) {
|
|
114
|
-
return <FiveProvider initialWork={work} ref={ref => Object.assign(window, { five: ref?.five })}>
|
|
115
|
-
<div className="layout">
|
|
116
|
-
<Viewport/><Controller/>
|
|
117
|
-
</div>
|
|
118
|
-
</FiveProvider>
|
|
119
|
-
}
|
|
120
|
-
return null;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
ReactDOM.render(<App></App>, document.getElementById("app"));
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "five-quick-start",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"description": "five quick start",
|
|
5
|
-
"scripts": {
|
|
6
|
-
"dev": "webpack serve",
|
|
7
|
-
"build": "webpack --config ./webpack.production.js"
|
|
8
|
-
},
|
|
9
|
-
"private": true,
|
|
10
|
-
"devDependencies": {
|
|
11
|
-
"@types/react": "^17.0.14",
|
|
12
|
-
"@types/react-dom": "^17.0.9",
|
|
13
|
-
"copy-webpack-plugin": "^9.0.1",
|
|
14
|
-
"html-webpack-plugin": "^5.3.2",
|
|
15
|
-
"http-server": "^0.12.1",
|
|
16
|
-
"react": "^17.0.2",
|
|
17
|
-
"react-dom": "^17.0.2",
|
|
18
|
-
"three": "^0.117.1",
|
|
19
|
-
"ts-loader": "^9.1.1",
|
|
20
|
-
"typescript": "^4.4.2",
|
|
21
|
-
"webpack": "^5.35.1",
|
|
22
|
-
"webpack-cli": "^4.6.0",
|
|
23
|
-
"webpack-dev-server": "^3.11.2"
|
|
24
|
-
}
|
|
25
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
/* Basic Options */
|
|
4
|
-
"jsx": "react",
|
|
5
|
-
"target": "ES5",
|
|
6
|
-
"lib": ["ES5", "DOM"],
|
|
7
|
-
"declaration": true,
|
|
8
|
-
"sourceMap": true,
|
|
9
|
-
"rootDir": "./",
|
|
10
|
-
|
|
11
|
-
/* Strict Type-Checking Options */
|
|
12
|
-
"strict": true,
|
|
13
|
-
"noImplicitAny": true,
|
|
14
|
-
"strictNullChecks": true,
|
|
15
|
-
"declarationMap": false,
|
|
16
|
-
|
|
17
|
-
/* Module Resolution Options */
|
|
18
|
-
"moduleResolution": "node",
|
|
19
|
-
"baseUrl": "./",
|
|
20
|
-
"esModuleInterop": true,
|
|
21
|
-
"preserveSymlinks": true,
|
|
22
|
-
|
|
23
|
-
/* Experimental Options */
|
|
24
|
-
"experimentalDecorators": true,
|
|
25
|
-
"emitDecoratorMetadata": true
|
|
26
|
-
}
|
|
27
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
const path = require("path");
|
|
2
|
-
const HtmlWebpackPlugin = require("html-webpack-plugin");
|
|
3
|
-
const express = require('express');
|
|
4
|
-
|
|
5
|
-
module.exports = {
|
|
6
|
-
context: __dirname,
|
|
7
|
-
entry: "./index.tsx",
|
|
8
|
-
output: {
|
|
9
|
-
path: path.resolve(__dirname, "../dist"),
|
|
10
|
-
filename: "index.bundle.js"
|
|
11
|
-
},
|
|
12
|
-
mode: "development",
|
|
13
|
-
devtool: "eval-cheap-source-map",
|
|
14
|
-
devServer: {
|
|
15
|
-
port: 3000,
|
|
16
|
-
contentBase: path.resolve(__dirname, "../dist"),
|
|
17
|
-
before(app) {
|
|
18
|
-
app.use('/assets/', express.static(path.resolve(__dirname, 'assets')));
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
module: {
|
|
22
|
-
rules: [{
|
|
23
|
-
test: /\.tsx?$/i,
|
|
24
|
-
exclude: /node_modules/,
|
|
25
|
-
use: [{
|
|
26
|
-
loader: "ts-loader",
|
|
27
|
-
options: {
|
|
28
|
-
compilerOptions: {
|
|
29
|
-
"declaration": false,
|
|
30
|
-
"sourceMap": true,
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
}]
|
|
34
|
-
}]
|
|
35
|
-
},
|
|
36
|
-
plugins: [
|
|
37
|
-
new HtmlWebpackPlugin({
|
|
38
|
-
template: path.resolve(__dirname, 'index.html'),
|
|
39
|
-
filename: "index.html",
|
|
40
|
-
}),
|
|
41
|
-
],
|
|
42
|
-
resolve: {
|
|
43
|
-
extensions: [".js", ".jsx", ".ts", ".tsx", ".json"],
|
|
44
|
-
}
|
|
45
|
-
};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
const path = require("path");
|
|
2
|
-
const HtmlWebpackPlugin = require("html-webpack-plugin");
|
|
3
|
-
const CopyWebpackPlugin = require("copy-webpack-plugin");
|
|
4
|
-
|
|
5
|
-
module.exports = {
|
|
6
|
-
context: __dirname,
|
|
7
|
-
entry: "./index.tsx",
|
|
8
|
-
output: {
|
|
9
|
-
path: path.resolve(__dirname, "dist"),
|
|
10
|
-
filename: "index.bundle.js"
|
|
11
|
-
},
|
|
12
|
-
mode: "production",
|
|
13
|
-
module: {
|
|
14
|
-
rules: [{
|
|
15
|
-
test: /\.tsx?$/i,
|
|
16
|
-
exclude: /node_modules/,
|
|
17
|
-
use: [{
|
|
18
|
-
loader: "ts-loader",
|
|
19
|
-
options: {
|
|
20
|
-
compilerOptions: {
|
|
21
|
-
"declaration": false,
|
|
22
|
-
"sourceMap": true,
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
}]
|
|
26
|
-
}]
|
|
27
|
-
},
|
|
28
|
-
plugins: [
|
|
29
|
-
new CopyWebpackPlugin({
|
|
30
|
-
patterns: [
|
|
31
|
-
{ from: "assets", to: "assets" }
|
|
32
|
-
]
|
|
33
|
-
}),
|
|
34
|
-
new HtmlWebpackPlugin({
|
|
35
|
-
template: path.resolve(__dirname, "index.html"),
|
|
36
|
-
filename: "index.html",
|
|
37
|
-
})
|
|
38
|
-
],
|
|
39
|
-
resolve: {
|
|
40
|
-
extensions: [".js", ".jsx", ".ts", ".tsx", ".json"]
|
|
41
|
-
}
|
|
42
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
# Five 插件: a-five-react-component
|
|
2
|
-
|
|
3
|
-
> 这是一个 Five 的 React 组件。
|
|
4
|
-
> 这个组件的用途是什么。
|
|
5
|
-
> 能干什么。为什么要使用这组件。
|
|
6
|
-
|
|
7
|
-
## 参数
|
|
8
|
-
|
|
9
|
-
```typescript
|
|
10
|
-
type PropTypes = {
|
|
11
|
-
parameter1: number,
|
|
12
|
-
parameter2: string,
|
|
13
|
-
children: JSX.Element,
|
|
14
|
-
};
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
## 如何使用
|
|
18
|
-
|
|
19
|
-
```typescript
|
|
20
|
-
import { AFiveReactComponent } from "a-five-react-component";
|
|
21
|
-
|
|
22
|
-
<FiveProvider>
|
|
23
|
-
<FiveCanvas width={512} height={512}></FiveCanvas>
|
|
24
|
-
|
|
25
|
-
{/* 使用 AFiveReactComponent */}
|
|
26
|
-
<AFiveReactComponent parameter1={123} parameter2={"abc"}>
|
|
27
|
-
<div>Hello World!</div>
|
|
28
|
-
</AFiveReactComponent>
|
|
29
|
-
|
|
30
|
-
</StoreProvider>;
|
|
31
|
-
|
|
32
|
-
```
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"include": [
|
|
3
|
-
"../lib/**/*.ts"
|
|
4
|
-
],
|
|
5
|
-
"compilerOptions": {
|
|
6
|
-
"jsx": "react",
|
|
7
|
-
"target": "ES5",
|
|
8
|
-
"module": "CommonJS",
|
|
9
|
-
"declaration": true,
|
|
10
|
-
"allowSyntheticDefaultImports": true,
|
|
11
|
-
"esModuleInterop": true,
|
|
12
|
-
"moduleResolution": "node",
|
|
13
|
-
"sourceMap": true,
|
|
14
|
-
"allowJs": true,
|
|
15
|
-
"rootDir": "../lib",
|
|
16
|
-
"outDir": "../build",
|
|
17
|
-
"skipLibCheck": true
|
|
18
|
-
}
|
|
19
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
const path = require("path");
|
|
2
|
-
const { NormalModuleReplacementPlugin } = require("webpack");
|
|
3
|
-
|
|
4
|
-
const name = require("../package.json").name.split("/").pop();
|
|
5
|
-
const libraryName = name.replace(/(^|\-)\w/g, char => char[char.length - 1].toUpperCase());
|
|
6
|
-
|
|
7
|
-
module.exports = {
|
|
8
|
-
context: path.join(__dirname, "lib"),
|
|
9
|
-
entry: {
|
|
10
|
-
[name]: path.join(__dirname, '../lib/index.tsx'),
|
|
11
|
-
},
|
|
12
|
-
output: {
|
|
13
|
-
path: path.join(__dirname, "../bundles"),
|
|
14
|
-
filename: "[name].js",
|
|
15
|
-
library: libraryName,
|
|
16
|
-
libraryTarget: "umd",
|
|
17
|
-
libraryExport: libraryName
|
|
18
|
-
},
|
|
19
|
-
mode: "production",
|
|
20
|
-
devtool: "source-map",
|
|
21
|
-
module: {
|
|
22
|
-
rules: [{
|
|
23
|
-
test: /\.tsx?$/i,
|
|
24
|
-
exclude: /node_modules/,
|
|
25
|
-
use: [{
|
|
26
|
-
loader: "ts-loader",
|
|
27
|
-
options: {
|
|
28
|
-
configFile: path.join(__dirname, "tsconfig.build.json"),
|
|
29
|
-
compilerOptions: {
|
|
30
|
-
"declaration": false,
|
|
31
|
-
"sourceMap": true,
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
}]
|
|
35
|
-
}],
|
|
36
|
-
},
|
|
37
|
-
plugins: [
|
|
38
|
-
new NormalModuleReplacementPlugin(/^three$/, path.join(__dirname, 'external-three.js')),
|
|
39
|
-
new NormalModuleReplacementPlugin(/^\@realsee\/five$/, path.join(__dirname, 'external-five.js')),
|
|
40
|
-
],
|
|
41
|
-
resolve: {
|
|
42
|
-
extensions: [".js", ".jsx", ".ts", ".tsx", ".json"],
|
|
43
|
-
}
|
|
44
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
const path = require("path");
|
|
2
|
-
const glob = require("glob");
|
|
3
|
-
|
|
4
|
-
module.exports = {
|
|
5
|
-
context: path.join(__dirname, "../examples"),
|
|
6
|
-
entry: () => {
|
|
7
|
-
const list = glob.sync("**/index.ts?(x)", { cwd: path.join(__dirname, "../examples") });
|
|
8
|
-
const entry = {}
|
|
9
|
-
list.map(filename => {
|
|
10
|
-
const name = filename.replace(/\.tsx?$/i, '');
|
|
11
|
-
entry[name] = './' + filename;
|
|
12
|
-
})
|
|
13
|
-
return entry;
|
|
14
|
-
},
|
|
15
|
-
output: {
|
|
16
|
-
path: path.join(__dirname, "../examples"),
|
|
17
|
-
filename: "[name].bundle.js"
|
|
18
|
-
},
|
|
19
|
-
mode: "development",
|
|
20
|
-
devtool: "eval-cheap-source-map",
|
|
21
|
-
module: {
|
|
22
|
-
rules: [{
|
|
23
|
-
test: /\.tsx?$/i,
|
|
24
|
-
exclude: /node_modules/,
|
|
25
|
-
use: [{
|
|
26
|
-
loader: "ts-loader",
|
|
27
|
-
options: {
|
|
28
|
-
compilerOptions: {
|
|
29
|
-
"declaration": false,
|
|
30
|
-
"sourceMap": true,
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
}]
|
|
34
|
-
}]
|
|
35
|
-
},
|
|
36
|
-
resolve: {
|
|
37
|
-
extensions: [".js", ".jsx", ".ts", ".tsx", ".json"],
|
|
38
|
-
}
|
|
39
|
-
};
|
|
File without changes
|