Skip to content

feat: make live demo code better #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>-->



`

















`;
Loading