Skip to content

Commit

Permalink
minify app
Browse files Browse the repository at this point in the history
  • Loading branch information
kolibril13 committed Mar 12, 2024
1 parent 006f573 commit df09217
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 83 deletions.
36 changes: 2 additions & 34 deletions src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,40 +1,8 @@
import { AssetRecordType, Tldraw } from "@tldraw/tldraw";
import "@tldraw/tldraw/tldraw.css";
import { useCallback } from 'react';
import { useCallback } from "react";

export default function App() {
const handleMount = useCallback((app) => {
const assetId = AssetRecordType.createId();
const videoAsset = {
id: assetId,
typeName: "asset",
type: "video",
props: {
w: 640, // Set the width of the video
h: 360, // Set the height of the video
name: "bunny.mp4",
isAnimated: true,
mimeType: "video/mp4",
src: "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4",
},
meta: {},
};

app.createAssets([videoAsset]);
app.createShapes([
{
type: "video",
x: 100,
y: 100,
props: {
w: 640,
h: 360,
assetId,
},
},
]);
}, []);

return (
<div
style={{
Expand All @@ -43,7 +11,7 @@ export default function App() {
height: "1000px",
}}
>
<Tldraw onMount={handleMount} />
<Tldraw />
</div>
);
}
49 changes: 0 additions & 49 deletions src/image_reference.jsx

This file was deleted.

0 comments on commit df09217

Please sign in to comment.