skinview3d
Advanced tools
Comparing version 3.0.1 to 3.1.0
@@ -75,1 +75,6 @@ import { PlayerObject } from "./model.js"; | ||
} | ||
export declare class WaveAnimation extends PlayerAnimation { | ||
whichArm: string; | ||
constructor(whichArm?: 'left' | 'right'); | ||
protected animate(player: PlayerObject): void; | ||
} |
@@ -188,2 +188,20 @@ import { PlayerObject } from "./model.js"; | ||
} | ||
export class WaveAnimation extends PlayerAnimation { | ||
constructor(whichArm = 'left') { | ||
super(); | ||
Object.defineProperty(this, "whichArm", { | ||
enumerable: true, | ||
configurable: true, | ||
writable: true, | ||
value: void 0 | ||
}); | ||
this.whichArm = whichArm; | ||
} | ||
animate(player) { | ||
const t = this.progress * 2 * Math.PI * 0.5; | ||
const targetArm = this.whichArm === 'left' ? player.skin.leftArm : player.skin.rightArm; | ||
targetArm.rotation.x = 180; | ||
targetArm.rotation.z = Math.sin(t) * 0.5; | ||
} | ||
} | ||
//# sourceMappingURL=animation.js.map |
{ | ||
"name": "skinview3d", | ||
"version": "3.0.1", | ||
"version": "3.1.0", | ||
"description": "Three.js powered Minecraft skin viewer", | ||
@@ -11,4 +11,6 @@ "main": "libs/skinview3d.js", | ||
"build:bundles": "rollup -c --configPlugin=swc3", | ||
"build": "npm run build:modules && npm run build:bundles", | ||
"format": "prettier src --write", | ||
"build:docs": "typedoc src/viewer.ts", | ||
"build:preview": "vite build", | ||
"build": "npm-run-all --parallel build:modules build:bundles build:preview", | ||
"format": "prettier src examples --write", | ||
"test:lint": "eslint --ext .ts src", | ||
@@ -18,4 +20,4 @@ "test": "npm run test:lint", | ||
"dev:watch:bundles": "rollup -w --no-watch.clearScreen -c --configPlugin=swc3", | ||
"dev:serve": "ws", | ||
"dev": "npm-run-all --parallel dev:watch:bundles dev:serve", | ||
"dev": "vite", | ||
"preview": "vite preview", | ||
"prepublishOnly": "npm run clean && npm run build" | ||
@@ -63,4 +65,6 @@ }, | ||
"rollup-plugin-swc3": "^0.8.1", | ||
"typescript": "^5.0.4" | ||
"typedoc": "^0.25.7", | ||
"typescript": "^5.0.4", | ||
"vite": "^5.4.7" | ||
} | ||
} |
@@ -99,3 +99,3 @@ skinview3d | ||
* `standalone`: 14x7 image that contains the ear ([example](https://github.com/bs-community/skinview3d/blob/master/examples/img/ears.png)) | ||
* `skin`: Skin texture that contains the ear (e.g. [deadmau5's skin](https://minecraft.fandom.com/wiki/Easter_eggs#Deadmau5.27s_ears)) | ||
* `skin`: Skin texture that contains the ear (e.g. [deadmau5's skin](https://minecraft.wiki/w/Easter_eggs#deadmau5's_ears)) | ||
@@ -102,0 +102,0 @@ Usage: |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
2372585
5659
16