BabylonJS/Spector.js

view attribute data?

dakom opened this issue · 3 comments

dakom commented

Love the project!

question - is it possible to view attribute data? I know it'll usually be rather massive, it it's be a big help

for example, I have a vao with position, normal, morph, etc. attributes. would be great to be able to just inspect what these are from the extension.

It is unfortunately by design as in the beginning of Spector the plugin with those infos was blocked to prevent stealing assets :-)

The workaround would be for you to tag your VAO with custom data https://github.com/BabylonJS/Spector.js#custom-data so that at least you could be sure of which one you are using when updating and such.

I agree it is definitely not as convenient but this was unfortunately the only way to prevent to much rejection from applications.

dakom commented

Fair enough :) thanks for the explanation!

[...] infos was blocked to prevent stealing assets [...]

That doesn't make any sense. It takes like 5 lines of code in the devtools console to overload gl.bufferData and gl.texImage calls.
As-is, spector.js also allows investigating algorithms, states and textures.

I believe that spector.js should implement whatever necessary to have the best tool.

I agree it is definitely not as convenient but this was unfortunately the only way to prevent to much rejection from applications.

What "applications" are those?
Webapps which didn't want to be debugged?
Or were there actual plans to reject it from npm, Mozilla and Chrome extension stores?

I don't think these are valid concerns, because there are many alternatives to dump these resources.
If a website attempts to block tools like spector.js that's also fine, but I don't think it will be very effective.
Instead, I think these concerns should be addressed by policies (such as prohibiting use when debugging 3rd party code; such cases also shouldn't be supported - this is also how RenderDoc seems to handle it).