问题标签 [famo.us]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
0 回答
51 浏览

cordova - Cordova 中的修饰符原点将图像放置得太高

我在 Cordova 3.4.x var mainContext = Engine.createContext(); 中使用以下代码运行基本著名应用程序

出于某种原因,将原点设置为[0.5,0.5]将表面放置得太高。这是一个错误还是我需要以某种方式重新定义原点?

科尔多瓦著名

0 投票
1 回答
239 浏览

famo.us - 在动画期间改变事物的位置

如果我有一个转换翻译,那就是在 0 -> 1000 之间垂直动画,超过 5 秒,如果我有点击事件来改变水平位置而不中断垂直动画,有没有办法?

然后在随机点击时,我想开始在 100 毫秒左右更改 x 位置,并且在 5000 持续时间完成之前它可能有多个这样的位置

我可以玩原点并独立制作动画,但我真的需要像素控制。那么有没有办法只为 x 设置动画?

如果我添加一个 setTransform,它会在第一个之后而不是同时链接。

0 投票
2 回答
1071 浏览

famo.us - 如何从布局中删除表面?

我正在创建许多小表面,这些表面被添加到布局中(在这种情况下是页眉页脚布局),动画,然后需要消失。但是,我不确定添加后如何删除表面?

0 投票
2 回答
376 浏览

javascript - famo.us hover not working

I really tried to solve this one. But nothing seems to work.

I'm trying to create a menu on Top of the page which shall only be visible if hovered.

very Simple Element for now:

then I wanted to call this function, should the Element 'topViewSurf' be hovered:

For some reason though I can't get hover to work.

I can call the function by:

Works perfectly fine. But when I replace 'click' with 'hover' nothing happens when I click or hover the element.

I've tried different approaches for this including jQuery and pure js but nothing seems to work (it might be possible that I did mistakes there) but since I'm asking anyway I thought I would ask for a famo.us solution.

Hope you can help me. spitterfly

0 投票
2 回答
196 浏览

famo.us - halt() 可以在结束状态停止动画吗?

我想要停止()我的翻译动画并让它立即在其最终位置结束。halt() 当前在当前位置停止动画。

0 投票
2 回答
1053 浏览

javascript - How to Swipe between surfaces in Famo.us?

Using the following Famo.us example code that adds 10 surfaces displayed vertically with 100% width and height, how can I add functionality to swipe between them, similar to how the swiping works on the iOS home screen?

0 投票
1 回答
385 浏览

javascript - Famo.us 多边形碰撞支持

我想做类似的东西http://brm.io/gears-d3-js/的东西,但是在寻找投掷物理模块时我找不到多边形体。可以用另一种方式完成,还是可能有其他带有多边形的叉子?

我发现这个项目很有趣,这就是为什么我想从中获得功能齐全的物理引擎......

谢谢。

0 投票
2 回答
461 浏览

famo.us - famo.us:我可以为页眉页脚布局的页眉/页脚高度设置动画吗?

我想让我的页眉和页脚几乎占据整个屏幕(中间只剩下一条细线,其中包含一个文本框。如果用户输入正确的密码,我希望文本框消失并且页眉和页脚逐渐变短(为内容显示在屏幕中央腾出更多空间)。

  1. 是否可以将过渡应用到页眉和页脚的高度HeaderFooterLayout
  2. 如何显示一个典型的密码框,其中所有字符都显示为 *?
0 投票
1 回答
372 浏览

famo.us - 如何使用 Famo.us 的旋转弹簧?

我正在尝试使用 Famo.us 物理引擎制作一些示例。

我试过一个春天的例子。我认为旋转弹簧可能与它相似,所以我正在尝试这样做,但这对我来说并不容易。

这是使用旋转弹簧的示例,但它不起作用

我怎样才能让它工作?:)

0 投票
1 回答
222 浏览

famo.us - 带有子表面的表面 html 内容

有什么推荐的方法来执行以下操作?

我有一个带有一些由浏览器布局的 html 内容的表面。在 html 中,希望有一个带有表面的额外 Scrollview。从哪里获取 Scrollview 的 x、y 和宽度、高度?我是否必须等待 html 被渲染然后将 inner-html 部分转换为表面?