CHANGELOG.md 94 KB

Changelog

5.0.1 (2025-09-22)

Bug Fixes

5.0.0 (2025-09-20)

⚠ BREAKING CHANGES

ESM Only

  • Tres is now ESM only - Removed UMD build configuration from package.json and adjusted exports to only include ES module. Updated vite.config.ts to specify the output format as ES, enhancing compatibility with modern module systems.

Event System Overhaul

  • New event system based on pmdrs/pointer-events - Only first element intersected will trigger the pointer event, no more need to stop propagation on occlusion. Replaced raycaster with events system throughout the codebase.

Loop System Refactoring

  • onAfterRender has been renamed to onRender
  • Removed deprecated loop implementation and updated related composables

Context API Changes

  • useTresReady is no longer available - replaced by isReady in the renderer in the context
  • onTresReady is no longer available - renderer.isReady should be leveraged instead
  • camera ctx property is now an object with the camera manager instead of the active camera
  • useRenderer now returns invalidate and advance - useTresContextProvider no longer contains render state
  • invalidate, advance, canBeInvalidated and the renderer instance are now accessed through the context via renderer
  • The renderer instance in the context is now readonly
  • Removed emit from useTresContextProvider and useTresEventManager
  • The types EmitEventName and EmitEventFn are no longer exported from @tresjs/core

Composables Removed/Deprecated

  • useTexture composable moved to @tresjs/cientos package
  • useSeek is deprecated and removed

Loader Changes

  • useLoader API changed - no longer returns the plain object, now returns an object with reactive data (resource|s), isLoading, error) and a load method, can be used both sync and async (suspense)

