Did it! So there were two lines expecting a touches[1] which would be at least two touches 0 and 1 - well, I guess mobile is not using the touches as expected so just commented those out - they were from early ZIM time with orbitcontrols. And now it works. You will need to clear your cache - but ZIM 017 ZIM_three now brings in the patched orbitcontrols.
We tested in TextureActive, three.js inside ZIM and raw three.js and the orbitcontrols works in all three places so probably are good.
This is a good improvement and we will encourage people to update to 017 for proper zooming on mobile. Will post about it after we update ours and make sure it is all working.
I want to ask if one last thing is possible on this subject: can ZIM elements be on top of threejs elements?
When I want to use it as responsive, I add ZIM objects to the stage. If I add the threejs size to the entire stage, ZIM objects are not visible. If I use ortho with hud, this time ZIM objects are not responsive.
You can only interact with one or the other if the two canvases are over top of one another. so yes, you can put ZIM on top but then you can't interact with three.js. Unless you use TextureActive with the HUD format. I would not say, when using the HUD, that the ZIM objects are not responsive. They are on three.js surfaces. You have to make the three.js surfaces responsive. That would be zoom and position then relative to window size, etc. We have positioned them responsively, but did not zoom them. You can zoom them, you just have to do it.
it works partially. it doesn't work for vertical screen. it works for horizontal screen.
F.on("resize", ()=>{
// I am really not sure what to put here
const scale = window.innerHeight / 500
HUD_panel.scale.set(scale,scale)
HUD_panel.pos(35,35,RIGHT,TOP,500)
})
const scale = window.innerHeight / 500
what is 500 here?
HUD_panel.pos(35,35,RIGHT,TOP,500) Also pos 5. value is mentioned as container in ZIM documents.
Yes - did not test it for vertical - will you have enough room to do what you are doing in vertical? Or would you change the layout to a bottom menu? That, I call adaptive, when you change layouts / add or remove things.
Is this on a TextureActive? Any clicks on lots of tile elements should be done with hitTestGrid(). If you do not need interaction on the tile elements or on labels, etc. then use noMouse() no them. Also see https://forum.zimjs.com/t/optimizing-zim
I am trying to clone a container that has other stuff that is masked. When I clone it the mask doesn't clone. The stuff gets cut at the container boundry without the mask? Any ideas? Thanks
The challenge of that I need an exact copy of the container. I am generating dynamic objects for a memory game so I need two to be the same. I found a post where you suggested using alpha effect. I will try that. Thanks