Skip to content

Commit

Permalink
feat: make live demo code better (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
meloalright authored Aug 13, 2024
1 parent e793a4d commit 4f31d8d
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 23 deletions.
17 changes: 4 additions & 13 deletions vue-playground/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
</p>
<div class="livebox" v-if="!debug">
<div class="hint">
You can edit <a title="copy code to clipboard" @click="copy">this</a>
You can edit
<span title="copy code to clipboard" @click="copy">this</span>
<span>-></span>
</div>
<VueLive
Expand Down Expand Up @@ -81,16 +82,9 @@
:height="70"
v-bind:blur="10"
:grayscale="false"
:brighten="40"
:brighten="80"
:invert="false"
></v-image>
<v-image
:x="0"
:y="0"
:image="'https://raw.githubusercontent.com/rustq/vue-skia/main/vue-playground/src/assets/logo.png'"
:width="70"
:height="70"
></v-image>
</v-surface>
</template>
<github-corners
Expand Down Expand Up @@ -125,14 +119,10 @@ export default defineComponent({
VueLive,
GithubCorners,
VSurface,
VGroup,
VRect,
VCircle,
VRoundRect,
VLine,
VPoints,
VImage,
VText
},
data() {
return {
Expand Down Expand Up @@ -246,6 +236,7 @@ body {
color: rgb(0, 161, 132);
transform: rotate(-30deg);
transition: transform 0.2s;
user-select: none;
}
@media (max-width: 1600px) {
Expand Down
9 changes: 1 addition & 8 deletions vue-playground/src/code.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,9 @@ export default `<v-surface :width="360" :height="360">
:height="70"
v-bind:blur="10"
:grayscale="false"
:brighten="40"
:brighten="80"
:invert="false"
></v-image>
<v-image
:x="0"
:y="0"
:image="'https://raw.githubusercontent.com/rustq/vue-skia/main/vue-playground/src/assets/logo.png'"
:width="70"
:height="70"
></v-image>
<v-group :x="200" :y="160" color="violet" :style="'stroke'" :invertClip="true">
<template #clip>
<v-circle :cx="8" :cy="68" :r="40" />
Expand Down
21 changes: 19 additions & 2 deletions vue-playground/src/loading-code.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default `<!--<template>loading</template>-->
export default `<!-- The vue-skia is a skia-based 2d graphics vue rendering library. It is based on Rust to implement software rasterization to perform rendering. It takes up less memory than the native canvas, however it is still a experiment project. And it's based entirely on vue syntax. -->
Expand All @@ -18,4 +18,21 @@ export default `<!--<template>loading</template>-->
`
`;

0 comments on commit 4f31d8d

Please sign in to comment.