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
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)
webgpu native support (#1029) (6f3d41d)
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
Co-authored-by: Tino Koch 17991193+Tinoooo@users.noreply.github.com
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.
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
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
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
EmitEventName
is no longer exported from @tresjs/corethe type EmitEventFn
is no longer exported from @tresjs/core
chore: restored renderer tyope in LoopCallbackWithCtx
refactor: renamed useRenderer
fix: test
cleanup
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
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
removed useTresReady, added isReady to the renderer in the… (#1000) (ff35bfc)
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.
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
Co-authored-by: Tino Koch 17991193+Tinoooo@users.noreply.github.com
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.
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
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
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
EmitEventName
is no longer exported from @tresjs/corethe type EmitEventFn
is no longer exported from @tresjs/core
chore: restored renderer tyope in LoopCallbackWithCtx
refactor: renamed useRenderer
fix: test
cleanup
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
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
removed useTresReady, added isReady to the renderer in the… (#1000) (ff35bfc)
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.
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.
@vue/devtools-api
(#846) (fd3b599)dispose
methods (#683) (e5a2cef)v160
and vue v3.4
(#488) (5fad3b8)nodeOps
is now a function (#579) (ddc229e)Object3DEventMap
to Object3D
generics for point event handling (#491) (a63eb90)@vue/devtools-api
dep to package.json (#604) (98109af)v160
and vue v3.4
(#488) (5fad3b8)nodeOps
is now a function (#579) (ddc229e)Object3DEventMap
to Object3D
generics for point event handling (#491) (a63eb90)args
change (#367) (453b031)provide/inject
.VNodeRef
on types to accept strings and null (#344) (c069f64)GlobalComponents
rather than replacing (70b3717)