famo.us

Distribute circles around a center circle

China☆狼群 提交于 2019-12-12 02:15:52
问题 I'm trying to place six circles around a center circle. Eeach of them has the same diameter so it should be possible to place them around the center without space between or overlaps. I thinking to be close to the solution but there are small overlaps. I can't find an answer how to get a perfect calculation. Thats my current result: and this the way how I've calculated it: this.distribute = function () { var surfaceSize = this.surface.getAbsoluteSize(), i, x = 0, y = 0; // 7 CIRCLES 6

Listen to famous-angular scroll view

送分小仙女□ 提交于 2019-12-11 06:54:41
问题 Is there a way to listen to a famous-angular's fa-scroll-view for scroll events on touch devices? For example, right out of the famous-angular docs: <fa-app ng-controller="ScrollCtrl"> <!-- fa-scroll-view receives all events from $scope.myEventHandler, and decides how to handle them --> <fa-scroll-view fa-pipe-from="myEventHandler"> <fa-view ng-repeat="view in views"> <fa-modifier fa-size="[undefined, 160]"> <!-- All events on fa-surfaces (click, mousewheel) are piped to $scope.myEventHandler

Famo.us IframeSurface

妖精的绣舞 提交于 2019-12-11 02:07:51
问题 I tried implementing an iframe within a surface. /* globals define */ define(function(require, exports, module) { 'use strict'; // import dependencies var Engine = require('famous/core/Engine'); var Modifier = require('famous/core/Modifier'); var Transform = require('famous/core/Transform'); var Surface = require('famous/core/Surface'); var mainContext = Engine.createContext(); var content = 'abc'; var logo = new Surface({ size: [undefined, undefined], content: '<iframe width=1024 height=768

Transforming Panoramas for Virtual Tours with famo.us, has it been done?

假装没事ソ 提交于 2019-12-10 12:13:12
问题 I'm looking in to have a virtual tour viewer created using famo.us. I am curious if anyone has explored 3d transformations for 360 degree panoramas using that system? I've looked around and haven't found anything specifically related to that. I've found an enclosed cube in 3D space which is a pretty good step. Changing the size of the cube to 1500 and you are in the centre of the cube. If the faces were a "cubified" pano and some controls were added, I think it would work. http://codepen.io

Animate Opacity async with other Transform functions

时间秒杀一切 提交于 2019-12-10 11:58:53
问题 I need to make opacity of a surface to transform from 0 to 1 like this: stateModifier.setTransform( Transform.multiply(Transform.opacity(1), Transform.rotateX(0)), { duration : 500, curve: Easing.inOutSine } ); But Transform.opacity doesn't exist. I know this is basic but how to transform opacity with other properties like translate or rotate . I know modifier has setOpacity according to http://famo.us/guides/animations UPDATE I thought stateModifier.setOpacity is async that can be animated

Scrollview Pull to Refresh Famo.us

三世轮回 提交于 2019-12-09 23:13:12
问题 I'm trying to implement a pull to reload/refresh type effect, that you see in lots of apps, with scrollview. I've got multiple pain points on this. Just stopping a scrollview past where it wants to sit is a pain. Setting velocity or speed limit doesn't work, just setting the position just makes it bounce because it wants to continue back. Then setting up an event call that doesn't just fire when they scroll too hard up while doing their normal browsing. If anyone has thoughts on how to

Famo.us swipe on scrollview

拈花ヽ惹草 提交于 2019-12-08 12:39:47
问题 I have go through the Timbre tutorial in Famo.us University and it works fine but when I add a scrollview to the layout.content the swipe function stop working the scrollview view works fine but not the swipe. Anyone know how to aplly the swipe right function from the Trimbe tutorial with a scrollview? ///AppView/// function _handleSwipe() { var sync = new GenericSync( ['mouse', 'touch'], {direction : GenericSync.DIRECTION_X} ); this.pageView.pipe(sync); sync.on('update', function(data) { var

Why cant we reuse State Modifiers?

心已入冬 提交于 2019-12-08 10:39:47
问题 I am just trying to understand famo.us and wondering why we cant reuse StateModifier instance when the values are the same. var rotateModifierOne = new StateModifier({ transform: Transform.rotateZ(Math.PI/4) }); var rotateModifierTwo = new StateModifier({ transform: Transform.rotateZ(Math.PI/4) }); As seen here: http://famo.us/university/famous-101/positioning/4/ Why cant we just do var mainContext = Engine.createContext(); var translateModifier = new StateModifier({ transform: Transform

What is a recommended way to get data into your meteor template from the front-end for a famous surface?

纵然是瞬间 提交于 2019-12-08 06:32:09
问题 I've been following along with the book Discover Meteor from https://www.discovermeteor.com/ and I have built the tutorial project called 'Microscope' This uses iron-router and Meteor templating system to render out the front-end. I want to redo this project using famo.us for the front-end but I am unclear on how I to do so. I am aware of a package called famono. mrt add famono. Using this package I can integrate famo.us and draw surface to the screen in a meteor project. It also allows you

Famo.us Scrollview height

流过昼夜 提交于 2019-12-07 15:14:23
问题 I am trying to add a image below a scrollview using the famous sequentialLayout and im having a problem with the scrollview's height. This is how i create my scrollview. var scrollview = new Scrollview({ direction: Utility.Direction.X, options: { size: [300, 300] }, paginated: true }); When i add surfaces to the scrollview with 250 height, the scrollview's parent DOM container (famous-group) containing these surfaces has a width and height of 0. When adding this scrollview within a