Questions tagged [tilt]

Tilt is a thin interface over a collection of Ruby template engines, that attempts to make their usage as generic possible.

118 questions
0
votes
0 answers

Removing empty nodes from an XML document created by a .builder template

I have a problem like What's the cleanest way to ignore empty nodes with Nokogiri::XML::Builder , except that my XML document is generated by a .builder template file using the builder gem. I'm generating an XML document using the builder gem (and…
Andrew Grimm
  • 78,473
  • 57
  • 200
  • 338
0
votes
1 answer

Middleman: undefined method `link_to' when rendering markdown from data file

I am using Markdown written in data file to render HTML in HAML template with Middleman static page generator. My data file, data/faq.yaml looks like this: dog: question: I want to know more about a dog. answerA: (HTML in data) Just
Rafal
  • 864
  • 10
  • 21
0
votes
1 answer

Trying to tilt multiple divs to different, random angles

I'm trying to achieve the opposite of what is described here. I have a series of divs in a wordpress page, which I would like to appear on the page as each randomly tilted to a different slight degree. They should also be straightened up as the user…
nonhocapito
  • 466
  • 5
  • 18
0
votes
1 answer

Fill tilt template using hash

I got following ruby example: require 'tilt' data = { "site_link" => "http://www.example.com", "title" => "example"} template = Tilt.new('../templates/test.erb', :default_encoding => 'UTF-8') output = template.render(data) puts output and this is…
BobC
  • 639
  • 5
  • 19
0
votes
0 answers

Sinatra fails to render view on first load

I'm getting the following error the first time I try to access the localhost route in the browser. Errno::ENOENT at / No such file or directory @ rb_sysopen - /Users/admin/Workspace/site/(__TEMPLATE__).haml After refreshing, it works fine until I…
Grozav Alex Ioan
  • 1,559
  • 3
  • 18
  • 26
0
votes
1 answer

three.js mesh tilt instead of rotate

I just learned about the THREE.js and am fascinated with it's abilities. I am no where advanced enough to write my own code so I have been browsing around trying to find an example to do exactly what I need or close to but so far with no avail…
0
votes
1 answer

Android Tilt issue with Accelerometer and Magnetometer

I am trying to detect Yaw, Pitch & roll using the following code: @Override public void onSensorChanged(SensorEvent event) { if (event.sensor == mAccelerometer) { System.arraycopy(event.values.clone(), 0,…
user1148358
0
votes
2 answers

iPhone tilt direction

I am making a simple, tilt controlled game using UIKit. So far, when I tilt the device the character moves in the appropriate direction. What I want him to do is to change the direction he is facing when I tilt the device. For example, when I…
0
votes
1 answer

Rendering tilt template using block as the scope

I'm using template.erb as my template example, which contains: <%= @text %>. I'd like to be able to render a tilt template with the scope being a block. I've done this, which works: proc = Proc.new do @text = "Hello, World" …
August
  • 12,410
  • 3
  • 35
  • 51
0
votes
0 answers

How to rotate the object in the direction it is travelling based on only accelerometer tilt in Unity?

I wish to rotate my object in the direction it is travelling. How can I calculate the Vector difference from the previous frame and current frame and hence give a direction to aim towards to make it rotate in the direction it is travelling. The…
dhully
  • 1
  • 3
0
votes
0 answers

Photo Tilt background-image

Just found this neat tool that replicates Facebook Paper's photo tilt feature for the web: https://github.com/tregoning/photoTilt I'd like to apply this to an image set as my background: body {background-image: url('../img/background.png');}
0
votes
1 answer

animation starts when tilting

i like to start this animation when tilting. it doesn't, so i suppose some essential code is missing. please help: - (void)accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration *)acceleration { flap.animationImages = [NSArray…
blacksheep
  • 13
  • 2
0
votes
2 answers

How to add tilt effect to LongListSelector?

I'm developing a Windows Phone 8 application. In this, I want to add tilt-effect to all my controls (Button, LongListSelector, etc). Could you please tell me how to add tilt effect in Windows Phone 8 Application controls?
user2636874
  • 889
  • 4
  • 15
  • 36
0
votes
0 answers

Why does the web browser size grow when i tilt it?

I am working with a windows phone app in visual studio that only have a web browser in it. I have problem with the layout. The app starts in portrait and it looks good. The web browser fills the whole screen. But when I tilt the phone to…
Cornelia G
  • 163
  • 1
  • 4
  • 12
0
votes
1 answer

Tilt Control Similar to Temple run

I want to create tilt effect just like temple run.I have a character controller(player) in the game that is moving on its forward by controller.Move(transform.forward) after which I am apply tilt to it to lean it left and right .Previously for the…
hariszaman
  • 8,202
  • 2
  • 40
  • 59