vis-core 0.28.27 → 0.28.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const _default: "0.28.27";
1
+ declare const _default: "0.28.29";
2
2
  export default _default;
@@ -1,10 +1,67 @@
1
1
  import { BaseObject } from 'gl-draw';
2
+ import * as THREE from 'three';
2
3
  interface Options {
3
4
  src?: string;
5
+ autoPlay?: boolean;
6
+ playbackSpeed?: number;
4
7
  }
5
8
  export default class extends BaseObject {
6
9
  options: Options;
10
+ mixer: THREE.AnimationMixer | null;
11
+ clips: THREE.AnimationClip[];
12
+ actions: THREE.AnimationAction[];
13
+ actionStates: Record<string, boolean>;
7
14
  constructor(options: Options);
8
15
  create(): Promise<void>;
16
+ /**
17
+ * Set animation clips for the model
18
+ * @param clips Array of animation clips from GLTF
19
+ */
20
+ setClips(clips: THREE.AnimationClip[]): void;
21
+ /**
22
+ * Play all animation clips
23
+ */
24
+ playAllClips(): void;
25
+ /**
26
+ * Play a specific animation clip by name
27
+ * @param clipName Name of the animation clip to play
28
+ */
29
+ playClip(clipName: string): void;
30
+ /**
31
+ * Stop a specific animation clip by name
32
+ * @param clipName Name of the animation clip to stop
33
+ */
34
+ stopClip(clipName: string): void;
35
+ /**
36
+ * Stop all animation clips
37
+ */
38
+ stopAllClips(): void;
39
+ /**
40
+ * Set the playback speed for all animations
41
+ * @param speed Playback speed (1.0 = normal speed)
42
+ */
43
+ setPlaybackSpeed(speed: number): void;
44
+ /**
45
+ * Get the current playback speed
46
+ */
47
+ getPlaybackSpeed(): number;
48
+ /**
49
+ * Check if a specific animation is playing
50
+ * @param clipName Name of the animation clip
51
+ */
52
+ isPlaying(clipName: string): boolean;
53
+ /**
54
+ * Get all available animation clip names
55
+ */
56
+ getClipNames(): string[];
57
+ /**
58
+ * Update animations - should be called in render loop
59
+ * @param deltaTime Time elapsed since last frame
60
+ */
61
+ update(deltaTime: number): void;
62
+ /**
63
+ * Dispose of resources including animation mixer
64
+ */
65
+ dispose(): void;
9
66
  }
10
67
  export {};
@@ -1,9 +1,9 @@
1
- import { BaseObject, Lead } from 'gl-draw';
2
1
  import Base, { BaseOptions } from "../base";
3
- import * as THREE from 'three';
4
- import { getProjection } from 'gl-draw/dist/utils';
5
- import { Group } from 'gl-draw/dist/objects';
6
2
  import leadObjs from "./objects";
3
+ import { BaseObject, Lead } from 'gl-draw';
4
+ import { Group } from 'gl-draw/dist/objects';
5
+ import { getProjection } from 'gl-draw/dist/utils';
6
+ import * as THREE from 'three';
7
7
  import Building from './objects/building';
8
8
  import Road from './objects/road';
9
9
  interface CityOptions extends BaseOptions {
@@ -1,7 +1,7 @@
1
+ import type { FeatureCollection, GeoJsonProperties, MultiPolygon, Polygon, Position } from 'geojson';
1
2
  import { BaseObject } from 'gl-draw';
2
- import * as THREE from 'three';
3
3
  import { Line, ExtrudePolygon, MeshLineMaterial, Group } from 'gl-draw/dist/objects';
4
- import type { FeatureCollection, Polygon, MultiPolygon, Position, GeoJsonProperties } from 'geojson';
4
+ import * as THREE from 'three';
5
5
  type GeoJSON = FeatureCollection<Polygon | MultiPolygon>;
6
6
  interface Options {
7
7
  areaGroup?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vis-core",
3
- "version": "0.28.27",
3
+ "version": "0.28.29",
4
4
  "scripts": {
5
5
  "start": "npm run version && PORT=5173 bundler-dev",
6
6
  "build:site": "npm run version && PUBLIC_EXCLUDE=true bundler",
@@ -66,7 +66,7 @@
66
66
  "esus-lite": "^0.2.8",
67
67
  "events": "^3.3.0",
68
68
  "geojson-cn": "^0.2.5",
69
- "gl-draw": "0.15.19",
69
+ "gl-draw": "0.15.0-beta.41",
70
70
  "jsrsasign": "^11.1.0",
71
71
  "lodash-es": "^4.17.21"
72
72
  },