famo.us

surface selection in famo.us + angular

蓝咒 提交于 2019-12-25 01:23:38
问题 I'm wondering how I can select specific fa-surface elements so that I can deal with them in a controller as surface objects. I have this markup <fa-modifier ng-repeat="item in list"> <fa-image-surface fa-click="itemClick($index)"> {{item.name}} </fa-image-surface> </fa-modifier> On itemClick(), I want to be able to apply modifiers in my controller to operate on a particular surface as an object (as seems typical in famo.us without the angular). Right now, if I try something like this <fa

How to work with the input and output handers in famo.us?

泪湿孤枕 提交于 2019-12-23 05:17:12
问题 In order to build clean code, Famo.us is using events to communicate to modules. Most of the Event guide shows example about EventHandler . Now we are supposed to build robust view with input and output events, how to actually work with it ? i.e. what is the purpose of the input and output handlers ? 回答1: In order to build robust modules is is convenient to separate the code into Widgets which are only responsible for the function they are built for. Here is the official way of building a

How to create a hexagonal custom surface in famo.us

爷,独闯天下 提交于 2019-12-23 04:37:28
问题 I'm testing "famo.us" Javascript Framework, and don't know how to do "custom surfaces". My goal is to create hexagonal surfaces (if possible with rounded corners) and put those surfaces next to each other as this example : But, i also need to click on each surface and activate different actions depending on the surface. AND also to put images on each surface ! Right now, i know how to use rectangular famo.us surfaces, i know how to modify it, turn it, translate it, etc... But is it possible

Famo.us, Three.js and Clara.io

不想你离开。 提交于 2019-12-21 04:14:38
问题 I found Famo.us and it seemed pretty exciting but their docs are closed. I am very curios about WebGL so I started looking for alternatives. I found Three.js and Clara.io. How do they differ from famo.us? What is the main objective of each framework? Thanks. Edit : Rephrased. 回答1: Three.js is a lightweight javascript library to create 3D visualisations (using WebGL, SVG, Canvas or another renderer). Clara.io is an online 3D modelling tool using WebGL. Famo.us is a javascript rendering engine

how can we get the size of a surface within famo.us?

廉价感情. 提交于 2019-12-18 07:14:30
问题 If i create a famo.us surface giving a size of [true, true] and put some arbitrary html content into it, is there a clean way to retrieve the size of the object? surface.getSize() just returns the same [true,true] I noticed there are some apparently private methods such as: s._currTarget.clientHeight but it seems asking for trouble to use those! 回答1: There are a couple of ways to solve this issue. Famo.us is aware of this limitation and it should be pretty high on the priority list.. In this

famo.us: can I animate the header/footer heights of a header footer layout?

十年热恋 提交于 2019-12-14 02:36:25
问题 I want to have my header and footer almost take up the entire screen (there will just be a thin line left in the middle which will contain a textbox. If the user enters the right password, I want the textbox to disappear and the header and footer to gradually get shorter (making more room for content to appear in the center of the screen). Is it possible to apply a transition to the height of the header and footer on a HeaderFooterLayout ? How do I show a typical password box where the

Famo.us - Using 'proportionsFrom' in Modifiers

随声附和 提交于 2019-12-13 08:22:37
问题 Why am I getting voted a minus vote for this? UPDATE - Solved Thanks guys for pointing me in the right direction. I actually found using the View to not be as useful as I had hoped. My solution was to use a ContainerSurface. Please find my solution here: http://jsfiddle.net/pandafinity/qntrau92/ I'm sure there is a lot of code I can cut out but ContainerSurfaces seems to be what I need. Thanks again :) Hi guys and Happy New Year !! Has anyone any examples of using the new method

How to put a reactive Template inside of a Surface in famo.us/Meteor

被刻印的时光 ゝ 提交于 2019-12-13 02:13:26
问题 I've read several posts on this but nothing that would really answer my question in an up-to-date way (i.e. UI.insert is depreciated). So what's the best way of inserting/rendering a Template into a Surface reactively, meaning, not only one data object (renderWithData), but whatever is defined in the Template.helpers should also be updated reactively. Code tried so far: var div = document.createElement('div'); //UI.insert(UI.render(function() { return Template.hello; }), div); surface = new

famo.us access to collisionData upon collision event

北慕城南 提交于 2019-12-12 03:58:23
问题 In the famo.us source I see that two things are emitted upon collision: the 'collision' string, and a variable called collisionData, like this: (physics/constraints/Collision.js, lines 112-122): if (this._eventOutput) { var collisionData = { target : target, source : source, overlap : overlap, normal : n }; this._eventOutput.emit('preCollision', collisionData); this._eventOutput.emit('collision', collisionData); } I know how to use the 'collision' string like so: collision.on('collision',

How to simply draw a line in famo.us?

不羁岁月 提交于 2019-12-12 02:55:21
问题 If tried a couple of things to simply draw a line with famo.us means (not on the canvas). Is there any possibilty to do that ? 回答1: Drawing a line in the DOM without canvas is not really drawing a line as much as creating an illusion of having drawn a line. This example shows how to make a surface look like a line. Famo.us will allow you to create a surface with a height or width of 1 with the alternative being the length you would like the line to be. With a little magic background-color ,