easy-three-utils 0.0.1 → 0.0.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/index.ts ADDED
@@ -0,0 +1,35 @@
1
+ import { useLoader } from './src/common/useLoader'
2
+ import { useMark, EMarkDefaultStyle } from './src/common/useMark'
3
+ import { useLine2 } from './src/common/useLine2'
4
+ import { useLocationCalculator } from './src/common/useLocationCalculator'
5
+ import { Animation } from './src/common/useTween'
6
+ import { useThree } from './src/core/main'
7
+
8
+ import type { IPathItem } from './src/common/useTween'
9
+
10
+ export {
11
+ useLoader,
12
+
13
+ useMark,
14
+ EMarkDefaultStyle,
15
+
16
+ useLine2,
17
+
18
+ useLocationCalculator,
19
+
20
+ Animation
21
+ }
22
+
23
+ export type {
24
+ IPathItem
25
+ }
26
+
27
+ const { loadThree, enableCustomEvent, EDefaultEvent, enableDefaultEvent, clearThree } = useThree()
28
+
29
+ export {
30
+ loadThree,
31
+ enableCustomEvent,
32
+ EDefaultEvent,
33
+ enableDefaultEvent,
34
+ clearThree
35
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easy-three-utils",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -7,9 +7,8 @@ import { FBXLoader } from 'three/examples/jsm/loaders/FBXLoader.js'
7
7
  import { TGALoader } from 'three/examples/jsm/loaders/TGALoader.js'
8
8
  import { TilesRenderer } from '../tileRenderer'
9
9
  import { GoogleCloudAuthPlugin } from '../tileRenderer/plugins';
10
- import { enableDefaultEvent, EDefaultEvent } from '../core'
10
+ import { enableDefaultEvent, EDefaultEvent } from '../../index'
11
11
 
12
- //todo 1.曝光
13
12
  interface IThreeLoaders {
14
13
  GLTFLoader: GLTFLoader | null,
15
14
  DRACOLoader: DRACOLoader | null,
@@ -159,7 +158,6 @@ const useLoader = () => {
159
158
  callback && callback(tilesRenderer, clear)
160
159
  }
161
160
 
162
- //todo 1.多动画封装 2.动画库封装 3.多动画加载时间差 4.同模型克隆
163
161
  const useMixer: (object: THREE.Object3D, animate: THREE.AnimationClip) => { mixer: THREE.AnimationMixer, action: THREE.AnimationAction } = (object: THREE.Object3D, animate: THREE.AnimationClip) => {
164
162
  const mixer = new THREE.AnimationMixer(object)
165
163
  const action = mixer.clipAction(animate);
package/src/core/main.ts CHANGED
@@ -122,7 +122,6 @@ const useThree = () => {
122
122
  succeededCallback && succeededCallback(threeConfiguration)
123
123
  }
124
124
 
125
- //todo 设置参数 光源辅助线
126
125
  const setScene = (options: ITHREEOptions) => {
127
126
  threeConfiguration.scene?.add(threeConfiguration.light.ambient!)
128
127
  threeConfiguration.scene?.add(threeConfiguration.light.directional.light!)
@@ -1,24 +0,0 @@
1
- import { useLoader } from './useLoader'
2
- import { useMark, EMarkDefaultStyle } from './useMark'
3
- import { useLine2 } from './useLine2'
4
- import { useLocationCalculator } from './useLocationCalculator'
5
- import { Animation } from './useTween'
6
-
7
- import type { IPathItem } from './useTween'
8
-
9
- export {
10
- useLoader,
11
-
12
- useMark,
13
- EMarkDefaultStyle,
14
-
15
- useLine2,
16
-
17
- useLocationCalculator,
18
-
19
- Animation
20
- }
21
-
22
- export type {
23
- IPathItem
24
- }