Is it possible to use Unity RenderTextures with Needle Engine? The threejs equivalent should be WebGLRenderTarget afaik. three.js docs
by user 474974683163394049
Is it possible to use Unity RenderTextures with Needle Engine? The threejs equivalent should be WebGLRenderTarget afaik. three.js docs
by user 474974683163394049
Yes and no - we currently dont export RenderTexture assets from Unity to hookup and just use on materials. But you can render into WebGLRenderTargets yes. There’s a small example in the samples repo (in the misc scripting examples folder)
Just wanted to mention, when using the sample script, an error occurs. This error is very likely linked to the threejs type defs for TypeScript
by user 474974683163394049
should already be fixed
by user 474974683163394049
If you happen to have a fix for it feel free to open a PR too
happy to merge that
is it possible that it’s just necessary to update your @types/three npm package?
by user 474974683163394049
and you can work around these type errors by adding //@ts-ignore
in the line above, better than being blocked by incorrect types (the actual field is there)
Dont always fallback to this tho please it can cause headaches later on too and hide actual errors
Well, I mean only in this kind of case where some type is missing in the typedef and one is sure that it’s a typedef error but good point to add
Speaking from experience ^^
the “official” three ts types have the samples parameter included. i’ll just copy that for now
by user 474974683163394049
by user 474974683163394049
I feel you
by user 474974683163394049