-
-
Notifications
You must be signed in to change notification settings - Fork 164
feat: 140 on demand rendering #497
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
Conversation
|
TresCanvas now emits a <TresCanvas render-mode="on-demand" clear-color="#82DBC5" @render="onRender" > Maybe should we include an |
|
Hey! I'm having a look. Maybe I just need more context, but on a first read through, I'm wondering: For the (My mental representation of this functionality is "mark frame as dirty", so "invalidate" makes more intuitive sense to me than "advance".) Merging under ... can just chug right along. Whereas currently, I think we'd need to switch over the render mode, e.g.: |
|
Hi @andretchen0 thanks for the feedback. Honestly I had the same dilemma as you, I added the I think is because when you are When The That being said, maybe makes more sense to change function advance() {
if (rendererOptions.renderMode === 'manual') {
renderer.value.render(scene.value,camera.value)
}
else {
logWarning('`advance` can only be used when `renderMode` is set to `manual`')
}
}Regarding switching between render mode on the fly, do you see it as a common use-case? |
Gotcha. No problem. If other libraries are using a separate method, then maybe there's a good reason.
I don't see it as a common use case, but people are surprising! ;) |
|
Hi @andretchen0 and @Tinoooo, I'm currently facing some performance issues on the devtools (creating the scene graph and reactivity) because I'm sending an event to the devtools every time it renders. Should we set "on-demand" rendering as default? wdyt? |
|
Maybe a fourth mode would make sense, where the render stops, when the current tab/window is not active anymore. This would prevent the scene rendering in the background, eating up performance and draining the users battery. The It's also worth mentioning, that |
I'd prefer "always" as the default, if possible. "always" matches my starting assumption for how rendering works: always throw away the last frame and render a new frame. Assuming my understanding of "on-demand" is correct, I think I'd be confused if I e.g., wrote a shader and then found it wasn't updating consistently because it wasn't hooked to a prop. |
|
You are right, also, we would need to refactor practically the ecosystem to be on-demand first, like OrbitControls and such. Let's keep |
|
@thomasaull That is a brilliant idea, I would probably add it to one of the current states instead of a new one. ☝️ |
@andretchen0 @thomasaull @Tinoooo what do you think? Should we create a new rendering mode like |
Hmm, I could imagine use cases for all modes that you want to pause rendering in the background. If it were up to me I'd probably add another prop like |
Is this not the way (Fwiw, I mostly work on Cientos and I'm not familiar with a lot of the Tres internals, so maybe I'm not looking/tinkering in the right spot.) |
|
@andretchen0 good point, you are right, I just check how many times it renders when I change tab and it stopped. |
|
@andretchen0 @alvarosabu In my tests with |
Sounds handy to me. Maybe getting to big for this PR, but ...:
|
That's why I want to consider it. But I agree with you, maybe we should create a different ticket for it. @thomasaull or @andretchen0 would you be so kind as to create a feature request? @andretchen0 can we merge this on v4? |
Will do.
I'll have a look at the code later today. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job! Looks to me like everything's working. I wasn't able to break the functionality.
The comments are either typos or some code quality stuff that you can accept or ignore – I won't block the PR. It's been lingering long enough; I don't want to stand in the way.
| import { extend } from '../../core/catalogue' | ||
| import { useLogger } from '../useLogger' | ||
|
|
||
| export interface InternalState { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For future readability/understandability, can we make this more descriptive? It's linked to renderMode, so maybe renderModeState?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@andretchen0 if the name renderModeState is meant to add clarity that the property isn't just a static setting but potentially a reactive state that could change over time, then we should rename most of the properties inside the TresContext type to state, like controlsState and rendererState etc.
Imo being inside of the TresContext which is already a state implies its nature without the need to add extra verbosity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @alvarosabu
I'd be fine with dropping State off the end, as most variables are some sort of state. (But then the name renderMode will collide with the other renderMode.)
The current name – internalState – doesn't say anything about what the object is used for. Since it's about renderMode-stuff, I thought that'd make it more obvious to future readers.
But no problem leaving it as is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@andretchen0 True, internal doesn't give enough context. 🤔 Let's continue this exercise, then, what if we rename the InternalState to RenderState and add everything related to it inside?
export interface RenderState {
mode: Ref<'always' | 'on-demand' | 'manual'>
priority: Ref<number>
frames: Ref<number>
maxFrames: number
canBeInvalidated: ComputedRef<boolean>
invalidate: () => void
advance: () => void
}I think it would be cleaner.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good!
| * If set to 'always', the scene will be rendered every frame | ||
| */ | ||
| renderMode: Ref<'always' | 'on-demand' | 'manual'> | ||
| internal: InternalState |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like the type, can we make this field name more descriptive? Maybe renderModeState?
|
Hey, buddy @andretchen0 I refactored |
Hey! I think that's clearer than |
|
Way better |
* feat: 474 vue chrome devtools plugin (#479) * feat: vue chrome devtools * feat: editable scenes from devtools * chore(lint): fix lint errors * feat: highlight material * chore(lint): fix * chore: release v4.0.0-next.0 * feat: update to three `v160` and vue `v3.4` (#488) * fix(types): added `Object3DEventMap` to `Object3D` generics for point event handling (#491) * feat: 140 on demand rendering (#497) * feat: conditional rendering * chore: remove subscribe system * feat: on-demand automatic invalidation with prop changes * feat: invalidate once first when is `renderMode !== 'always'` * docs: performance page, on-demand rendering * chore: fix windowsize issue * chore(lint): fix maximum line length issues * feat: invalidate on-demand on window resize * feat: add advance method for manual mode * feat: fix manual first render with advance * docs: performance manual mode * docs: add badge with version * chore: correct typos and PR suggestions * chore: tell dont ask fix * feat: render state instead of internal * feat: remove default camera warning (#499) * feat: remove annoying defautl camera warning * chore: remove logWarning * feat: 492 set tone mapping default to acesfilmictonemapping (#498) * feat: set ACESFilmicToneMapping as default toneMapping * chore: usage of nullish coealescing operator instead of ternaries * feat: 516 localstate for custom renderer node instances instead of userdata (#522) * feat: conditional rendering * chore: remove subscribe system * feat: on-demand automatic invalidation with prop changes * feat: invalidate once first when is `renderMode !== 'always'` * docs: performance page, on-demand rendering * chore: fix windowsize issue * chore(lint): fix maximum line length issues * feat: invalidate on-demand on window resize * feat: add advance method for manual mode * feat: fix manual first render with advance * docs: performance manual mode * docs: add badge with version * chore: correct typos and PR suggestions * chore: tell dont ask fix * feat: render state instead of internal * feat: add __tres local state to nodeOps instances * feat: add context to root on instances localstate * feat: camera registration ops from node local state ctx * feat: event handling registration from localState of nodes * feature: disposable flag on node localstate * feat: remove userData from types * chore: remove unused import * fix(test): fake localstate `.__tres` on tests * fix(types): fix nodeOps instances localstate type * fix: camera aspect * Update orthographic camera aspect when screen size updates * Give user a "manual" flag to keep Tres from updating camera * feat: 503 conditional rendering of primitives (#514) * feat(nodeOps): switch instance logic for reactive `object` prop * chore: playground primitives with models * chore: fix linter * chore: fix tests and linters, primitive object is now reactive * chore: refactor instance swaping logic to overwrite set and copy properties * chore: tests * chore: remove console.log * chore: remove unused import watch * feat: add primitive conditional to patch object prop * fix: `nodeOps` is now a function (#579) * fix: `nodeOps` is now a function * chore(test): updated tests for `nodeOps` * chore: next package json version * chore: release v4.0.0-next.1 * fix: refactor nodeOps to return methods at the end of the function (#602) * fix: refactor nodeOps to return methods at the end of the function * chore: fix lint * chore: internal playground organisation (#601) * chore: new internal playground org and testing pages * chore: fix lint * chore: better styling of playground landing page * chore: lint * chore: deps update * chore: internal primitive model test playground * chore: fix lint * chore: release v4.0.0-next.2 * chore: misc routes * fix: do not change pierced props case (#608) * chore: lint fix * chore: problem with package version * chore: fix lint * chore: rebuild pnpm-lock * test(nodeOps): clean up tests * test(nodeOps): organize tests * test: add coverage plugin * test: add coverage to package.json script * test(nodeOps): improve test coverage * feat: devtools renderer improvements (#614) * feat: renderer programs when selecting scene on devtools * feat: renderer.info * chore: fix lint * docs: devtools update * chore: fix lint issues * feat(events)!: pointerevents manager and state (#529) * new file: playground/src/components/Box.vue new file: playground/src/pages/raycaster/Propogation.vue * Started work on interactive Event Propogation playground example modified: src/components/TresCanvas.vue * Import and use `useEventStore` * defineEmits for all expected pointer events so we may emit propogated events off of the canvasa modified: src/composables/index.ts new file: src/composables/useEventStore/index.ts * Started work on an event store. I'm not sure this counts as a store just yet * Wired up majority of pointer events * Added event propogation * Does not require using userData scene props or nodeOps for registering objects to scene modified: src/composables/useRaycaster/index.ts * Added new event listeners to power newly supported pointer events. We now check whole scene/children when calling intersectObjects. * Created new EventHooks for new events * Added `forceUpdate` function that allows for pointer-move events to work without mouth movement (good for when camera is moving but mouse is not) modified: src/core/nodeOps.ts * Added supported events to array so they don't get received as props * (temporarily) unhook current pointer event solution to iterate on useEventStore modified: src/utils/index.ts * Added Camel-to-kebab case util * Support multiple event listeners, add support for .stop event modifier * Set stopProgation variable to false by default, whoops * fix typo * fix: remove `createGlobalState` from `useEventStore`, allowing events to work while multiple TresCanvas' are being used * fix(perf): remove extraneous intersectObjects/getIntersects calls by moving intersects into a ref that is updated on pointer-move * chore(lint): fix lint issues * feat: enhance events manager to include duplicates checking, pointer-missed support, and forced updating Per file changelog: modified: playground/src/components/Box.vue * Added a pointer-missed handler for testing modified: playground/src/pages/TheBasic.vue * uses forceUpdate from EventManager to fire events even when the mouse hasn't moved modified: playground/src/pages/raycaster/Propagation.vue * Didn't mean to undo the lint changes, adds a pointer-missed event on the canvas for extra testing modified: src/components/TresCanvas.vue * Adds `pointer-missed` as possible event for canvas emits modified: src/composables/index.ts * Update export deleted: src/composables/useEventStore/index.ts * Rename `useEventStore` to `useTresEventManager` modified: src/composables/useRaycaster/index.ts * Check for empty intersects on hit test, wire up pointerMissed events eventHook * Fix forceUpdate to call onPointerMove instead of triggering an EventHook modified: src/composables/useTresContextProvider/index.ts * Add TresEventManager type new file: src/composables/useTresEventManager/index.ts * add onPointerMissed * create (de)registerPointerMissedObj methods so we can track objects in the scene listening to this event * Note: These are passed to nodeOps via TresContext * Implement duplicates checking for eventPropogation modified: src/core/nodeOps.ts * register/deregister pointerMissed objects * chore: lint * docs: new event docs * chore: fix lint * feat: enhance event object details and use in Box example to change material color. Add ability to force event system updates even when mouse hasn't moved. Enhance pointer-enter/leave events. Update types Box.vue * Added pointer-missed handler * set the materials flash color using the object coming off of the event instead of a ref UseRaycaster * Flesh out event details to include * all mouse event properties * intersections * tres camera * camera raycaster * source event * mouse position delta * stopPropagating stub * and unprojectedPoint (this needs work, cant get the math to work) UseTresContextProvider * Add TresEventManager type to TresContext useTresEventManager * Add forceUpdate method to allow apps to force an event system update even when the mouse hasnt moved * Add pointerMissed event * Properly implement pointer-enter/pointer-leave events * Before now, pointer-enter | leave were only called on first object in intersection, now we execute the events for all entered/left objects * Use stopPropagating property included on event object * chore: lint * chore: fix lint issues --------- Co-authored-by: alvarosabu <alvaro.saburido@gmail.com> * feat: 499 better memory management (#606) * chore: memory management playground * feat: recursively free cpu and gpu memory allocation on remove * chore: clumsy attempt to dispose on unmount * chore: lint fix * feat: remove scene root on disposal * chore: fix lint * docs: added disposal guide on `performance` docs * chore: fix lint * chore: type issues (#663) * fix: fix some internal types * chore: fix linters * fix: typescript issues on event manager * chore: release v4.0.0-rc.0 * fix: make on* callbacks settable (#672) * fix: make on- callbacks settable * test: test setting not calling * feat: 633 use loop (#673) * feat: createRenderLoop unique to context * feat: onLoop returns current state * feat: ensuring callback excecution with index order * feat: take control of render loop logic * docs: updated composable docs * feat: change error to deprecation warning towards v5 * chore: add link to new composable docs on deprecation warning * chore: remove depcreation warning of existing useRenderLoop * feat: `useFrame` and `useRender` instead of `onLoop` * chore: fix lint * feat: applied useFrame to directives * chore: fix lint * feat: `useUpdate` instead of `useFrame` and useRender pausing. * chore: testing fbo * feat: reserve index 1 for late-updates * chore: fix lint * feat: useLoop composable for the win * chore: change onLoop name for register * chore: unit tests for loop * chore: change order for registration to make index optional * chore: fix lint * feat: pauseRender and resumeRender * docs: useLoop guide * docs: updated basic animations recipe to `useLoop` * docs: correct pause render methods on docs * Update docs/api/composables.md Co-authored-by: Tino Koch <17991193+Tinoooo@users.noreply.github.com> * Update docs/api/composables.md Co-authored-by: Tino Koch <17991193+Tinoooo@users.noreply.github.com> * Update docs/api/composables.md Co-authored-by: Tino Koch <17991193+Tinoooo@users.noreply.github.com> * Update docs/api/composables.md Co-authored-by: Tino Koch <17991193+Tinoooo@users.noreply.github.com> * Update docs/api/composables.md Co-authored-by: Tino Koch <17991193+Tinoooo@users.noreply.github.com> * Update docs/api/composables.md Co-authored-by: Tino Koch <17991193+Tinoooo@users.noreply.github.com> * Update docs/api/composables.md Co-authored-by: Tino Koch <17991193+Tinoooo@users.noreply.github.com> * chore: refactor subscribers to `priorityEventHooks` * Update docs/api/composables.md Co-authored-by: Tino Koch <17991193+Tinoooo@users.noreply.github.com> * feat: just return `off` on the loop registration methods * docs: update docs to add `off` unregister callback method * feat: remove `v-rotate` * docs: added context warning for `v-always-look-at` * Update docs/api/composables.md Co-authored-by: Tino Koch <17991193+Tinoooo@users.noreply.github.com> * Update docs/api/composables.md Co-authored-by: Tino Koch <17991193+Tinoooo@users.noreply.github.com> * chore: remove leftover of isntance.provide * chore: remove subscribers from context * chore: abstract `wrapCallback` and move render loop register to `useRender` * chore: fix lint * chore: testing off * Revert "chore: abstract `wrapCallback` and move render loop register to `useRender`" This reverts commit 24cec65. * chore: return bound `off` method and use createPriorityEvent for render with defaultFn fallback * feat: deprecate and remove `vAlwaysLookAt` and `vRotate` BREAKING_CHANGE: Directives `vAlwaysLookAt` and `vRotate` due incompatibility with new `useLoop` and the refactor of the render loop logic. * feat: set context to loop to avoid wrapping the callbacks * feat: dispose render hook before taking over --------- Co-authored-by: Tino Koch <17991193+Tinoooo@users.noreply.github.com> * chore(playground): adding missing import and removing the directives that were deprecated * chore(playground): use new composable on animations * fix(utils): reorder object disposal to avoid issue with Helper `dispose` methods (#683) * chore: updated deps * chore: release v4.0.0-rc.1 * fix: manual rendering blank (#685) * fix: increate time to advance on manual mode * chore: correct playground * fix: 686 useloop callback state missing controls (#687) * fix(loop): take plain snapshots of ctx * fix: types for useloop * chore: lint * docs: add RectAreaLightHelper to vLightHelper docs * chore(deps): update deps 24-0-2024 * chore: release v4.0.0-rc.2 * fix: start loop if user calls useRenderLoop (#695) * docs: change motivation * chore(deps): last update before release --------- Co-authored-by: Peter <petermoldovia@yahoo.ca> Co-authored-by: Garrett Walker <garbwalk@gmail.com> Co-authored-by: Tino Koch <17991193+Tinoooo@users.noreply.github.com> Co-authored-by: Jaime Torrealba <solucionesinformaticasjtc@gmail.com> Co-authored-by: Jaime A Torrealba C <63722373+JaimeTorrealba@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* docs: add user input config docs
* feat: add camera recognition for default props setup
* chore(docs): change example
* fix: add support for camera prop
* chore: rename camera-controls export
* refactor(tools): Fix some eslint issues
* chore: new tres eslint
* feat(cientos/positional-audio): delete medias, modifications doc
* chore: fix lint
* chore: fix lint
* chore(ci): updated node version to 18 for eslint v9
* chore(ci): updated lockfile
* feat(cientos/positional-audio): improved code and documentation
* feat(Fit): add component, playground, demo
* feat(cientos/positional-audio): improve documentation
* feat(cientos/positional-audio): improve documentation
* feat(cientos/positional-audio): improve documentation
* feat(cientos/positional-audio): improve documentation
* refactor(Fit): clarity
* chore(Fit): add instance to defineExpose
* chore: run linter
* chore: fix linter errors
* chore(lightformer): remove defineProps import
* refactor(Levioso): make speed prop optional
* docs: add component list grid view to /guide
* chore: guard against overzealous md/jsdoc linting
* feature: add `local` props
* feat(docs): add local prop to docs
* fix(type): correct the east description
* chore: lint
* docs: add component-list page
* chore: rename component-list to components
* fix(docs): better description
* chore(deps): update deps (#405)
* chore(tools): Update deps
* chore: Fix lints
* chore(deps): update deps in playground and docs
* chore: linter jsdoc issue
* Update bug_report.yml reproduction link (#99)
* Update lint.yml node version to 18 (#100)
* chore: new eslint flat config (#101)
* chore: new eslint flat config
* chore: update node version on lint action
* chore(deps): update core v3.9.0 (#102)
* chore: release v2.1.2
* chore: release v3.9.0 bump
* docs: remove cientos props table (#412)
* docs: change props tables to HTML/markdown
* docs: remove CientosPropsTable component
* docs: remove CientosPropsTable dep from pnpm-lock
* docs: added `backticks` to component names on docs to avoid recursion
---------
Co-authored-by: alvarosabu <alvaro.saburido@gmail.com>
* feat: added exception to rule `vue/attribute-hyphenation`
* chore: fix my own lint
* chore(deps): update deps
* chore: peer eslint 9
* refactor: add rule for hyphenation to the right place
* chore: lint fix
* fix: import correct flatconfig type
* chore: fix lint
* chore: release v1.1.0
* fix: vue attrs hyphenation issues
* fix(SkyDemo): value.value -> value
* feat: Add cylinder component
* add cylinder component + docs
* feat: update to core v4 (#104)
* feat: update to core v4
* chore: devtools tweaks
* fix: augmenting types from `@tresjs/core`
* chore: release v3.0.0-beta.0
* fix: update core to v4.0.2 for performance issues
* chore: release v3.0.0-beta.1
* chore: deps update
* chore: release v3.0.0
* fix(deps): updated deps (#109)
* chore: release v3.0.1
* fix(deps): updated to core v4.2 (#115)
* fix(deps): updated to core v4.2
* chore(ci): updated node version to 20
* chore: fix lint
* chore: fix build
* chore: fix lint
* chore: release v3.0.2
* fix: update deps
* chore: release v3.0.3
* feat: V4 (#420)
* feat(AnimatedSprite): add AnimatedSprite, playground, docs
* chore(AnimatedSprite): fix linter errors
* chore(AnimatedSprite): update docs
* feat(AnimatedSprite): allow [numCols, numRows] as atlas prop
* docs(AnimatedSprite): reorder sections, improve clarity
* docs(AnimatedSprite): format type names
* docs(AnimatedSprite): update no-atlas example to use [cols, rows]
* chore(AnimatedSprite): run linter, remove console.log
* refactor(AnimatedSprite): create new animation frames if props.reversed is toggled
* docs(AtlasAnimationDefinitionParser): change 'delay' to 'duration'
* refactor(AtlasAnimationDefinitionParser): make parse function private to module
* refactor(AtlasAnimationDefinitionParser): use destructuring
* refactor(AtlasAnimationDefinitionParser): use destructuring
* refactor(AtlasAnimationDefinitionParser): rename returned value 'result'
* chore: run linter
* refactor(AtlasAnimationDefinitionParser): rename private error logging functions
* refactor(Atlas): rename private functions
* fix(Atlas): add missing argument to function call
* refactor(AnimatedSprite): merge FrameData types as single type
* refactor(AnimatedSprite): change callbacks to emits
* chore(AnimatedSprite): run linter
* chore(AnimatedSprite): format Atlas error message
* fix(AnimatedSprite): return nullFrame animation if requested animation not found
* refactor(AnimatedSprite): simplify component onLoop
* chore(AnimatedSprite): run lint --fix
* refactor(AnimatedSprite): add Atlasish type
* refactor(AnimatedSprite): remove onLoad prop
* feat(app)!: 227 Change the keyboardcontrols implementation
* docs(AnimatedSprite): update docs and demos
* docs(AnimatedSprite): update playground demo
* refactor(AnimatedSprite): remove TresSprite
* refactor(AnimatedSprite): rename prop, anchor -> center
* refactor(AnimatedSprite): remove asSprite prop, improve clarity
* docs(AnimatedSprite): update docs
* refactor(AnimatedSprite): update playground
* refactor(AnimatedSprite): rename 'page' -> 'atlas'
* refactor(AnimatedSprite): make definitions reactive
* feat(AnimatedSprite): change default fps
* docs(AnimatedSprite): mark props as 'not reactive'
* feat(AnimatedSprite): always emit last frame name on loop and on end
* docs(AnimatedSprite): correct and update docs/demos
* chore(AnimatedSprite): run linter
* docs(AnimatedSprite): improve wording
* feat: add arrow keys support
* refactor(AnimatedSprite): improve variable name
* refactor(AnimatedSprite): use degrees instead of radians in example
* chore(AnimatedSprite): fix linter errors
* refactor(app)!: 349 Remove directives from cientos
* docs(app): 227 Add documentation for new KeyboardControls
* feat(app): 227 Final details, ready to go
* refactor: move in the right position a piece of code
* chore: update core to `v4`
* chore: release v4.0.0-next.0
* fix(MeshReflectionMaterial)!: add features/docs, reorganize
* feat(AnimatedSprite): add asSprite prop
* feat(AnimatedSprite): dispose texture onUnmounted
* feat(AnimatedSprite): remove explicit click event
* feat(AnimatedSprite): remove unnecessary Suspense
* docs(AnimatedSprite): add asSprite control to demo
* docs(AnimatedSprite): update demo code line highlights
* docs(AnimatedSprite): update atlas path, image names
* refactor: defineExpose
* refactor: change value.value -> value.instance in defineExpose
* fix: uncomment section
* refactor(app): 160 Add Global audio, stats, statsGl
* refactor: remove extra semi-colon, lint issue
* chore: Fix Lint (console.logs should be disabled in playground)
* chore: update lint
* chore: fix lints
* chore: fix demos
* chore: fix lint
* feat(app): 421 Adapt components to use useLoop instead of useRenderLoop
* Revert "feat(app): 421 Adapt components to use useLoop instead of useRenderLoop"
This reverts commit 24e98122131cc523f41f3907b6077cd57684edf7.
* feat(app): 421 Update components to use useLoop instead of useRenderLoop
* chore: update statsGl y stats
* fix lint
* chore: update useEnviroment
* chore: update fbo
* chore: lint
* feat: re-remove tweakpane (#425)
* feat(app)!: 313 re-uninstall tweakpane
* chore: fix lint
* docs: update enviroment and useEnviroment docs
* fix: remove hardcoded speed number, that setting at 0 doesn't stop the effect
* update lock
* chore: add Cylinder to v4 (#439)
* chore: add Cylinder to v4
* chore: fix playground link
* fix(Lensflare demo): add camera #435 (#441)
* feat: update to core v4.2
* chore(ci): update node version to 20 for linting
* chore: fix lints
* feat: 423 enable on demand render mode usage (#436)
* chore(deps): update deps to latest
* chore: on demand invalidation composable with prop change detection
* feat: on-demand orbit-controls
* feat: on-demand camera controls
* feat: invalidate also on autoRotate
* feat: on-demand map controls and refactor
* feat: on-demand transform controls
* feat: on-demand keyboard controls
* feat: on-demand keybaord controls
* chore: added demo suffix to control pages to avoid confusions
* feat: on-demand pointer lock controls
* feat: on-demand scroll controls
* feat: on-demand levioso
* feat: correct orbit controls auto rotate invalidation
* feat: on-demand text3d
* feat: on-demand mouse-parallax
* feat: on-demand fbo and size watcher refactor
* chore(playground): refactor to use useLoop and sub components
* chore: remove unused import for lint fix
* chore(playground): refactor lensflare demo to use useLoop
* feat: on-demand sampler
* feat: on-demand invaldiation on reflector prop change
* chore: added render activity graph and try to make on-demand work on AnimatedSprite
* chore: renamed positional audio demo
* chore: on-demand smoke
* feat: on-demand precipitation
* feat: on-dermand stars
* feat: on-demand Environment
* feat: on-demand sky
* feat: on-demand Ocean component
* chore: testing on-demand on fit
* feat: on-demand Wobble Material
* feat: on-demand invalidation holographic material
* feat: on-demand reflection material
* feat: on-demand custom shader material
* chore: rename bakeshadows demo
* chore: misc route
* chore: ci, update action setup
* docs: add migration guide from v3 in cientos (to do grammar check, ad… (#428)
* docs: add migration guide from v3 in cientos (to do grammar check, add img)
* docs: grammar corrections
* fix lint
* docs: rename migration-guide.md -> migrating-from-v3.md
* docs: update wording/formatting
---------
Co-authored-by: Peter <petermoldovia@yahoo.ca>
* fix(types): fixed types generics for `useGLTF` (#448)
* feat(app): Add the option for x and y in mouseparallax component (#444)
* feat(app): Add the option for x and y in mouseparallax component
* fix reactivity, grammar corrections
* change ref for shallowRef
* chore: release v4.0.0-next.1
* docs(SVG): set playground render-mode to on-demand
* refactor(HolographicMaterial): remove useOnDemandInvalidation, use invalidate
* refactor(CustomShaderMaterial): remove useOnDemandInvalidated, use invalidate
* refactor(MeshReflectionmaterial): remove useOnDemandInvalidated, use invalidate
* refactor: call invalidate on props update
* docs: add on-demand shapes playground demo
* fix: reimplement ContactShadows for v4 (#449)
* chore(deps): update deps to latest
* chore: on demand invalidation composable with prop change detection
* feat: on-demand orbit-controls
* feat: on-demand camera controls
* feat: invalidate also on autoRotate
* feat: on-demand map controls and refactor
* feat: on-demand transform controls
* feat: on-demand keyboard controls
* feat: on-demand keybaord controls
* chore: added demo suffix to control pages to avoid confusions
* feat: on-demand pointer lock controls
* feat: on-demand scroll controls
* feat: on-demand levioso
* feat: correct orbit controls auto rotate invalidation
* feat: on-demand text3d
* feat: on-demand mouse-parallax
* feat: on-demand fbo and size watcher refactor
* chore(playground): refactor to use useLoop and sub components
* chore: remove unused import for lint fix
* chore(playground): refactor lensflare demo to use useLoop
* feat: on-demand sampler
* feat: on-demand invaldiation on reflector prop change
* chore: added render activity graph and try to make on-demand work on AnimatedSprite
* chore: renamed positional audio demo
* chore: on-demand smoke
* feat: on-demand precipitation
* feat: on-dermand stars
* feat: on-demand Environment
* feat: on-demand sky
* feat: on-demand Ocean component
* chore: testing on-demand on fit
* feat: on-demand Wobble Material
* feat: on-demand invalidation holographic material
* feat: on-demand reflection material
* feat: on-demand custom shader material
* chore: rename bakeshadows demo
* chore: misc route
* chore: ci, update action setup
* chore: update Tres core
* fix: reimplement ContactShadows for v4 core
* docs: change link name
* fix(ContactShadows): add invalidate to updates
---------
Co-authored-by: alvarosabu <alvaro.saburido@gmail.com>
* feat(Sparkles): invalidate on update (#446)
* feat(Sparkles): invalidate on update
* chore: fix linter error
* refactor(Sparkles): remove renderMode predicate before invalidate
* chore: remove on demand composable (#452)
* chore: remove `useOnDemandInvalidation` on Levioso
* chore: remove composable `useOnDemandInvalidation`
* chore: remove composable from Ocean
* chore: remove composable on Precipitation
* chore: remove composable from sky
* chore: remove from Fit
* chore: remove from smoke
* chore: remove from orbit-controls
* chore: remove composable from Text3D
* chore: remove from mouse parallax
* chore: remove composable from Reflector
* chore: only needed fbo invalidation
* chore: remove composable from useSurfaceSampler
* chore: remove composable from all controls
* chore: add invalidation on loop
* chore: remove prop speed check on loop for Levioso
* chore: remove invalidateOnDemand on MapControls
* chore: remove `invalidateOnDemand` from Keyboard controls
* chore: add invalidate on fit method, remove watch props
* chore: invalidation refactor leftovers
* chore(types): fixes some type issues
* fix: update to core v4.2.2 to remove warning on invalidation
* chore: fix lint
* chore: release v4.0.0-rc.0
* feat(fbo): add autoRender flag as an option to useFBO (#458)
This PR adds an `autoRender` flag to `FBOOptions`.
This flag allows consumers of `useFBO` who want to take control of when
and where to render the render target instead of always rendering it
with the default scene and camera.
Co-authored-by: Alvaro Saburido <alvaro.saburido@gmail.com>
* chore: fix lint
* chore: release v4.0.0-rc.1
* docs: added recipe for tweakpane to migration guides
* chore(playground): added same scale as default
* chore: release v4.0.0-rc.2
* chore: linter fix
* chore: update deps to fix docs build
* fix: typescript issues (#459)
* fix: type assertion for props as params of `normalizeVectorFlexibleParam`
* fix: type assertion on camera and pointerlock controls
* refactor(BlurPass): fix TS errors
* refactor(SVG): fix TS errors
* refactor(Lensflare): fix TS errors
* refactor(Reflector): silence and explain TS error
* refactor(HolographicMaterial): add declaration for clock
* refactor(MeshWobbleMaterial): fix TS error
* fix(useProgress): remove extraneous, unused argument
* chore(types): fixed gradient type issue from core
* fix(types): controls types
* chore(types): fix loaders types
* chore(types): HTML
* chore(types): improve occlude type on HTML
* refactor(environment)!: properly type and return texture ref
BREAKING CHANGE: `useEnvironment` now returns a ref with the texture instead of an object { texture }
* chore(types): HTML, backdrop and Sparkles type issues
* chore(types): correct occlusion types without the refs
* fix(transform-controls): fps drops due prop watcher for invalidation
* chore: type issues on transform controls
---------
Co-authored-by: Peter <petermoldovia@yahoo.ca>
* fix: AnimatedSprite (#464)
* fix: remove explicit fallthrough attr attachment
* fix: remove infinite loop
* docs: move click from canvas to object
* docs: convert props table to HTML
* docs: rephrase
* chore: deps update
* chore: update deps
* ci: update lint action
* chore: fix lint
* chore: fix lint
* chore: lint issues
* chore: lint remove whitespaces
* chore: lint
---------
Co-authored-by: Peter <petermoldovia@yahoo.ca>
Co-authored-by: alvarosabu <alvaro.saburido@gmail.com>
Co-authored-by: Chau Tran <nartc7789@gmail.com>
* chore: release v4.0.0
* chore(deps): updates (#123)
* chore: release v3.0.4
* docs(app): Improve docs examples with code group to avoid confusion (#463)
* feat(AnimatedSprite): add AnimatedSprite, playground, docs
* chore(AnimatedSprite): fix linter errors
* chore(AnimatedSprite): update docs
* feat(AnimatedSprite): allow [numCols, numRows] as atlas prop
* docs(AnimatedSprite): reorder sections, improve clarity
* docs(AnimatedSprite): format type names
* docs(AnimatedSprite): update no-atlas example to use [cols, rows]
* chore(AnimatedSprite): run linter, remove console.log
* refactor(AnimatedSprite): create new animation frames if props.reversed is toggled
* docs(AtlasAnimationDefinitionParser): change 'delay' to 'duration'
* refactor(AtlasAnimationDefinitionParser): make parse function private to module
* refactor(AtlasAnimationDefinitionParser): use destructuring
* refactor(AtlasAnimationDefinitionParser): use destructuring
* refactor(AtlasAnimationDefinitionParser): rename returned value 'result'
* chore: run linter
* refactor(AtlasAnimationDefinitionParser): rename private error logging functions
* refactor(Atlas): rename private functions
* fix(Atlas): add missing argument to function call
* refactor(AnimatedSprite): merge FrameData types as single type
* refactor(AnimatedSprite): change callbacks to emits
* chore(AnimatedSprite): run linter
* chore(AnimatedSprite): format Atlas error message
* fix(AnimatedSprite): return nullFrame animation if requested animation not found
* refactor(AnimatedSprite): simplify component onLoop
* chore(AnimatedSprite): run lint --fix
* refactor(AnimatedSprite): add Atlasish type
* refactor(AnimatedSprite): remove onLoad prop
* feat(app)!: 227 Change the keyboardcontrols implementation
* docs(AnimatedSprite): update docs and demos
* docs(AnimatedSprite): update playground demo
* refactor(AnimatedSprite): remove TresSprite
* refactor(AnimatedSprite): rename prop, anchor -> center
* refactor(AnimatedSprite): remove asSprite prop, improve clarity
* docs(AnimatedSprite): update docs
* refactor(AnimatedSprite): update playground
* refactor(AnimatedSprite): rename 'page' -> 'atlas'
* refactor(AnimatedSprite): make definitions reactive
* feat(AnimatedSprite): change default fps
* docs(AnimatedSprite): mark props as 'not reactive'
* feat(AnimatedSprite): always emit last frame name on loop and on end
* docs(AnimatedSprite): correct and update docs/demos
* chore(AnimatedSprite): run linter
* docs(AnimatedSprite): improve wording
* feat: add arrow keys support
* refactor(AnimatedSprite): improve variable name
* refactor(AnimatedSprite): use degrees instead of radians in example
* chore(AnimatedSprite): fix linter errors
* refactor(app)!: 349 Remove directives from cientos
* docs(app): 227 Add documentation for new KeyboardControls
* feat(app): 227 Final details, ready to go
* refactor: move in the right position a piece of code
* chore: update core to `v4`
* chore: release v4.0.0-next.0
* fix(MeshReflectionMaterial)!: add features/docs, reorganize
* feat(AnimatedSprite): add asSprite prop
* feat(AnimatedSprite): dispose texture onUnmounted
* feat(AnimatedSprite): remove explicit click event
* feat(AnimatedSprite): remove unnecessary Suspense
* docs(AnimatedSprite): add asSprite control to demo
* docs(AnimatedSprite): update demo code line highlights
* docs(AnimatedSprite): update atlas path, image names
* refactor: defineExpose
* refactor: change value.value -> value.instance in defineExpose
* fix: uncomment section
* refactor(app): 160 Add Global audio, stats, statsGl
* refactor: remove extra semi-colon, lint issue
* chore: Fix Lint (console.logs should be disabled in playground)
* chore: update lint
* chore: fix lints
* chore: fix demos
* chore: fix lint
* feat(app): 421 Adapt components to use useLoop instead of useRenderLoop
* Revert "feat(app): 421 Adapt components to use useLoop instead of useRenderLoop"
This reverts commit 24e98122131cc523f41f3907b6077cd57684edf7.
* feat(app): 421 Update components to use useLoop instead of useRenderLoop
* chore: update statsGl y stats
* fix lint
* chore: update useEnviroment
* chore: update fbo
* chore: lint
* feat: re-remove tweakpane (#425)
* feat(app)!: 313 re-uninstall tweakpane
* chore: fix lint
* docs: update enviroment and useEnviroment docs
* fix: remove hardcoded speed number, that setting at 0 doesn't stop the effect
* update lock
* chore: add Cylinder to v4 (#439)
* chore: add Cylinder to v4
* chore: fix playground link
* fix(Lensflare demo): add camera #435 (#441)
* feat: update to core v4.2
* chore(ci): update node version to 20 for linting
* chore: fix lints
* feat: 423 enable on demand render mode usage (#436)
* chore(deps): update deps to latest
* chore: on demand invalidation composable with prop change detection
* feat: on-demand orbit-controls
* feat: on-demand camera controls
* feat: invalidate also on autoRotate
* feat: on-demand map controls and refactor
* feat: on-demand transform controls
* feat: on-demand keyboard controls
* feat: on-demand keybaord controls
* chore: added demo suffix to control pages to avoid confusions
* feat: on-demand pointer lock controls
* feat: on-demand scroll controls
* feat: on-demand levioso
* feat: correct orbit controls auto rotate invalidation
* feat: on-demand text3d
* feat: on-demand mouse-parallax
* feat: on-demand fbo and size watcher refactor
* chore(playground): refactor to use useLoop and sub components
* chore: remove unused import for lint fix
* chore(playground): refactor lensflare demo to use useLoop
* feat: on-demand sampler
* feat: on-demand invaldiation on reflector prop change
* chore: added render activity graph and try to make on-demand work on AnimatedSprite
* chore: renamed positional audio demo
* chore: on-demand smoke
* feat: on-demand precipitation
* feat: on-dermand stars
* feat: on-demand Environment
* feat: on-demand sky
* feat: on-demand Ocean component
* chore: testing on-demand on fit
* feat: on-demand Wobble Material
* feat: on-demand invalidation holographic material
* feat: on-demand reflection material
* feat: on-demand custom shader material
* chore: rename bakeshadows demo
* chore: misc route
* chore: ci, update action setup
* docs: add migration guide from v3 in cientos (to do grammar check, ad… (#428)
* docs: add migration guide from v3 in cientos (to do grammar check, add img)
* docs: grammar corrections
* fix lint
* docs: rename migration-guide.md -> migrating-from-v3.md
* docs: update wording/formatting
---------
Co-authored-by: Peter <petermoldovia@yahoo.ca>
* fix(types): fixed types generics for `useGLTF` (#448)
* feat(app): Add the option for x and y in mouseparallax component (#444)
* feat(app): Add the option for x and y in mouseparallax component
* fix reactivity, grammar corrections
* change ref for shallowRef
* chore: release v4.0.0-next.1
* docs(SVG): set playground render-mode to on-demand
* refactor(HolographicMaterial): remove useOnDemandInvalidation, use invalidate
* refactor(CustomShaderMaterial): remove useOnDemandInvalidated, use invalidate
* refactor(MeshReflectionmaterial): remove useOnDemandInvalidated, use invalidate
* refactor: call invalidate on props update
* docs: add on-demand shapes playground demo
* fix: reimplement ContactShadows for v4 (#449)
* chore(deps): update deps to latest
* chore: on demand invalidation composable with prop change detection
* feat: on-demand orbit-controls
* feat: on-demand camera controls
* feat: invalidate also on autoRotate
* feat: on-demand map controls and refactor
* feat: on-demand transform controls
* feat: on-demand keyboard controls
* feat: on-demand keybaord controls
* chore: added demo suffix to control pages to avoid confusions
* feat: on-demand pointer lock controls
* feat: on-demand scroll controls
* feat: on-demand levioso
* feat: correct orbit controls auto rotate invalidation
* feat: on-demand text3d
* feat: on-demand mouse-parallax
* feat: on-demand fbo and size watcher refactor
* chore(playground): refactor to use useLoop and sub components
* chore: remove unused import for lint fix
* chore(playground): refactor lensflare demo to use useLoop
* feat: on-demand sampler
* feat: on-demand invaldiation on reflector prop change
* chore: added render activity graph and try to make on-demand work on AnimatedSprite
* chore: renamed positional audio demo
* chore: on-demand smoke
* feat: on-demand precipitation
* feat: on-dermand stars
* feat: on-demand Environment
* feat: on-demand sky
* feat: on-demand Ocean component
* chore: testing on-demand on fit
* feat: on-demand Wobble Material
* feat: on-demand invalidation holographic material
* feat: on-demand reflection material
* feat: on-demand custom shader material
* chore: rename bakeshadows demo
* chore: misc route
* chore: ci, update action setup
* chore: update Tres core
* fix: reimplement ContactShadows for v4 core
* docs: change link name
* fix(ContactShadows): add invalidate to updates
---------
Co-authored-by: alvarosabu <alvaro.saburido@gmail.com>
* feat(Sparkles): invalidate on update (#446)
* feat(Sparkles): invalidate on update
* chore: fix linter error
* refactor(Sparkles): remove renderMode predicate before invalidate
* chore: remove on demand composable (#452)
* chore: remove `useOnDemandInvalidation` on Levioso
* chore: remove composable `useOnDemandInvalidation`
* chore: remove composable from Ocean
* chore: remove composable on Precipitation
* chore: remove composable from sky
* chore: remove from Fit
* chore: remove from smoke
* chore: remove from orbit-controls
* chore: remove composable from Text3D
* chore: remove from mouse parallax
* chore: remove composable from Reflector
* chore: only needed fbo invalidation
* chore: remove composable from useSurfaceSampler
* chore: remove composable from all controls
* chore: add invalidation on loop
* chore: remove prop speed check on loop for Levioso
* chore: remove invalidateOnDemand on MapControls
* chore: remove `invalidateOnDemand` from Keyboard controls
* chore: add invalidate on fit method, remove watch props
* chore: invalidation refactor leftovers
* chore(types): fixes some type issues
* fix: update to core v4.2.2 to remove warning on invalidation
* chore: fix lint
* chore: release v4.0.0-rc.0
* feat(fbo): add autoRender flag as an option to useFBO (#458)
This PR adds an `autoRender` flag to `FBOOptions`.
This flag allows consumers of `useFBO` who want to take control of when
and where to render the render target instead of always rendering it
with the default scene and camera.
Co-authored-by: Alvaro Saburido <alvaro.saburido@gmail.com>
* chore: fix lint
* chore: release v4.0.0-rc.1
* docs: added recipe for tweakpane to migration guides
* chore(playground): added same scale as default
* chore: release v4.0.0-rc.2
* chore: linter fix
* chore: update deps to fix docs build
* docs(app): Improve docs examples with code group to avoid confusion
* fix: change name to the async components
---------
Co-authored-by: Peter <petermoldovia@yahoo.ca>
Co-authored-by: alvarosabu <alvaro.saburido@gmail.com>
Co-authored-by: Chau Tran <nartc7789@gmail.com>
* feat: update to `@antfu/estlint-config` v3
* chore: release v1.2.0
* fix(deps): update dependency @tresjs/core to v4.2.7 (#466)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* fix: adapt to changes on useloader for Cube Textures (#476)
* chore(playground): move playground to `playground/vue` folder
* chore(playground-nuxt): added reproduction playground with nuxt
* fix(useEnvironment): adapt to changes on useLoader for Cube textures
* chore: fix lint
* chore: fix ci lock
* chore: fix lint
* chore: fix lint
* chore: remove nuxt playground .github
* chore(playground): remove nuxt playground that is breaking the installs here
* chore: remove deps from nuxt playground
* chore: release v4.0.1
* fix: useEnvironment issue in nuxt
* chore: fix lint
* chore: release v3.0.5
* fix(useGltf): use-loader fix for gltf with textures (#480)
* chore: release v4.0.2
* fix(deps): update dependency @tresjs/core to v4.2.9 (#126)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* chore: release v3.0.6
* fix(deps): update to core v4.2.10
* fix: update lock
* chore: lint fix
* chore: release v3.0.7
* feat: perfectionist/sort-imports
* chore: release v1.3.0
* chore: perfectionist lint fixes (#484)
* fix(deps): update dependency @tresjs/core to v4.2.10 (#479)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* chore(ci): automerge renovate branches minors and patches (#483)
* ci: add pkg.pr.new
* chore(ci): automerge renovate branches minors and patches (#131)
* ci: add `pkg.pr.new` (#132)
* ci: add `pkg.pr.new`
* ci: lint workflow
* ci: use prepack instead
* chore(deps): update dependency @tresjs/eslint-config to v1.3.0 (#130)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* chore(deps): update pnpm to v9.9.0 (#103)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* chore(deps): update dependency ubuntu to v22 (#31)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* fix: discrepancy between param enableDamping in OrbitControl (#486)
* chore(deps): update pnpm to v9 (#406)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* chore: added repository url to package.json
* fix: more perfectionist rules fixed
* chore: release v1.3.1
* fix: turn-off import rule
* ci: add pkg.pr.new
* fix: only accept new minor versions
* chore: update lock
* chore: fix pkg.pr.new lint
* chore: release v1.3.2
* chore: removed husky and updated eslint config (#496)
* feat: added ignores and turn off `style/max-statements-per-line` rule
* chore: fix internal lint
* feat: moved ignores to antfu config
* chore: add cientos jsdoc/check-alignment rule off
* chore: release v1.4.0
* fix(deps): update dependency typescript to v5.6.2 (#136)
* chore(deps): update pnpm to v9.10.0
* fix(deps): update dependency typescript to v5.6.2
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* chore(deps): update pnpm to v9.12.0 (#135)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* chore(deps): update actions/setup-node action to v4 (#56)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* chore(deps): update actions/checkout action to v4 (#37)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* chore(deps): update dependency @nuxt/eslint-config to v0.5.7 (#127)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* chore: release v4.0.3
* chore: clean up config (#498)
* chore(deps): update dependency vite to v5.4.6 [security] (#494)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* chore(deps): update dependency @vitejs/plugin-vue to v5.1.4 (#499)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* fix(deps): update dependency vue-router to v4.4.5 (#488)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* chore(deps): update dependency vite-plugin-dts to v4.2.3 (#481)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* chore(deps): update dependency unplugin-auto-import to v0.18.3 (#497)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* chore(deps): update dependency eslint to v9.11.1 (#485)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* chore(deps): update pnpm to v9.12.0 (#487)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* chore(deps): update dependency @release-it/conventional-changelog to v8.0.2 (#491)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* fix(deps): update dependency @tresjs/core to v4.3.0 (#503)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* fix: update core version with patch (#508)
* chore(deps): update dependency ubuntu to v24 (#510)
* chore(deps): update pnpm to v9.12.1
* chore(deps): update dependency ubuntu to v24
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* chore(deps): update dependency vitepress to v1.4.1 (#512)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* chore: add @alvarosabu to codeowners
* chore: add @alvarosabu to codeowners (#518)
* chore: add @alvarosabu to codeowners (#142)
* fix(deps): update dependency @tresjs/nuxt to v3.0.7 (#106)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* chore(deps): update dependency unocss to ^0.64.0 (#516)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* chore(deps): update pnpm to v9.13.0 (#509)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* fix(MeshReflectionMaterial): remove unneeded material.onBeforeRender (#534)
* chore(lint): reformat to avoid linter error (#533)
Co-authored-by: Alvaro Saburido <alvaro.saburido@gmail.com>
* feat(MeshDiscardMaterial): add component, playground, docs (#525)
Co-authored-by: Alvaro Saburido <alvaro.saburido@gmail.com>
* feat(Billboard): add component, playground, docs (#527)
Co-authored-by: alvarosabu <alvaro.saburido@gmail.com>
* feat: edges (#390)
* feat: add edges component
* feat(cientos/edges): rework code and playground demo
* feat(cientos/edges): rework code and playground demo - fix lint
* feat(cientos/edges): wip doc
* feat(cientos/edges): wip documentation and demo
* update edge component
* update merge main
* review fix
---------
Co-authored-by: Alvaro Saburido <alvaro.saburido@gmail.com>
* chore: update deps (#554)
* chore: update deps
* chore: fix lint
* feat(Image): add component, playground, docs (#529)
* feat(Image): add component, playground, docs
* refactor(Image): improve reactivity readability
* docs(Image): add interactive demo
* chore: fix lint
---------
Co-authored-by: Alvaro Saburido <alvaro.saburido@gmail.com>
* feat(Outline): add component, demo, docs (#532)
* squash
* chore: lint
* feat(Outline): add component, demo, docs
* chore(shaderMaterial): destructure import
* docs(Outline): update playground demo
* chore: lint
---------
Co-authored-by: alvarosabu <alvaro.saburido@gmail.com>
* feat(ScreenSpace): add component, demo, docs (#536)
* feat(ScreenSpace): add component, demo, docs
* chore: lint
* chore: remove unnecesary variable prop
---------
Co-authored-by: alvarosabu <alvaro.saburido@gmail.com>
* feat(ScreenSizer): add component, playground, docs (#535)
* feat(ScreenSizer): add component, playground, docs
* chore: added demo to routes
---------
Co-authored-by: alvarosabu <alvaro.saburido@gmail.com>
* feat(gradientTexture): add component, demo, docs (#531)
* feat(GradientTexture): add component, demo, docs
* fix(GradientTexture): remove useTres from props
---------
Co-authored-by: alvarosabu <alvaro.saburido@gmail.com>
* chore(deps): update pnpm to v9.15.0 (#556)
* chore(deps): update dependency vite to v6.0.3
* chore(deps): update pnpm to v9.15.0
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* feat(CubeCamera): add component, demo, docs (#537)
* feat(CubeCamera): add component, demo, docs
* docs: add CubeCamera to sidebar
---------
Co-authored-by: alvarosabu <alvaro.saburido@gmail.com>
* feat(Grid): add component, demo, docs (#540)
* feat(Grid): add component, demo, docs
* chore: lint
---------
Co-authored-by: Alvaro Saburido <alvaro.saburido@gmail.com>
* feat(SoftShadows): add component, demo, docs (#541)
* feat(SoftShadows): add component, demo, docs
* chore(SoftShadows): remove unused @ready
* refactor(SoftShadows): check for camera
* docs(SoftShadows): make samples interactive, slow spheres
---------
Co-authored-by: alvarosabu <alvaro.saburido@gmail.com>
* feat(Align): add component, demo, docs (#544)
Co-authored-by: alvarosabu <alvaro.saburido@gmail.com>
* feat(Mask): add component, demo, docs (#552)
Co-authored-by: alvarosabu <alvaro.saburido@gmail.com>
* docs: temporarely hide unreleased abstractions (#560)
* docs: temporarely hide unreleased abstractions
* docs: hide temporarely MeshDiscardMaterial
* fix: instance properties and fix demo (#561)
Co-authored-by: Alvaro Saburido <alvaro.saburido@gmail.com>
* chore: trying to update deps (#145)
* chore: trying to update deps
* chore: remove post-processing
* chore: fix lint
* chore: playground working now with cientos
* fix(KeyboardControls): support non-qwerty keyboards (#573) (#574)
* fix(KeyboardControls): support non-QWERTY keyboards
* docs(KeyboardControls): add mention of QWERTY/non-QWERTY layouts
* docs(KeyboardControls): fix wording/formatting
* fix: build dts error TS7056 (#521)
Co-authored-by: Alvaro Saburido <alvaro.saburido@gmail.com>
* fix: typescript build issues (#578)
* chore(tsconfig): update module resolution and linting options
- Changed moduleResolution from "node" to "bundler" for improved compatibility with bundlers.
- Added allowImportingTsExtensions to enable importing TypeScript files with extensions.
- Updated linting options: enabled noFallthroughCasesInSwitch, noUnusedParameters, and isolatedModules.
- Removed declaration, sourceMap, and esModuleInterop options for cleaner configuration.
* fix(Edges): ensure parent is a Mesh instance before accessing geometry
* refactor(Lensflare): migrate Lensflare import to three-stdlib for improved typescript compatibility
* fix(Outline): enhance OutlineMaterial type definition and improve material instantiation for better TypeScript support
* fix(PositionalAudio): migrate PositionalAudioHelper import to three-stdlib for improved TypeScript compatibility
* refactor(PointerLockControls): enhance TypeScript support by extending PointerLockControls with event types and enabling shallow references
* fix(SVGLoader): implement TresSVGLoader class to enhance compatibility with TresJS loader interface and streamline SVG loading process
* fix(GLTFLoader): implement TresGLTFLoader class for enhanced compatibility with TresJS loader system and improve GLTF loading functionality
* refactor(meshGlassMaterial): consolidate imports for improved readability and maintainability
* refactor(Line2): consolidate Line2 imports from three-stdlib for improved compatibility and maintainability
* refactor(ShaderData): replace mapLinear and clamp imports with MathUtils methods for improved consistency and maintainability
* fix(Precipitation): enhance texture handling by adding support for texture URLs and updating prop types for better flexibility
* refactor(FBXLoader): implement TresFBXLoader class to enhance compatibility with TresJS loader system and improve FBX loading functionality
* chore(playground): improved demos for gltf and fbx
* refactor(useEnvironment): simplify loader logic and improve type handling for environment map loading
* chore(FBXModelDemo): add OrbitControls and adjust FBXModel position and shadow casting
* chore(Jeep): adjust truck position, enable shadow casting for mesh components
* chore: adding shadows and correct spacial parameters to model playgrounds
* refactor(PointerLockControls): revert wrong change on extend PointerLockControls
* chore: fix lint
* refactor(useFBX): improve type handling for useFBX function to support generic path types similar to useGLTF
* refactor(Precipitation): update prop type documentation to correctly reference PrecipitationProps instead of StarsProps and ContactShadowsProps
* refactor(useEnvironment): simplify loader callback by removing unnecessary type annotation
* refactor(Edges): improve type checks for parent geometry in Edges component
* refactor(Precipitation): enhance prop type definitions and improve texture handling logic
* refactor(Edges): reorder import statements for better readability
* chore(deps): update pnpm to v9.15.4 (#149)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* fix: 581 environment lightformers are not working (#584)
* fix(Environment): add EnvironmentDemo and Lightformers components, update routing and environment handling
- Enhanced environment handling in `useEnvironment` with improved texture management and disposal methods.
- Refactored `EnvSence` class to use `dispose` method for better resource management.
- Updated lightformer properties for consistency and improved functionality.
* chore: fix lint
* chore(EnvironmentDemo): set lightformers controls to false as default
* fix(useEnvironment): replace EnvSence with EnvironmentScene class for improved resource management and texture handling
* fix(useEnvironment): improve environment mesh handling by reusing existing meshes and updating background properties to avoid memory leaks
* chore(dev-deps): bump release-it
* chore: release v4.1.0
* docs: restore previously commented-out links in VitePress config
- Re-enabled links for 'Edges', 'Mask', and 'Billboard' in the documentation configuration.
- Updated links for 'Align' and 'Grid' to ensure all relevant abstractions are accessible in the guide.
* chore(deps): update dependency three to ^0.173.0 (#565)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* docs: 📝 update components section with new components (#589)
Remove directive
Co-authored-by: Alvaro Saburido <alvaro.saburido@gmail.com>
* fix: update repository URLs to use Tresjs capitalization (#160)
* chore: release v3.0.8
* fix: remove will-change that makes Html components blurry (#602)
Co-authored-by: AntoninRousset <antonin@i-r-s.ch>
* fix: update html on camera dolly zoom (#600)
Co-authored-by: AntoninRousset <antonin@i-r-s.ch>
Co-authored-by: Alvaro Saburido <alvaro.saburido@gmail.com>
* docs(ScrollControls): update references to default smoothScroll values to be the actual default value used (#593)
Co-authored-by: Alvaro Saburido <alvaro.saburido@gmail.com>
* chore(HTMLDemo): add Card component to Torus mesh with HTML positioning
* chore: release v4.1.1
* feat(OrbitControls): add mouseButtons prop to customize mouse interactions (#603)
* feat(OrbitControls): add mouseButtons prop to customize mouse interactions
- Updated OrbitControls component to support custom mouse button configurations
- Added `mouseButtons` prop to documentation and component
- Imported MOUSE enum from three.js
- Updated demo and documentation to showcase new prop
* chore(CI): update corepack installation in GitHub workflow
- Force install corepack globally using npm to ensure compatibility
- Modify workflow to use global corepack installation before enabling
* chore: release v4.2.0
* chore(deps): update dependency vite to v6.0.9 [security] (#592)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* feat(environment): enhance environment and background props (#590)
* feat(environment): enhance environment and background props
- Added new properties for background and environment intensity, as well as their rotations, to improve scene customization.
- Updated `useEnvironment` and related components to support the new properties, ensuring better control over lighting and background effects.
- Refactored `EnvironmentDemo` to utilize the new properties, enhancing the demo's interactivity and visual fidelity.
- Improved type definitions in `EnvironmentOptions` to include the new parameters for better TypeScript support.
* docs: fix lint
* feat(Environment): add syncMaterials prop for synchronized background and environment rotation
- Introduced `syncMaterials` prop to the `<Environment />` component, allowing the environment rotation to sync with the background rotation.
- Updated documentation to reflect the new prop and its functionality.
- Enhanced the `useEnvironment` composable to handle the synchronization logic and ensure visual consistency in the scene.
- Adjusted the `EnvironmentDemo` to demonstrate the new feature.
* feat(Environment): enhance rotation handling and material updates
- Introduced `toEuler` function to convert various rotation formats into Euler instances for better handling of background and environment rotations.
- Added `updateMaterials` function to ensure all materials in the scene are updated when environment rotation changes.
- Refactored existing watch effects to utilize the new `toEuler` function, improving code readability and maintainability.
- Enhanced the synchronization logic for `syncMaterials` to ensure consistent updates across background and environment rotations.
* chore: release v4.3.0
* fix(deps): update @tresjs/core and @types/three to latest versions (#619)
* fix(deps): update @tresjs/core and @types/three to latest versions
- Upgraded @tresjs/core from 4.3.1 to 4.3.5 for improved functionality and bug fixes.
- Updated @types/three from 0.172.0 to 0.176.0 to ensure compatibility with the latest Three.js features.
- Adjusted package.json and pnpm-lock.yaml accordingly to reflect these changes.
* chore(deps): update @types/three to version 0.176.0
* chore: release v4.3.1
* chore: fix corepack at pkg-pr-new workflow (#166)
* feat!: update Nuxt to support version ^3.16.0 (#164)
* feat!: updated dependencies for v3.16-3.17
* chore: moved nuxt/kit and unocss deps to devDeps
* chore: added versioning inside module meta
* chore: fix test
* chore: fix lint
* chore: remove types and include types version
* chore: fix dependencies and devtools module
* chore: devtools client update
* fix: type changed to interface
* chore: css clean up on the client devtools perf monitor
* chore: updated Nuxt module to v3.17.4
* chore: fix pnpm installation at pkg-pr-new workflow
* chore: fix corepack installation at pkg-pr-new workflow
* chore: use lts/ instead 22 at pkg-pr-new workflow
* chore: update text color contrast at devtools components
* chore: optimize `@nuxt/devtools-kit/iframe-client` dependency
* chore: update svg and badge color contrast
* chore: use `#imports` instead `vue`
* chore: add vue to client
---------
Co-authored-by: userquin <userquin@gmail.com>
Co-authored-by: alvarosabu <alvaro.saburido@gmail.com>
* fix: update TypeScript error comments in ProgramsModule.vue for clarity
* chore: release v4.0.0
* chore: update README to reflect pnpm usage for dependency installation and scripts
* fix: precipitation speed (#643)
* feat: release v5 (#563)
* docs: un-comment back the new features
* feat(Helper): add component, demo, docs (#543)
* feat(Helper): add component, demo, docs
* refactor(useHelper): use destructuring
* refactor(useHelper): remove
---------
Co-authored-by: Alvaro Saburido <alvaro.saburido@gmail.com>
* feat(PointMaterial): add component, demo, docs (#545)
* feat(PointMaterial): add component, demo, docs
* chore: lint
* refactor: remove unused function argument
* feat: deconstruct points material imports
---------
Co-authored-by: alvarosabu <alvaro.saburido@gmail.com>
* feat(ScreenQuad): add component, playground, docs (#530)
* feat(MarchingCubes): add component, demo, docs (#553)
* feat(MarchingCubes): add component, demo, docs
* feat(MarchingCubes): add default material
* chore: lint
---------
Co-authored-by: alvarosabu <alvaro.saburido@gmail.com>
* feat(CubicBezierLine): add component, demo, docs (#546)
* feat(CubicBezierLine): add component, demo, docs
* docs: revert broken link
* feat(QuadraticBezierLine): add component, demo, docs (#548)
Co-authored-by: alvarosabu <alvaro.saburido@gmail.com>
* feat(AccumulativeShadows): add component, demo, docs (#558)
* feat(AccumulativeShadows): add component, demo, docs
* refactor(RandomizedLights): rename interface
* refactor(AccumulativeShadows): change default alphaTest value
* refactor(AccumulativeShadows): expose update function
* feat(Bounds): add component, demo, docs (#408) (#568)
* feat(Bounds): add component, demo, docs
* refactor(Bounds): useScreenSize -> useResize
* refactor(Bounds): rename variables, remove unneeded state
* docs: fix material items merge issue
---------
Co-authored-by: alvarosabu <alvaro.saburido@gmail.com>
* refactor(Align): change callback to emit, improve naming (#571)
* feat(CircleShadow): add component, demo, docs (#549)
* feat(CircleShadow): add component, demo, docs
* docs(CircleShadow): fix prop name
---------
Co-authored-by: alvarosabu <alvaro.saburido@gmail.com>
* feat(Stage): add component, demo, docs (#572)
* feat(AccumulativeShadows): add component, demo, docs
* feat(Bounds): add component, demo, docs
* refactor(Bounds): useScreenSize -> useResize
* refactor(Bounds): rename variables, remove unneeded state
* refactor(Align): change callback to emit, improve naming
* refactor(RandomizedLights): rename interface
* refactor(AccumulativeShadows): change default alphaTest value
* refactor(AccumulativeShadows): expose update function
* feat(Stage): add component, demo, docs
* docs: fix material items
* feat: import RandomizedLightsProps from correct file
* refactor(Stage): update types
---------
Co-authored-by: alvarosabu <alvaro.saburido@gmail.com>
* chore(Outline): type material
* feat(LOD): add component, playground, docs (#524)
Co-authored-by: Alvaro Saburido <alvaro.saburido@gmail.com>
* refactor(Bounds): replace clamp import with MathUtils.clamp for consistency
* feat(useIntersect): add function, demo, docs (#550)
Co-authored-by: alvarosabu <alvaro.saburido@gmail.com>
* chore: update dependencies in package.json and pnpm-lock.yaml
- Bump versions for several dependencies including:
- @vueuse/core from ^12.0.0 to ^12.3.0
- three-stdlib from ^2.34.0 to ^2.35.2
- eslint from ^9.16.0 to ^9.17.0
- release-it from ^17.10.0 to ^18.0.0
- typescript-eslint packages to ^8.19.0
- Update various other dependencies to their latest versions for improved compatibility and performance.
- Update pnpm-lock.yaml to reflect the changes in package.json and ensure consistency across the project.
* fix: fixes to next components and docs (#586)
* docs(Environment): remove demo
- page contained multiple instances of useProgress
- useProgress instances interfere with one another
* docs(sidebar): use data from component-list
* docs: add unlisted components
* docs(Environment): fix code snippet formatting
* docs: remove non-existant directives from component list
* docs(Backdrop): fix demo errors
- TS errors
- traverse and cast-shadows on null
* fix(Lensflare): add THREE src
* three-stdlib Lensflare is not working
* use THREE examples/jsm src in the meantime
* chore(Lensflare): add TODO
* chore: update dependencies and refactor logging
- Updated `@tresjs/core` dependency to next version
- Removed the `useLogger` composable and replaced its usage with direct calls to `logError` and `logWarning` in various files for improved clarity and performance.
- Updated `package.json` and `pnpm-lock.yaml` to reflect the changes in dependencies.
* feat!: 609-refactor-usegltf (#610)
* feat!: refactor useGLTF to use new useLoader based on `useAsyncState`
BREAKING CHANGE: useGLTF no longer returns the plain obj, it now returns an object with reactive data (state, isLoading, error) and a load method.
- Refactored GLTF loading in components to use the updated `useGLTF` composable, improving state management and performance.
- Removed unnecessary `Suspense` wrappers in demo components for cleaner rendering.
- Added new demo components for showcasing GLTF model loading with DRACO compression.
- Updated documentation to reflect changes in GLTF model usage.
* fix: update import syntax and clean up unused code
- Changed import statement for `TresObject` in `gltf-model.md` to use the correct TypeScript syntax.
- Removed unused imports in `use-gltf/index.vue` for cleaner code.
- Added ESLint directive to disable console warnings in `TheModel.vue` for development purposes.
* docs: update useGLTF implementation and clean up components
- Refactored components to utilize the new `useGLTF` structure, replacing direct access to nodes with reactive state management.
- Removed unused imports and commented-out code for improved clarity and maintainability.
- Updated documentation references to reflect changes in component usage and structure.
* feat: adapt useAnimations to new useAsyncState loader's model
- Added a new demo page for `use-animations` showcasing the animated GLTF model.
- Refactored the `useAnimations` composable to support reactive animations using `MaybeRef`.
- Updated the `TheModel.vue` component to utilize the new reactive state for animations.
- Enhanced the main demo layout with `TresCanvas`, `OrbitControls`, and lighting for improved visualization.
* chore: update @tresjs/core dependency to version 5.0.0-next.0
- Changed the dependency for @tresjs/core in package.json and playground/vue/package.json to the stable version 5.0.0-next.0 from a previous URL reference.
- Updated pnpm-lock.yaml to reflect the new version of @tresjs/core across all relevant sections.
- Adjusted the useGLTF implementation in documentation to align with the new state management approach.
* fix: return nodes and materials computed directly (#612)
* feat: return nodes and materials computed directly
* docs: correct lint issues in markdown and update latest changes of useLoader
* feat: 616-adapt-code-to-core-ctx-renderer-state-breaking-change (#620)
* feat: update to latest core v5 next
* feat: update renderer access in components to use instance reference
- Updated various components to access the renderer through `renderer.instance.value` instead of `renderer.value`, ensuring compatibility with the latest core changes.
- Adjusted related watch and invalidate calls to check for `renderer.canBeInvalidated.value` before invoking invalidate, improving performance and stability.
- Refactored multiple files including shapes, controls, and materials to reflect these changes, enhancing overall code consistency and maintainability.
* feat: 615-adapt-camera-dependant-abstractions-to-core-v5-camera-changes (#621)
* feat: adapt core camera ctx changes to cientos
* fix: remove unused Camera type import in useFBO module
- Removed the unused `Camera` type import from `index.ts` in the `useFBO` module to clean up the code and improve maintainability.
* chore(deps): update dependencies to latest versions
- Upgraded several dependencies in `package.json` and `pnpm-lock.yaml` to their latest versions, including:
- `@release-it/conventional-changelog` from `10.0.0` to `10.0.1`
- `@types/three` from `0.172.0` to `0.176.0`
- `@vitejs/plugin-vue` from `5.2.1` to `5.2.4`
- `eslint` from `9.17.0` to `9.27.0`
- `eslint-plugin-vue` from `9.32.0` to `10.1.0`
- `gsap` from `3.12.5` to `3.13.0`
- `three` from `0.173.0` to `0.176.0`
- `typescript` from `5.7.2` to `5.8.3`
- `vite` from `6.0.7` to `6.3.5`
- `vite-plugin-banner` from `0.8.0` to `0.8.1`
- `vite-plugin-dts` from `4.4.0` to `4.5.4`
- `vite-plugin-glsl` from `1.3.1` to `1.4.1`
- `vitepress` from `1.5.0` to `1.6.3`
- Adjusted related dependencies in `pnpm-lock.yaml` to ensure compatibility and stability across the project.
* chore(deps): update @tresjs/core to version 965 and upgrade Vue to 3.5.14
- Updated the dependency for `@tresjs/core` in `package.json` and `playground/vue/package.json` to the new version `965`.
- Upgraded Vue from `3.5.13` to `3.5.14` in `pnpm-lock.yaml` to ensure compatibility with the latest features and improvements.
- Adjusted related references in the codebase to utilize the updated context and camera handling methods, enhancing overall functionality and maintainability.
* chore(deps): update @tresjs/core to version 0731c19
- Updated the dependency for `@tresjs/core` in `package.json` and `pnpm-lock.yaml` to the new version `0731c19`.
- Adjusted related references in the lock file to ensure consistency and compatibility across the project.
* feat: 611 move cores usetexture to cientos (#617)
* feat: add useTexture composable and related documentation
- Introduced the `useTexture` composable for loading textures in TresJS scenes using THREE.js's texture loader.
- Created a new demo component `UseTextureDemo.vue` to showcase the usage of the `useTexture` composable.
- Updated the documentation to include a guide for `useTexture`, detailing its options and providing usage examples.
- Added new routes and components in the playground for testing and demonstrating the `useTexture` functionality.
- Ensured all new components follow best practices and TypeScript standards.
* feat: introduce useTextures composable and related documentation
- Added the `useTextures` composable for loading multiple textures simultaneously in TresJS scenes using THREE.js's texture loader.
- Created a new demo component `PBRTexturesDemo.vue` to showcase the usage of the `useTextures` composable with PBR textures.
- Updated the documentation to include a guide for `useTextures`, detailing its parameters, return values, and providing usage examples.
- Added new routes and components in the playground for testing and demonstrating the `useTextures` functionality.
- Ensured all new components adhere to best practices and TypeScript standards.
* fix: clean up logging and formatting in PBRTexturesDemo and related documentation
- Removed unnecessary console logging of loading state in `PBRTexturesDemo.vue` for cleaner output.
- Adjusted formatting in `use-textures.md` for improved readability.
- Updated import statements in `PBRTextures.vue` to remove unused dependencies, streamlining the component.
- Ensured all changes adhere to TypeScript standards and best practices.
* chore: disable console warnings in PBRTextures.vue for cleaner development output
- Added an ESLint directive to disable console warnings in `PBRTextures.vue`, allowing for a more streamlined development experience without cluttering the console.
- This change is aimed at improving the usability of the component during development while maintaining adherence to TypeScript standards.
* fix: set new texture as initial value for textue loader
* fix: added initial value to useTextures
* chore: update @tresjs/core dependency to latest version
- Updated the @tresjs/core dependency from version be3280b to 0731c19 in package.json and playground/vue/package.json for improved functionality.
- Adjusted pnpm-lock.yaml to reflect the updated version of @tresjs/core across all relevant sections.
* refactor: abstractions using useTextures from core now use local useTexture
* refactor: update texture loading in Ocean and Precipitation components
- Replaced the use of destructured state from `useTexture` with direct texture loading using `TextureLoader` in the `Ocean.vue` component for improved clarity and performance.
- Updated the `watchEffect` in `Precipitation.vue` to use a more descriptive variable name for the texture state, enhancing code readability.
- Ensured that texture loading logic is consistent across components, aligning with best practices for resource management.
* chore: fix some demos shenanigans
* feat!: 608 drop umd support (#622)
* chore(vite): update output formats and remove UMD globals
- Added 'es' format to the Vite configuration for better module compatibility.
- Removed the UMD globals section from the output configuration as it is no longer necessary, streamlining the build process.
* feat!: update output formats and remove UMD globals
BREAKING CHANGE: cientos is now ESM only
- Added 'es' format to the Vite configuration for better module compatibility.
- Removed the UMD globals section from the output configuration as it is no longer necessary, streamlining the build process.
* fix: rollback to previous use tres usage (#623)
* refactor: useTres partial context to simplify
* refactor: update useFBO to utilize useTres for improved context handling
* refactor: update BakeShadows to use useTres for improved renderer access
* refactor: update MouseParallax to use useTres for improved renderer access
* refactor: update controls to use useTres for improved renderer access and simplify context handling
* refactor: remove unused StatsGl import in KeyboardControlsDemo.vue for cleaner code
* refactor: remove unused parameter from onBeforeRender in LensflareImpl and clean up imports in OrbitControls for improved code clarity
* refactor: update Bounds component to use camera directly from useTres for improved clarity and simplify renderer invalidation logic
* refactor: update components to use useTres for improved renderer access and simplify invalidation logic
* refactor: update shape components to use useTres for improved renderer access and simplify invalidation logic
* refactor: update shape and staging components to use useTres for improved renderer access and simplify invalidation logic
* chore: update pnpm-lock.yaml to reflect dependency version upgrades including Vue, ESLint, and various plugins for improved stability and performance
* refactor: format code for improved readability by adjusting indentation in Atlas.ts, HTML.vue, and ShaderData.ts
* chore: update @tresjs/core dependency to version 5.0.0-next.1
- Changed the dependency for `@tresjs/core` in `package.json` and `playground/vue/package.json` from a specific commit URL to the latest pre-release version `5.0.0-next.1`.
- Updated `pnpm-lock.yaml` to reflect this change across all relevant sections, ensuring consistency and compatibility with the updated core features.
* chore: release v5.0.0-next.0
* chore: update @tresjs/core dependency to version 5.0.0-next.2
- Updated the `@tresjs/core` dependency in `package.json` and `playground/vue/package.json` to the latest pre-release version `5.0.0-next.2`.
- Adjusted `pnpm-lock.yaml` to reflect this change across all relevant sections, ensuring consistency and compatibility with the updated core features.
* chore: release v5.0.0-next.1
* fix: adapt to renderer.isntance no longer being shallowRef
* fix: type issues from v5
- Added type imports for `WebGLRenderer` and `TresRenderer` in various components to enhance type safety and clarity.
- Simplified prop emit definitions in `Align.vue` by combining event types into a single union type.
- Ensured consistent usage of `TresRenderer` in `SoftShadows.vue` and `useCubeCamera.ts` for better integration with TresJS.
- Updated `MouseParallax.vue` to use non-null assertion for camera reference, improving type safety.
- Adjusted `AccumulativeShadows/component.vue` to cast renderer to `WebGLRenderer` where necessary for compatibility.
* fix: remove unused type import in MouseParallax.vue
- Removed the unused import of `Object3D` from `MouseParallax.vue` to enhance code clarity and maintainability.
- This change aligns with the ongoing effort to streamline type imports and improve type safety across the codebase.
* chore: release v5.0.0-next.2
* chore(playground): update BlenderCube component to use correct GLTF node
- Changed the reference from `state.value?.nodes?.Cube` to `nodes.value?.BlenderCube` in the BlenderCube.vue component to correctly access the GLTF model.
- Imported `computed` and `shallowRef` from Vue to enhance reactivity and maintainability of the component.
* fix: typescript issues (#624)
* fix: update Stats component to use onRender instead of onAfterRender
- Replaced the `onAfterRender` hook with `onRender` in the Stats component to align with the updated rendering lifecycle.
- This change ensures that the stats rendering ends at the correct point in the render cycle, improving performance and accuracy.
* fix: update useIntersect to use onRender instead of onAfterRender
- Replaced the `onAfterRender` hook with `onRender` in the `useIntersect` function to align with the updated rendering lifecycle.
- This change ensures that intersection checks occur at the correct point in the render cycle, improving performance and accuracy.
* fix: update ContactSh…
This PR introduces the concept of conditional rendering. It closes #140
The
renderModeprop has been added to theTresCanvascomponent with 3 different options:alwaysthe default one (current solution)on-demandwill automatically invalidate the frame on:manual: theinvalidatemethod needs to be called by the user to trigger a render.TresCanvas now emits a
renderevent:I'm still finishing the docs, you can start taking a look to it.