Skip to content

Commit 9d448f9

Browse files
committed
Fix types + add default export
1 parent b06c433 commit 9d448f9

File tree

4 files changed

+26
-7
lines changed

4 files changed

+26
-7
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changelog
2+
All notable changes to this package will be documented in this file.
3+
4+
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
5+
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
6+
7+
## [1.0.0] - 2025-08-27
8+
- Initial release

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
{
22
"name": "@needle-tools/three-animation-pointer",
3-
"version": "1.0.0-beta.2",
3+
"version": "1.0.0-beta.3",
44
"description": "KHR_animation_pointer support for three.js",
55
"type": "module",
66
"main": "src/index.js",
77
"types": "types/index.d.ts",
8+
"exports": {
9+
".": {
10+
"import": "./src/index.js"
11+
}
12+
},
813
"files": [
914
"src",
1015
"types",

src/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
export * from "./GLTFLoaderAnimationPointer.js"
1+
import { GLTFAnimationPointerExtension } from "./GLTFLoaderAnimationPointer.js"
2+
3+
export * from "./GLTFLoaderAnimationPointer.js"
4+
5+
export default GLTFAnimationPointerExtension;

types/index.d.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
import { GLTFLoaderPlugin } from "three/examples/jsm/loaders/GLTFLoader";
2-
import { GLTFLoaderPlugin } from "../src/GLTFLoaderAnimationPointer";
3-
1+
import { GLTFLoaderPlugin } from "three/examples/jsm/loaders/GLTFLoader.js";
42

53
export type AnimationPointerResolver = {
64
resolvePath(path: string): string | null;
75
}
86

9-
export type GLTFAnimationPointerExtension = GLTFLoaderPlugin & {
10-
setAnimationPointerResolver(resolver: AnimationPointerResolver | null): void;
7+
export declare class GLTFAnimationPointerExtension implements GLTFLoaderPlugin {
8+
name: string;
9+
parser: any;
10+
constructor(parser: any);
11+
setAnimationPointerResolver(resolver: AnimationPointerResolver | null): GLTFAnimationPointerExtension;
12+
loadAnimation(animationIndex: number): Promise<any>;
1113
}

0 commit comments

Comments
 (0)