是否可以使用five.grok在Plone 4.1中注册portlet?(Is it possible to use five.grok to register portlets in Plone 4.1?)
我查看了five.grok,发现没有提到Portlets。 可以吗?
I looked into five.grok and found no reference to Portlets. Can it be done?
原文:https://stackoverflow.com/questions/6415585
最满意答案
每个动画完成后,您必须调用
root.render
函数。 因此,请在root.render
函数中调用root.animate
函数。 喜欢这个 -var root = this; animate: function() { // Development console.log("init Animate"); requestAnimationFrame( root.animate ); root.mesh.rotation.x += .05; root.mesh.rotation.y += .05; root.render(); },
另外,我不知道你为什么需要
LoadingManager
。 我不认为它应该在animate
函数中使用,它将被重复调用。编辑:您必须在函数之外定义
root
变量。 您已在每个函数中定义了此变量。 相反,你必须在CubeController
定义它。You have to call the
root.render
function after each animation is done. So call theroot.render
function in yourroot.animate
function. Like this -var root = this; animate: function() { // Development console.log("init Animate"); requestAnimationFrame( root.animate ); root.mesh.rotation.x += .05; root.mesh.rotation.y += .05; root.render(); },
Also, i dont know why do you need
LoadingManager
. I dont think it should be used in theanimate
function which will be called repeatedly.Edit: You have to define the
root
variable outside of the functions. You have defined this variable in every function. Instead you have to define it in theCubeController
.
相关问答
更多-
每个动画完成后,您必须调用root.render函数。 因此,请在root.render函数中调用root.animate函数。 喜欢这个 - var root = this; animate: function() { // Development console.log("init Animate"); requestAnimationFrame( root.animate ); root.m ...
-
Requirejs和Threejs OrbitControls如何让它工作?(Requirejs and Threejs OrbitControls how to get it working?)[2023-06-13]
弄清楚如何使其工作并希望帮助他人。 首先,我需要使用基本的require define函数包装OrbitControls.js define(['threejs'], function(THREE) { /* OrbitControls.js */ }); 然后在课堂上使用控件的必须定义'orbitControls' define(['orbitControls'], function() { var controls = new THREE.OrbitControls(this.came ... -
camera.lookAt( object.position )将完成你想要的大部分。 将摄像机定位在合适的距离是更主观的。 我通常做这样的事情: object.updateMatrixWorld(); const box = new THREE.Box3().setFromObject(object); const size = box.getSize().length(); const center = box.getCenter(); object.position.x += (object.pos ...
-
ThreeJS字体未加载(ThreeJS font not loading)[2022-07-26]
以下是如何找到要使用的字体名称: 打开typeface.js文件 寻找font_family属性: "font_family_name":"Trebuchet MS" 将其更改为全部小写 。 空间很好。 所以在你的例子中: var textGeo = new THREE.TextGeometry( "THREE.JS", { size: 200, height: 50, curveSegments: 12, font: "trebuchet ms", // wei ... -
threejs移动多个对象(threejs move multiple objects)[2023-12-21]
Object3D.translateX (和其他翻译方法)是可加的。 这意味着如果你的X值已经是5,并且你打电话给myMesh.translateX(5) ,你的新myMesh.position.x将是10 。 为此,您需要计算拖动对象的原始position.x x与其新position.x x之间的差异,然后将其应用于所有其他对象。 这里有一些代码/伪代码是一个非常宽松的例子。 如果您希望在拖动时发生这种情况,则需要计算每帧的差异(或者经常打算更新)。 // start dragging original ... -
在ThreeJS中,来自搅拌机的导出对象不能正常工作(Exported object from blender doesnt work properly in ThreeJS)[2022-08-14]
以下是Three.js和Blender的简单教程。 最简单的方法就是使用Three.ColladaLoader 。 将您的.dae文件放在您的/root目录中标题为models的文件夹中。 在init()函数内调用Collada函数。 function init(){ scene = new THREE.scene; ... var object1 = new PinaCollada('model1', 1); scene.add(object1); var obj ... -
您所要做的就是在渲染循环中添加以下行: airplane.translateZ( 1 ); 更新小提琴: http : //jsfiddle.net/Lc8gH/21/享受! 顺便说一句,你不能“翻译四元数”。 继续学习直到你理解这段代码的作用。 All you have to do is add the following line in your render loop: airplane.translateZ( 1 ); Updated Fiddle: http://jsfiddle.net/Lc ...
-
您需要在网格上设置receiveShadow标志。 查看Object3D的文档,它是Mesh的父级。 https://jsfiddle.net/woa7kzz1/ You need to set the receiveShadow flag on your meshes. Look at the documentation of Object3D which is the parent of Mesh. https://jsfiddle.net/woa7kzz1/
-
是的,在three.js中支持删除剪切平面的交叉点 。 你可以使用这样的模式: // clipping planes var localPlanes = [ new THREE.Plane( new THREE.Vector3( - 1, 0, 0 ), 1 ), new THREE.Plane( new THREE.Vector3( 0, - 1, 0 ), 1 ) ]; // material var material = new THREE.MeshPhongMaterial( { ...
-
我发现只有这一个: https://github.com/mrdoob/three.js/blob/master/examples/webgl_animation_scene.html 还有,能够自己写一个: //Let's create a mesh this.mesh = new THREE.Mesh( geometry, material ); this.clock = new THREE.Clock(); //Save this mixer somewhere this.mixer = new ...