Update data.ts
This commit is contained in:
parent
39ef1cf317
commit
6064683d3c
1 changed files with 26 additions and 26 deletions
|
@ -1,18 +1,18 @@
|
||||||
import { Data, ShapeType } from "types"
|
import { Data, ShapeType } from 'types'
|
||||||
import shapeUtils from "lib/shape-utils"
|
import shapeUtils from 'lib/shape-utils'
|
||||||
import { shades } from "lib/colors"
|
import { shades } from 'lib/colors'
|
||||||
|
|
||||||
export const defaultDocument: Data["document"] = {
|
export const defaultDocument: Data['document'] = {
|
||||||
pages: {
|
pages: {
|
||||||
page0: {
|
page0: {
|
||||||
id: "page0",
|
id: 'page0',
|
||||||
type: "page",
|
type: 'page',
|
||||||
name: "Page 0",
|
name: 'Page 0',
|
||||||
childIndex: 0,
|
childIndex: 0,
|
||||||
shapes: {
|
shapes: {
|
||||||
shape3: shapeUtils[ShapeType.Dot].create({
|
shape3: shapeUtils[ShapeType.Dot].create({
|
||||||
id: "shape3",
|
id: 'shape3',
|
||||||
name: "Shape 3",
|
name: 'Shape 3',
|
||||||
childIndex: 3,
|
childIndex: 3,
|
||||||
point: [400, 500],
|
point: [400, 500],
|
||||||
style: {
|
style: {
|
||||||
|
@ -22,8 +22,8 @@ export const defaultDocument: Data["document"] = {
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
shape0: shapeUtils[ShapeType.Circle].create({
|
shape0: shapeUtils[ShapeType.Circle].create({
|
||||||
id: "shape0",
|
id: 'shape0',
|
||||||
name: "Shape 0",
|
name: 'Shape 0',
|
||||||
childIndex: 1,
|
childIndex: 1,
|
||||||
point: [100, 600],
|
point: [100, 600],
|
||||||
radius: 50,
|
radius: 50,
|
||||||
|
@ -34,8 +34,8 @@ export const defaultDocument: Data["document"] = {
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
shape5: shapeUtils[ShapeType.Ellipse].create({
|
shape5: shapeUtils[ShapeType.Ellipse].create({
|
||||||
id: "shape5",
|
id: 'shape5',
|
||||||
name: "Shape 5",
|
name: 'Shape 5',
|
||||||
childIndex: 5,
|
childIndex: 5,
|
||||||
point: [200, 200],
|
point: [200, 200],
|
||||||
radiusX: 50,
|
radiusX: 50,
|
||||||
|
@ -47,8 +47,8 @@ export const defaultDocument: Data["document"] = {
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
shape7: shapeUtils[ShapeType.Ellipse].create({
|
shape7: shapeUtils[ShapeType.Ellipse].create({
|
||||||
id: "shape7",
|
id: 'shape7',
|
||||||
name: "Shape 7",
|
name: 'Shape 7',
|
||||||
childIndex: 7,
|
childIndex: 7,
|
||||||
point: [100, 100],
|
point: [100, 100],
|
||||||
radiusX: 50,
|
radiusX: 50,
|
||||||
|
@ -60,8 +60,8 @@ export const defaultDocument: Data["document"] = {
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
shape6: shapeUtils[ShapeType.Line].create({
|
shape6: shapeUtils[ShapeType.Line].create({
|
||||||
id: "shape6",
|
id: 'shape6',
|
||||||
name: "Shape 6",
|
name: 'Shape 6',
|
||||||
childIndex: 1,
|
childIndex: 1,
|
||||||
point: [400, 400],
|
point: [400, 400],
|
||||||
direction: [0.2, 0.2],
|
direction: [0.2, 0.2],
|
||||||
|
@ -72,8 +72,8 @@ export const defaultDocument: Data["document"] = {
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
rayShape: shapeUtils[ShapeType.Ray].create({
|
rayShape: shapeUtils[ShapeType.Ray].create({
|
||||||
id: "rayShape",
|
id: 'rayShape',
|
||||||
name: "Ray",
|
name: 'Ray',
|
||||||
childIndex: 3,
|
childIndex: 3,
|
||||||
point: [300, 100],
|
point: [300, 100],
|
||||||
direction: [0.5, 0.5],
|
direction: [0.5, 0.5],
|
||||||
|
@ -84,8 +84,8 @@ export const defaultDocument: Data["document"] = {
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
shape2: shapeUtils[ShapeType.Polyline].create({
|
shape2: shapeUtils[ShapeType.Polyline].create({
|
||||||
id: "shape2",
|
id: 'shape2',
|
||||||
name: "Shape 2",
|
name: 'Shape 2',
|
||||||
childIndex: 2,
|
childIndex: 2,
|
||||||
point: [200, 600],
|
point: [200, 600],
|
||||||
points: [
|
points: [
|
||||||
|
@ -95,13 +95,13 @@ export const defaultDocument: Data["document"] = {
|
||||||
],
|
],
|
||||||
style: {
|
style: {
|
||||||
stroke: shades.black,
|
stroke: shades.black,
|
||||||
fill: shades.transparent,
|
fill: shades.none,
|
||||||
strokeWidth: 1,
|
strokeWidth: 1,
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
shape1: shapeUtils[ShapeType.Rectangle].create({
|
shape1: shapeUtils[ShapeType.Rectangle].create({
|
||||||
id: "shape1",
|
id: 'shape1',
|
||||||
name: "Shape 1",
|
name: 'Shape 1',
|
||||||
childIndex: 1,
|
childIndex: 1,
|
||||||
point: [400, 600],
|
point: [400, 600],
|
||||||
size: [200, 200],
|
size: [200, 200],
|
||||||
|
@ -116,8 +116,8 @@ export const defaultDocument: Data["document"] = {
|
||||||
},
|
},
|
||||||
code: {
|
code: {
|
||||||
file0: {
|
file0: {
|
||||||
id: "file0",
|
id: 'file0',
|
||||||
name: "index.ts",
|
name: 'index.ts',
|
||||||
code: `
|
code: `
|
||||||
new Dot({
|
new Dot({
|
||||||
point: new Vector(0, 0),
|
point: new Vector(0, 0),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue