I just wonder, how does pc.RENDERSTYLE_POINTS work?

I didn’t find any useful information about it.

It could, try just setting it to so.

Yes, surely I tried, but it doesn’t work out of the box.

    this.entity.model.model.meshInstances[0].renderStyle = pc.RENDERSTYLE_POINTS;

Or even primitive:

    var e = new pc.Entity();

    e.addComponent("model", {
        type: "box"

    e.model.model.meshInstances[0].renderStyle = pc.RENDERSTYLE_POINTS;

And I got error

I dive into code and I suppose there is no special primitive type for render.
Like 0 is for solid, 1 is for wireframe and 2 is for points.

And I have to generateWireframe() before use it, but engine has no generatePoints() or whatever.

Could be. I can’t recall any use of pc.RENDERSTYLE_POINTS. So it might be not tested.

Okay, so, what’s the logic of this function?
How should it works?
Perhaps, I can write generatePoints and and make pull request?

Perhaps. If you open launcher with HTTP (no ssl), and add argument: &use_local_engine=true, it will try to load engine from your local host. Instead of true you can add direct URL to engine file you are testing. This helps to test your PR on existing projects.

Probably learn from generateWireframe for generatePoints :slight_smile:

Okay, but generateWireframe creates lines between vertexes, I can’t do the same.

I think vertex have to look like a point in space, right? How can I represent it?

I think generateWireframe doesn’t modifies vertex buffer, but generates new index buffer.
With render points, your index buffer simply lists all indices of vertices. You would need to investigate :slight_smile: