Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

next solid-three #12

Draft
wants to merge 169 commits into
base: main
Choose a base branch
from
Draft

next solid-three #12

wants to merge 169 commits into from

Commits on Jun 14, 2023

  1. Switched from universal renderer to context and T proxy

    This commit discards Nikhil Saraf's older architecture based on the SolidJS
    universal renderer, in favor of his newer approach that looks more like Threlte:
    
    https://github.com/nksaraf/react-three-fiber/blob/chess-solid-three/solid-example/src/components/ModernPiece.tsx
    
    This approach uses context to maintain the scene graph, thus avoiding the need
    for the universal renderer, which adds build-time complexity and a layer (or two)
    of abstraction.  It also uses a "T" proxy object to instantiate the three.js objects
    and add them to the scene appropriately.
    
    Issues:
    
    The example seems to leave the canvas at some default size, rather than filling the
    viewport.
    
    This approach still has a dependency on "scheduler", an NPM package apparently
    created as a reusable React internal package.  We might consider replacing that.
    vorth committed Jun 14, 2023
    Configuration menu
    Copy the full SHA
    2ebd36f View commit details
    Browse the repository at this point in the history

Commits on Jul 15, 2023

  1. Configuration menu
    Copy the full SHA
    d21e331 View commit details
    Browse the repository at this point in the history
  2. (fix) comment out the resetting of raycasters

    unclear why this is being done in the first place.
    bigmistqke committed Jul 15, 2023
    Configuration menu
    Copy the full SHA
    b39ca50 View commit details
    Browse the repository at this point in the history
  3. (fix) extend state.events with events(store) instead of overwriting

    in core/events.ts the raycasting was checking for state.events.enabled, but this was being overwritten with events().
    bigmistqke committed Jul 15, 2023
    Configuration menu
    Copy the full SHA
    52a0c9f View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    408f92e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    0635783 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    bb43d12 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    5286bc6 View commit details
    Browse the repository at this point in the history
  8. refactor Subscription.ref as Callback instead of MutableRefObject<Cal…

    …lback>
    
    remove artefact from original useRef
    bigmistqke committed Jul 15, 2023
    Configuration menu
    Copy the full SHA
    97f08e0 View commit details
    Browse the repository at this point in the history
  9. refactor store.internal.lastEvent as DomEvent | null instead of Mutab…

    …leRefObject<DomEvent | null>
    
    remove artefact from original useRef
    bigmistqke committed Jul 15, 2023
    Configuration menu
    Copy the full SHA
    b7eb31c View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    e35ec9a View commit details
    Browse the repository at this point in the history
  11. cleanup solid/hooks

    bigmistqke committed Jul 15, 2023
    Configuration menu
    Copy the full SHA
    9638500 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    627b044 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    c1ec34a View commit details
    Browse the repository at this point in the history
  14. remove unused three-types

    bigmistqke committed Jul 15, 2023
    Configuration menu
    Copy the full SHA
    a128701 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    e56cb37 View commit details
    Browse the repository at this point in the history
  16. simplify vite.config.ts

    bigmistqke committed Jul 15, 2023
    Configuration menu
    Copy the full SHA
    5b02d6e View commit details
    Browse the repository at this point in the history
  17. remove pnpm-workspace.yaml

    bigmistqke committed Jul 15, 2023
    Configuration menu
    Copy the full SHA
    88c861d View commit details
    Browse the repository at this point in the history
  18. update pnpm-lock.yaml

    bigmistqke committed Jul 15, 2023
    Configuration menu
    Copy the full SHA
    8005d0f View commit details
    Browse the repository at this point in the history
  19. update example

    bigmistqke committed Jul 15, 2023
    Configuration menu
    Copy the full SHA
    3e951c8 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    4695314 View commit details
    Browse the repository at this point in the history

