@threlte/theatre 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script>import { TransformControls, useParent, useThrelte } from '@threlte/core';
|
|
2
|
-
import { getContext } from 'svelte';
|
|
2
|
+
import { getContext, onDestroy } from 'svelte';
|
|
3
3
|
import { DEG2RAD, RAD2DEG } from 'three/src/math/MathUtils';
|
|
4
4
|
import { globalObjects, globalStudio } from '../consts';
|
|
5
5
|
import { createRawEventDispatcher } from './createRawEventDispatcher';
|
|
@@ -138,7 +138,7 @@ const updateProjectionMatrixKeys = [
|
|
|
138
138
|
'bottom',
|
|
139
139
|
'aspect'
|
|
140
140
|
];
|
|
141
|
-
object.onValuesChange((newValues) => {
|
|
141
|
+
const unsubscribe = object.onValuesChange((newValues) => {
|
|
142
142
|
// assign new values to slot prop
|
|
143
143
|
values = newValues;
|
|
144
144
|
// dispatch events to parent component callbacks
|
|
@@ -176,6 +176,7 @@ object.onValuesChange((newValues) => {
|
|
|
176
176
|
invalidate();
|
|
177
177
|
});
|
|
178
178
|
});
|
|
179
|
+
onDestroy(unsubscribe);
|
|
179
180
|
export const read = () => {
|
|
180
181
|
if (!$globalStudio)
|
|
181
182
|
return;
|