Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Apparently incorrect documentation on voxels:set(...)

in Bugs Posts: 1,277

I have to say I find the voxel documentation really difficult to understand, but even so, I think this is just plain incorrect.

The description references a coord parameter that’s not referenced anywhere in the syntax list.

Comments

  • Posts: 1,089

    the generate calls set with varying coord as the first input, i believe

  • Posts: 1,277

    @RonJeffries er that explanation is as mystifying to me as the lack of documentation.

    “the generate?” Huh?

    Varying coord as first input? Again, whaaa?

    And if you’re saying something based on information that’s not visible on the reference page itself, I stand by my assertion that the documentation is wrong.

  • edited June 4 Posts: 1,089

    voxels are created, if i recall, on demand, as viewed. so the scene generates the voxels, calling the set "automatically". the coord variable will be a vec3, as indicated in the write up where it says "coordinates".

    doubtless it could be improved. I'm not arguing that it couldn't: I'm trying to point you in the rough direction of better understanding, based on my own imperfect knowledge.

  • Posts: 1,277

    @RonJeffries sorry to be thick but I still can’t get what you’re saying.

    I mean, I understand the individual words arrayed in a syntactically legitimate order according to the rules of the English language, but I can’t put the overall meaning together in a way that makes sense.

    There are three parameters listed at the bottom of the screen. The Last two are clearly visible also at the top of the screen where the examples of the correct syntax valid function calls are listed. The first parameter listed at the bottom, however, “coord”, is not present in any of the syntax demonstrations at the top of the screen.

    What I’m looking for is the syntax for passing coordinates to this method, and I’m sorry but I still can’t put that together from any of your explanations. If you think it’s clear how to do it, please provide a demonstration.

  • dave1707dave1707 Mod
    Posts: 9,415

    @UberGoober Everything isn’t perfect, there’s going to be mistakes here and there. Apparently when TLL wrote the documentation for voxel:set, they left out coord at the top of the documentation. At the bottom of the documentation it shows that coord is a vec3(x,y,z)… and that coord is shown before the info and key values. So it’s safe to assume that the coord values would come before the other two when using voxel:set. And it does in the line of code I show below that I used in the Sierpinski demo in another post.

    scene.voxels:set((x1+x+ss),(y1+y+ss),(z1+z+ss),"name","Blank",COLOR, c)
    
  • Posts: 1,277

    @dave1707 thanks for your demonstration.

    Your deduction makes sense, and is proven correct by your implementation, and also demonstrates definitively that the documentation is incomplete.

    Does everything have to be perfect? No. But documentation is supposed to, you know, document, so there’s nothing wrong with calling attention to something that could be improved. Of course not everything is perfect, that’s why it’s helpful to have other people point out typos.

Sign In or Register to comment.