Features

  • WebGPU native support (#1029) (6f3d41d)
  • New useTres composable - introduce useTres composable and update related documentation (#1017) (fd03f72)
  • Enhanced useLoop and useRenderLoop - useLoop and useRenderLoop refactoring (#1035) (db65f3f)
  • Expose render mode (#1032) (b5b9456)
  • Tres Devtools integration - add context inspector devtools (#1013) (ff6723c)
  • Make utility methods available (#1068) (a225230)
  • Model and animation recipe (#1082) (078d7bc)
  • Warning system - warn user if the canvas has no area (#1048) (4c06603)
  • Enhanced Nuxt configuration - enhance Nuxt configuration and AppHeader to include package version (7a8b53f)
  • devtools communication strategy (#1067) (d8752bb)
  • v5 release (#965) (190d8f7)

Bug Fixes

  • Performance improvements - update elapsed time retrieval in useCreateRafLoop to use the latest clock property (#1046) (1b3971c)
  • Property handling - avoid pierced props to setScalar when numerical (#1073) (4e7ba85)
  • Documentation - docs ssg 404 issues (#1081) (9e1fc89)
  • Package exports - removed development exports from package.json (#1079) (1baca35)
  • Loader improvements - add initial value support to useLoader (#1007) (be3280b)
  • added forgotten ready emit (8b97e85)

Code Refactoring

  • useRenderer refactoring - move renderer logic from usetrescontextprovider to userenderer (#1022) (cc8b752)
  • Context system overhaul - removal of emit from usetrescontextprovider composable (#999) (090adf3)
  • Camera management - context camera is now a state (#1004) (d5daf5d)
  • Performance optimization - removal of performance state from useTresContextProvider (#1003) (79edf43)
  • Ready state management - removed useTresReady, added isReady to the renderer (#1000) (ff35bfc)

Deprecated/Removed Features

  • useTexture composable removal (#1008) (041b697)
  • useSeek deprecation - deprecate useSeek composable and update documentation (#990) (3d5ea13)

5.0.0-rc.0 (2025-09-20)

Features

Bug Fixes

5.0.0-alpha.2 (2025-09-03)

Features

5.0.0-alpha.1 (2025-08-30)

Bug Fixes

  • removed development exports from package.json (#1079) (1baca35)

5.0.0-alpha.0 (2025-08-21)

Features

  • 1047 warn user if the canvas has no area (#1048) (4c06603)
  • enhance Nuxt configuration and AppHeader to include package version (7a8b53f)
  • make some of the utility methods available to users (#1068) (a225230)

Bug Fixes

  • avoid pierced props to setScalar when numerical (#1073) (4e7ba85)

Reverts

5.0.0-next.6 (2025-06-22)

Bug Fixes

  • update elapsed time retrieval in useCreateRafLoop to use the latest clock property (#1046) (1b3971c)

5.0.0-next.5 (2025-06-20)

5.0.0-next.4 (2025-06-20)

⚠ BREAKING CHANGES

  • onAfterRender has been renamed to onRender

  • refactor: type improvements in createPriorityEventHook

  • wip

  • wip

  • improved test

  • added context to useCreateRenderLoop and tests

  • fixed typing

  • added clock

  • wip

  • refactor: remove deprecated loop implementation and update related composables

  • Removed the old useCreateRenderLoop and its associated tests.

  • Updated useLoop to utilize the new useRenderLoop for better event handling.

  • Commented out OrbitControls in relevant Vue components for potential future use.

  • Cleaned up unused code and comments in useTresContextProvider.

  • added some todos

  • refactor: removed redundant eventhook

  • refactor: simplify renderer setup by removing loop parameter

  • refactor: enhance useRenderLoop to accept notifyFrameRendered callback

  • chore: removed obsolete comment

  • chore: made TresCanvas use correct event hook

  • refactor!: omitted frame in render manager return

  • refactor: restored renderEventHook

  • chore: added comments after meeting

  • refactor: made render loop more generic in it's naming

  • refactor: made useLoop use useTres context

  • chore: added jsdoc description for useLoop

  • refactor: rename LoopContext to RafLoopContext and update related references

  • refactor: replaced setTimeout with useTimeout

  • refactor: update useLoop tests to use useCreateRafLoop and adjust rendering logic

  • test: enhance useLoop tests with fake timers and add new callback functionality

  • chore: removed debug code

  • fix: initialize frames based on renderMode to ensure correct rendering behavior

  • refactor: fixed multiple playgrounds

  • feat: added loop and beforeLoop events to canvas

  • fix: fixed playground experience rafactor: renamed replaceCycleFunction to replaceLoopFunction

  • fix: fixed some more playgrounds

  • fixed some more playgrounds

  • refactor!: renamed onBeforeRender to onBeforeLoop and onRender to onLoop fix: fixed playgrounds

  • fixed test

  • refactor: tiny code styling improvement

  • refactor: omitted export of useCreateRafLoop

  • linting fixes

  • refactor: tiny improvement for fbo demo

  • refactor: rename fboRef to groupRef for clarity in FBO demo

  • refactor: renamed onBeforeLoop back to onBeforeRender and onLoop back to onRender

  • restored usage of orbit controls

  • more restoring of orbitcontrols usages

  • refactor: updated loop handling by renaming onLoop to onRender in TakeOverRenderExperience.vue and adjusted related emit definitions in TresCanvas.vue

  • removed obsolete comment

Features

5.0.0-next.3 (2025-06-15)

Features

5.0.0-next.2 (2025-06-15)

⚠ BREAKING CHANGES

  • Only first element intersected wil trigger the pointer event, no more need to stop propagation on occlusion

  • feat: get the context object tree with max 4 leves deep

  • feat: enhance context node creation and graph building

  • Updated createContextNode to include an optional parentKey parameter for better context chaining.

  • Modified buildContextGraph to utilize the new parentKey for constructing chained keys during recursion.

  • Added handling for context nodes in the inspector state, allowing for dynamic traversal of context objects based on chained keys.

  • Improved readability and maintainability of the context graph logic.

  • fix: improve scene object handling in Tres Devtools

  • Enhanced the logic for extracting UUIDs from scene node IDs to ensure proper handling of scene objects.

  • Updated the inspector state editing to reflect the new UUID extraction method, improving reliability when editing scene objects.

  • Set the editable property to false for certain inspector values to prevent unintended modifications.

  • fix: lint issue with fonts

  • feat: implement inspector handlers for Tres Devtools

  • Added inspectorHandlers.ts to manage inspector tree and state updates, enhancing the interaction with the Tres context.

  • Introduced functions for creating nodes in the inspector tree, building graphs for scene and context objects, and handling state edits.

  • Updated TresCanvas.vue to ensure proper context handling when registering Tres Devtools.

  • Refactored plugin.ts to utilize the new inspector handlers, improving code organization and maintainability.

  • Created type definitions in types.ts for better clarity and type safety in inspector-related functionalities.

  • feat!(events): new event system based on pmdrs/pointer-events

  • Only first element intersected wil trigger the pointer event, no more need to stop propagation on occlusion

  • refactor: update event handler parameter naming for clarity

  • Renamed the parameter in the onPointerMove function from 'ev' to '_ev' to indicate that it is intentionally unused, improving code readability.

  • Removed unused import 'TresObject' from useTresContextProvider to clean up the codebase.

  • refactor: update type imports and event handling in TresCanvas

  • Replaced the Camera type with TresCamera in TresCanvasProps for better type specificity.

  • Cleaned up imports in TresCanvas.vue by removing unused imports.

  • Updated event handling in useEventManager to use pointerEventsMap for onClick, with a TODO for future type improvements.

  • Modified handlers in LocalState to accept both PointerEventType and string for enhanced flexibility.

  • Adjusted deregistration method in doRemoveDeregister to use context.events for consistency.

  • refactor: update useTres composable to replace raycaster with events

  • Modified the useTres composable to return events instead of raycaster, aligning with the updated context structure.

  • Removed the uuid property from the TresContext interface and cleaned up unused imports in useTresContextProvider, enhancing code maintainability.

  • refactor: update useLoop composable to replace raycaster with events

  • Modified the useLoop composable to utilize events instead of raycaster, aligning with the recent changes in the Tres context structure.

  • This change enhances the integration with the updated event system, ensuring better context handling during the rendering loop.

  • wip

  • separated event utils

  • beautified types

  • type fixes

  • moved update call

  • added todos

  • omitted potential memory leak and callback calls of gone objects

  • refactor: fixed onRender naming

  • restored playground example

  • Updated the offPointerMissed assignment to create a separate listener for each object, preventing unintended shared calls.

  • improved comment

  • renamed eventManager in context

  • removed obsolete code

  • chore: update @tresjs/cientos dependency to version 5.0.0-next.0 in package.json and playground/vue/package.json

  • chore(playground): streamline event handling and remove unused Box component

  • Removed the stopPropagation control logic from event handlers in index.vue to simplify the code.

  • Updated event logging messages for consistency in index.vue and groups/index.vue.

  • Enhanced the TresGroup component in groups/index.vue to include a new @pointermissed event handler.

  • Deleted the unused Box.vue and index.vue files from the propagation directory to clean up the codebase.

  • went back to "events"

  • removed pointermissed from nodeops

  • fixed emits of canvas compoennt

  • cleaned up types

  • tiny readability improvement

  • eslint fix

  • feat!(events): new event system based on pmdrs/pointer-events (f201378)

Features

⚠ BREAKING CHANGES

  • - useTresReady is no longer available, it has been replaced by isReady in the renderer in the context
  • onTresReady is no longer available. renderer.isReady should be leveraged instead

  • chore: removed playground files concerning useTresReady

  • chore: removed ready pages from playground routes

  • feature: made isReady dependency clearer by leveraging triggerRef

  • ˆ

  • camera ctx property is now an object with the camera manager instead of the active camera

  • fix: remove camera manual check

  • chore: remove reset onUnmounted

Co-authored-by: Tino Koch 17991193+Tinoooo@users.noreply.github.com

  • chore: remove unused comment

Co-authored-by: Tino Koch 17991193+Tinoooo@users.noreply.github.com

  • chore: omit previous reordering of cameras

Co-authored-by: Tino Koch 17991193+Tinoooo@users.noreply.github.com

  • refactor: update camera handling to use Three.js Camera type

  • Replaced instances of TresCamera with Three.js Camera type across the codebase for better compatibility and consistency.

  • Updated camera management logic in useCamera composable and related components to reflect the new type.

  • Simplified currentCamera logic to use computed properties instead of watch.

  • refactor: enhance orthographic camera setup and controls

  • Updated the orthographic camera initialization to correctly calculate frustum dimensions based on the aspect ratio.

  • Introduced zoom functionality for the orthographic camera.

  • Simplified the useControls setup by removing unnecessary properties and focusing on essential controls.

  • Adjusted the camera update logic to reflect the new control structure, ensuring proper projection matrix updates.

  • chore(playground): streamline camera implementation with TresJS components

  • Removed manual camera initialization in favor of using TresJS components for perspective and orthographic cameras.

  • Updated the template to conditionally render the appropriate camera based on the selected camera type.

  • Enhanced readability and maintainability by leveraging TresJS's built-in camera properties and methods.

  • refactor(playground): remove unused camera imports in index.vue

  • Eliminated unused imports for OrthographicCamera and PerspectiveCamera from Three.js to streamline the code.

  • This change enhances code clarity and reduces unnecessary dependencies, aligning with the recent updates to utilize TresJS components for camera management.

  • useTexture composable has been refactored and moved to @tresjs/cientos package

  • Deleted the useTexture composable and its associated files as it has been refactored and moved to the @tresjs/cientos package.

  • Updated documentation to reflect the changes, including a warning about the deprecation and a link to the new cientos documentation for useTexture.

  • Adjusted examples in the cookbook to utilize the new useTexture from @tresjs/cientos, ensuring users are directed to the correct implementation.

  • fix: clean up texture loading examples in documentation

  • Removed unnecessary line breaks and improved formatting in the load-textures.md documentation.

  • Streamlined the example code for TresMeshStandardMaterial to enhance readability and maintain consistency with coding standards.

  • docs: update composables documentation to reflect removal of useTexture

  • Removed deprecated useTexture section from the documentation, indicating its refactor to the @tresjs/cientos package.

  • Added a warning about the deprecation and provided a link to the new cientos documentation for user guidance.

  • Ensured that the remaining documentation is clear and concise, maintaining consistency with the latest changes in the codebase.

    • useTresReady is no longer available, it has been replaced by isReady in the renderer in the context
  • onTresReady is no longer available. renderer.isReady should be leveraged instead

  • chore: removed playground files concerning useTresReady

  • chore: removed ready pages from playground routes

  • feature: made isReady dependency clearer by leveraging triggerRef

    • useRenderer now returns invalidate and advance
  • useTresContextProvider no longer contains render state

  • chore: removed internal renderer ref

  • refactor!: the renderer instance is now returned from useRenderer, made renderer being wrapped inside the context

    • invalidate, advance, canBeInvalidated and the renderer instance are now accessed through the context via renderer
  • the renderer instance in the context is now readonly

  • refactor: removed one emit dependency

  • tofo cleanup

  • merge fix

  • refactor: updated other parts to match structural changes

  • worked around loop errors

  • fixes concerning changes in playground

  • updated english docs

  • fix: wrong render mode in docs

  • removed obsolete todo

  • fix: added null check

  • fix: removed deprecated toValue import

  • feat: remove emit from useTresEventManager

  • renamed type

  • chore: got rid of emit concerning TresReady

  • refactor!: removed emit from useTresContextProvider and useTresEventManager

    • the type EmitEventName is no longer exported from @tresjs/core
  • the type EmitEventFn is no longer exported from @tresjs/core

  • chore: restored renderer tyope in LoopCallbackWithCtx

  • refactor: renamed useRenderer

  • fix: test

  • cleanup

    • useRenderer now returns invalidate and advance
  • useTresContextProvider no longer contains render state

  • chore: removed internal renderer ref

  • refactor!: the renderer instance is now returned from useRenderer, made renderer being wrapped inside the context

    • invalidate, advance, canBeInvalidated and the renderer instance are now accessed through the context via renderer
  • the renderer instance in the context is now readonly

  • refactor: removed one emit dependency

  • tofo cleanup

  • merge fix

  • refactor: updated other parts to match structural changes

  • worked around loop errors

  • fixes concerning changes in playground

  • updated english docs

  • fix: wrong render mode in docs

  • removed obsolete todo

  • fix: added null check

  • fix: removed deprecated toValue import

  • chore: restored renderer tyope in LoopCallbackWithCtx

  • refactor: renamed useRenderer

  • fix: test

  • fix: lint fix

  • useSeek is deprecated

  • Marked the useSeek composable as deprecated in the documentation, indicating its removal in v5.0.0.

  • Removed the useSeek composable implementation and its associated tests from the codebase to streamline the composables directory.

  • Updated the documentation to reflect the deprecation status and provide guidance for users.

  • Update docs/api/composables.md

Co-authored-by: Tino Koch 17991193+Tinoooo@users.noreply.github.com

Features

  • 1012 add context inspector devtools (#1013) (ff6723c)
  • 986 remove usetexture (#1008) (041b697)
  • deprecate useSeek composable and update documentation (#990) (3d5ea13)
  • introduce useTres composable and update related documentation (#1017) (fd03f72)

Bug Fixes

Code Refactoring

  • 979 move renderer logic from usetrescontextprovider to userenderer 2 (#993) (36bcb1c)
  • 992 removal of emit from usetrescontextprovider composable (#999) (090adf3)
  • context camera is now a state (#1004) (d5daf5d), closes #1009
  • removal of performance state from useTresContextProvider (#1003) (79edf43)
  • removed useTresReady, added isReady to the renderer in the… (#1000) (ff35bfc)

    5.0.0-next.0 (2025-04-12)

⚠ BREAKING CHANGES

  • loader: useLoader no longer returns the plain obj, it now returns and object with reactive data (resource|s), isLoading, error) and a load method, can be used both sync and async (suspense)

  • Added useLoader composable for loading resources with THREE.js, supporting single and multiple resource loading, loading state tracking, and error handling.

  • Created comprehensive documentation for useLoader, detailing its features, usage examples, and API reference.

  • Updated various playground components to utilize the new useLoader composable for loading GLTF and FBX models.

  • Added new demo pages for loading multiple models and using the UseLoader component in templates.

  • chore(loader): simplify useLoader implementation and clean up imports

  • Updated the UseLoader component in documentation to remove unnecessary destructuring of the slot props.

  • Cleaned up imports in BlenderCube.vue, Suzanne.vue, and TheExperience.vue by removing unused types.

  • Added eslint-disable comments for console logging in Suzanne.vue and TheExperience.vue to improve code readability while debugging.

  • feat: useGraph to generate named object material collections

  • feat: useAsyncState for useLoader

  • Added documentation for the useLoader composable, detailing its features, usage examples, and API reference.

  • Updated the navigation in the VitePress configuration to include a link to the new useLoader documentation.

  • Enhanced the useLoader composable to support better type safety and resource management.

  • Removed the Suzanne.vue component as part of the cleanup process.

  • feat: enhance useLoader and useGraph composables

  • Updated the useLoader composable to improve type safety and support loading textures alongside models.

  • Refactored the useGraph composable to accept both Object3D and TresObject types, enhancing its flexibility.

  • Added new examples and documentation for loading multiple models and textures, including progress tracking.

  • Cleaned up and organized playground components to demonstrate the new features effectively.

  • refactor(useLoader.test): clean up imports by removing unused nextTick import

  • Removed the unused nextTick import from the useLoader.test.ts file to streamline the code and improve readability.

  • docs: remove trailing spaces in team.md for consistency

  • Cleaned up trailing spaces in the team.md file to improve code consistency and readability.

  • fix(graph): export also types from graph utils

  • refactor(index.ts): remove unused export of buildGraph

  • Removed the unused buildGraph export from index.ts to streamline the code and improve maintainability.

  • feat: enhance resources loading with progress tracking

  • Enhanced the useLoader composable to return progress information, allowing for better user feedback during model loading.

  • Updated TheModel.vue to utilize the new progress tracking feature from the useLoader composable.

  • Removed the unused LoadingManager and integrated progress updates directly into the component's state.

  • Updated docs

  • feat: added tests to load and progress

  • Tres is now ESM only

  • Removed UMD build configuration from package.json and adjusted exports to only include ES module.

  • Updated vite.config.ts to specify the output format as ES, enhancing compatibility with modern module systems.

Features

Bug Fixes

  • export logger utility from utils in index.ts (#966) (bb0b9e2)

    4.3.6 (2025-06-06)

5.0.0-next.1 (2025-06-06)

⚠ BREAKING CHANGES

  • - useTresReady is no longer available, it has been replaced by isReady in the renderer in the context
  • onTresReady is no longer available. renderer.isReady should be leveraged instead

  • chore: removed playground files concerning useTresReady

  • chore: removed ready pages from playground routes

  • feature: made isReady dependency clearer by leveraging triggerRef

  • ˆ

  • camera ctx property is now an object with the camera manager instead of the active camera

  • fix: remove camera manual check

  • chore: remove reset onUnmounted

Co-authored-by: Tino Koch 17991193+Tinoooo@users.noreply.github.com

  • chore: remove unused comment

Co-authored-by: Tino Koch 17991193+Tinoooo@users.noreply.github.com

  • chore: omit previous reordering of cameras

Co-authored-by: Tino Koch 17991193+Tinoooo@users.noreply.github.com

  • refactor: update camera handling to use Three.js Camera type

  • Replaced instances of TresCamera with Three.js Camera type across the codebase for better compatibility and consistency.

  • Updated camera management logic in useCamera composable and related components to reflect the new type.

  • Simplified currentCamera logic to use computed properties instead of watch.

  • refactor: enhance orthographic camera setup and controls

  • Updated the orthographic camera initialization to correctly calculate frustum dimensions based on the aspect ratio.

  • Introduced zoom functionality for the orthographic camera.

  • Simplified the useControls setup by removing unnecessary properties and focusing on essential controls.

  • Adjusted the camera update logic to reflect the new control structure, ensuring proper projection matrix updates.

  • chore(playground): streamline camera implementation with TresJS components

  • Removed manual camera initialization in favor of using TresJS components for perspective and orthographic cameras.

  • Updated the template to conditionally render the appropriate camera based on the selected camera type.

  • Enhanced readability and maintainability by leveraging TresJS's built-in camera properties and methods.

  • refactor(playground): remove unused camera imports in index.vue

  • Eliminated unused imports for OrthographicCamera and PerspectiveCamera from Three.js to streamline the code.

  • This change enhances code clarity and reduces unnecessary dependencies, aligning with the recent updates to utilize TresJS components for camera management.

  • useTexture composable has been refactored and moved to @tresjs/cientos package

  • Deleted the useTexture composable and its associated files as it has been refactored and moved to the @tresjs/cientos package.

  • Updated documentation to reflect the changes, including a warning about the deprecation and a link to the new cientos documentation for useTexture.

  • Adjusted examples in the cookbook to utilize the new useTexture from @tresjs/cientos, ensuring users are directed to the correct implementation.

  • fix: clean up texture loading examples in documentation

  • Removed unnecessary line breaks and improved formatting in the load-textures.md documentation.

  • Streamlined the example code for TresMeshStandardMaterial to enhance readability and maintain consistency with coding standards.

  • docs: update composables documentation to reflect removal of useTexture

  • Removed deprecated useTexture section from the documentation, indicating its refactor to the @tresjs/cientos package.

  • Added a warning about the deprecation and provided a link to the new cientos documentation for user guidance.

  • Ensured that the remaining documentation is clear and concise, maintaining consistency with the latest changes in the codebase.

    • useTresReady is no longer available, it has been replaced by isReady in the renderer in the context
  • onTresReady is no longer available. renderer.isReady should be leveraged instead

  • chore: removed playground files concerning useTresReady

  • chore: removed ready pages from playground routes

  • feature: made isReady dependency clearer by leveraging triggerRef

    • useRenderer now returns invalidate and advance
  • useTresContextProvider no longer contains render state

  • chore: removed internal renderer ref

  • refactor!: the renderer instance is now returned from useRenderer, made renderer being wrapped inside the context

    • invalidate, advance, canBeInvalidated and the renderer instance are now accessed through the context via renderer
  • the renderer instance in the context is now readonly

  • refactor: removed one emit dependency

  • tofo cleanup

  • merge fix

  • refactor: updated other parts to match structural changes

  • worked around loop errors

  • fixes concerning changes in playground

  • updated english docs

  • fix: wrong render mode in docs

  • removed obsolete todo

  • fix: added null check

  • fix: removed deprecated toValue import

  • feat: remove emit from useTresEventManager

  • renamed type

  • chore: got rid of emit concerning TresReady

  • refactor!: removed emit from useTresContextProvider and useTresEventManager

    • the type EmitEventName is no longer exported from @tresjs/core
  • the type EmitEventFn is no longer exported from @tresjs/core

  • chore: restored renderer tyope in LoopCallbackWithCtx

  • refactor: renamed useRenderer

  • fix: test

  • cleanup

    • useRenderer now returns invalidate and advance
  • useTresContextProvider no longer contains render state

  • chore: removed internal renderer ref

  • refactor!: the renderer instance is now returned from useRenderer, made renderer being wrapped inside the context

    • invalidate, advance, canBeInvalidated and the renderer instance are now accessed through the context via renderer
  • the renderer instance in the context is now readonly

  • refactor: removed one emit dependency

  • tofo cleanup

  • merge fix

  • refactor: updated other parts to match structural changes

  • worked around loop errors

  • fixes concerning changes in playground

  • updated english docs

  • fix: wrong render mode in docs

  • removed obsolete todo

  • fix: added null check

  • fix: removed deprecated toValue import

  • chore: restored renderer tyope in LoopCallbackWithCtx

  • refactor: renamed useRenderer

  • fix: test

  • fix: lint fix

  • useSeek is deprecated

  • Marked the useSeek composable as deprecated in the documentation, indicating its removal in v5.0.0.

  • Removed the useSeek composable implementation and its associated tests from the codebase to streamline the composables directory.

  • Updated the documentation to reflect the deprecation status and provide guidance for users.

  • Update docs/api/composables.md

Co-authored-by: Tino Koch 17991193+Tinoooo@users.noreply.github.com

Features

  • 1012 add context inspector devtools (#1013) (ff6723c)
  • 986 remove usetexture (#1008) (041b697)
  • deprecate useSeek composable and update documentation (#990) (3d5ea13)
  • introduce useTres composable and update related documentation (#1017) (fd03f72)

Bug Fixes

Code Refactoring

  • 979 move renderer logic from usetrescontextprovider to userenderer 2 (#993) (36bcb1c)
  • 992 removal of emit from usetrescontextprovider composable (#999) (090adf3)
  • context camera is now a state (#1004) (d5daf5d), closes #1009
  • removal of performance state from useTresContextProvider (#1003) (79edf43)
  • removed useTresReady, added isReady to the renderer in the… (#1000) (ff35bfc)

    5.0.0-next.0 (2025-04-12)

⚠ BREAKING CHANGES

  • loader: useLoader no longer returns the plain obj, it now returns and object with reactive data (resource|s), isLoading, error) and a load method, can be used both sync and async (suspense)

  • Added useLoader composable for loading resources with THREE.js, supporting single and multiple resource loading, loading state tracking, and error handling.

  • Created comprehensive documentation for useLoader, detailing its features, usage examples, and API reference.

  • Updated various playground components to utilize the new useLoader composable for loading GLTF and FBX models.

  • Added new demo pages for loading multiple models and using the UseLoader component in templates.

  • chore(loader): simplify useLoader implementation and clean up imports

  • Updated the UseLoader component in documentation to remove unnecessary destructuring of the slot props.

  • Cleaned up imports in BlenderCube.vue, Suzanne.vue, and TheExperience.vue by removing unused types.

  • Added eslint-disable comments for console logging in Suzanne.vue and TheExperience.vue to improve code readability while debugging.

  • feat: useGraph to generate named object material collections

  • feat: useAsyncState for useLoader

  • Added documentation for the useLoader composable, detailing its features, usage examples, and API reference.

  • Updated the navigation in the VitePress configuration to include a link to the new useLoader documentation.

  • Enhanced the useLoader composable to support better type safety and resource management.

  • Removed the Suzanne.vue component as part of the cleanup process.

  • feat: enhance useLoader and useGraph composables

  • Updated the useLoader composable to improve type safety and support loading textures alongside models.

  • Refactored the useGraph composable to accept both Object3D and TresObject types, enhancing its flexibility.

  • Added new examples and documentation for loading multiple models and textures, including progress tracking.

  • Cleaned up and organized playground components to demonstrate the new features effectively.

  • refactor(useLoader.test): clean up imports by removing unused nextTick import

  • Removed the unused nextTick import from the useLoader.test.ts file to streamline the code and improve readability.

  • docs: remove trailing spaces in team.md for consistency

  • Cleaned up trailing spaces in the team.md file to improve code consistency and readability.

  • fix(graph): export also types from graph utils

  • refactor(index.ts): remove unused export of buildGraph

  • Removed the unused buildGraph export from index.ts to streamline the code and improve maintainability.

  • feat: enhance resources loading with progress tracking

  • Enhanced the useLoader composable to return progress information, allowing for better user feedback during model loading.

  • Updated TheModel.vue to utilize the new progress tracking feature from the useLoader composable.

  • Removed the unused LoadingManager and integrated progress updates directly into the component's state.

  • Updated docs

  • feat: added tests to load and progress

  • Tres is now ESM only

  • Removed UMD build configuration from package.json and adjusted exports to only include ES module.

  • Updated vite.config.ts to specify the output format as ES, enhancing compatibility with modern module systems.

Features

Bug Fixes

  • export logger utility from utils in index.ts (#966) (bb0b9e2)

    4.3.5 (2025-05-16)

Bug Fixes

  • make sure key is camelCase when reached else on conditional (#1011) (2902d05)

    4.3.4 (2025-05-13)

Bug Fixes

5.0.0-next.0 (2025-04-12)

⚠ BREAKING CHANGES

  • loader: useLoader no longer returns the plain obj, it now returns and object with reactive data (resource|s), isLoading, error) and a load method, can be used both sync and async (suspense)

  • Added useLoader composable for loading resources with THREE.js, supporting single and multiple resource loading, loading state tracking, and error handling.

  • Created comprehensive documentation for useLoader, detailing its features, usage examples, and API reference.

  • Updated various playground components to utilize the new useLoader composable for loading GLTF and FBX models.

  • Added new demo pages for loading multiple models and using the UseLoader component in templates.

  • chore(loader): simplify useLoader implementation and clean up imports

  • Updated the UseLoader component in documentation to remove unnecessary destructuring of the slot props.

  • Cleaned up imports in BlenderCube.vue, Suzanne.vue, and TheExperience.vue by removing unused types.

  • Added eslint-disable comments for console logging in Suzanne.vue and TheExperience.vue to improve code readability while debugging.

  • feat: useGraph to generate named object material collections

  • feat: useAsyncState for useLoader

  • Added documentation for the useLoader composable, detailing its features, usage examples, and API reference.

  • Updated the navigation in the VitePress configuration to include a link to the new useLoader documentation.

  • Enhanced the useLoader composable to support better type safety and resource management.

  • Removed the Suzanne.vue component as part of the cleanup process.

  • feat: enhance useLoader and useGraph composables

  • Updated the useLoader composable to improve type safety and support loading textures alongside models.

  • Refactored the useGraph composable to accept both Object3D and TresObject types, enhancing its flexibility.

  • Added new examples and documentation for loading multiple models and textures, including progress tracking.

  • Cleaned up and organized playground components to demonstrate the new features effectively.

  • refactor(useLoader.test): clean up imports by removing unused nextTick import

  • Removed the unused nextTick import from the useLoader.test.ts file to streamline the code and improve readability.

  • docs: remove trailing spaces in team.md for consistency

  • Cleaned up trailing spaces in the team.md file to improve code consistency and readability.

  • fix(graph): export also types from graph utils

  • refactor(index.ts): remove unused export of buildGraph

  • Removed the unused buildGraph export from index.ts to streamline the code and improve maintainability.

  • feat: enhance resources loading with progress tracking

  • Enhanced the useLoader composable to return progress information, allowing for better user feedback during model loading.

  • Updated TheModel.vue to utilize the new progress tracking feature from the useLoader composable.

  • Removed the unused LoadingManager and integrated progress updates directly into the component's state.

  • Updated docs

  • feat: added tests to load and progress

  • Tres is now ESM only

  • Removed UMD build configuration from package.json and adjusted exports to only include ES module.

  • Updated vite.config.ts to specify the output format as ES, enhancing compatibility with modern module systems.

Features

Bug Fixes

  • export logger utility from utils in index.ts (#966) (bb0b9e2)

    4.3.6 (2025-06-06)

4.3.5 (2025-05-16)

Bug Fixes

  • make sure key is camelCase when reached else on conditional (#1011) (2902d05)

4.3.4 (2025-05-13)

Bug Fixes

  • patchProp: harden props inference (#1006) (6cdf28b)
  • revert improve type safety in retargeting proxy setter (#930) (0a95764)

Reverts

  • Revert "fix: improve typing pixel ratio handling in setPixelRatio utility" (#929) (9e76010), closes #929

4.3.3 (2025-02-06)

Bug Fixes

  • remove camera warning log on default camera creation (#916) (5d490b4)
  • safely remove helpers in vDistanceTo and vLightHelper directives (#919) (f512b1a)
  • typescript build issues utils (#924) (e9b7bf9)

4.3.2 (2025-01-03)

Features

  • extend GlobalComponents interface to include 'primitive' component type (#896) (b78a6ff)
  • update deps 20 12 24 (#887) (d377750)

Bug Fixes

  • function typo: fix typo in function name in composable (#858) (c186232)
  • 4.3.1 (2024-10-13)

    Bug Fixes

    • 849 support Symbol keys in provide/inject (#850) (35125ce)

    4.3.0 (2024-09-30)

    Features

    • add UseLoader component (471bd0d)
    • app: 680 UseTexture composable as component (#757) (f01a897)
    • pass all provides down to custom renderer (#806) (b4a3866)

    Bug Fixes

    Reverts

    4.2.10 (2024-09-04)

    Bug Fixes

    • 785 vscode intellisense autocompletion not getting tres components props (#809) (66c7ab5)

    4.2.9 (2024-08-30)

    Bug Fixes

    • useLoader: remove array related logic for loaders (#808) (88cef1e)

    4.2.8 (2024-08-30)

    Bug Fixes

    • use CubeTextureLoader correctly with array of files (#807) (38f05b0)

    4.2.7 (2024-08-19)

    4.2.6 (2024-08-15)

    Bug Fixes

    • 796 unmount the canvas component instant mount children again even if canvas is not mounted (#799) (9a20b52)

    4.2.5 (2024-08-01)

    Bug Fixes

    • types: added Ref type to controls on ctx (415de94)

    4.2.4 (2024-08-01)

    Bug Fixes

    4.2.3 (2024-07-26)

    Bug Fixes

    • 792 directionallighthelpers breaks devtools (#793) (426acee), closes #533

    4.2.2 (2024-07-24)

    Bug Fixes

    • remove on demand invalidation warning (#788) (eab74e6)

    4.2.1 (2024-07-17)

    Bug Fixes

    4.2.0 (2024-07-14)

    Features

    • (devtools) add userData to inspectable properties (#740) (00bef33)
    • TresCanvas: add dpr prop (#768) (8943cc3)

    Bug Fixes

    • attach detach (#749) (8c1c668)
    • localstate for objects with events and manual register/unregister from nodeOps using ctx (#767) (9a53e60)
    • primitive: implement as proxy to avoid breaking references (#764) (f637bf3)

    4.1.0 (2024-07-05)

    Features

    Bug Fixes

    4.0.2 (2024-06-05)

    Bug Fixes

    • implement createComment and nextSibling node operations so that objects being v-if'd are not lost by Vue's runtime and incorrectly placed in the scene root (814d678)
    • intersect only objects with events registered. (#714) (b320524)
    • propogate events over previous intersections on pointerLeave and pointerOut (66264fc)

    4.0.1 (2024-06-01)

    Bug Fixes

    • augmenting types for tres components for the nuxt module (#710) (c8a5b0d)

    4.0.0 (2024-05-30)

    Features

    4.0.0-rc.2 (2024-05-24)

    Bug Fixes

    4.0.0-rc.1 (2024-05-15)

    Features

    Bug Fixes

    • make on* callbacks settable (#672) (ac152df)
    • utils: reorder object disposal to avoid issue with Helper dispose methods (#683) (e5a2cef)

    4.0.0-rc.0 (2024-04-25)

    ⚠ BREAKING CHANGES

    • events: pointerevents manager and state (#529)

    Features

    Bug Fixes

    4.0.0-next.2 (2024-03-27)

    Bug Fixes

    • refactor nodeOps to return methods at the end of the function (#602) (cd0c3bc)

    4.0.0-next.1 (2024-03-18)

    Features

    • 140 on demand rendering (#497) (f688c64)
    • 492 set tone mapping default to acesfilmictonemapping (#498) (c4547f9)
    • 503 conditional rendering of primitives (#514) (79d8a76)
    • 516 localstate for custom renderer node instances instead of userdata (#522) (08717ef)
    • remove default camera warning (#499) (8bbafde)
    • update to three v160 and vue v3.4 (#488) (5fad3b8)

    Bug Fixes

    • nodeOps is now a function (#579) (ddc229e)
    • camera aspect (52dad5c)
    • types: added Object3DEventMap to Object3D generics for point event handling (#491) (a63eb90)

    4.0.0-next.0 (2023-12-22)

    Features

    4.0.0-next.2 (2024-03-27)

    4.0.0-next.1 (2024-03-18)

    3.9.0 (2024-04-24)

    Features

    • app: Add a new directive, v-rotate (ccf5313)

    Bug Fixes

    • deps: update dependency vue-router to v4.3.1 (#650) (9bbb676)

    3.8.1 (2024-04-08)

    Bug Fixes

    • refactor nodeOps to return methods at the end of the function (#602) (cd0c3bc)

    3.8.0 (2024-04-03)

    Features

    Bug Fixes

    • explicitely add @vue/devtools-api dep to package.json (#604) (98109af)
    • useLogger: avoid string substitution in non-strings (3e2233c)
    • useLogger: remove '' from log, allow any args and string substitution (a482ebe)
    • 3.7.0 (2024-01-29)

      Features

      • 140 on demand rendering (#497) (f688c64)
      • 492 set tone mapping default to acesfilmictonemapping (#498) (c4547f9)
      • 503 conditional rendering of primitives (#514) (79d8a76)
      • 516 localstate for custom renderer node instances instead of userdata (#522) (08717ef)
      • remove default camera warning (#499) (8bbafde)
      • update to three v160 and vue v3.4 (#488) (5fad3b8)

      Bug Fixes

      • nodeOps is now a function (#579) (ddc229e)
      • camera aspect (52dad5c)
      • types: added Object3DEventMap to Object3D generics for point event handling (#491) (a63eb90)

      4.0.0-next.0 (2023-12-22)

      Features

      3.7.0 (2024-01-29)

      Features

      Bug Fixes

      • docs: change image path to silence warning (#519) (280d248)

      3.6.1 (2024-01-16)

      Bug Fixes

      • correct minor typos (#438) (341faac), closes #452
      • incorrect MathRepresentation type (#456) (314b088)
      • usetrescontextprovider: fixed rendering issues caused when resize is triggered (#512) (a16b12b), closes #511

      3.6.0 (2023-12-12)

      Features

      3.6.0-next.0 (2023-12-06)

      Features

      • devtools hook on window object (df96c1f)

      3.5.2 (2023-12-12)

      Bug Fixes

      • force memory free allocation when disposing materials and geometries (#463) (1ef3533)

      3.5.1 (2023-11-28)

      3.5.0 (2023-11-05)

      Features

      • useSeek: Add seekAll and seekAllByName methods to useSeek composable (#433) (ef905a3)

      Bug Fixes

      • types-(fix-#427): vueprops change ref to vnoderef and key add number and symbol (#428) (45aeafd), closes fix-#427 #427

      3.4.1 (2023-10-19)

      Bug Fixes

      3.4.0 (2023-10-19)

      Features

      Bug Fixes

      3.3.0 (2023-10-02)

      Features

      • context (TresContext) is now exposed from TresCanvas (#404) (838d779)

      Bug Fixes

      3.3.0-next.0 (2023-09-29)

      Features

      • context (TresContext) is now exposed from TresCanvas (#404) (838d779)

      Bug Fixes

      3.2.3 (2023-09-22)

      Bug Fixes

      3.2.2 (2023-09-16)

      Bug Fixes

      • ensure scene as parent fallback for helpers (#397) (d63b028)
      • made reactivity of camera prop on TresCanvas work again (#396) (990612d)
      • useTexture docs detail (#395) (158d4c3)

      3.2.1 (2023-09-11)

      Bug Fixes

      3.2.1-next.4 (2023-09-11)

      Reverts

      • Revert "chore: fix lint" (f53fba9)

      3.2.1-next.3 (2023-09-11)

      Bug Fixes

      • revert object assign usage for setting app in appContext (889e022)

      3.2.1-next.2 (2023-09-11)

      Bug Fixes

      • explicitely set app context app (c2a758f)

      3.2.1-next.1 (2023-09-11)

      Bug Fixes

      • object assign approach for inner app context (3a6dc31)

      3.2.1-next.0 (2023-09-11)

      Bug Fixes

      3.2.0 (2023-09-06)

      Features

      • objects blocking pointer event (#388) (03ab2e1)
      • renamed useCamera composable methods to prevent confusion (#380) (58feabd)

      Bug Fixes

      • removed boolean prop defaults from TresCanvas (#384) (bb5fca5)

      3.1.1 (2023-08-26)

      Bug Fixes

      3.1.0 (2023-08-23)

      Features

      Bug Fixes

      • added logic on pathProps to re-instance nodes once args change (#367) (453b031)
      • added revision version to apply useLegacyLights only if neccesary (#373) (dee4b97)
      • args should be empty when args was falsy (#369) (81b7914)
      • instances re-instancing when not needed (#374) (f2ae46b)

      3.0.1 (2023-07-29)

      Bug Fixes

      • added controls and extend to state context (#355) (c2540a5)

      3.0.0 (2023-07-29)

      ⚠ BREAKING CHANGES

      • UseTres is now useTresContext. Instead of using a store like in v2, we now use a context provider based on provide/inject.

      Features

      Documentation

      • explain state breaking changes (4757da9)

      2.4.2 (2023-07-14)

      Bug Fixes

      2.4.1 (2023-07-13)

      Bug Fixes

      • add app context to state (#346) (197f258)
      • change internal Scene component name to force rendering (#330) (780743c)
      • fake a VNodeRef on types to accept strings and null (#344) (c069f64)
      • prop types on TresCanvas (#326) (309584a)

      2.4.0 (2023-06-28)

      Features

      • export vue compiler options for Tres custom renderer (#324) (66716d5)

      Bug Fixes

      • temporaly cast the disableRender prop (#322) (9cc63d2)

      2.3.0 (2023-06-22)

      Features

      2.2.0 (2023-06-19)

      Features

      • removed useCamera logic from nodeOps (#308) (e9509ba)

      Bug Fixes

      • banner image link (b793c77)
      • main button colors (3aab827)
      • raycaster does not work properly when scene is not in full screen (#304) (20a5b9e)

      2.1.3 (2023-06-14)

      Bug Fixes

      2.1.2 (2023-05-26)

      Bug Fixes

      • added scene fallback as parent for controls (e986f9c)

      2.1.1 (2023-05-22)

      2.1.0 (2023-05-22)

      Features

      • mighty sexy runtime types (97a5b64)

      Bug Fixes

      2.0.0 (2023-05-12)

      2.0.0-rc.4 (2023-05-09)

      Bug Fixes

      • only set default camera settings to first camera (7f1e7cd)

      2.0.0-rc.3 (2023-05-09)

      Bug Fixes

      • akwardly added fog and fixed also typing (e256768)
      • colorspace types (27e10e9)
      • disabling pushing more than one camera on nodeOpts (57a07bf)

      2.0.0-rc.2 (2023-05-03)

      Bug Fixes

      • updated breaking changes of three v152 color maangement (1e47a5f)

      2.0.0-rc.1 (2023-05-03)

      2.0.0-rc.0 (2023-05-03)

      2.0.0-beta.13 (2023-04-27)

      Features

      • add manual camera prop to canvas (588a3fc)

      2.0.0-beta.12 (2023-04-25)

      Bug Fixes

      • avoid assigning args as BufferAttribute to BufferGeometry (1cc67b0)
      • deps: update dependency three to ^0.151.0 (6f0e80c)

      2.0.0-beta.11 (2023-04-20)

      Bug Fixes

      • optional chaining on insert vnodes (c2dcf52)

      Reverts

      • Revert "edit getting-started.md" (fcc6900)

      2.0.0-beta.10 (2023-04-19)

      Bug Fixes

      2.0.0-beta.9 (2023-04-18)

      Bug Fixes

      • incorrect implementation of disable render on canvas (2442935)

      2.0.0-beta.8 (2023-04-17)

      Features

      • add disable render prop for postprocessing (b2fd557)

      2.0.0-beta.7 (2023-04-15)

      Bug Fixes

      • remove object assign for non primitive (f9e0d4b)

      2.0.0-beta.6 (2023-04-15)

      2.0.0-beta.5 (2023-04-14)

      Features

      • core: fixed nodeOps remove test (2706f48)
      • core: fixed nodeOps remove test (this time correctly 😉) (f5fca28)
      • core: made custom renderer determine whether materials and geometries should be disposed (36c8cf5)
      • core: made custom renderer traverse the scene tree to dispose obsolete materials and geometries (cae21b1)
      • first try concerning conditional rendering of components (31bdd96)
      • primitive (ab63e14)

      Bug Fixes

      2.0.0-beta.4 (2023-04-06)

      Bug Fixes

      • optional chaining on object pointer events (421a7d5)

      2.0.0-beta.3 (2023-04-06)

      Bug Fixes

      • added default position and direction to camera if props are not passed (63a340f)
      • tres-canvas window-size now support 'true' string (a63e33f)

      2.0.0-beta.2 (2023-04-05)

      Bug Fixes

      • move raycaster logic from nodeOps to TresCanvas (d2200ae)
      • raycaster events listener on canvas rather than windows (bfe82b0)

      2.0.0-beta.1 (2023-04-04)

      Features

      • expose state from TresCanvas (eeeff2e)

      2.0.0-beta.0 (2023-04-04)

      Features

      • cleanup of obsolete code (f55ef36)
      • core: performance improvement concerning raycaster (#139) (597e917)
      • use tres provider and context (46cdd00)

      2.0.0-alpha.6 (2023-03-30)

      Features

      • add alphaMap to useTexture (f66c363)
      • add matcap to useTexture (ce374d6)
      • adding warning when canvas parent height is 0px (4224103)

      Bug Fixes

      • removed key split on buffer geometry attributes (a29cb2b)

      2.0.0-alpha.5 (2023-03-28)

      Features

      2.0.0-alpha.4 (2023-03-27)

      Bug Fixes

      • removing resetState and going for more granular approach of disposal (6f1e38b)
      • reset state on unmounted (dbbaee7)

      2.0.0-alpha.3 (2023-03-26)

      Bug Fixes

      • ensure parent for nodeOps target when key is a function (c07d963)

      2.0.0-alpha.2 (2023-03-23)

      Features

      • buffergeometry setAttribute logic (beee7b3)

      2.0.0-alpha.1 (2023-03-22)

      Bug Fixes

      2.0.0-alpha.0 (2023-03-22)

      Features

      • cientos: better typ support useEnvironment (821b6a6)
      • cientos: correctly typed Text3D (61efbfb)
      • cientos: orbit controls typed (e38e699)
      • cientos: shapes types (aa7361b)
      • cientos: typed usePamCameraMouse (07609be)
      • core: adding composables to the solution (9a3f8bb)
      • core: auto generated tres component types (7430d2c)
      • core: cleaning up a little bit (8bdd825)
      • core: export useLogger (4ad1a3e)
      • core: fixing black screen (f4f198c)
      • core: function props and demos updated (fa072cd)
      • core: nice warning for camera at 0,0,0
      • core: provide inject worked again (2390ec1)
      • core: re-structure and tres custom renderer base (aad0953)
      • core: tres components typing auto generated (6736b4c)
      • core: types for TresCanvas (42ee984)
      • core: v-if working on custom renderer (e19da3a)
      • createTres wrapper for mounting options (d480b36)

      Bug Fixes

      • cientos: added default props to orbit controls (68d8673)
      • cientos: cone props (5f20368)
      • cientos: remove unused extend (5d5b487)
      • core: added handleHMR update (594ab73)
      • core: fixed type issues (bd4be33)
      • core: nodeOps no op (9044c99)
      • useTexture to show indentation for code snippet (e983c5d)