Chore: Simplified ISheet's signature

This commit is contained in:
Aria Minaei 2021-07-03 15:36:00 +02:00
parent d161703c20
commit 2a671b129d
11 changed files with 125 additions and 138 deletions

View file

@ -6,12 +6,10 @@ import type {IProject, ISheet, ISheetObject} from '@theatre/core'
import {types as t} from '@theatre/core'
import type {IScrub, IStudio} from '@theatre/studio'
const boxObjectConfig = {
props: t.compound({
x: t.number(0),
y: t.number(0),
}),
}
const boxObjectConfig = t.compound({
x: t.number(0),
y: t.number(0),
})
const Box: React.FC<{
id: string

View file

@ -6,25 +6,23 @@ import type {IProject, ISheet, ISheetObject} from '@theatre/core'
import {types as t} from '@theatre/core'
import type {IScrub, IStudio} from '@theatre/studio'
const boxObjectConfig = {
props: t.compound({
position: t.compound({
x: t.number(0),
y: t.number(0),
z: t.number(0),
}),
scale: t.compound({
x: t.number(0),
y: t.number(0),
z: t.number(0),
origin: t.compound({
x: t.number(0),
y: t.number(0),
}),
w: t.number(0),
}),
const boxObjectConfig = t.compound({
position: t.compound({
x: t.number(0),
y: t.number(0),
z: t.number(0),
}),
}
scale: t.compound({
x: t.number(0),
y: t.number(0),
z: t.number(0),
origin: t.compound({
x: t.number(0),
y: t.number(0),
}),
w: t.number(0),
}),
})
const Box: React.FC<{
id: string

View file

@ -13,15 +13,13 @@ import {types} from '@theatre/core'
import type {ITurtle} from './turtle'
import {drawTurtlePlan, makeTurtlePlan} from './turtle'
const objConfig = {
props: types.compound({
startingPoint: types.compound({
x: types.number(0.5, {min: 0, max: 1}),
y: types.number(0.5, {min: 0, max: 1}),
}),
scale: types.number(1, {min: 0.1}),
const objConfig = types.compound({
startingPoint: types.compound({
x: types.number(0.5, {min: 0, max: 1}),
y: types.number(0.5, {min: 0, max: 1}),
}),
}
scale: types.number(1, {min: 0.1}),
})
const TurtleRenderer: React.FC<{
sheet: ISheet