Sorry for the delay. I’m gradually switching my workflow to WebGPU and TSL. Please try the latest version, 2.1.0
, and let me know if anything needs to be added.
I pulled your GitHub code and modified the demo locally. There were too many errors when using the WebGPU renderer. Would you consider creating a branch so that we can submit some test demos? Is it convenient for you to switch branches to verify bugs?
You should need to use the latest dev branch because I submitted some necessary error issues to three when using the webGPU renderer, and now these issues have been fixed on the development branch.
Hmm… The WebGLRenderer works as expected, but with the WebGPURenderer, the viewport is completely off.
I think the best approach is to wait for the fixes to be merged and then update the peerDependency
to the latest version. What do you think?
Update: the WebGPURenderer, is not working at all when WebGPU
is enabled, and when it backup to WebGL
the viewport is off!
You can use version 173, which is almost correct, but the background color of the viewport is incorrect. This is my example https://codesandbox.io/p/sandbox/jovial-mirzakhani-q3j2pc
Do you know why this background color is incorrect?
It’s hard to say for sure since you’re using a custom Object3D
. The WebGPURenderer
expects a Scene
and doesn’t seem to work with Object3D
(Or at least, Typescript is raising an error when setting an Object3D
). If you check the latest version, you’ll see that I’m internally adding the gizmo to a Scene
, ViewportGizmo.ts#L219, then I’m rendering the scene
instead of the object itself, ViewportGizmo.ts#L310.
Maybe that’s where the background issue is coming from!
Hello, the latest version 174 that I mentioned earlier has been released
I love this thing! Is there a way to do the Hand panning like in blender?
I’ve been trying to create something that can rotate around a part of the model without rotating over the whole thing but I’m having trouble so I just started researching blender viewports remade in threejs and found this
(the hand underneath the magnifying glass in the image below )
Hi @klamz,
I appreciate your enthusiasm! But I’d like to keep the library simple and focused on orientation. Features like hand panning, camera switching, and grid visibility can be easily implemented externally.
I’ve put together an example demonstrating how you can achieve this by simply adding and styling a few HTML buttons in this JSFiddle. The example also includes grid ▦ visibility controls, and you can extend it with any additional functionality you need.
Hope this helps! Let me know if you have any questions.