Skip to main content
Create new
Introduction
Reactivity
Props
Logic
Events
Bindings
Lifecycle
Stores
Motion
Transitions
Animations
Easing
SVG
Actions
Classes
Component composition
Context API
Special elements
Module context
Debugging
7GUIs
Miscellaneous
App.svelte
Example.svelte
<script>
import "aframe"
import "aframe-svelte"
// aframe stuff doesn't like getting imported twice, delete above to play around in repl
import Example from "./Example.svelte"
</script>

<a-scene>
<a-entity svelte={{component: Example, props: { color: "gold" }}} />
<a-plane position="0 0 -4" rotation="-90 0 0" width="4" height="4" color="#7BC8A4"></a-plane>
<a-sky color="#AAAAFF"></a-sky>
</a-scene>
loading Svelte compiler...
/* Select a component to see its compiled code */
result = svelte.compile(source, {
generate: ,
});
/* Select a component to see its compiled code */