The "points" rendering type in the DepthKit.js plugin does not appear to work

Hi everyone, thank you in advance for any assistance you can give. I have a question about the Depthkit.js plugin. I’m new to the community so please excuse me if I miss any best practices in this post.

I am using the DepthKit.js plugin, with Three.js. I have created a character (3D object) using the DepthKit class as explained on the npm page: depthkit - npm

character = new DepthKit( ‘points’, ‘…/assets/dale/TAKE_02.txt’, ‘…/assets/dale/TAKE_02.mp4’ ); character.depthkit.setPointSize(30);

Then called the setPointSize method on that object but it does not work.

The above code works when setting the first argument as “mesh” or “wire” but not “points.”

I have been looking at the depthkit.js file and from what I can tell it should work. That said I am new developer and python is my main language, I am learning javascript on the fly, so it’s highly likely I have missed something obvious.

To test this I added the console.log(size) to the function on line 240 in the DepthKit.js file:

value: function setPointSize(size) {
if (this.material.uniforms.isPoints.value) {
this.material.uniforms.pointSize.value = size;
console.log(size);
}
else {
console.warn(‘Can not set point size because the current character is not set to render points’); }

That printed the value 30 (see image) that I had passed to the depthkit method but appears to have no effect.

I’d be grateful for any guidance. I’m wondering if anyone else has had this issue?

@TheTechGent Welcome to the forums, and thanks for your question.

We have seen some functionality break as Three.js has been continuously updated since this Depthkit.js repo was published. Some issues we have addressed in the version of Depthkit.js found within Scatter’s GitHub, so you may have better luck forking/cloning/downloading that repo rather than using the node version.

This open-source library was conceived and developed as a community effort, and because it hasn’t been integral to the other prioritized parts of the Depthkit ecosystem, it lacks the resources needed to make it a fully-supported developer tool. Later this year, we are planning on developing an entirely new WebXR integration, which will also introduce support for rendering Depthkit Core and Studio assets in browser, so stay tuned for updates.

1 Like

Thank you @CoryAllen, I tried what you suggested but due to incompatibilty with the web app we were trying to integrate it with, we had to change direction.

We are exploring Unity as an alternate option now. I will definitely keep an eye out for the WebXR integration though.

Many thanks for your reply and apologies for the delay.

All the best,
Dale