Pārlūkot izejas kodu

Add play animation button to tweakpane editor util buttons

master
Palash Bansal pirms 2 gadiem
vecāks
revīzija
808935525b
Revīzijas autora e-pasta adrese nav piesaistīta nevienam kontam

+ 2
- 2
plugins/tweakpane-editor/package-lock.json Parādīt failu

@@ -1,12 +1,12 @@
{
"name": "@threepipe/plugin-tweakpane-editor",
"version": "0.1.2",
"version": "0.1.3",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@threepipe/plugin-tweakpane-editor",
"version": "0.1.2",
"version": "0.1.3",
"license": "Apache-2.0",
"dependencies": {
"@threepipe/plugin-tweakpane": "file:./../tweakpane/src/",

+ 1
- 1
plugins/tweakpane-editor/package.json Parādīt failu

@@ -1,7 +1,7 @@
{
"name": "@threepipe/plugin-tweakpane-editor",
"description": "Tweakpane Editor Plugin for ThreePipe",
"version": "0.1.2",
"version": "0.1.3",
"devDependencies": {
"tippy.js": "^6.3.7"
},

+ 19
- 11
plugins/tweakpane-editor/src/util-buttons.ts Parādīt failu

@@ -1,5 +1,13 @@
import {AViewerPlugin, Class, createDiv, downloadBlob, FullScreenPlugin, ThreeViewer} from 'threepipe'
import {autoRotateCC, collapse, download, expand, resetSettings, snapshot, trash} from './icons'
import {
AViewerPlugin,
Class,
createDiv,
downloadBlob,
FullScreenPlugin,
GLTFAnimationPlugin,
ThreeViewer,
} from 'threepipe'
import {autoRotateCC, collapse, download, expand, playIcon, resetSettings, snapshot, trash} from './icons'
import tippy, {createSingleton} from 'tippy.js'

export function createUtilButtons(viewer: ThreeViewer, allPlugins: Class<AViewerPlugin>[]) {
@@ -43,15 +51,15 @@ export function createUtilButtons(viewer: ThreeViewer, allPlugins: Class<AViewer
// viewer.getPlugin(CameraViewPlugin)!.viewLooping = !viewer.getPlugin(CameraViewPlugin)!.viewLooping
// },
// },
// {
// id: 'play-gltf',
// icon: playIcon,
// tooltip: 'GLTF Animations',
// toggle: true,
// onclick: async() => {
// viewer.getPlugin(GLTFAnimationPlugin)?.playPauseAnimation()
// },
// },
{
id: 'play-gltf',
icon: playIcon,
tooltip: 'GLTF Animations',
toggle: true,
onclick: async() => {
viewer.getPlugin(GLTFAnimationPlugin)?.playPauseAnimation()
},
},
{
id: 'auto-rotate-cc',
icon: autoRotateCC,

Notiek ielāde…
Atcelt
Saglabāt