@threlte/gltf 0.0.2 → 0.0.3

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/Arcade.glb ADDED
Binary file
package/Arcade.svelte ADDED
@@ -0,0 +1,86 @@
1
+ <!--
2
+ Auto-generated by: https://github.com/threlte/threlte/tree/main/packages/gltf
3
+ Command: npx @threlte/gltf@0.0.2 Arcade.glb
4
+ -->
5
+ <script>
6
+ import { Group } from 'three'
7
+ import { T, Three } from '@threlte/core'
8
+ import { useGltf } from '@threlte/extras'
9
+
10
+ export const ref = new Group()
11
+
12
+ const { gltf } = useGltf('/Arcade.glb')
13
+ </script>
14
+
15
+ {#if $gltf}
16
+ <Three type={ref} {...$$restProps}>
17
+ <T.Mesh
18
+ geometry={$gltf.nodes.Screen.geometry}
19
+ material={$gltf.materials.Screen}
20
+ position={[0, 1.38, 0.14]}
21
+ scale={1.01}
22
+ />
23
+ <T.Mesh
24
+ geometry={$gltf.nodes.BodyMesh.geometry}
25
+ material={$gltf.materials['machine body main']}
26
+ position={[0.28, 0, 0]}
27
+ />
28
+ <T.Mesh
29
+ geometry={$gltf.nodes.LeftCover.geometry}
30
+ material={$gltf.materials['machine body outer']}
31
+ position={[0.3, 1.21, -0.13]}
32
+ />
33
+ <T.Mesh
34
+ geometry={$gltf.nodes.RightCover.geometry}
35
+ material={$gltf.materials['machine body outer']}
36
+ position={[-0.3, 1.21, -0.13]}
37
+ scale={[-1, 1, 1]}
38
+ />
39
+ <T.Mesh
40
+ geometry={$gltf.nodes.ScreenFrame.geometry}
41
+ material={$gltf.materials['screen frame']}
42
+ position={[0.28, 0.06, 0.03]}
43
+ />
44
+ <T.Mesh
45
+ geometry={$gltf.nodes.joystick_base.geometry}
46
+ material={$gltf.materials['joystick base']}
47
+ position={[0.13, 0.96, -0.2]}
48
+ rotation={[-0.19, 0, 0]}
49
+ />
50
+ <T.Mesh
51
+ geometry={$gltf.nodes.Main_Button_Enclosure.geometry}
52
+ material={$gltf.materials['joystick base']}
53
+ position={[-0.11, 0.98, -0.09]}
54
+ rotation={[-0.18, 0, 0]}
55
+ scale={0.94}
56
+ >
57
+ <T.Mesh
58
+ geometry={$gltf.nodes.Main_Button.geometry}
59
+ material={$gltf.materials['joystick cap']}
60
+ position={[0, 0.01, 0]}
61
+ rotation={[0.19, 0, 0]}
62
+ scale={0.72}
63
+ />
64
+ </T.Mesh>
65
+ <T.Mesh
66
+ geometry={$gltf.nodes.joystick_stick_application.geometry}
67
+ material={$gltf.materials['joystick base']}
68
+ position={[0.13, 0.97, -0.2]}
69
+ rotation={[-0.19, 0, 0]}
70
+ >
71
+ <T.Mesh
72
+ geometry={$gltf.nodes.joystick_stick.geometry}
73
+ material={$gltf.materials['joystick stick']}
74
+ position={[0, -0.01, 0]}
75
+ >
76
+ <T.Mesh
77
+ geometry={$gltf.nodes.joystick_cap.geometry}
78
+ material={$gltf.materials['joystick cap']}
79
+ position={[0, 0.11, 0]}
80
+ />
81
+ </T.Mesh>
82
+ </T.Mesh>
83
+
84
+ <slot {ref} />
85
+ </Three>
86
+ {/if}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@threlte/gltf",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "GLTF to Threlte converter",
5
5
  "scripts": {
6
6
  "cleanup": "rm -rf node_modules"
package/src/index.js CHANGED
@@ -3,7 +3,7 @@ import fs from 'fs'
3
3
  import path from 'path'
4
4
  import transform from './utils/transform.js'
5
5
 
6
- import prettier from 'prettier'
6
+ import * as prettier from 'prettier'
7
7
  import THREE from 'three'
8
8
  global.THREE = THREE
9
9