Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

feat: release v4 #490

Merged
merged 70 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
224ab06
feat: 474 vue chrome devtools plugin (#479)
alvarosabu Dec 22, 2023
e760525
chore: release v4.0.0-next.0
alvarosabu Dec 22, 2023
c8e79bc
Merge branch 'main' into v4
alvarosabu Jan 2, 2024
5fad3b8
feat: update to three `v160` and vue `v3.4` (#488)
alvarosabu Jan 2, 2024
a63eb90
fix(types): added `Object3DEventMap` to `Object3D` generics for point…
alvarosabu Jan 2, 2024
83f0e06
Merge branch 'main' into v4
alvarosabu Jan 17, 2024
f688c64
feat: 140 on demand rendering (#497)
alvarosabu Jan 23, 2024
8bbafde
feat: remove default camera warning (#499)
alvarosabu Jan 23, 2024
c4547f9
feat: 492 set tone mapping default to acesfilmictonemapping (#498)
alvarosabu Jan 23, 2024
08717ef
feat: 516 localstate for custom renderer node instances instead of us…
alvarosabu Feb 1, 2024
898a8b1
Merge branch 'main' into v4
alvarosabu Feb 2, 2024
52dad5c
fix: camera aspect
andretchen0 Feb 5, 2024
79d8a76
feat: 503 conditional rendering of primitives (#514)
alvarosabu Feb 21, 2024
1fa9385
Merge branch 'main' into v4
alvarosabu Mar 4, 2024
1a705b1
Merge branch 'v4' into fix/camera-aspect
alvarosabu Mar 6, 2024
97dcd7b
Merge pull request #538 from Tresjs/fix/camera-aspect
andretchen0 Mar 6, 2024
ddc229e
fix: `nodeOps` is now a function (#579)
alvarosabu Mar 8, 2024
963e662
chore: next package json version
alvarosabu Mar 18, 2024
47713bc
chore: release v4.0.0-next.1
alvarosabu Mar 18, 2024
8efe6e0
Merge branch 'main' into v4
alvarosabu Mar 20, 2024
cd0c3bc
fix: refactor nodeOps to return methods at the end of the function (#…
alvarosabu Mar 26, 2024
a6578a7
chore: internal playground organisation (#601)
alvarosabu Mar 27, 2024
5f0979e
chore: deps update
alvarosabu Mar 27, 2024
18375e4
chore: internal primitive model test playground
alvarosabu Mar 27, 2024
affd17c
chore: fix lint
alvarosabu Mar 27, 2024
bd1909c
chore: release v4.0.0-next.2
alvarosabu Mar 27, 2024
05069ab
chore: misc routes
alvarosabu Mar 31, 2024
906f2e1
fix: do not change pierced props case (#608)
andretchen0 Mar 31, 2024
fe37d7c
chore: lint fix
alvarosabu Mar 31, 2024
9d217d6
Merge branch 'main' into v4
alvarosabu Apr 9, 2024
4b7fb86
chore: problem with package version
alvarosabu Apr 9, 2024
1429905
chore: fix lint
alvarosabu Apr 9, 2024
b5aae35
Merge branch 'v4' of https://github.com/Tresjs/tres into v4
andretchen0 Apr 12, 2024
bc12f0b
chore: rebuild pnpm-lock
andretchen0 Apr 12, 2024
e3874f9
test(nodeOps): clean up tests
andretchen0 Apr 12, 2024
0cf1771
test(nodeOps): organize tests
andretchen0 Apr 12, 2024
576cf6c
test: add coverage plugin
andretchen0 Apr 12, 2024
fbcaa41
test: add coverage to package.json script
andretchen0 Apr 13, 2024
6fd8c08
test(nodeOps): improve test coverage
andretchen0 Apr 13, 2024
986543c
Merge branch 'main' into v4
alvarosabu Apr 16, 2024
1ad7b8b
Merge branch 'main' into v4
alvarosabu Apr 16, 2024
cdf6b6f
feat: devtools renderer improvements (#614)
alvarosabu Apr 18, 2024
b536ab1
feat(events)!: pointerevents manager and state (#529)
garrlker Apr 22, 2024
5f20467
Merge branch 'main' into v4
alvarosabu Apr 23, 2024
e98ca6d
feat: 499 better memory management (#606)
alvarosabu Apr 24, 2024
15ef7a2
Merge branch 'main' into v4
alvarosabu Apr 24, 2024
0badfb1
chore: fix lint
alvarosabu Apr 24, 2024
d4e1fe2
chore: type issues (#663)
alvarosabu Apr 25, 2024
17d3b29
chore: release v4.0.0-rc.0
alvarosabu Apr 25, 2024
a3d7bbe
chore: merge v4 updates
andretchen0 Apr 26, 2024
1121eb1
Merge pull request #637 from Tresjs/test/nodeOps-organize
andretchen0 Apr 26, 2024
ac152df
fix: make on* callbacks settable (#672)
andretchen0 May 3, 2024
1b2fa70
feat: 633 use loop (#673)
alvarosabu May 14, 2024
96960d1
chore(playground): adding missing import and removing the directives …
alvarosabu May 15, 2024
6be07a5
chore(playground): use new composable on animations
alvarosabu May 15, 2024
e5a2cef
fix(utils): reorder object disposal to avoid issue with Helper `dispo…
alvarosabu May 15, 2024
59b8139
Merge branch 'main' into v4
alvarosabu May 15, 2024
119a5ac
Merge branch 'v4' of github.com:Tresjs/tres into v4
alvarosabu May 15, 2024
22b0f26
chore: updated deps
alvarosabu May 15, 2024
f840614
chore: release v4.0.0-rc.1
alvarosabu May 15, 2024
0720d18
fix: manual rendering blank (#685)
alvarosabu May 18, 2024
a41f532
fix: 686 useloop callback state missing controls (#687)
alvarosabu May 22, 2024
41ab274
docs: add RectAreaLightHelper to vLightHelper docs
JaimeTorrealba May 23, 2024
ea71654
chore(deps): update deps 24-0-2024
alvarosabu May 24, 2024
dac4d7c
chore: release v4.0.0-rc.2
alvarosabu May 24, 2024
43c3229
fix: start loop if user calls useRenderLoop (#695)
andretchen0 May 27, 2024
d45c4d8
docs: change motivation
alvarosabu May 27, 2024
6cc13b5
Merge pull request #690 from Tresjs/docs/add-reactarealighthelper-vli…
JaimeTorrealba May 28, 2024
51dec77
Merge branch 'main' into v4
alvarosabu May 28, 2024
228054a
chore(deps): last update before release
alvarosabu May 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 105 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,83 @@


## [4.0.0-rc.2](https://github.com/Tresjs/tres/compare/4.0.0-rc.1...4.0.0-rc.2) (2024-05-24)


### Bug Fixes

* 686 useloop callback state missing controls ([#687](https://github.com/Tresjs/tres/issues/687)) ([a41f532](https://github.com/Tresjs/tres/commit/a41f532b0c8d717e4bc3ec11fa73bd58df871fa8))
* manual rendering blank ([#685](https://github.com/Tresjs/tres/issues/685)) ([0720d18](https://github.com/Tresjs/tres/commit/0720d186e92ca9faa9e5f4e51a3269504bed2a09))

## [4.0.0-rc.1](https://github.com/Tresjs/tres/compare/4.0.0-rc.0...4.0.0-rc.1) (2024-05-15)


### Features

* 633 use loop ([#673](https://github.com/Tresjs/tres/issues/673)) ([1b2fa70](https://github.com/Tresjs/tres/commit/1b2fa70e9999eb64395b3e7e9f2489ceab035a7a))


### Bug Fixes

* make on* callbacks settable ([#672](https://github.com/Tresjs/tres/issues/672)) ([ac152df](https://github.com/Tresjs/tres/commit/ac152dfa91c6ba347cbe0566fb4afbe19f50dd2b))
* **utils:** reorder object disposal to avoid issue with Helper `dispose` methods ([#683](https://github.com/Tresjs/tres/issues/683)) ([e5a2cef](https://github.com/Tresjs/tres/commit/e5a2cef0e450196abaa6d18380a5aadbc9cd057d))

## [4.0.0-rc.0](https://github.com/Tresjs/tres/compare/3.9.0...4.0.0-rc.0) (2024-04-25)


### ⚠ BREAKING CHANGES

* **events:** pointerevents manager and state (#529)

### Features

* 499 better memory management ([#606](https://github.com/Tresjs/tres/issues/606)) ([e98ca6d](https://github.com/Tresjs/tres/commit/e98ca6dea15973b3a00e4b485199d9906eb772eb))
* devtools renderer improvements ([#614](https://github.com/Tresjs/tres/issues/614)) ([cdf6b6f](https://github.com/Tresjs/tres/commit/cdf6b6fefbd58dbf1dfbe396f219ac6f7c6fc92d))
* **events:** pointerevents manager and state ([#529](https://github.com/Tresjs/tres/issues/529)) ([b536ab1](https://github.com/Tresjs/tres/commit/b536ab19d1f4082c2db926e24d8c52f92949964b))


### Bug Fixes

* do not change pierced props case ([#608](https://github.com/Tresjs/tres/issues/608)) ([906f2e1](https://github.com/Tresjs/tres/commit/906f2e157aab7aa6daef5682c3282cf6e84fa891))

## [4.0.0-next.2](https://github.com/Tresjs/tres/compare/3.9.0...4.0.0-rc.0) (2024-03-27)


### Bug Fixes

* refactor nodeOps to return methods at the end of the function ([#602](https://github.com/Tresjs/tres/issues/602)) ([cd0c3bc](https://github.com/Tresjs/tres/commit/cd0c3bcd891f019cf91f30e5fdd547630332a065))

## [4.0.0-next.1](https://github.com/Tresjs/tres/compare/3.9.0...4.0.0-rc.0) (2024-03-18)


### Features

* 140 on demand rendering ([#497](https://github.com/Tresjs/tres/issues/497)) ([f688c64](https://github.com/Tresjs/tres/commit/f688c6447be887c4675a57ecabb5182d8b7d02cf))
* 492 set tone mapping default to acesfilmictonemapping ([#498](https://github.com/Tresjs/tres/issues/498)) ([c4547f9](https://github.com/Tresjs/tres/commit/c4547f92615a43b7b56b34c0e1ee9f4b78a2230b))
* 503 conditional rendering of primitives ([#514](https://github.com/Tresjs/tres/issues/514)) ([79d8a76](https://github.com/Tresjs/tres/commit/79d8a762da6b6e23771a20314f7902eff4635acf))
* 516 localstate for custom renderer node instances instead of userdata ([#522](https://github.com/Tresjs/tres/issues/522)) ([08717ef](https://github.com/Tresjs/tres/commit/08717efd0f631c085340b1fea4eb6c154c63608b))
* remove default camera warning ([#499](https://github.com/Tresjs/tres/issues/499)) ([8bbafde](https://github.com/Tresjs/tres/commit/8bbafde48a33753f0b6560da36a4d128aaa83cc6))
* update to three `v160` and vue `v3.4` ([#488](https://github.com/Tresjs/tres/issues/488)) ([5fad3b8](https://github.com/Tresjs/tres/commit/5fad3b8095c09cfe758e2553da3df49b29b1ce1a))


### Bug Fixes

* `nodeOps` is now a function ([#579](https://github.com/Tresjs/tres/issues/579)) ([ddc229e](https://github.com/Tresjs/tres/commit/ddc229e6e492b9e7887add0fcc679a9ae4e47f5c))
* camera aspect ([52dad5c](https://github.com/Tresjs/tres/commit/52dad5c98271f80f4d454bbcce1bb5844960f943))
* **types:** added `Object3DEventMap` to `Object3D` generics for point event handling ([#491](https://github.com/Tresjs/tres/issues/491)) ([a63eb90](https://github.com/Tresjs/tres/commit/a63eb9099fcaf97b1c96abe5667ee71ca2fd611f))

## [4.0.0-next.0](https://github.com/Tresjs/tres/compare/3.9.0...4.0.0-rc.0) (2023-12-22)


### Features

* 474 vue chrome devtools plugin ([#479](https://github.com/Tresjs/tres/issues/479)) ([224ab06](https://github.com/Tresjs/tres/commit/224ab06a4404e2ae5a0cbd2f43041961862b09fd))

## [4.0.0-next.2](https://github.com/Tresjs/tres/compare/4.0.0-next.1...4.0.0-next.2) (2024-03-27)

## [4.0.0-next.1](https://github.com/Tresjs/tres/compare/3.7.0...4.0.0-next.1) (2024-03-18)
* correct type exporting issues ([#625](https://github.com/Tresjs/tres/issues/625)) ([8e52cf1](https://github.com/Tresjs/tres/commit/8e52cf1935d7b725b87c9a41e44ba61e33bd3e85))


## [3.9.0](https://github.com/Tresjs/tres/compare/3.8.1...3.9.0) (2024-04-24)


Expand All @@ -17,7 +95,8 @@

### Bug Fixes

* correct type exporting issues ([#625](https://github.com/Tresjs/tres/issues/625)) ([8e52cf1](https://github.com/Tresjs/tres/commit/8e52cf1935d7b725b87c9a41e44ba61e33bd3e85))
* refactor nodeOps to return methods at the end of the function ([#602](https://github.com/Tresjs/tres/issues/602)) ([cd0c3bc](https://github.com/Tresjs/tres/commit/cd0c3bcd891f019cf91f30e5fdd547630332a065))


## [3.8.0](https://github.com/Tresjs/tres/compare/3.7.0...3.8.0) (2024-04-03)

Expand All @@ -38,6 +117,31 @@

### Features

* 140 on demand rendering ([#497](https://github.com/Tresjs/tres/issues/497)) ([f688c64](https://github.com/Tresjs/tres/commit/f688c6447be887c4675a57ecabb5182d8b7d02cf))
* 492 set tone mapping default to acesfilmictonemapping ([#498](https://github.com/Tresjs/tres/issues/498)) ([c4547f9](https://github.com/Tresjs/tres/commit/c4547f92615a43b7b56b34c0e1ee9f4b78a2230b))
* 503 conditional rendering of primitives ([#514](https://github.com/Tresjs/tres/issues/514)) ([79d8a76](https://github.com/Tresjs/tres/commit/79d8a762da6b6e23771a20314f7902eff4635acf))
* 516 localstate for custom renderer node instances instead of userdata ([#522](https://github.com/Tresjs/tres/issues/522)) ([08717ef](https://github.com/Tresjs/tres/commit/08717efd0f631c085340b1fea4eb6c154c63608b))
* remove default camera warning ([#499](https://github.com/Tresjs/tres/issues/499)) ([8bbafde](https://github.com/Tresjs/tres/commit/8bbafde48a33753f0b6560da36a4d128aaa83cc6))
* update to three `v160` and vue `v3.4` ([#488](https://github.com/Tresjs/tres/issues/488)) ([5fad3b8](https://github.com/Tresjs/tres/commit/5fad3b8095c09cfe758e2553da3df49b29b1ce1a))


### Bug Fixes

* `nodeOps` is now a function ([#579](https://github.com/Tresjs/tres/issues/579)) ([ddc229e](https://github.com/Tresjs/tres/commit/ddc229e6e492b9e7887add0fcc679a9ae4e47f5c))
* camera aspect ([52dad5c](https://github.com/Tresjs/tres/commit/52dad5c98271f80f4d454bbcce1bb5844960f943))
* **types:** added `Object3DEventMap` to `Object3D` generics for point event handling ([#491](https://github.com/Tresjs/tres/issues/491)) ([a63eb90](https://github.com/Tresjs/tres/commit/a63eb9099fcaf97b1c96abe5667ee71ca2fd611f))

## [4.0.0-next.0](https://github.com/Tresjs/tres/compare/3.7.0...4.0.0-next.1) (2023-12-22)


### Features

* 474 vue chrome devtools plugin ([#479](https://github.com/Tresjs/tres/issues/479)) ([224ab06](https://github.com/Tresjs/tres/commit/224ab06a4404e2ae5a0cbd2f43041961862b09fd))

## [3.7.0](https://github.com/Tresjs/tres/compare/3.6.1...3.7.0) (2024-01-29)

### Features

* 474 vue chrome devtools plugin ([#526](https://github.com/Tresjs/tres/issues/526)) ([0185bfa](https://github.com/Tresjs/tres/commit/0185bfa6f04faff5eabbc526616713ef7747ebeb))
* 524 feat add directives to core ([#525](https://github.com/Tresjs/tres/issues/525)) ([5268e9f](https://github.com/Tresjs/tres/commit/5268e9f13bf65c61d5ddfe7153b71b335449b81d))

Expand Down
5 changes: 2 additions & 3 deletions docs/.vitepress/config/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ export const enConfig: LocaleSpecificConfig<DefaultTheme.Config> = {

items: [
{ text: 'Extending', link: '/advanced/extending' },
{ text: 'Primitive', link: '/advanced/primitive' },
{ text: 'Primitives', link: '/advanced/primitive' },
{ text: 'Scaling Performance 🚀', link: '/advanced/performance' },
{
text: 'Caveats',
link: '/advanced/caveats',
Expand Down Expand Up @@ -77,9 +78,7 @@ export const enConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
items: [
{ text: 'v-log', link: '/directives/v-log' },
{ text: 'v-light-helper', link: '/directives/v-light-helper' },
{ text: 'v-always-look-at', link: '/directives/v-always-look-at' },
{ text: 'v-distance-to', link: '/directives/v-distance-to' },
{ text: 'v-rotate', link: '/directives/v-rotate' },
],
},
{
Expand Down
17 changes: 17 additions & 0 deletions docs/.vitepress/theme/components/BlenderCube.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<script setup lang="ts">
import { useTresContext } from '@tresjs/core'
import { useGLTF } from '@tresjs/cientos'

const { nodes } = await useGLTF('https://raw.githubusercontent.com/Tresjs/assets/main/models/gltf/blender-cube.glb', { draco: true })
const model = nodes.Cube

model.position.set(0, 1, 0)

const state = useTresContext()

state.invalidate()
</script>

<template>
<primitive :object="model" />
</template>
101 changes: 101 additions & 0 deletions docs/.vitepress/theme/components/GraphPane.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
<script lang="ts" setup>
import { ref } from 'vue'
import { useRafFn } from '@vueuse/core'
import { useState } from '../composables/state'

const width = 160
const height = 40
const strokeWidth = 2
const updateInterval = 100 // Update interval in milliseconds
const topOffset = 0 // Offset from the top

const points = ref('')
const frameTimes = ref([])
const maxFrames = ref(width / strokeWidth)

let lastUpdateTime = performance.now()

const { renderingTimes } = useState()

useRafFn(({ timestamp }) => {
if (timestamp - lastUpdateTime >= updateInterval) {
lastUpdateTime = timestamp

frameTimes.value.push(renderingTimes?.value)
renderingTimes.value = 0

if (frameTimes.value.length > maxFrames.value) {
frameTimes.value.shift()
}

points.value = frameTimes.value
.map(
(value, index) =>
`${index * strokeWidth},${
height + topOffset - strokeWidth / 2 - (value * (height + topOffset - strokeWidth)) / 2
}`,
)
.join(' ')
}
})
</script>

<template>
<div
class="absolute
right-2
top-2
flex
px-4
py-1
justify-between
gap-4
items-center
mb-2
z-10
bg-white
dark:bg-dark
shadow-xl
rounded
border-4
border-solid
bg-primary
border-primary
pointer-events-none
overflow-hidden"
>
<label class="text-secondary text-xs w-1/3">Rendering Activity</label>

<div
class="
bg-gray-100
dark:bg-gray-600
relative
w-2/3
p-1
rounded
text-right
text-xs
focus:border-gray-200
outline-none
border-none
font-sans
"
>
<svg
:width="width"
:height="height"
xmlns="http://www.w3.org/2000/svg"
fill="none"
>
<polyline
:points="points"
stroke="lightgray"
:stroke-width="strokeWidth"
stroke-linecap="round"
stroke-linejoin="round"
/>
</svg>
</div>
</div>
</template>
37 changes: 37 additions & 0 deletions docs/.vitepress/theme/components/OnDemandRendering.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<script setup lang="ts">
import { TresCanvas } from '@tresjs/core'
import { useState } from '../composables/state'
import BlenderCube from './BlenderCube.vue'
import GraphPane from './GraphPane.vue'
import RenderingLogger from './RenderingLogger.vue'

const { renderingTimes } = useState()

function onRender() {
renderingTimes.value = 1
}
</script>

<template>
<GraphPane />
<TresCanvas
render-mode="on-demand"
clear-color="#82DBC5"
@render="onRender"
>
<TresPerspectiveCamera
:position="[5, 5, 5]"
:look-at="[0, 0, 0]"
/>
<Suspense>
<BlenderCube />
</Suspense>
<TresGridHelper />
<RenderingLogger />
<TresAmbientLight :intensity="1" />
<TresDirectionalLight
:position="[0, 8, 4]"
:intensity="0.7"
/>
</TresCanvas>
</template>
23 changes: 23 additions & 0 deletions docs/.vitepress/theme/components/RenderingLogger.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<script setup lang="ts">
import { useTresContext } from '@tresjs/core'
import { OrbitControls } from '@tresjs/cientos'
import { onMounted } from 'vue'

/* const { renderingTimes } = useState() */

const state = useTresContext()

function manualInvalidate() {
state.invalidate()
}

onMounted(() => {
manualInvalidate()
})
</script>

<template>
<OrbitControls
@change="manualInvalidate"
/>
</template>
11 changes: 11 additions & 0 deletions docs/.vitepress/theme/composables/state.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { reactive, toRefs } from 'vue'

const state = reactive({
renderingTimes: 0,
})
export function useState() {
return {
...toRefs(state),

}
}
Loading
Loading