Commit graph

436 commits

Author SHA1 Message Date
Aria Minaei
e8ac6c77ea 0.6.1-dev.3 2023-02-03 13:00:32 +01:00
Aria Minaei
5c135a3cb9 0.6.1-dev.2 2023-02-01 16:15:02 +01:00
Aria Minaei
069c87fbcf 0.6.1-dev.1 2023-02-01 12:33:53 +01:00
Aria Minaei
f7808a0ef7 Fix the bug where unsubscribed prism listeners might still fire one last time 2023-02-01 12:32:46 +01:00
Aria Minaei
24af219f76 0.6.0 2023-01-25 19:04:36 +01:00
Andrew Prifer
bc7a742dc6
Demote assets example to bottom 2023-01-25 18:48:50 +01:00
Andrew Prifer
8e33eb4e40
Fix Theatric README video 2023-01-25 18:38:01 +01:00
Aria Minaei
dead5ea2ea theatric video 2023-01-25 18:27:06 +01:00
Aria Minaei
e603b1b9ca Codesandbox examples for theatric 2023-01-25 18:10:39 +01:00
Aria Minaei
4be16f36c1 0.6.0-rc.4 2023-01-25 17:54:52 +01:00
Aria Minaei
6bbf43a922 Theatric: make the studio select the default object on first load 2023-01-25 17:53:08 +01:00
Aria Minaei
fb661d017f More docs 2023-01-25 17:41:47 +01:00
Aria Minaei
3d44575828 0.6.0-rc.3 2023-01-25 17:20:53 +01:00
Aria Minaei
01e386e0c7 More docs for theatric 2023-01-25 17:19:36 +01:00
Aria Minaei
2b10e46441 Fix the bugs in assetStorage 2023-01-25 15:08:22 +01:00
Aria Minaei
33235e9cd7 0.6.0-rc.2 2023-01-24 18:47:10 +01:00
Aria Minaei
00bb2d3310 Fix the recursion issue with theatric 2023-01-24 18:46:09 +01:00
Andrew Prifer
97ab020bfb Fix typo in Theatric's readme 2023-01-24 16:50:03 +01:00
Andrew Prifer
a0eeab7b69 Fix typo in Theatric readme 2023-01-24 16:48:16 +01:00
Andrew Prifer
1744dc28f4
Add readme for theatric (#385)
* Add readme for theatric

* Add TOC for API
2023-01-24 15:45:08 +00:00
Aria Minaei
3e65a3eaa2 0.6.0-rc.1 2023-01-24 16:24:03 +01:00
Aria Minaei
ee357b341e 0.6.0-dev.6 2023-01-24 08:53:22 +01:00
Aria Minaei
43669313c7 0.6.0-dev.5 2023-01-23 23:21:28 +01:00
Aria Minaei
a30bba0708 Convert extensions' Dropdown tool to Flyout
And use the style of a regular context Theatre.js menu.
2023-01-23 22:23:06 +01:00
Colin Duffy
3d343cc59e
Feat/studio extension dropdowns (#379) 2023-01-23 22:16:38 +01:00
Andrew Prifer
8470b67d4b
Support the entire getProject config in theatric's initialize() function (#384)
Support the entire getProject config in initialize
2023-01-22 21:59:29 +00:00
Aria Minaei
415ec76942 Mark the actions api as unstable 2023-01-22 20:35:42 +01:00
Aria Minaei
164442a6ea Add theatric to the release scripts and fix compat issues 2023-01-22 18:52:09 +01:00
Andrew Prifer
246e75ccb5
Theatric - a leva-like Theatre.js API for React (#375)
Co-authored-by: Aria Minaei <aria.minaei@gmail.com>
2023-01-22 18:01:31 +01:00
Aria Minaei
41fb7de533 Tweak the style of ImagePropEditor 2023-01-22 14:28:41 +01:00
Aria Minaei
ef279eddff Add tests and docs to dataverse 2023-01-21 22:04:20 +01:00
Aria Minaei
bab95ddad9 More dataverse docs 2023-01-17 17:58:33 +01:00
Aria Minaei
1e1a5f5831 More tests/docs for dataverse 2023-01-16 18:31:13 +01:00
Aria Minaei
155c84523a Rename IdentityPrismProvider => PointerToPrismProvider 2023-01-16 17:25:44 +01:00
Aria Minaei
2b396a5295 0.6.0-dev.4 2023-01-16 13:53:56 +01:00
Aria Minaei
a0c7255157 Add more tests to dataverse 2023-01-15 22:04:27 +01:00
Aria Minaei
e3a9d7665a Add test to pointers 2023-01-15 18:17:34 +01:00
Aria Minaei
ab77e09462 Add tests to Atom 2023-01-15 17:58:16 +01:00
Aria Minaei
9ec9bed80e Fix the links in playground 2023-01-15 14:53:50 +01:00
Aria Minaei
415938212a Add notes to dataverse's docs 2023-01-15 14:50:33 +01:00
Aria Minaei
3c68ed26ad Remove Atom.set|getState() 2023-01-15 12:42:28 +01:00
Aria
d649858529 Feature: Custom RAFDrivers (#374)
Co-authored-by: Pete Feltham <dev@felthy.com>
Co-authored-by: Andrew Prifer <andrew.prifer@gmail.com>
2023-01-14 15:01:09 +01:00
Aria Minaei
41ce858c2b Fully retire Box 2023-01-04 20:51:03 +01:00
Aria Minaei
ac9d8b4481 Replace Atom.setIn() and Atom.reduceIn() with the type-safe Atom.setByPointer() and Atom.reduceByPointer() 2023-01-04 20:51:01 +01:00
Aria Minaei
5b6306bde9 Fix the lint warnings 2023-01-04 20:49:44 +01:00
Aria Minaei
c354a602a4 Remove Box in favor of Atom 2023-01-04 20:49:44 +01:00
Aria Minaei
2bd1dc85a9 Remove `EventEmitter 2023-01-04 20:49:44 +01:00
Aria Minaei
867cf51acb Remove Tappable and Emitter 2023-01-04 20:49:44 +01:00
Aria Minaei
391958f5cf Use EventEmitter instead of Emitter in Box
... so that we have one less dependency on `Tappable`
2023-01-04 20:49:44 +01:00
Aria Minaei
d2876a7c9a Unify Derivation and Prism 13/13 2023-01-04 20:49:44 +01:00
Aria Minaei
b2116e9a5d Unify Derivation and Prism 11/n
`useDerivation()` => `usePrismInstance()`
2023-01-04 20:49:44 +01:00
Aria Minaei
1236900ddf Unify Derivation and Prism 10/n 2023-01-04 20:49:44 +01:00
Aria Minaei
3552f50613 Unify Derivation and Prism 9/n 2023-01-04 20:49:44 +01:00
Aria Minaei
27b9c96afd Unify Derivation and Prism 8/n 2023-01-04 20:49:44 +01:00
Aria Minaei
acf34d393d Unify Derivation and Prism 7/n 2023-01-04 20:49:44 +01:00
Aria Minaei
859cb40e0f Unify Derivation and Prism 6/n 2023-01-04 20:49:44 +01:00
Aria Minaei
0a0c35a7b7 Unify Derivation and Prism 5/n 2023-01-04 20:49:44 +01:00
Aria Minaei
a38d96ec95 Unify Derivation and Prism 4/n 2023-01-04 20:49:43 +01:00
Aria Minaei
06808f99e9 Unify Derivation and Prism 3/n 2023-01-04 20:49:43 +01:00
Aria Minaei
bfba1d4879 Unify Derivation and Prism 2/n 2023-01-04 20:49:43 +01:00
Aria Minaei
12b3f477bc Unify Derivation and Prism (1/n) 2023-01-04 20:49:43 +01:00
Aria Minaei
e9bbb0ef41 Remove PrismDerivation.map/flatMap() 2023-01-04 20:49:43 +01:00
Aria Minaei
a073984b2f Mark add/removeDependent() as internal 2023-01-04 20:49:43 +01:00
Aria Minaei
194de8d833 Simplify Derivation.onChange()
It no longer uses `DerivationEmitter`.
2023-01-04 20:49:43 +01:00
Aria Minaei
a24a149a52 Remove Derivation.tapImmediate()
This is now just an extra flag on `Derivation.onChange()`
2023-01-04 20:49:43 +01:00
Aria Minaei
f2bb24ef99 Change the signature of Derivation.changes() to Derivation.onChange()
This way, we no longer expose the `Tappable` interface so we can remove it later.
2023-01-04 20:49:43 +01:00
Aria Minaei
f1cb8edc91 Simplify Derivation.onStale() 2023-01-04 20:49:43 +01:00
Aria Minaei
5c1aa1cd50 Remove Derivation.changesWithoutValues()
And replace it with `Derivation.onStale()`
2023-01-04 20:49:43 +01:00
Aria Minaei
9094e3041e Remove AbstractDerivation
At this point, the only derivation that we have is `PrismDerivation`.
2023-01-04 20:49:43 +01:00
Aria Minaei
63228fd86a Simplify prism.state() 2023-01-04 20:49:43 +01:00
Aria Minaei
ee68112867 Implement prism.source() 2023-01-04 20:49:43 +01:00
Aria Minaei
b117ee0aff Retire DerivationFromSource (1/2)
This is supposed to break the build. In the next commit, I'll implement `HotScope.source()` to fix the build.
2023-01-04 20:49:43 +01:00
Aria Minaei
918dd754a7 Retire ConstantDerivation 2023-01-04 20:49:43 +01:00
Aria Minaei
ed322b66de Separate the hot path from the cold path in prisms 2023-01-04 20:49:43 +01:00
Aria Minaei
c81fe11e52 Rename Prism.changesWithoutValues() to onStale() 2023-01-04 20:49:43 +01:00
Aria Minaei
a71fff0c73 Don't expose PrismDerivation as a class 2023-01-04 20:49:43 +01:00
Aria Minaei
e0a61981c9 Have PrismDerivation no longer extend AbstractDerivation 2023-01-04 20:49:43 +01:00
Aria Minaei
0655e5b1c4 Add performance note about prism scopes 2023-01-04 20:49:43 +01:00
Aria Minaei
83832ef85b Note down that map/flatMap must be removed 2023-01-04 20:49:43 +01:00
Aria Minaei
6d7d461223 Remove all WeakMaps from prism's scope
... making it easier to debug prism scopes. Again, there is a perf regression here.
2023-01-04 20:49:43 +01:00
Aria Minaei
1c69cb7055 Save prism effects in the prism scope, rather than a WeakMap
... for easier debugging, but there is a perf regression which I
can't yet quantify as the benchmark suit doesn't support comparisons.
2023-01-04 20:49:43 +01:00
Aria Minaei
ae8be59366 Implement a basic benchmark test, and deprecate derivation.map()/flatMap()
This starts a new workspace at `packages/benchmarks` where future benchmarks
are going to sit. For now, it only contains a basic profile of a `sequence.play()`
setup.

It also removes all uses of `AbstractDerivation.map()/flatMap()` and uses prisms
instead.
2023-01-04 20:49:35 +01:00
Aria Minaei
45b548660c 0.6.0-dev.3 2023-01-04 20:35:56 +01:00
Aria
718beb4d7b
Catch more SSR issues and improve compat tests (#353)
This will cause the build to fail, as this will catch an SSR issue, which will be fixed after merging #369
2023-01-04 20:03:47 +01:00
Aria
feb3ad34b8
Compact and collapsible compound prop editor
* Create compact vector prop editor

* MAke all compound props collapsible

* Add collapsed indicator for compound props

* Persist collapsed state accross component rerenders

* Adjust dom playground to use the new vector prop

Co-authored-by: Andrew Prifer <andrew.prifer@gmail.com>
2023-01-04 12:43:49 +01:00
Aria Minaei
f6361e7905 0.6.0-dev.2 2023-01-02 22:34:50 +01:00
Aria Minaei
438a83d2d4 0.6.0-dev.1 2023-01-02 19:47:23 +01:00
Aria Minaei
c58bc694ee Fix: Re-render the panels when object identity change
This fixes the pesky "Argument 'der' in 'useDerivation(der)' should not change between renders."
2022-12-31 22:54:52 +01:00
Andrew Prifer
8d8e2348dd Create idb-backed image prop (#366)
Co-authored-by: Clement Roche <rchclement@gmail.com>
2022-12-31 11:01:16 +01:00
Aria Minaei
95b329b02d 0.5.1 2022-12-31 10:54:27 +01:00
Aria Minaei
fcd3ab7ec5 0.5.1-rc.2 2022-12-07 10:24:50 +01:00
Aria Minaei
a9adc2640c 0.5.1-rc.1 2022-11-25 11:21:28 +01:00
Andrew Prifer
e3a194c7dd
Playground improvements (#342)
Remove previews, add vs code task, open in chrome
2022-11-22 15:05:11 +00:00
Andrew Prifer
484cfeb8ba
Add camera playground (#343) 2022-11-22 14:34:15 +00:00
Aria Minaei
a8a9b5ef05 Rename deleteObject() and related params
Since `sheet.deleteObject()` doesn't actually delete the values
of the props of that object, I decided to rename it to `detachObject()`.

Also, the param `override` sounded too similar to the concept of value overrides,
so I renamed it to `reconfigure`.
2022-11-10 16:23:15 +01:00
Andrew Prifer
43714fdf17
Notification improvements (#324) 2022-10-21 20:32:53 +00:00
Andrew Prifer
965d7085dc
Add runtime type checks to r3f (#323)
* Add better error/warning messages to r3f

* Fix notifications playground
2022-10-21 19:17:45 +00:00
Andrew Prifer
62bc12ab51
Create a notification system that can display notifications in Theatre.js' Studio (#320)
* Implement an internal library for studio notifications

* Improve design a little

* Document code

* Change relative import to absolute one

* Fix tiny styling issue

* Add notifications playground

* Add notifications empty state and keep notifications buttons always visible

Also fix a bug related to not clearing the type and uniqueness checkers.

* Simplify notifications playground

* Treat window as optional in case it runs in server code
2022-10-21 15:51:13 +02:00
Aria Minaei
ef5752cbd3 Add a playground for dynamic trees in r3f 2022-10-18 11:43:54 +02:00
Aria Minaei
a9c3c00153 Implement dynamic scene trees in r3f
This makes it possible to add/remove objects on the fly, do hot-module reloading, change object configs on the fly, and more.
2022-10-18 11:43:54 +02:00