pmndrs / gltfjsx

🎮 Turns GLTFs into JSX components
https://gltf.pmnd.rs
MIT License
4.5k stars 293 forks source link

Add cli support (without npx) #42

Open MaxmaxmaximusAWS opened 3 years ago

MaxmaxmaximusAWS commented 3 years ago

cant find react-three programm

this not work image

image

but if i ass npx before @react-three/gltfjsx, all works correctly

age2pierre commented 3 years ago

that is to be expected and the nominal behavior of npm scripts, you could write them either :

"convert": "npx @react-three/gltfjsx myasset.glb"

or

"convert": "gltfjsx myasset.glb"

to know the names of available binaries, look in you ./node_modules/.bin/ folder; package and binary usually have the same name but not always (as it is the case here).

drcmda commented 3 years ago

starting to think the npm namespace thing (react-three/gltfjsx) is a mistake. hard to type, serves no purpose, confusing as hell.

QuantumEPR commented 3 years ago

Just had a similar problem. I also tried running

npx gltfjsx scene-draco.gltf  --draco --compress

directly in the terminal like in this Twitter demo. Although there is no explicit npm ERR, the output is nowhere to be found. Did I misunderstand the usage of this tool?

image image image

drcmda commented 3 years ago

fixed