It is not only a fully functional graph visualization library, but also an explorer of data relationships.
!!!###!!!title=VisActor/VRender tutorial documents!!!###!!!!!!###!!!description=In this section, we will learn how to use the `scene tree` to describe a scene, as well as how to use it in cross-platform environments.Our scene is very simple, consisting of a circular "drum." When the "drum" is clicked, it will trigger an animation, launching many small circles.!!!###!!!
Quick Start for Events and Animations
In this section, we will learn how to use the scene tree to describe a scene, as well as how to use it in cross-platform environments.
Our scene is very simple, consisting of a circular "drum." When the "drum" is clicked, it will trigger an animation, launching many small circles.
Create a Canvas
import { createBrowserVRenderApp } from '@visactor/vrender';
const app = createBrowserVRenderApp();
// Create a stage with a default initial layer.
const stage = app.createStage({
canvas: 'main',
autoRender: true
});
Create Nodes
import { createCircle, createGroup, defaultTicker } from '@visactor/vrender';
const c1 = createCircle({
radius:60,
x:300,
y:300,
fill:'orange',
stroke:'#ccc',
lineWidth:6,
innerBorder: {
distance:10,
lineWidth:2,
stroke:'#eee' }
});
const group = createGroup({});
group.add(c1);
// Start the animation ticker when the application is ready.defaultTicker.start();
stage.defaultLayer.add(group);