Commit graph

578 commits

Author SHA1 Message Date
Cole Lawrence
6fd718a6e7 refactor: Remove unused styled components in PropWithChildrenRow 2022-05-20 07:37:35 -04:00
Cole Lawrence
79f2424a8a refactor for useTooltip remove unnecessary as $IntentionalAny 2022-05-20 07:37:35 -04:00
Cole Lawrence
9400aa12a1 refactor: Assorted VFCs, dead code removal, use Nominals in ahistoric 2022-05-20 07:37:35 -04:00
Cole Lawrence
84daaaf94a dev: Add configurable ITheatreLogger
Addresses the lack of options we currently have for surfacing issues in
our application via debugging tools. Prioritizes performance and
usability (visually) over clarity in some places that could have been
object mapped.

A logger with three separate audiences:

 * `internal`: Logs for developers maintaining Theatre.js
 * `dev`: Logs for developers using Theatre.js
 * `public`: Logs for everyone

This logger supports:
 * multiple logging levels (error, warn, debug, trace),
 * multiple audience levels (internal, dev, public),
 * multiple categories (general, todo, troubleshooting)
 * named and keyed loggers (e.g.
   `rootLogger.named("Project", project.id)`)
 * console styling with deterministic coloring
 * console devtool maintains accurate sourcemap link to logging origin
   (e.g. `coreExports.ts:71` as opposed to `logger.ts:45` or whatever)
 * swappable logger
 * customizable filtering
 * Accepts lazy `args`: `args: () => object` via
  `logger.lazy.<level>("message", () => <expensive computation>)` (e.g.
  `logger.lazy.debugDev("Loaded project state", () => ({ save: bigProject.exportToSaveable() }))`)
2022-05-19 16:34:34 -04:00
Cole Lawrence
5d61060828 fix(useDrag): Refactor to separate detection
* Remove unecessary `modeRef`
 * Use "Domain modeling" principles to enforce state
