Skip to content

Commit

Permalink
Update soonspacejs[v2.11.68]
Browse files Browse the repository at this point in the history
  • Loading branch information
beginnerJq committed Dec 24, 2024
1 parent 93f35b8 commit 866410b
Show file tree
Hide file tree
Showing 18 changed files with 184 additions and 15 deletions.
6 changes: 3 additions & 3 deletions libs/soonspacejs/index.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions libs/soonspacejs/plugins/cps-soonmanager.js

Large diffs are not rendered by default.

49 changes: 49 additions & 0 deletions libs/umanager-animation-parser/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# umanager-animation-parser

## Installation

```sh
pnpm i umanager-animation-parser
```

## Usage

```ts
const player = new AnimationPlayer(ssp, target);
```

## Properties

### tweenSet

## Methods

### play

```
player.paly(frames)
```

### stop

```
player.stop()
```

### reset

```
player.reset()
```

### dispose

```
player.dispose()
```

## Events

### update

### start
1 change: 1 addition & 0 deletions libs/umanager-animation-parser/dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions libs/umanager-animation-parser/dist/types/AnimationParser.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { EventDispatcher, Object3D } from 'three';
import SoonSpace from 'soonspacejs';
import { TAnimationFrame, TEventMap, TTransformObject, TTweenType } from './types';
declare class AnimationPlayer extends EventDispatcher<TEventMap> {
readonly ssp: SoonSpace;
readonly target: Object3D;
tweenSet: Set<TTweenType>;
constructor(ssp: SoonSpace, target: Object3D);
initTransform(defaultTransform?: TTransformObject): TTransformObject;
getInitialTransform(): TTransformObject | undefined;
play(frames: TAnimationFrame[]): Promise<void>;
stop(): void;
reset(): void;
dispose(): void;
}
export { AnimationPlayer };
2 changes: 2 additions & 0 deletions libs/umanager-animation-parser/dist/types/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from './AnimationParser';
export * from './types';
34 changes: 34 additions & 0 deletions libs/umanager-animation-parser/dist/types/types.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import { AnimationModeType, IVector3 } from 'soonspacejs';
import { Tween } from 'three/examples/jsm/libs/tween.module.js';
export type TAnimationFrame = {
position: IVector3;
rotation: IVector3;
scale: IVector3;
duration: number;
delay: number;
repeat: number;
yoyo: boolean;
easing: AnimationModeType;
};
export type TTransformObject = Pick<TAnimationFrame, 'position' | 'rotation' | 'scale'>;
export type TTweenSource = {
x: number;
y: number;
z: number;
rotationX: number;
rotationY: number;
rotationZ: number;
scaleX: number;
scaleY: number;
scaleZ: number;
};
export type TTweenType = Tween<TTweenSource>;
export type TEventMap = {
update: {
source: TTweenSource;
tween: TTweenType;
};
start: {
tween: TTweenType;
};
};
31 changes: 31 additions & 0 deletions libs/umanager-animation-parser/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"name": "umanager-animation-parser",
"description": "动画解析",
"version": "0.0.6",
"type": "module",
"module": "./dist/index.js",
"main": "./dist/index.js",
"types": "./dist/types/index.d.ts",
"exports": {
".": {
"import": "./dist/index.js",
"types": "./dist/types/index.d.ts"
}
},
"scripts": {
"build": "rollup -c rollup.config.js"
},
"peerDependencies": {
"soonspacejs": ">=2.11.x",
"three": ">=0.169.0"
},
"devDependencies": {
"@rollup/plugin-node-resolve": "^16.0.0",
"@rollup/plugin-terser": "^0.4.4",
"@rollup/plugin-typescript": "^12.1.2",
"@types/three": "^0.170.0",
"rollup": "^4.28.1",
"tslib": "^2.8.1",
"typescript": "^5.7.2"
}
}
19 changes: 19 additions & 0 deletions libs/umanager-animation-parser/rollup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { nodeResolve } from '@rollup/plugin-node-resolve';
import typescript from '@rollup/plugin-typescript';
import terser from '@rollup/plugin-terser';

