@threlte/gltf 2.0.2 → 3.0.0-next.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @threlte/gltf
2
2
 
3
+ ## 3.0.0-next.0
4
+
5
+ ### Major Changes
6
+
7
+ - e27c1e4: Remove forwardEventHandlers from generated svelte files
8
+
9
+ ## 2.0.3
10
+
11
+ ### Patch Changes
12
+
13
+ - f7f561d: Downgraded sharp
14
+
3
15
  ## 2.0.2
4
16
 
5
17
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@threlte/gltf",
3
- "version": "2.0.2",
3
+ "version": "3.0.0-next.0",
4
4
  "description": "GLTF to Threlte converter",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -41,7 +41,7 @@
41
41
  "meshoptimizer": "^0.18.1",
42
42
  "prettier": "^2.8.3",
43
43
  "prettier-plugin-svelte": "^2.9.0",
44
- "sharp": "^0.33.2",
44
+ "sharp": "^0.32.0",
45
45
  "svelte": "^3.55.1",
46
46
  "three": "0.122.0",
47
47
  "three-stdlib": "^2.21.8"
@@ -473,11 +473,9 @@ function parse(fileName, gltf, options = {}) {
473
473
 
474
474
  const imports = `
475
475
  ${options.types ? `\nimport type * as THREE from 'three'` : ''}
476
- import { Group } from 'three'
477
476
  import { ${[
478
477
  'T',
479
- options.types && !options.isolated ? 'type Props, type Events, type Slots' : '',
480
- !options.isolated && 'forwardEventHandlers'
478
+ options.types && !options.isolated ? 'type Props, type Events, type Slots' : ''
481
479
  ]
482
480
  .filter(Boolean)
483
481
  .join(', ')} } from '@threlte/core'
@@ -530,10 +528,8 @@ ${
530
528
 
531
529
 
532
530
  <script${options.types ? ' lang="ts"' : ''}>
533
-
534
531
  ${!options.preload ? imports : ''}
535
532
 
536
- ${options.types && !options.isolated ? 'type $$Props = Props<THREE.Group>' : ''}
537
533
  ${options.types && !options.isolated ? 'type $$Events = Events<THREE.Group>' : ''}
538
534
  ${
539
535
  options.types && !options.isolated
@@ -541,7 +537,10 @@ ${
541
537
  : ''
542
538
  }
543
539
 
544
- export const ref = new Group()
540
+ let {
541
+ ref = $bindable(),
542
+ ...props
543
+ }${options.types && !options.isolated ? ': Props<THREE.Group>' : ''} = $props()
545
544
 
546
545
  ${!options.preload && options.suspense ? 'const suspend = useSuspense()' : ''}
547
546
 
@@ -555,11 +554,9 @@ ${
555
554
  }(gltf, ref)`
556
555
  : ''
557
556
  }
558
-
559
- ${!options.isolated ? 'const component = forwardEventHandlers()' : ''}
560
557
  </script>
561
558
 
562
- <T is={ref} dispose={false} ${!options.isolated ? '{...$$restProps} bind:this={$component}' : ''}>
559
+ <T.Group bind:ref dispose={false} ${!options.isolated ? '{...props}' : ''}>
563
560
  {#await gltf}
564
561
  <slot name="fallback" />
565
562
  {:then gltf}