forked from misskey-dev/misskey
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* wip * wip * シンボリックリンクやめた * install lib dependency * bring live2d assets from misskey-dev/assets * refactor * nanka iroiro * コミット忘れ * random motion * wip * run git submodule update --init * コミット忘れ * refactor * fix bug * Update misskey-assets * lint * lint * lint * 藍モード修正 (misskey-dev#7702) * lazy load live2d script * fix typo * lazy load also widget * hot link to cubism core * https://github.com/misskey-dev/misskey/pull/7702/files#r695623821 * fix lint * remove live2d stuff * use iframe * update * Update gulpfile.ts * update * Update .gitattributes * update Co-authored-by: tamaina <[email protected]>
- Loading branch information
Showing
20 changed files
with
158 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "misskey-assets"] | ||
path = misskey-assets | ||
url = https://github.com/misskey-dev/assets.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule misskey-assets
added at
017979
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<template> | ||
<MkContainer :naked="props.transparent" :show-header="false"> | ||
<iframe class="dedjhjmo" ref="live2d" @click="touched" src="https://misskey-dev.github.io/mascot-web/?scale=1.5&y=1.1&eyeY=100"></iframe> | ||
</MkContainer> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { defineComponent, markRaw } from 'vue'; | ||
import define from './define'; | ||
import MkContainer from '@client/components/ui/container.vue'; | ||
import * as os from '@client/os'; | ||
const widget = define({ | ||
name: 'ai', | ||
props: () => ({ | ||
transparent: { | ||
type: 'boolean', | ||
default: false, | ||
}, | ||
}) | ||
}); | ||
export default defineComponent({ | ||
extends: widget, | ||
components: { | ||
MkContainer, | ||
}, | ||
data() { | ||
return { | ||
}; | ||
}, | ||
mounted() { | ||
window.addEventListener('mousemove', ev => { | ||
const iframeRect = this.$refs.live2d.getBoundingClientRect(); | ||
this.$refs.live2d.contentWindow.postMessage({ | ||
type: 'moveCursor', | ||
body: { | ||
x: ev.clientX - iframeRect.left, | ||
y: ev.clientY - iframeRect.top, | ||
} | ||
}, '*'); | ||
}, { passive: true }); | ||
}, | ||
methods: { | ||
touched() { | ||
//if (this.live2d) this.live2d.changeExpression('gurugurume'); | ||
} | ||
} | ||
}); | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
.dedjhjmo { | ||
width: 100%; | ||
height: 350px; | ||
border: none; | ||
pointer-events: none; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters