@tomorrowevening/theatre-browser-bundles 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,3 @@
1
+ This is a bundle of @theatre/core and @theatre/studio packages.
2
+
3
+ See their licenses in their repo: https://github.com/theatre-js/theatre
package/README.md ADDED
@@ -0,0 +1,32 @@
1
+ # Theatre.js browser bundles
2
+
3
+ A custom build of Theatre.js that you can use via a `<script>` tag rather than using a bundler.
4
+
5
+ ## How to use
6
+
7
+ There are currently two builds:
8
+
9
+ * `dist/core-and-studio.js`
10
+ * `dist/core-only.min.js`
11
+
12
+ As the names imply, one includes both `@theatre/studio` and `@theatre/core`, while the other is a minified version of `@theatre/core`.
13
+
14
+ Example:
15
+
16
+ ```html
17
+ <script src="path/to/core-and-studio.js"></script>
18
+ <script>
19
+ // here, core is equal to `import * as core from '@theatre/core`
20
+ const core = Theatre.core
21
+ // here, studio is equal to `import studio from '@theatre/studio`.
22
+ // Note this would be undefined if you're using `core-only.min.js`
23
+ const studio = Theatre.studio
24
+
25
+ // only call this if you're using the core-and-studio.js bundle
26
+ studio.initialize()
27
+
28
+ const project = core.getProject("My project")
29
+ const sheet = project.sheet("...")
30
+ // and so on...
31
+ </script>
32
+ ```