我正在尝试使用css3的多重背景支持创建带有叠加层的页面背景;
html, body {
background: url('https://github.com/jaysalvat/vegas/raw/master/overlays/01.png') repeat,
url('http://farm8.staticflickr.com/7260/7502004958_595bf03fbf_z.jpg') top left no-repeat;
background-size: cover;
}?
Run Code Online (Sandbox Code Playgroud)
我希望照片背景图像"覆盖"页面,并且覆盖层在孔页面上重复小(3*3px).
上面的例子给了我http://jsfiddle.net/tpmD4/(也是覆盖页面的叠加层).
我该如何解决这个问题?
当我尝试为两个图像指定背景大小时(background-size: 3px 3px, cover;); 然后图像背景不会覆盖,但叠加层工作.
删除网格表单场景的正确方法是什么?在这个例子中:
removable_items = [];
box = new THREE.Object3D();
scene.add(box);
function add() {
var mesh = new THREE.Mesh( new THREE.IcosahedronGeometry( 10, 5 ), new THREE.MeshPhongMaterial( {color: 0xFFFFFF}) );
box.add( mesh );
removable_items.push(mesh);
//clean(); ///// when is integrated in function memory is cleaned properly
}
function clean() {
if( removable_items.length > 0 ) {
removable_items.forEach(function(v,i) {
v.parent.remove(v);
});
removable_items = null;
removable_items = [];
}
}
function makeExperiment(r) {
var i = 0;
while (i < r) {
add();
i++;
if( r …Run Code Online (Sandbox Code Playgroud) 嗨,据我所知THREE.projector,版本三71中没有.
但我不明白,如何取代THREE.projector功能和什么?
这是我的点击功能:
var vector = new THREE.Vector3(
(event.clientX / window.innerWidth) * 2 - 1,
-(event.clientY / window.innerHeight) * 2 + 1,
0.5
);
projector.unprojectVector(vector, camera);
var raycaster = new THREE.Raycaster(
camera.position,
vector.sub(camera.position).normalize()
);
var intersects = raycaster.intersectObjects(objects);
if (intersects.length > 0) {
clicked = intersects[0];
console.log("my clicked object:", clicked);
}
Run Code Online (Sandbox Code Playgroud)
什么是正确的方法?
我收到了数以千计的错误(谷歌浏览器):
[.CommandBufferContext]RENDER WARNING: Render count or primcount is 0.
Run Code Online (Sandbox Code Playgroud)
从Bledner导出的OBJ和MTL文件,使用OBJMTLLoader.js作为加载器移动到R73之后.
有经验吗?
我可以将.phtml文件调用到我的.phtml模板,就像list.phtml一样.
<?php
echo $this->getLayout()->createBlock('core/template')->setTemplate('goodtest/test.phtml')->toHtml();
?>
Run Code Online (Sandbox Code Playgroud)
但在test.phtml中,我无法调用$ _product值.
例如:
<?php
$_productCollection=$this->getLoadedProductCollection();
foreach ($_productCollection as $_product):
?>
Run Code Online (Sandbox Code Playgroud)
作品
<?php echo $_product->getName() ?>
Run Code Online (Sandbox Code Playgroud)
不起作用:
<?php
echo $this->getLayout()->createBlock('core/template')->setTemplate('goodtest/test.phtml')->toHtml();
?>
Run Code Online (Sandbox Code Playgroud)
在文件中:test.html : <?php echo $_product->getName() ?>.
我是否必须在每个包含的文件中再次加载产品中的完整集合,如何才能在test.phtml中获得$ _product值最有效的方法?
我有形式:
<form onchange="allvaluestostring()">
<select name="status">
<option value="*">All</option>
<option value="1">Active</option>
<option value="0">Inactive</option>
</select>
<select name="size">
<option value="*">All</option>
<option value="small">Small</option>
<option value="big">Big</option>
</select>
</form>
Run Code Online (Sandbox Code Playgroud)
和形式的任何输入的onchange动作我需要获取javascript字符串例如" status=1&size=big"用于在httprequest中使用.
在javascript中存在什么,当一个表单输入将被更改时,什么采取所有形式值?
我使用<select name="status" onchange="showExporteditems(this.name,this.value)">但是这只使用一个输入值只使用" status=1",但我需要在每个onchage上所有输入的所有值为字符串,如" status=1&size=big&...etc....".
谢谢!
编辑:不使用jquery.
我有两个Vector3点A和B.
我想得到从A到B的轨迹路径的矢量C,但是加上它的长度为100品脱.
我该如何计算这个向量?

如何在没有 alphaMap 的情况下从具有透明黑色的纹理制作 Lambert 材料。
我有带云纹理的球体。我需要黑色透明,如果我使用混合,它会影响阴影,我需要保持像 MeshPhong 材料一样的行为,但只能使用透明的黑色。
var cloudsMaterial = new THREE.MeshLambertMaterial( {
color: 0xffffff,
map: THREE.ImageUtils.loadTexture( "img/planets/clouds.jpg" ),
specular : new THREE.Color("rgb(255,255,255)"),
shininess : 0.1,
depthTest : 0,
blending : 1,
transparent: true,
bumpScale : 1, //0.8
bumpMap : THREE.ImageUtils.loadTexture( "img/planets/bump.jpg" ),
} );
Run Code Online (Sandbox Code Playgroud)
设置混合或其他属性的正确方法是什么?
我有旋转物体(球体).当我点击一个物体时,我得到相对于相机的坐标:
var raycaster = new THREE.Raycaster();
raycaster.setFromCamera( mouse, camera );
var intersects = raycaster.intersectObjects( cameradestinations, true );
Run Code Online (Sandbox Code Playgroud)
如何获得相对于单击对象位置的坐标,而不是场景中心?
(是的,我可以点击.点击 - clicked.position,但这里更聪明吗?)
我有产品:
<?php $_helper = $this->helper('catalog/output'); ?>
<?php $_product = $this->getProduct(); ?>
Run Code Online (Sandbox Code Playgroud)
我有属性组的名称(不是ID).
我需要列出此属性组中的所有属性名称和值(在属性集上无关紧要).
如果我只知道产品和属性组名称,我怎样才能从属性组中获取属性和值?
我有代码:
function loginUser( $email, $password )
{
/** @var $session Mage_Customer_Model_Session */
$session = Mage::getSingleton( 'customer/session' );
try
{
$session->login( $email, $password );
$session->setCustomerAsLoggedIn( $session->getCustomer() );
return 1;
}
catch( Exception $e )
{
return $e;
}
}
$test = loginUser("login","password");
echo "test";
print_r($test);
die;
Run Code Online (Sandbox Code Playgroud)
但我总是得到
Mage_Core_Exception Object ( [_messages:protected] => Array ( ) [message:protected] => Invalid login or password.
登录和密码是正确的,我尝试了很多帐户,结果相同.
我该如何正确登录?