Skip to content

Commit df0b876

Browse files
committed
fix(cli): Remove old weld-related options
1 parent ab92d2f commit df0b876

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

cli.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,10 @@ const cli = meow(
3131
--exportdefault, -E Use default export
3232
--transform, -T Transform the asset for the web (draco, prune, resize)
3333
--resolution, -R Resolution for texture resizing (default: 1024)
34-
--keepmeshes, -j Do not join compatible meshes
34+
--keepmeshes, -j Do not join compatible meshes
3535
--keepmaterials, -M Do not palette join materials
3636
--format, -f Texture format (default: "webp")
3737
--simplify, -S Mesh simplification (default: false)
38-
--weld Weld tolerance (default: 0.00005)
3938
--ratio Simplifier ratio (default: 0)
4039
--error Simplifier error threshold (default: 0.0001)
4140
--console, -c Log JSX to console, won't produce a file
@@ -66,7 +65,6 @@ const cli = meow(
6665
keepmaterials: { type: 'boolean', shortFlag: 'M', default: false },
6766
format: { type: 'string', shortFlag: 'f', default: 'webp' },
6867
exportdefault: { type: 'boolean', shortFlag: 'E' },
69-
weld: { type: 'number', default: 0.0001 },
7068
ratio: { type: 'number', default: 0.75 },
7169
error: { type: 'number', default: 0.001 },
7270
console: { type: 'boolean', shortFlag: 'c' },

readme.md

+6-7
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ A small command-line tool that turns GLTF assets into declarative and re-usable
1818

1919
### GLTFJSX fixes that
2020

21-
- 🧑‍💻 It creates a virtual graph of all objects and materials. Now you can easily alter contents and re-use.
21+
- 🧑‍💻 It creates a virtual graph of all objects and materials. Now you can easily alter contents and re-use.
2222
- 🏎️ The graph gets pruned (empty groups, unnecessary transforms, ...) and will perform better.
2323
- ⚡️ It will optionally compress your model with up to 70%-90% size reduction.
2424

@@ -45,11 +45,10 @@ Options
4545
--exportdefault, -E Use default export
4646
--transform, -T Transform the asset for the web (draco, prune, resize)
4747
--resolution, -R Resolution for texture resizing (default: 1024)
48-
--keepmeshes, -j Do not join compatible meshes
48+
--keepmeshes, -j Do not join compatible meshes
4949
--keepmaterials, -M Do not palette join materials
5050
--format, -f Texture format (default: "webp")
5151
--simplify, -S Mesh simplification (default: false)
52-
--weld Weld tolerance (default: 0.00005)
5352
--ratio Simplifier ratio (default: 0)
5453
--error Simplifier error threshold (default: 0.0001)
5554
--console, -c Log JSX to console, won't produce a file
@@ -81,7 +80,7 @@ export function Model(props) {
8180
const { nodes, materials } = useGLTF('/model-transformed.glb')
8281
return (
8382
<group {...props} dispose={null}>
84-
<PerspectiveCamera name="camera" fov={40} near={10} far={1000} position={[10, 0, 50]} />
83+
<PerspectiveCamera name="camera" fov={40} near={10} far={1000} position={[10, 0, 50]} />
8584
<pointLight intensity={10} position={[100, 50, 100]} rotation={[-Math.PI / 2, 0, 0]} />
8685
<group position={[10, -5, 0]}>
8786
<mesh geometry={nodes.robot.geometry} material={materials.metal} />
@@ -110,7 +109,7 @@ import { Model } from './Model'
110109
function App() {
111110
return (
112111
<Canvas>
113-
<Model />
112+
<Model />
114113
```
115114
116115
You can re-use it, it will re-use geometries and materials out of the box:
@@ -208,7 +207,7 @@ useEffect(() => {
208207
209208
#### ⚡️ Auto-instancing
210209
211-
Use the `--instance` flag and it will look for similar geometry and create instances of them. Look into [drei/Merged](https://github.com/pmndrs/drei#instances) to understand how it works. It does not matter if you instanced the model previously in Blender, it creates instances for each mesh that has a specific geometry and/or material.
210+
Use the `--instance` flag and it will look for similar geometry and create instances of them. Look into [drei/Merged](https://github.com/pmndrs/drei#instances) to understand how it works. It does not matter if you instanced the model previously in Blender, it creates instances for each mesh that has a specific geometry and/or material.
212211
213212
`--instanceall` will create instances of all the geometry. This allows you to re-use the model with the smallest amount of drawcalls.
214213
@@ -287,7 +286,7 @@ it('should have a scene with a blue mesh', async () => {
287286
const { scene } = await new Promise((res) => loader.parse(data, '', res))
288287
expect(() => scene.children.length).toEqual(1)
289288
expect(() => scene.children[0].type).toEqual('mesh')
290-
expect(() => scene.children[0].material.color).toEqual('blue')
289+
expect(() => scene.children[0].material.color).toEqual('blue')
291290
})
292291
```
293292

0 commit comments

Comments
 (0)