// #创建 Text [标准创建 (Leafer)]
import { Leafer, Text } from 'leafer-ui'
const leafer = new Leafer({ view: window })
const text = new Text({
text: 'Welcome to LeaferJS',
"fill": {
"type": "radial",
"stops": [
{
"offset": 0,
"color": "#ffffff"
},
{
"offset": 1,
"color": "#105ef5"
}
],
"from": "center",
"to": "bottom"
},
})
const text2 = new Text({
x:200,
y:200,
text: 'Welcome to LeaferJS',
"fill": {
"type": "radial",
"stops": [
{
"offset": 0,
"color": "#ffffff"
},
{
"offset": 1,
"color": "#105ef5"
}
],
"from": "center",
"to": "bottom"
},
})
leafer.add(text)
leafer.add(text2)
// #创建 Text [标准创建 (Leafer)]
import { Leafer, Text } from 'leafer-ui'
const leafer = new Leafer({ view: window })
const text = new Text({
text: 'Welcome to LeaferJS',
"fill": {
"type": "radial",
"stops": [
{
"offset": 0,
"color": "#ffffff"
},
{
"offset": 1,
"color": "#105ef5"
}
],
"from": "center",
"to": "bottom"
},
})
const text2 = new Text({
x:200,
y:200,
text: 'Welcome to LeaferJS',
"fill": {
"type": "radial",
"stops": [
{
"offset": 0,
"color": "#ffffff"
},
{
"offset": 1,
"color": "#105ef5"
}
],
"from": "center",
"to": "bottom"
},
})
leafer.add(text)
leafer.add(text2)