0.1.26 • Published 10 months ago

@verygoodgraphics/vgg-vue v0.1.26

Weekly downloads
-
License
-
Repository
github
Last release
10 months ago

VGG Vue

Environment

Create a .env file and set the VGG runtime URL if you want to use a specific version, otherwise it will use the latest version.

# Open your terminal and goto the root directory of your project
cp /packages/vue/.env.example /packages/vue/.env

Usage

<VGGRender />

<script setup lang="ts">
import VGGRender from "@verygoodgraphics/vgg-vue"

function handleLoad(event: VGGEvent, instance: VGG<"#vgg_home">) {
  console.log(event, instance)
  instance?.$("#vgg_home").on(EventType.Click, async () => {
    window.alert("Hello, VGG!")
  })
}
</script>

<template>
  <VGGRender
    src="https://raw.githubusercontent.com/verygoodgraphics/vgg_docs/main/static/example/docs__example__vgg_homepage_v1.daruma"
    :canvasStyle="{ width: '50vw', height: '100vh' }"
    @onLoad="handleLoad"
  />
</template>

API

Props for <VGGRender />

OptionTypeRequiredDefault
srcstring | Int8Array--
runtimestring-https://s5.vgg.cool/runtime/latest
canvasStyleStyleValue--
editModeboolean-false
verboseboolean-false
disableLoaderboolean-false
customFontsstring[]-[]
onLoad(event: VGGEvent, instance: VGG<T>) => Promise<void>--
onLoadError(event: VGGEvent) => Promise<void>--
onReadyEventCallback--
onRenderedEventCallback--
onStateChange(event: VGGEvent, instance: VGG<T>) => Promise<void>--
onSelectEventCallback--
onLoadingStateUpdate(state: LoadingState) => void--
0.1.26

10 months ago

0.1.22

1 year ago

0.1.23

1 year ago

0.1.24

1 year ago

0.1.25

1 year ago

0.1.21

1 year ago

0.1.20

1 year ago

0.1.19

1 year ago

0.1.17

1 year ago

0.1.18

1 year ago

0.1.16

1 year ago

0.1.15

1 year ago

0.1.14

1 year ago

0.1.13

1 year ago

0.1.12

1 year ago

0.1.11

1 year ago

0.1.10

1 year ago

0.1.9

1 year ago

0.1.8

1 year ago

0.1.7

1 year ago

0.1.6

1 year ago

0.1.5

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago