JerryI / Mathematica-ThreeJS-graphics-engine

A parser for Wolfram Mathematica's Graphics3D functions (written in JS)
28 stars 2 forks source link

mobile doesnot interactive #10

Closed asukaminato0721 closed 1 year ago

asukaminato0721 commented 1 year ago

goto https://jerryi.github.io/Mathematica-ThreeJS-graphics-engine/

into mobile mode.

image

It stuck. (But I don't know the reason.)

JerryI commented 1 year ago

I will check the orbit controls parameters, or I guess it doesn't even use OrbitControl component (since this part of the code was borrowed from Mathics project)

JerryI commented 1 year ago

I will implement this https://developer.mozilla.org/en-US/docs/Web/API/Touch_events onto of onDocumentMouseMove function

paulmasson commented 1 year ago

@JerryI you don't need to spend time modifying the Mathics code, but should delete it and implement OrbitControls completely. After importing OrbitControls you still need to create an instance of the controller and update it. Here's an example from one of my libraries:

https://github.com/paulmasson/mathcell/blob/master/src/render/threejs-template.js#L164

Your demo page works on desktop because the Mathics code is still there. Once that is removed and the new controller is in place, then interactivity will be available on both desktop and mobile.