0

I used a threejs to write a game and used a lot of gltf files. I don't want to expose these gltf files directly.

王治明
  • 1
  • 2
  • 2
    You can't really. You could try to encrypt or zip then but a determined person can just lift them out of memory, same as any other game tech. – manthrax Jul 31 '18 at 01:57
  • 1
    Welcome to the web - everything you do is visible and technically stealable. Just be proud of your work, own it, and let the thieves be thieves - nothing to win there. – somethinghere Jul 31 '18 at 12:30
  • @manthrax Ok! I am too naive! So what are the proven schemes for encryption or compression? If not, I have to toss it again. – 王治明 Aug 01 '18 at 00:51
  • There's https://github.com/Stuk/jszip which I have used before. Seems to work pretty well. You'll have to decompress into memory and use the GLTFLoader().parse( method I think... R.E. Encryption I don't really know.. but implementations exist.. But be aware that all of your textures+meshes will still be visible using a GPU inspecting tool like WebGLInspector... – manthrax Aug 01 '18 at 12:00
  • 1
    @manthrax thank you for your help. Looks good! – 王治明 Aug 02 '18 at 00:50

1 Answers1

0

For the record, this cannot be done. Obfuscation can get you really far and deter a casual hacker, but all graphics data can be intercepted and extracted since it has to be made available and formatted properly for drawing.

pailhead
  • 5,162
  • 2
  • 25
  • 46