2022-05-19 13:15:05 -04:00
vezwork
1f7206a66f Replace few usages of useRefAndState with useState 2022-05-19 13:15:05 -04:00
vezwork
c5ccb8c28d Add shouldPointerLock to useDrag, BasicNumberInput 2022-05-19 13:15:05 -04:00
vezwork
b547282d95 Remove DraggableArea in favor of useDrag 2022-05-19 13:15:05 -04:00
Don McCurdy
386a8fafac
theatre/r3f: Allow physical lighting in snapshot viewport (#114)
Co-authored-by: Andrew Prifer <andrew.prifer@gmail.com>
2022-05-19 12:48:59 +02:00
Aria Minaei
c15c88fcec Fix the quoting issue in the prerelease script 2022-05-19 12:43:31 +02:00
Aria Minaei
e8272862c7 Add a command output to the prerelease script 2022-05-19 12:33:31 +02:00
Andrew Prifer
95d4e1d315
Create reference window for r3f (#169)
* Add reference window (and fix tooltips)

* Replace image with data url so the build doesn't fail
2022-05-18 17:04:07 +02:00
Fülöp
8520c74116 Automatically publish prereleases to npm (#155)
This commit creates `x.x.x-insiders.COMMIT_HASH` builds of all of our public packages, and publishes them to npm with the `insiders` tag, so one could say `npm install @theatre/core@0.4.8-insiders.bsdf387` and use the package at that particular commit.

Co-authored-by: Aria Minaei <aria.minaei@gmail.com>
2022-05-18 12:39:35 +02:00
Fülöp
3d10325873
Add tests for Theatre.js + popular setups in the ecosystem (#165)
This implements some basic infra for testing Theatre.js with popular setups such as npm/yarn/pnpm, webpack/vite/parcel, js/ts, etc.

So far, the only existing setup has been with create-react-app. Will add more in the future.

Co-authored-by: Fülöp <fulopkovacs@users.noreply.github.com>
Co-authored-by: Aria Minaei <aria.minaei@gmail.com>
2022-05-17 20:53:01 +02:00
Cole Lawrence
2324218453
Implement inline keyframe editing (#135)
* refactor: improve idents near DeterminePropEditor

* fix: Allow `MouseEvent` for `usePopover` `OpenFn`
 * Anticipate to be used with `useDrag` (which is written using `MouseEvent`s)

* refactor: rename local variable depth to visualIndentation

* fix: Hide out of bounds LengthIndicator

* pointer: Fix type errors with `getPointerParts` using generics

 * Fix param type for `getPointerMeta`

* Inline keyframe editor + popover nesting
 * Complete inline editor,
 * add reason for close popover, &
 * enable popover nesting
 * enable inline keyframe editing with splitting of DeterminePropEditor
 * usePopover has PopoverAutoCloseLock helper

Co-authored-by: Elliot <key.draw@gmail.com>
Co-authored-by: Aria <aria.minaei@gmail.com>

* prop editor: Reorganize prop-editors & improve documentation

Co-authored-by: Cole Lawrence <cole@colelawrence.com>
Co-authored-by: Elliot <key.draw@gmail.com>

Co-authored-by: Elliot <key.draw@gmail.com>
Co-authored-by: Aria <aria.minaei@gmail.com>
2022-05-16 14:14:47 +02:00
Cole Lawrence
e140bb6fc4
docs: Minor adjustments to Curve docs (#160) 2022-05-16 07:53:56 -04:00
Andrew Prifer
2bdb535a28
Update CONTRIBUTING.md with merge instructions (#164)
Update CONTRIBUTING.md
2022-05-16 12:57:19 +02:00
Andrew Prifer
fc9df7c346
Support multiple sheet instances (#153)
* Support multiple/nested sheets and sheet instances

* Add playground for instances

* Fix playground and example

* Change r3f's objectKey to storeKey to avoid confusion

* Update all editable/uniqueName variables used as store key to storeKey too

* Fix lint warnings
2022-05-16 12:43:45 +02:00
Andrew Prifer
10b4954ee2
Support fog editing in r3f second try (#163)
* Add support for editable fog

* Oops
2022-05-15 22:04:00 +02:00
Andrew Prifer
ef96fa1974
Revert "Merge pull request #161" (#162)
This reverts commit 5bd224ae86.
2022-05-15 22:00:54 +02:00
Andrew Prifer
5bd224ae86
Merge pull request #161
* Add support for editable fog
2022-05-15 21:54:02 +02:00
Andrew Prifer
3eba08ff32
Merge pull request #159
* Fix raycasting-related perf issues
2022-05-13 19:43:09 +02:00
Elliot
bd110ed01a
Add input selection on curve change (#158) 2022-05-13 13:18:00 -04:00
Elliot
cd9d03076b
Fix curveEditorPopover overwriting existing curve (#151)
* Fix curveEditorPopover overwriting existing curve

* Fix existing curve overwrite, other reactivity
2022-05-10 13:14:32 -04:00
Aria Minaei
417233a7c6 Fix the color inconsistency that shows up when dragging the focus range 2022-05-10 18:56:43 +02:00
Aria Minaei
7ce3111e07 Fix the cursor for the middle-button drag gesture 2022-05-10 18:29:03 +02:00
Aria Minaei
202b61c48c Simplify useDrag()'s API and implement middle-button dragging in SequenceEditor 2022-05-10 15:31:16 +02:00
Aria Minaei
e12d495f29 Fix the bug where small wheel events would leak to cause unwanted scroll 2022-05-10 15:27:43 +02:00
Aria Minaei
ab8361d24a Document VerticalScrollContainer 2022-05-10 15:26:28 +02:00
Cole Lawrence
8c271d187d marker: Optimize MarkerVisualDot svg
Co-authored-by: Aria Minaei <aria.minaei@gmail.com>
2022-05-09 09:23:53 -04:00
vezwork
4281092ffc Fix MarkerDot non-visible when out of rightDims
Co-authored-by: Aria Minaei <aria.minaei@gmail.com>
Co-authored-by: Cole Lawrence <cole@colelawrence.com>
2022-05-09 09:23:53 -04:00
vezwork
d4060730d7 Refactor data-pos common code 2022-05-09 09:23:53 -04:00
vezwork
030b6d2804 Initial marker features
- Add comments about cursor lock, framestamp lock
- Add PointableSet, Mark Ids, dataverse usage fix
- Add marker dragging, fix PointerCapturing

Co-authored-by: Cole Lawrence <cole@colelawrence.com>
Co-authored-by: Aria <aria.minaei@gmail.com>
2022-05-09 09:23:53 -04:00
Andrew Prifer
a3b1938d43
Remove debouncedScrub() from r3f (#147) 2022-05-06 14:07:29 +02:00
Aria Minaei
a38201a835 Fix the visual glitches with FocusRangeCurtains 2022-05-05 15:17:35 +02:00
Aria Minaei
c6a7c40339 Fix the type errors from the rebase 2022-05-05 14:21:46 +02:00
Cole Lawrence
abd79b197f doc + optimize: prism.ts (use Maps) 2022-05-05 07:58:44 -04:00
Cole Lawrence
1387ce62d2 refactor: Add working Nominal types, clarify identifiers
* Use more Nominal types to help with internal code id usage consistency
 * Broke apart StudioHistoricState type

Co-authored-by: Aria <aria.minaei@gmail.com>
2022-05-05 07:58:44 -04:00
Cole Lawrence
9d9fc1680e refactor: add pointer types for prop editors 2022-05-05 07:58:44 -04:00
Cole Lawrence
91794f550d refactor/docs: Minor identifier tweaks for RightClick/ContextMenu 2022-05-05 07:58:40 -04:00
Cole Lawrence
f04bc3e31a dev(tsconfig): ensure imports use import type ... 2022-05-05 07:55:20 -04:00
Andrew Prifer
c1e515a13f
Merge pull request #145
* Fix RefreshSnapshot component and make useRefreshSnapshot not a hook,…
2022-05-04 17:10:42 +02:00
Elliot
fceb1eb60a
feature/single curve editor (#122)
Co-authored-by: Cole Lawrence <cole@colelawrence.com>
Co-authored-by: Andrew Prifer <AndrewPrifer@users.noreply.github.com>
Co-authored-by: Aria Minaei <aria.minaei@gmail.com>
2022-05-04 17:08:30 +02:00
Andrew Prifer
dceb3965d6
Make editable schema-based and add default schemas (#139)
* Make editable schema based and fix a couple UX issues

* Refactor the icons a bit

* Add support for points, lines, line segments, and line loops

* Adjust nudge multipliers

* Fix types

* Fix helpers not showing on hover in some cases
2022-05-04 16:43:44 +02:00
Aria Minaei
6caf8267c5 Bugfix: Ensure the focus range doesn't invert upon snapping 2022-05-03 12:42:53 +02:00
Aria
3ecc3dd012
QOL improvements to the FocusRange and SequenceEdito (#125) 2022-05-03 12:38:08 +02:00
Andrew Prifer
d85e3053af
Fix r3f example not actually making the editable camera defined in the scene the defaul (#78)
* Fix e.perspectiveCamera -> editable(PerspectiveCamera)

* Also fix the one in the examples directory

* Update fix to latest version
2022-05-01 14:59:52 +02:00
Elliot
4b5f7adf21
Add hotness details to dataverse docs (#138)
* Add hotness details to dataverse docs

* Add reference for hot observables
2022-04-29 19:04:21 +02:00
Elliot
b6e0a217cd
Fix typo? (#137) 2022-04-28 15:11:20 -04:00
Cole Lawrence
909ffccafb
refactor: Improve identifiers in pointer.ts + use Map over object (#134)
Co-authored-by: Elliot <key.draw@gmail.com>
2022-04-27 22:21:51 +02:00