prep for demo
This commit is contained in:
parent
772a42c947
commit
b37c09bae9
|
|
@ -0,0 +1,33 @@
|
|||
name: Deploy to GitHub Pages
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- pages-demo
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
concurrency: ci-${{ github.ref }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout 🛎️
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Enable Corepack 📦
|
||||
run: |
|
||||
corepack enable
|
||||
corepack prepare yarn@4.0.2 --activate
|
||||
|
||||
|
||||
- name: Build 🔧
|
||||
run: |
|
||||
yarn install
|
||||
yarn build
|
||||
|
||||
- name: Deploy 🚀
|
||||
uses: JamesIves/github-pages-deploy-action@v4
|
||||
with:
|
||||
folder: dist
|
||||
|
|
@ -10,7 +10,7 @@ export default function YjsExample() {
|
|||
MainMenu: CustomMainMenu,
|
||||
}}
|
||||
onMount={onMount}
|
||||
persistenceKey='funcArrows'
|
||||
persistenceKey='scoped-propagators'
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { SpatialIndex } from "@/SpatialIndex"
|
||||
import { SpatialIndex } from "@/propagators/SpatialIndex"
|
||||
import { Editor, TLShape, TLShapeId, VecLike, polygonsIntersect } from "tldraw"
|
||||
|
||||
export class Geo {
|
||||
|
|
@ -1,11 +1,20 @@
|
|||
import { DeltaTime } from "@/DeltaTime"
|
||||
import { Geo } from "@/Geo"
|
||||
import { Edge, getArrowsFromShape, getEdge } from "@/tlgraph"
|
||||
import { isShapeOfType, updateProps } from "@/utils"
|
||||
import { DeltaTime } from "@/propagators/DeltaTime"
|
||||
import { Geo } from "@/propagators/Geo"
|
||||
import { Edge, getArrowsFromShape, getEdge } from "@/propagators/tlgraph"
|
||||
import { isShapeOfType, updateProps } from "@/propagators/utils"
|
||||
import { Editor, TLArrowShape, TLBinding, TLGroupShape, TLShape, TLShapeId } from "tldraw"
|
||||
|
||||
type Prefix = 'click' | 'tick' | 'geo' | ''
|
||||
|
||||
export function registerDefaultPropagators(editor: Editor) {
|
||||
registerPropagators(editor, [
|
||||
ChangePropagator,
|
||||
ClickPropagator,
|
||||
TickPropagator,
|
||||
SpatialPropagator,
|
||||
])
|
||||
}
|
||||
|
||||
function isPropagatorOfType(arrow: TLShape, prefix: Prefix) {
|
||||
if (!isShapeOfType<TLArrowShape>(arrow, 'arrow')) return false
|
||||
const regex = new RegExp(`^\\s*${prefix}\\s*\\{`)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { isShapeOfType } from "@/utils";
|
||||
import { isShapeOfType } from "@/propagators/utils";
|
||||
import { Editor, TLArrowBinding, TLArrowShape, TLShape, TLShapeId } from "tldraw";
|
||||
|
||||
export interface Edge {
|
||||
Loading…
Reference in New Issue