Commits on Jul 16, 2023

  1. Configuration menu
    Copy the full SHA
    465b32d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f8bc371 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5ac7857 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e603e86 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    b94981e View commit details
    Browse the repository at this point in the history
  6. (fix) update package.json

    bigmistqke committed Jul 16, 2023
    Configuration menu
    Copy the full SHA
    bef8dc0 View commit details
    Browse the repository at this point in the history
  7. add get()-back to get back typings for rootState

    circular dependency was causing type-errors
    bigmistqke committed Jul 16, 2023
    Configuration menu
    Copy the full SHA
    5854874 View commit details
    Browse the repository at this point in the history
  8. (fix) RangeError: Maximum Call Stack Size Exceeded-bug

    An endless effect was created by calling `props.onCreated` inside a useIsomorphicLayoutEffect.
    In the original r3f-code it is an IsomorphicLayoutEffect with empty dependency-array, but using onMount did not render any image.
    bigmistqke committed Jul 16, 2023
    Configuration menu
    Copy the full SHA
    c190f3c View commit details
    Browse the repository at this point in the history
  9. Remove useIsomorphicLayoutEffect in Provider

    I believe we can actually just remove the effect all together, since it originally in r3f never wanted to be re-run anyway.
    bigmistqke committed Jul 16, 2023
    Configuration menu
    Copy the full SHA
    9118b9f View commit details
    Browse the repository at this point in the history
  10. refactor src/index to src/renderer.ts

    `core/renderer` was containing code from the deleted `core/reconcile.ts` and a lot of unused code that we deleted in an earlier commit.
    The code responsible for rendering the THREE-scene was before this commit located in `solid/index.ts`.
    
    This commit
    - moves the types to three-types,
    - the rendering-code to `solid/renderer.ts`,
    - the empty `core/renderer.ts` is deleted and
    - `solid/index.ts` is now only responsible for exporting.
    bigmistqke committed Jul 16, 2023
    Configuration menu
    Copy the full SHA
    e0c058d View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    ea1f33f View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    c5686e4 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    afe1ddd View commit details
    Browse the repository at this point in the history
  14. (fix) rollback updated types Instance and InstanceProps

    I had updated `Instance` and `InstanceProps` in commit e0c058d when refactoring with the types of r3f v9 but they substantially changed the typings of Instance.
    bigmistqke committed Jul 16, 2023
    Configuration menu
    Copy the full SHA
    d6adc65 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    ca2f1fc View commit details
    Browse the repository at this point in the history
  16. cleanup exports

    bigmistqke committed Jul 16, 2023
    Configuration menu
    Copy the full SHA
    195d567 View commit details
    Browse the repository at this point in the history
  17. (fix) update package.json

    bigmistqke committed Jul 16, 2023
    Configuration menu
    Copy the full SHA
    2da6da7 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    1b275b6 View commit details
    Browse the repository at this point in the history
  19. (fix) uncomment useHelper

    bigmistqke committed Jul 16, 2023
    Configuration menu
    Copy the full SHA
    a6409f7 View commit details
    Browse the repository at this point in the history
  20. (cleanup) refactor exports

    bigmistqke committed Jul 16, 2023
    Configuration menu
    Copy the full SHA
    7bb666a View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    feb8ccf View commit details
    Browse the repository at this point in the history
  22. (cleanup) update .prettierrc

    .prettierrc before commit was containing the following line
    "plugins": ["prettier-plugin-tailwindcss"]
    this was causing prettier to not work when the plugin was not present, causing formatting errors throughout the code.
    
    I noticed we were using a different .prettierrc then r3f, this would cause unnecessary differences between the two codebases.
    To unify the codestyle of both, I copy+pasted r3f's .prettierrc and ran `prettier --write ./src` from root
    bigmistqke committed Jul 16, 2023
    Configuration menu
    Copy the full SHA
    e06a5b8 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    0a8ce78 View commit details
    Browse the repository at this point in the history
  24. replace our custom typing of the three-jsx with r3f's typing

    Our branch had custom typing of the jsx-nodes, but since then r3f implemented their own version of it, slightly more streamlined. To unify the codebases I replaced our typing with r3f's.
    bigmistqke committed Jul 16, 2023
    Configuration menu
    Copy the full SHA
    64a9b62 View commit details
    Browse the repository at this point in the history
  25. remove applyProps from core/utils in favor of solid/renderer

    Before commit there were two applyProps-implementations, one custom made and one from the original r3f-file.
    
    This commit adjusts the custom applyProps function by removing the call to `useThree` and replacing it with `getRootState()`. This way that function can also in the code before the Provider and we can remove r3f's implementation.
    bigmistqke committed Jul 16, 2023
    Configuration menu
    Copy the full SHA
    feb7727 View commit details
    Browse the repository at this point in the history
  26. (cleanup) renamed Klass to TSource and defaultProxy to T

    and re-written and moved the jsdoc comment for T
    bigmistqke committed Jul 16, 2023
    Configuration menu
    Copy the full SHA
    28e5b91 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    abb2239 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    4164a25 View commit details
    Browse the repository at this point in the history
  29. re-write useHelper with Accessor instead of createRef

    and remove `createRef`
    (I don't really know what useHelper is supposed to be doing tbh)
    bigmistqke committed Jul 16, 2023
    Configuration menu
    Copy the full SHA
    a61ccc4 View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    8a41df0 View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    0ef64a4 View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    9fbe8b0 View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    ed684bf View commit details
    Browse the repository at this point in the history
  34. (fix/cleanup) imports

    bigmistqke committed Jul 16, 2023
    Configuration menu
    Copy the full SHA
    2f4c30e View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    1f7aa65 View commit details
    Browse the repository at this point in the history
  36. rename core/components to core/proxy

    a bit of a subjective commit, but imo it reflects better the content and is a better parallel with r3f's `core/reconciler` what this file a replacement is off.
    bigmistqke committed Jul 16, 2023
    Configuration menu
    Copy the full SHA
    75aadb5 View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    c936cd2 View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    50209e7 View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    fc7b3f5 View commit details
    Browse the repository at this point in the history
  40. Configuration menu
    Copy the full SHA
    5733199 View commit details
    Browse the repository at this point in the history
  41. (fix) update ref-type

    bigmistqke committed Jul 16, 2023
    Configuration menu
    Copy the full SHA
    6b980a3 View commit details
    Browse the repository at this point in the history
  42. optimization applyProps

    Instead of `createRenderEffect(() => applyProps(instanceProps))` we now do `createRenderEffect(mapArray(() => Object.keys(instanceProps), ...)`.
    This way we don't have to loop and re-create effects every single time a prop changes.
    
    We also check if a prop has a getter or is a function. If they aren't we only set the property, otherwise we wrap it in an effect.
    bigmistqke committed Jul 16, 2023
    Configuration menu
    Copy the full SHA
    d2455e9 View commit details
    Browse the repository at this point in the history
  43. Configuration menu
    Copy the full SHA
    96f040d View commit details
    Browse the repository at this point in the history
  44. add TODO

    bigmistqke committed Jul 16, 2023
    Configuration menu
    Copy the full SHA
    719d593 View commit details
    Browse the repository at this point in the history
  45. Configuration menu
    Copy the full SHA
    8e87f48 View commit details
    Browse the repository at this point in the history

Commits on Jul 17, 2023

  1. Configuration menu
    Copy the full SHA
    42ed46a View commit details
    Browse the repository at this point in the history
  2. (cleanup) remove unused const store and tidy up

    use full names and use similar names as r3f
    remove DEBUG-logs
    bigmistqke committed Jul 17, 2023
    Configuration menu
    Copy the full SHA
    da80462 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    90eb26e View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    bfb542e View commit details
    Browse the repository at this point in the history
  5. (fix) automatic resizing of canvas

    r3f's code had a `store.subscribe(...)` in which they did a diff to check if they should update the camera. With solid we can just place them into a createEffect and let reactivity figure it out. Creates a flickering when resizing, idk if this is a regression or not.
    bigmistqke committed Jul 17, 2023
    Configuration menu
    Copy the full SHA
    8574968 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    88d765f View commit details
    Browse the repository at this point in the history
  7. (cleanup) useLoader

    Set cache to result instead of callback. In the original code the cache was set to the data and then directly afterwards to the async callback. onProgress is passed through.
    bigmistqke committed Jul 17, 2023
    Configuration menu
    Copy the full SHA
    9a6291c View commit details
    Browse the repository at this point in the history
  8. (fix) broken import

    and minor cleanup
    bigmistqke committed Jul 17, 2023
    Configuration menu
    Copy the full SHA
    7e0d9ec View commit details
    Browse the repository at this point in the history
  9. (refactor) our code to look more like v9 branch

    I copied the contents of r3f's `packages/fiber/src` and used the vscode-extension `Diff Folders` to compare the two directories and made changes so that these two directories look more alike.
    
    Maybe this could be a way forward: have a r3f-directory which contains a clone of `packages/fiber/src` and we manually update them.
    bigmistqke committed Jul 17, 2023
    Configuration menu
    Copy the full SHA
    2435313 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    ae0c42a View commit details
    Browse the repository at this point in the history

Commits on Jul 18, 2023

  1. Configuration menu
    Copy the full SHA
    7e31608 View commit details
    Browse the repository at this point in the history
  2. Update Instance-type to r3f's current v9 branch

    r3f refactored their internal typings of Instance during pmndrs/react-three-fiber#2465
    - before: Instance represented a THREE-object with additional parameters: __r3f: LocalState, children, remove, add and raycast
    - now: Instance: LocalState with additional parameter: object, props and children
        - object: is the THREE-object with additional parameter __r3f ( = a circular reference back to this Instance)
        - props contains the props of the component, without children and ref
        - children contain all the children of the component (before children only contained the attached children)
    bigmistqke committed Jul 18, 2023
    Configuration menu
    Copy the full SHA
    631dd4c View commit details
    Browse the repository at this point in the history
  3. update example

    bigmistqke committed Jul 18, 2023
    Configuration menu
    Copy the full SHA
    2d7293a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b509093 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    cd27d13 View commit details
    Browse the repository at this point in the history
  6. export Primitive

    bigmistqke committed Jul 18, 2023
    Configuration menu
    Copy the full SHA
    8451164 View commit details
    Browse the repository at this point in the history
  7. add path-alias to src

    bigmistqke committed Jul 18, 2023
    Configuration menu
    Copy the full SHA
    9794c76 View commit details
    Browse the repository at this point in the history
  8. (fix) set .needsUpdate to true if necessary

    if key is included in NEEDS_UPDATE
    and it changed from falsey to truthy or vice versa.
    NEEDS_UPDATE is possibly incomplete.
    bigmistqke committed Jul 18, 2023
    Configuration menu
    Copy the full SHA
    43f3b40 View commit details
    Browse the repository at this point in the history
  9. (fix) tsconfig playground

    bigmistqke committed Jul 18, 2023
    Configuration menu
    Copy the full SHA
    a72587f View commit details
    Browse the repository at this point in the history
  10. update playground

    bigmistqke committed Jul 18, 2023
    Configuration menu
    Copy the full SHA
    0bc91ef View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    acf8a4e View commit details
    Browse the repository at this point in the history
  12. (fix) Portal

    bigmistqke committed Jul 18, 2023
    Configuration menu
    Copy the full SHA
    3fded89 View commit details
    Browse the repository at this point in the history
  13. add RenderTarget-test

    bigmistqke committed Jul 18, 2023
    Configuration menu
    Copy the full SHA
    2632891 View commit details
    Browse the repository at this point in the history
  14. (refactor) update repo to pnpm workspace

    repo is now a pnpm workspace
    - packages: `@solid-three/fiber` and `@solid-three/drei` (just an empty folder for now)
    - apps: `@solid-three/playground`, we could add other apps later one if we want to
    
    the react-three-fiber directory is now moved to `references` and another git-submodule has been added there: `@react-three/drei`
    bigmistqke committed Jul 18, 2023
    Configuration menu
    Copy the full SHA
    318ed9a View commit details
    Browse the repository at this point in the history
  15. (fix) remove console.log

    bigmistqke committed Jul 18, 2023
    Configuration menu
    Copy the full SHA
    d3435b8 View commit details
    Browse the repository at this point in the history

Commits on Jul 19, 2023

  1. update playground

    bigmistqke committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    83387e6 View commit details
    Browse the repository at this point in the history
  2. (playground) update Tests and added Noop

    Noop displays a flaw in our current design:
    ```
    const Noop = () => {
      const box = <T.Mesh>...</T.Mesh>
      return <></>
    }
    ```
    will add box to its parent context even if it's not returning the jsx.
    bigmistqke committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    023908c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c034bd7 View commit details
    Browse the repository at this point in the history
  4. fiber: add utils/withContext

    a utility function to wrap children in context without having to use JSX.
    
    see solidjs-community/solid-primitives#464
    bigmistqke committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    ba231d3 View commit details
    Browse the repository at this point in the history
  5. fiber: create tree with props.children instead of getParent()-con…

    …text
    
    Our previous architecture had a design flaw as described 023908c
    ```
    const Noop = () => {
    const box = <T.Mesh>...</T.Mesh>
    return <></>
    }
    ```
    would add box to its parent, with or without returning the actual jsx.
    This was due to the fact that parent-child relationships were established from the child to the parent with context through the `getParent()`-hook.
    
    This commit changes the mechanism from child-to-parent to parent-to-child:
    By walking the children from the parent and then attaching/connecting these childs, with a function called `parentChildren`.
    This function is used when initializing scene too, the props.children are attached to the THREE.Scene with `parentChildren(() => instance, props)`
    
    Since this would mean that props
    bigmistqke committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    b6cbde4 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    55f5025 View commit details
    Browse the repository at this point in the history
  7. fiber: returntype of <T.Mesh/> is now Accessor<THREE.Mesh>

    Before `<T.Mesh/>` return `Accessor<Instance<THREE.Mesh>>` but I think for userland it would be handier if it returned `Accessor<THREE.Mesh>` instead.
    
    That way you could do
    ```
    const mesh = <T.Mesh />
    useFrame(() => mesh().rotation.x += 0.1)
    return mesh
    ```
    if you don't mind the type-error of `mesh()`
    bigmistqke committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    d63be7e View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    5db765c View commit details
    Browse the repository at this point in the history
  9. remove reference/drei and add new sub-module in packages/drei

    this sub-module is a reference to `https://github.com/bigmistqke/drei`. Once there is some progress in drei-port we could move it to `solid-community` too.
    bigmistqke committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    21c0e85 View commit details
    Browse the repository at this point in the history
  10. add utility-types

    utility-type-imports were causing issues when used in another directory inside the monorepo
    bigmistqke committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    91f8388 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    70a5db1 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    8dc1c02 View commit details
    Browse the repository at this point in the history
  13. fiber: update ref-types

    bigmistqke committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    133333f View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    cb0e27f View commit details
    Browse the repository at this point in the history

Commits on Aug 4, 2023

  1. Configuration menu
    Copy the full SHA
    6eb0be0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    fff24b5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d2743c8 View commit details
    Browse the repository at this point in the history
  4. fiber: add props-helpers

    bigmistqke committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    7f2c5c5 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    db5e2aa View commit details
    Browse the repository at this point in the history
  6. fiber: pass <Provider/> straight to children

    the memo was causing children to resolve each time it changed.
    bigmistqke committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    d20186a View commit details
    Browse the repository at this point in the history
  7. fiber: SolidThree namespace, remove Catalogue

    In favor for `SolidThree` namespace.
    r3f extends the global namespace of JSX.IntrinsicElements.
    In `solid-three` we do not extend the JSX-namespace, but `SolidThree` instead.
    bigmistqke committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    e36e435 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    4ba0820 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    1bcdd7e View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    41a7684 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    3e28948 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    a93ba8e View commit details
    Browse the repository at this point in the history

Commits on Aug 11, 2023

  1. Configuration menu
    Copy the full SHA
    43a1395 View commit details
    Browse the repository at this point in the history
  2. fiber: (fix) .getState

    leftover from zustand
    bigmistqke committed Aug 11, 2023
    Configuration menu
    Copy the full SHA
    e98207a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    eca5618 View commit details
    Browse the repository at this point in the history
  4. fiber: pass context.Provider directly into parentChildren

    instead of using `withContext`
    bigmistqke committed Aug 11, 2023
    Configuration menu
    Copy the full SHA
    b41519c View commit details
    Browse the repository at this point in the history
  5. fiber: delay useFrame with 1 frame

    this way 99% of all refs will be resolved by then.
    bigmistqke committed Aug 11, 2023
    Configuration menu
    Copy the full SHA
    3e88fd8 View commit details
    Browse the repository at this point in the history

Commits on Aug 13, 2023

  1. fiber: T.Suspense and createThreeResource

    Inconsistencies between `Suspense` implementation of `react` and `solid` caused `Suspense` to behave differently between `r3f` and `solid-three`:
    - in `r3f` a resource throws a promise, this way it is able to defer creation of three-elements until all resources were resolved
    - in `solid-three` only `createEffect` and `onMount` are deferred by suspense, and all elements are eagerly created
    
    Besides that `Suspense` was not behaving as expected, where each resource needed to be dealt with on a component-level too.
    
    This commit fixes `Suspense` and creates a custom `T.Suspense` and `createThreeResource`.
    The jsx-graph is walked eagerly, and resource-accesses trigger suspenses. This way waterfalls are prevented.
    When using `T.Suspense` and `createThreeResource` creation of three-elements are deferred until all resources are resolved.
    `createLoader`, and hereby all of `drei`'s loaders too, use `createThreeResource`
    bigmistqke committed Aug 13, 2023
    Configuration menu
    Copy the full SHA
    3c4aac3 View commit details
    Browse the repository at this point in the history
  2. fiber: update package.json

    bigmistqke committed Aug 13, 2023
    Configuration menu
    Copy the full SHA
    5517cec View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    546a309 View commit details
    Browse the repository at this point in the history

Commits on Aug 16, 2023

  1. fiber: update inject in Portal to be more in line with v8

    Before this commit we were only setting a handful of parameters in inject and letting the rest be set by `rootState`.
    This was causing bugs, p.ex in `GizmoHelperStories` from `drei`, where the camera of the `Portal` was being set by the `rootState`.
    We were missing a couple of loc to filter out the correct keys to inject.
    
    There is for sure a more performant, more solid-like way to merge the `rootState` and the `portalState`, which I will explore in a later commit.
    bigmistqke committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    5339214 View commit details
    Browse the repository at this point in the history
  2. fiber: AllConstructorParameters-typehelper to include overloaded Co…

    …nstructorParameters
    
    `ConstructorParameters` does not include overloaded constructors
    see microsoft/TypeScript#37079 and pmndrs/react-three-fiber#581
    `r3f`s solution is to special-case Color in v8 and solve it later for v9, because they faced some problems with the solution/hack described in the typescript github-issue
    The hack didn't seem to cause the same issues with us, so I implemented that instead.
    
    It's a manual union of overloaded methods, going up to 7 overloads, which is probably a bit of overkill.
    bigmistqke committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    526497a View commit details
    Browse the repository at this point in the history
  3. fiber: seperate IntrinsicElements and IntrinsicComponents

    Before commit we mirrored `r3f` `JSX.IntrinsicElements` with `SolidThree.IntrinsicElements`
    `IntrinsicElements` is an interface with the props as values.
    
    An earlier commit added `T.Suspense` and `T.Primitive` to the interface with `Primitive: Parameters<typeof Primitive<T>>[0]` but this didn't work nicely with the generic.
    To solve this I added `IntrinsicComponents` to the `SolidThree`-namespace, `Primitive: typeof Primitive` and then in `SolidThreeElements = { ...SolidThree.IntrinsicElements } & { ... SolidThree.IntrinsicComponents
    bigmistqke committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    51fa152 View commit details
    Browse the repository at this point in the history
  4. fiber: use onMount instead of useEffect in useFrame

    the subscription-function should only be called once, after suspension is resolved: `onMount` prevents accidental re-subscriptions.
    bigmistqke committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    56991db View commit details
    Browse the repository at this point in the history
  5. apps: add apps/fiber-example

    unported copy+paste from `r3f`
    bigmistqke committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    f500d14 View commit details
    Browse the repository at this point in the history
  6. update package.json and pnpm-lock.yaml

    add `build:drei` script
    bigmistqke committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    d010084 View commit details
    Browse the repository at this point in the history
  7. fiber: rename constructors and components to intrinsicElements

    …and `intrinsicComponents`
    bigmistqke committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    b9ae938 View commit details
    Browse the repository at this point in the history

Commits on Aug 17, 2023

  1. Configuration menu
    Copy the full SHA
    eb017ee View commit details
    Browse the repository at this point in the history
  2. fiber: add when-utility

    bigmistqke committed Aug 17, 2023
    Configuration menu
    Copy the full SHA
    4598af7 View commit details
    Browse the repository at this point in the history
  3. fiber: initial inspect-run

    Introduce an initial `inspect`-run in which we resolve children and props, but do not yet create the three-element, attach/connect the children or apply the props.
    This way any resource that is present in the new tree gets accessed and their respective `Suspense`s are activated.
    The children are resolved depth-first and are then created from the leafs back to the root, until they are finally added to the rest of the scene.
    
    see #12 (comment) for a more detailed description of the timeline of the components.
    bigmistqke committed Aug 17, 2023
    Configuration menu
    Copy the full SHA
    aa6ac70 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    44a51a6 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    408be4f View commit details
    Browse the repository at this point in the history
  6. fiber: fix types <T/>

    A regression happened with extending the SolidThree-namespace where it didn't recognize the newly added T-components.
    This was caused bc the type of `ThreeElements` was resolved when the namespace is empty.
    bigmistqke committed Aug 17, 2023
    Configuration menu
    Copy the full SHA
    a3c208f View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    581c2e8 View commit details
    Browse the repository at this point in the history

Commits on Aug 18, 2023

  1. Configuration menu
    Copy the full SHA
    17ec25c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0826bd5 View commit details
    Browse the repository at this point in the history
  3. candycrush: initial commit

    bigmistqke committed Aug 18, 2023
    Configuration menu
    Copy the full SHA
    46fb498 View commit details
    Browse the repository at this point in the history
  4. candycrush: update candycrush

    rotate matrix
    add envMap to gems
    bigmistqke committed Aug 18, 2023
    Configuration menu
    Copy the full SHA
    2db16aa View commit details
    Browse the repository at this point in the history
  5. fiber: getObject()?.dispose?.()

    was creating issues with drei's `<OrbitControls/>`
    bigmistqke committed Aug 18, 2023
    Configuration menu
    Copy the full SHA
    4bbd1ea View commit details
    Browse the repository at this point in the history

Commits on Aug 20, 2023

  1. tetris: initial commit

    bigmistqke committed Aug 20, 2023
    Configuration menu
    Copy the full SHA
    73e650a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f3374cf View commit details
    Browse the repository at this point in the history

Commits on Aug 27, 2023

  1. Configuration menu
    Copy the full SHA
    53f1bba View commit details
    Browse the repository at this point in the history
  2. fiber: add Portal to T

    bigmistqke committed Aug 27, 2023
    Configuration menu
    Copy the full SHA
    918b655 View commit details
    Browse the repository at this point in the history
  3. fiber: add get back to RootState

    a bit of a silly property, since with solid-store we can just access the store directly, but handy when porting.
    bigmistqke committed Aug 27, 2023
    Configuration menu
    Copy the full SHA
    9060ea1 View commit details
    Browse the repository at this point in the history
  4. fiber: preserve reactivity in props passed to configure

    Use solid's utility functions `mergeProps` and `splitProps` to compose arguments, instead of de-structuring and spreading.
    This way reactivity is preserved.
    bigmistqke committed Aug 27, 2023
    Configuration menu
    Copy the full SHA
    5a97dac View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    c5a6dfe View commit details
    Browse the repository at this point in the history
  6. fiber: eagerly create Portal instead of waiting for mount.

    still remnant of experiment with suspending creation in case of Suspense
    bigmistqke committed Aug 27, 2023
    Configuration menu
    Copy the full SHA
    1ee349d View commit details
    Browse the repository at this point in the history

Commits on Aug 28, 2023

  1. Configuration menu
    Copy the full SHA
    eb7df9a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4d3271d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4e8d951 View commit details
    Browse the repository at this point in the history
  4. workspace: add pnpm:devPreinstall

    bc npm lifecycles are the worst.
    bigmistqke committed Aug 28, 2023
    Configuration menu
    Copy the full SHA
    cece2b4 View commit details
    Browse the repository at this point in the history
  5. workspace: add build:packages and install:packages

    and add complex git-command copy+pasted from
    https://stackoverflow.com/a/62192503/4366929
    otherwise submodule's head would be detached
    after `git submodule update --remote --rebase`
    bigmistqke committed Aug 28, 2023
    Configuration menu
    Copy the full SHA
    785d163 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    c2ea975 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    6e2f607 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    ec73d4e View commit details
    Browse the repository at this point in the history
  9. workspace: rename pnpm:devPreinstall to prepare

    devPreinstall still created a bug where `apps/playground` would error
    bc it wasn't able to read the package.json of drei (although
    the submodule was already cloned)
    bigmistqke committed Aug 28, 2023
    Configuration menu
    Copy the full SHA
    8de30a3 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    fe73a7b View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    7115094 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    ba5d6d2 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    a9c6c22 View commit details
    Browse the repository at this point in the history
  14. playground: update example

    bigmistqke committed Aug 28, 2023
    Configuration menu
    Copy the full SHA
    10b64cd View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    b5316b7 View commit details
    Browse the repository at this point in the history
  16. race: add race-example

    bigmistqke committed Aug 28, 2023
    Configuration menu
    Copy the full SHA
    2211e4c View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    dffbb32 View commit details
    Browse the repository at this point in the history