问题标签 [tile]

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 投票
2 回答
250 浏览

jquery - 如何将内容与我的 jQuery Flip 动画的每个实现分开?

我正在创建一个使用 jQuery 插件 Flip 的马赛克瓷砖墙!(http://lab.smashup.it/flip/) 在每个图块上显示更多内容。我不是 JavaScript 或 jQuery 大师,但我让它在 IE7+、FF、Chrome 和 Safari 中完美运行(拍拍自己的背部)。但是,我知道它可以用更少的 JS 来完成,我想了解如何。

我正在使用以下标记构建每个图块:

文本“默认可见内容”是默认显示在图块中的内容(duh)。里面的内容<div id="tileID_flipped" class="hiddenContent">是在翻转磁贴时显示的内容。

我正在使用以下 JavaScript$(document).ready(function() {来使每个磁贴翻转工作:

仅供参考,我正在使用该e.stopImmediatePropagation()解决方案来防止在用户单击磁贴内的链接时触发翻转事件。在此站点上找到了该解决方案。

问题是我为我创建的每个图块重复这个脚本。我觉得这很浪费,因为唯一的独特属性是content: $(selector).

我能够使用以下代码将翻转事件应用于具有“tile”类的每个元素:

既然我已经这样做了,我如何将特定于图块的内容“注入”到每个图块中?

PS 我正在使用 jQuery (1.6.4)、jQuery UI (1.7.2) 和 jQuery Flip。

0 投票
2 回答
405 浏览

android - NullPointer 与 tiled.tmx

我有一个 tiled.tmx 文件正在加载到 andengine 中。但我不断得到这个空指针

这是空指针指向我的地方,我不知道为什么。

0 投票
1 回答
1335 浏览

android - 如何使用平铺和 AndEngine 将对象放置在特定位置?

我正在使用 AndEngine 创建一个测试运行项目。

到目前为止我做得很好。我遇到的唯一问题是使用平铺地图编辑器并加载 tmx。文件到项目中。地图已正确加载,但我无法理解整个瓷砖是如何工作的。您将如何在地图的特定区域定位角色或对象,例如如果您长大了,您如何设置将对象放置在地面上以进行横向卷轴类型的游戏?

还有碰撞检测,所以如果角色在地上,那么它会做什么?

感谢所有的帮助!

0 投票
1 回答
1557 浏览

javascript - 在鼠标悬停时显示类似于 Google Chrome WebStore 磁贴的 div

我想在我的网站上复制来自 Google Chrome WebStore 的平铺/幻灯片效果。有谁知道执行此操作的脚本?或者你能帮我写一个吗?

0 投票
4 回答
12431 浏览

image - 使用 ImageMagick 重复或“平铺”图像

如何使用 ImageMagick 平铺图像?我认为我不能使用montage,因为我希望列被原始图像高度的 50% 取代。

展示我正在尝试做的示例可能更容易:

从...开始:

在此处输入图像描述

以:

在此处输入图像描述

谢谢!

0 投票
1 回答
292 浏览

c# - Preventing System.Drawing.Graphics from updating

I'm creating a 2D game engine that uses a tile system. When it is drawing these tiles, you can see each one be individually drawn on the screen. It's very fast with drawing but you can still see it.

When I tell the graphics to draw something, I do not want it to update immediately because it has other things to draw on the screen and is obviously very inefficient. I want it to still "draw" what I tell it, but then actually show it all in one big update...Or would that do the exact same thing? Probably not possible anyway.

0 投票
1 回答
18921 浏览

google-maps - 如何获取您的图像 URL 磁贴?(谷歌地图)

我正在研究如何生成您自己的图像图块并像此示例一样将其放入服务器。该示例从http://mt3.google.com/mapstt加载图块?...,但是如果我想要我的图像怎么办?

我正在研究如何从图像中生成图块,而我刚刚发现您必须使用我们的 MapTiler (http://www.maptiler.org/)。

还有别的办法吗?

我想我想念一些知识。谁能举个例子?

谢谢!!

0 投票
1 回答
1271 浏览

windows-phone-7 - 每天从本地数据自动更新 WP7 应用程序磁贴

你能推荐一个描述如何每天自动更新 Windows phone 7 应用程序磁贴的教程吗?我需要从绑定中获取一些本地文本并放入图块中。我对此进行了研究。有些文章包含有关从服务器更新磁贴的信息,有些主题仅包含部分而不是完整的源代码或难以理解。

0 投票
2 回答
941 浏览

arrays - 使用 tile 构造 numpy 数组

我的问题是:如何从正在使用的瓷砖中获得b ?

我这样做了,但我想要更好的东西:

0 投票
1 回答
529 浏览

xna - Stretching a texture over a rectangular area in xna

I have a problem with drawing a texture stretched over a rectangular area in XNA. For some background : it is a 3d project, where at some place I'm putting a big broadcast screen 'filming' some other area. This is done by renderstates and the texture is rendered perfectly well (I checked by rendering into a file). The problem is, when I set this as a texture of my defined area, the mapped texture consists of tiles as you can see on the picture I'm uploading. The area where the texture should be stretched is defined like this:

What worries me is that I tried playing with there texture coordinates and could not see any difference :/. I'm rendering with my own effect file, this might be a source of problems, you can get this file here: http://gamma.mini.pw.edu.pl/~zabak/random/PhongAlternative.fx

The rendered texture is passed as "xTexture" to the effect file.

Finally the screen showing my problem: http://gamma.mini.pw.edu.pl/~zabak/random/gk3d_2error.jpg As you can see I get a large number of tile in the broadcast screen, the goal is to get the texture stretched over. (For purpose of doing the screenshot I turned off lights by commenting the

line in my effect file.)

UPDATE: I changed declaration from the effect file from this one:

to this one:

And the broadcast screen works but the lights are messed up. Can someone tell me please what I'm doing wrong?