From a9d260436db0d685fa34ea29fe2e1894fdaa910b Mon Sep 17 00:00:00 2001 From: Mark Mankarious Date: Wed, 4 Oct 2023 18:49:58 +0100 Subject: [PATCH] chore: removes demo scene from documentation and instead refers to CodeSandbox example --- docs/pages/docs/api/initialScene.mdx | 97 +--------------------------- 1 file changed, 1 insertion(+), 96 deletions(-) diff --git a/docs/pages/docs/api/initialScene.mdx b/docs/pages/docs/api/initialScene.mdx index 43278f3..9caa33d 100644 --- a/docs/pages/docs/api/initialScene.mdx +++ b/docs/pages/docs/api/initialScene.mdx @@ -112,102 +112,7 @@ id?: string; ``` ## `initialScene` example -Open this example in [CodeSandbox](https://codesandbox.io/p/sandbox/github/markmanx/isoflow/tree/main). - -```js -{ - icons: [ - { - id: 'server', - name: 'Server', - url: 'https://isoflow-public.s3.eu-west-2.amazonaws.com/isopacks/isoflow/server.svg', - isIsometric: true - }, - { - id: 'storage', - name: 'Storage', - url: 'https://isoflow-public.s3.eu-west-2.amazonaws.com/isopacks/isoflow/storage.svg', - isIsometric: true - }, - { - id: 'laptop', - name: 'Laptop', - url: 'https://isoflow-public.s3.eu-west-2.amazonaws.com/isopacks/isoflow/laptop.svg', - isIsometric: true - } - ], - nodes: [ - { - id: 'database', - icon: 'storage', - label: 'Database', - tile: { - x: 2, - y: -2 - } - }, - { - id: 'server', - icon: 'server', - label: 'Server', - labelHeight: 100, - tile: { - x: 2, - y: 2 - } - }, - { - id: 'client', - icon: 'laptop', - label: 'Client', - labelHeight: 100, - tile: { - x: -1, - y: 0 - } - } - ], - connectors: [ - { - id: 'connector1', - anchors: [{ nodeId: 'server' }, { nodeId: 'database' }] - }, - { - id: 'connector2', - style: ConnectorStyleEnum.DOTTED, - width: 10, - anchors: [ - { nodeId: 'server' }, - { tile: { x: -1, y: 2 } }, - { nodeId: 'client' } - ] - } - ], - rectangles: [ - { - id: 'rect1', - from: { - x: 3, - y: 3 - }, - to: { - x: 1, - y: -3 - } - } - ], - textBoxes: [ - { - id: 'text1', - tile: { - x: 1, - y: -4 - }, - text: 'Backend' - } - ] -} -``` +A demo scene is hosted here on [CodeSandbox](https://codesandbox.io/p/sandbox/github/markmanx/isoflow/tree/main). ## Validation `initialScene` is validated before Isoflow renders the scene, and an error is thrown if the data is invalid.