export default {
input: './src/index.ts',
output: {
dir: './dist',
format: 'es',
},
external: ['three', 'soonspacejs'],
plugins: [
nodeResolve(),
typescript({
tsconfig: './tsconfig.json',
}),
terser(),
],
};
9 changes: 9 additions & 0 deletions libs/umanager-animation-parser/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"compilerOptions": {
"target": "es2018",
"moduleResolution": "bundler",
"declaration": true,
"emitDeclarationOnly": true,
"outDir": "./dist/types"
}
}
3 changes: 2 additions & 1 deletion page/model/loadDxf.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
"three": "../../libs/three/build/three.module.js",
"three/examples/": "../../libs/three/examples/",
"three-mesh-bvh": "../../libs/three-mesh-bvh/build/index.module.js",
"soonspacejs": "../../libs/soonspacejs/index.js"
"soonspacejs": "../../libs/soonspacejs/index.js",
"umanager-animation-parser": "../../libs/umanager-animation-parser/dist/index.js"
}
}
</script>
Expand Down
3 changes: 2 additions & 1 deletion page/plugin/cpsScheme.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@
"three-mesh-bvh": "../../libs/three-mesh-bvh/build/index.module.js",
"soonspacejs": "../../libs/soonspacejs/index.js",
"@soonspacejs/plugin-cps-soonmanager": "../../libs/soonspacejs/plugins/cps-soonmanager.js",
"@soonspacejs/plugin-cps-scheme": "../../libs/soonspacejs/plugins/cps-scheme.js"
"@soonspacejs/plugin-cps-scheme": "../../libs/soonspacejs/plugins/cps-scheme.js",
"umanager-animation-parser": "../../libs/umanager-animation-parser/dist/index.js"
}
}
</script>
Expand Down
3 changes: 2 additions & 1 deletion page/plugin/cpsSoonmanager.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"three": "../../libs/three/build/three.module.js",
"three/examples/": "../../libs/three/examples/",
"three-mesh-bvh": "../../libs/three-mesh-bvh/build/index.module.js",
"soonspacejs": "../../libs/soonspacejs/index.js"
"soonspacejs": "../../libs/soonspacejs/index.js",
"umanager-animation-parser": "../../libs/umanager-animation-parser/dist/index.js"
}
}
</script>
Expand Down
3 changes: 2 additions & 1 deletion page/plugin/cpsSoonmanagerLevel.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"three": "../../libs/three/build/three.module.js",
"three/examples/": "../../libs/three/examples/",
"three-mesh-bvh": "../../libs/three-mesh-bvh/build/index.module.js",
"soonspacejs": "../../libs/soonspacejs/index.js"
"soonspacejs": "../../libs/soonspacejs/index.js",
"umanager-animation-parser": "../../libs/umanager-animation-parser/dist/index.js"
}
}
</script>
Expand Down
3 changes: 2 additions & 1 deletion page/plugin/firstPersonControls.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"three-mesh-bvh": "../../libs/three-mesh-bvh/build/index.module.js",
"soonspacejs": "../../libs/soonspacejs/index.js",
"@soonspacejs/plugin-cps-soonmanager": "../../libs/soonspacejs/plugins/cps-soonmanager.js",
"@soonspacejs/plugin-first-person-controls": "../../libs/soonspacejs/plugins/first-person-controls.js"
"@soonspacejs/plugin-first-person-controls": "../../libs/soonspacejs/plugins/first-person-controls.js",
"umanager-animation-parser": "../../libs/umanager-animation-parser/dist/index.js"
}
}
</script>
Expand Down
3 changes: 2 additions & 1 deletion page/plugin/tiles-demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
"three": "../../libs/three/build/three.module.js",
"three/examples/": "../../libs/three/examples/",
"three-mesh-bvh": "../../libs/three-mesh-bvh/build/index.module.js",
"soonspacejs": "../../libs/soonspacejs/index.js"
"soonspacejs": "../../libs/soonspacejs/index.js",
"umanager-animation-parser": "../../libs/umanager-animation-parser/dist/index.js"
}
}
</script>
Expand Down
3 changes: 2 additions & 1 deletion page/sceneTool/sky-ocean-1.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"three": "../../libs/three/build/three.module.js",
"three/examples/": "../../libs/three/examples/",
"three-mesh-bvh": "../../libs/three-mesh-bvh/build/index.module.js",
"soonspacejs": "../../libs/soonspacejs/index.js"
"soonspacejs": "../../libs/soonspacejs/index.js",
"umanager-animation-parser": "../../libs/umanager-animation-parser/dist/index.js"
}
}
</script>
Expand Down
3 changes: 2 additions & 1 deletion page/topology/topologyPassable.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"three/examples/": "../../libs/three/examples/",
"three-mesh-bvh": "../../libs/three-mesh-bvh/build/index.module.js",
"soonspacejs": "../../libs/soonspacejs/index.js",
"gui": "../../libs/gui.js"
"gui": "../../libs/gui.js",
"umanager-animation-parser": "../../libs/umanager-animation-parser/dist/index.js"
}
}
</script>
Expand Down

0 comments on commit 866410b

Please sign in to comment.