Starchasers / OCGlasses

mod for minecraft and addon for Open Computers
zlib License
30 stars 17 forks source link

[Bug/Suggestion?] OBJModel3D widget does not support line declaration #102

Closed hohserg1 closed 2 years ago

hohserg1 commented 3 years ago

Describe the bug Line declaration in obj model does not produce render effect

In which environment did the Bug appear? Singleplayer

To Reproduce Steps to reproduce the behavior:

  1. Create file /home/test.obj with content:
    
    v 0 0 0
    v 1 0 0
    v 1 0 1
    v 1 1 1
    v 1 1 0

l 1 2 3 4 5

f 1 2 3


2. open lua repl
3. Execute `w=component.glasses.addOBJModel3D()`
4. Execute `w.loadObj(io.open("/home/test.obj"):read("*a"))`
5. Execute `w.addTranslation(x,y,z)` to move widget to comfortable coords
6. Execute `w.addColor(1,0,0,1)`
7. See red triangle but no see line

**Expected behavior**
Line must render
https://en.wikipedia.org/wiki/Wavefront_.obj_file#Line_elements

**Screenshots / Code Snippet**
![image](https://user-images.githubusercontent.com/35610168/104814628-16865700-5821-11eb-891d-98da6a89de15.png)

**Minecraft:**
 - Mod Version - OpenGlasses-MC1.12.2-2.2-53
 - Minecraft Version - 1.12.2
 - Forge Version - 14.23.5.2854
hohserg1 commented 3 years ago

Ok, I found here that's line declaration really unsupported image And this issue must be suggestion of addition line support of obj format

hohserg1 commented 3 years ago

@ben-mkiv is Commons0815 open-source? Can I contribute to it?

ben-mkiv commented 3 years ago

@ben-mkiv is Commons0815 open-source? Can I contribute to it?

now it is again, https://github.com/ben-mkiv/commons0815

if you want to add the feature go ahead, if you want it in the official build you can make an PR and i'll merge it

hohserg1 commented 3 years ago

Yeah, Thx!

ben-mkiv commented 3 years ago

Feature got merged and is in the latest commons0815 (1.4.0) release on curseForge https://www.curseforge.com/minecraft/mc-mods/commons0815/files/