首页 \ 问答 \ IOS上的JQuery很慢,跳跃和生涩(JQuery on IOS is slow, jumpy and jerky)

IOS上的JQuery很慢,跳跃和生涩(JQuery on IOS is slow, jumpy and jerky)

我们的网站使用了大量的JQuery,但是对于iOS效果,例如淡入淡出,幻灯片等等,都是最好的。 它们并不流畅,例如在原生应用上的网络应用上看到的那些。

如何在这样的网络应用程序上实现这种平滑性。

有任何想法吗?

奇妙

例如。 看看这个页面。 它在iPAD上使用幻灯片和淡入淡出效果都是相当废话http://www.divethegap.com/update/diving-trips/master-scuba-diver#


Our site uses a great deal of JQuery, but on iOS effects such as fade, slide etc.. are jumpy at best. They are not smooth such as those seen on web apps on on native apps.

How does one achieve this smoothness seen on such web apps.

Any ideas?

Marvellous

EG. Have a look at this page. It uses slide and fade effects all fairly crap on the iPAD http://www.divethegap.com/update/diving-trips/master-scuba-diver#


原文:https://stackoverflow.com/questions/5524467
更新时间:2022-04-25 10:04

最满意答案

我正在使用3D坐标来考虑

  • 由矢量翻译[uv]
  • 由matrixabcd进行二维线性变换

整体变换矩阵将具有这种形式

    [ a b u]
M = [ c d v]
    [ 0 0 1]
  1. 从三角形取3点A=[x1 y1 1]B=[x2 y2 1]C=[x3 y3 1]
  2. 将它们与它们在变换A' = [x1' y1' 1]B'=[x2' y2' 1]并且C'=[x3' y3' 1] 。 Id est:用数学方法得到变换矩阵M使A' = MAB' = MBC' = MC
  3. x -> M x应用于每个输入点

编辑:使用转换矩阵中的翻译将翻译合并到矩阵M

编辑:看起来“做你的数学”并不清楚你。

你会意识到3个方程可以写成:

[x1' x2' x3']     [x1 x2 x3]
[y1' y2' y3'] = M [y1 y2 y3]
[1   1   1  ]     [1  1  1 ]

要么

X' = M X

要么

M = X . X'^-1

是的,OpenCV在矩阵上有一个函数inv()


I'm using 3D coordinates to take account

  • translation by vector [u v]
  • 2D linear transformation made by matrixabcd

The overall transformation matrix will have the form

    [ a b u]
M = [ c d v]
    [ 0 0 1]
  1. Take 3 points A=[x1 y1 1] and B=[x2 y2 1] and C=[x3 y3 1] from the triangle
  2. Compare them with their position after transformation A' = [x1' y1' 1] and B'=[x2' y2' 1] and C'=[x3' y3' 1]. Id est: Do your math to get the transformation matrix M so that A' = M A and B' = M B and C' = M C
  3. Apply x -> M x to every input points

Edit: Incorporate the translation in the matrix M using Translation in transformation matrix

Edit: It seems "do your math" is not clear for you.

You'll realize that the 3 equations can be written as:

[x1' x2' x3']     [x1 x2 x3]
[y1' y2' y3'] = M [y1 y2 y3]
[1   1   1  ]     [1  1  1 ]

or

X' = M X

Or

M = X . X'^-1

and yes, OpenCV has a function inv() on matrices.

相关问答

更多
  • 读第一行,称之为N 将剩下的点读入数组A 。 Point xdir = A[1] - A[0]; int xdim = 2; while (A[xdim] - A[xdim-1] == xdir) xdim++; int ydim = N / xdim; for (int y = 0; y < ydim-1; y++) { for (int x = 0; x < xdim-1; x++) { addTriangle(A[y*xdim+x],A[(y+1)*xdim+x],A[(y+1)*x ...
  • 我不明白这段代码到底在做什么,但似乎d (在线fixture = p1+offset + n*d; )必须是原点和由平面定义的平面之间的有符号距离。三点。 如果用方程Ax+By+Cz+D=0描述你的平面,其中(A,B,C)是代码中描述的正常单位向量n ,则d = - D 。 如果这是正确的,那么编写此代码的人特别讨厌从调用者那里询问d ,因为它可以从其他输入计算: d = dot(n,p1); 关于你的实际问题( The code will help me define if a 3D point is ...
  • 与法线有关。 add geometry.computeVertexNormals(); 例如。 var vertices = geometry.attributes.position.array; for ( var i = -1; i < vertices.length; i += 3) { vertices[i] = Math.random() * 10; } geometry.computeVertexNormals(); To do with normals. add geometry.com ...
  • 似乎你的Plane被实现,因此D不是你的一个点投影到平面法线上,而是负面投影。 您可以将此视为将平面中的矢量投影到法线上。 无论如何,我相信改变 float value = dot - plane.D; 至 float value = dot + plane.D; 应该解决的问题。 HTH。 It seems that your Plane is implemented so that D is not the projection of one of your points onto the plan ...
  • 取决于你想要的精度: 您可以通过Poisson磁盘采样获得随机正确的答案。 具体地,泊松盘采样是随机采样,使得没有点比指定半径更近。 这样的事情可以高效地(线性)实现,例如:来自Robert Bridson的c ++代码: http : //www.cs.ubc.ca/~rbridson/download/curlnoise.tar.gz实现他的论文http: //www.cs.ubc.ca/~rbridson/docs/bridson-siggraph07-poissondisk.pdf 你可以真正优化点 ...
  • 我发现最有效的方法是创建一个Anchor来处理感兴趣的x,z位置。 对于y坐标使用平面(或平面偏移)。 背后的理由是,随着对飞机的了解和飞机的扩大,计划的中心将会发生变化。 上下移动是很好的 - 因为你希望在你的案例中的飞机是地板。 但是因为你将原点固定在空间中,所以你可能不想左右和前后跳跃,所以使用锚点会比飞机的中心点更好。 What I have found works best is to create an Anchor to handle the x,z location of interest. ...
  • 可以用几种方式定义平面。 通常使用平面上的点和法向量。 要从三个点( P1 , P2 , P3 )获得法向量,请取三角形边的叉积 P1 = {x1, y1, z1}; P2 = {x2, y2, z2}; P3 = {x3, y3, z3}; N = UNIT( CROSS( P2-P1, P3-P1 ) ); Plane P = { P1, N } 反之,从点P1和正常N到三点,你从任何方向G开始, 而不是沿着法线N这样DOT(G,N)!=0 。 然后沿着平面的两个正交方向 //try G={0,0, ...
  • 我正在使用3D坐标来考虑 由矢量翻译[uv] 由matrixabcd进行二维线性变换 整体变换矩阵将具有这种形式 [ a b u] M = [ c d v] [ 0 0 1] 从三角形取3点A=[x1 y1 1]和B=[x2 y2 1] , C=[x3 y3 1] 将它们与它们在变换A' = [x1' y1' 1]和B'=[x2' y2' 1]并且C'=[x3' y3' 1] 。 Id est:用数学方法得到变换矩阵M使A' = MA和B' = MB , C' = MC 将x -> M x ...
  • 我可能完全误解你的问题,在这种情况下,我表示歉意; 但我认为以下三种方法中的一种可能实际上就是你所需要的。 请注意,方法3给出的图像看起来很像您提供的示例...但我使用了非常不同的路径(根本不使用sphere命令,但通过工作来计算“体内”和“体外”)直接与他们离中心的距离)。 我将第二张图像与第三张图像进行了比较,因为它看起来更好 - 用零填充球体看上去就像一个黑色圆盘。 %% method 1: find the coordinates, and histogram them [x y z]=sphere ...
  • 如果你的点都接近平面,你可以选择普通最小二乘(你可以看到Z是两个独立变量X和Y的函数,你最小化到平面的垂直距离的平方),或者总和最小正方形(所有变量独立,最小化正常距离之和)。 后者需要3x3 SVD。 (请参阅http://en.wikipedia.org/wiki/Total_least_squares ,遗憾的是这不是最简单的演示文稿。) 如果某些点是异常值,则需要采用稳健的拟合方法。 其中一个是RANSAC:选择三个点是随机的,建立他们的平面并计算所有点到平面的距离之和,作为适应度的度量。 在N个图 ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。