ExtJS Pivot Grid Left-Axis height different than data-cell height
By : Plondia
Date : March 29 2020, 07:55 AM
I hope this helps you . I'm trying out ExtJS Pivot Grid. I'm using the examples pretty much as-is from examples (here: http://dev.sencha.com/deploy/ext-3.3-beta1-6976/examples/pivotgrid/people.html ) except I'm putting the grid in a layout so that I can have another grid below it. , Change de doctype to code :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
Is height along the x-axis and width along the y-axis in libgdx?
By : Rémi Dulong
Date : March 29 2020, 07:55 AM
will be helpful for those in need By default no. LIBGDX uses OpenGL's default origin in the bottom left corner, with Y going up and X going right. Your camera could be messed up.
|
Canvas | How do I create a Y-axis trail, from an X-axis moving object
By : FreddyR
Date : March 29 2020, 07:55 AM
may help you . I do not know phaser, but since you are also asking for plain canvas example, here is one for that: FIFO buffer (array) code :
var ctx = document.querySelector("canvas").getContext("2d");
ctx.fillStyle = "#fff";
var fifo = [], // fifo buffer to cycle older x values through
max = 30, // max positions stored in the buffer
i = 0, // just for demo, make x cycle on screen
size = 8, // draw size
x = 300, // x-pos from mousemove event
y = 30, // y-pos for player head
// make gradient for the tail stroke:
// Adjust range as needed
gradient = ctx.createLinearGradient(0, 30, 0, 280);
// brightest color on top, transparent color at bottom.
gradient.addColorStop(0, "#ccd");
gradient.addColorStop(1, "rgba(200,200,240,0)");
// set up canvas
ctx.strokeStyle = gradient;
ctx.lineWidth = 10;
ctx.lineJoin = "round";
ctx.lineCap = "square";
// glow effect (because we can.. :) )
ctx.shadowColor = "rgba(255,255,255,0.5)";
ctx.shadowBlur = 20;
ctx.canvas.onmousemove = function(e) {
var rect = this.getBoundingClientRect();
x = e.clientX - rect.left;
};
// main loop -
(function loop() {
// push new value(s) to fifo array (for demo, only x)
fifo.push(x);
// fifo buffer full? Throw out the first value
if (fifo.length > max) fifo.shift();
// render what we got;
ctx.clearRect(0, 0, 600, 480);
ctx.beginPath();
ctx.moveTo(fifo[0], y + fifo.length * size);
for(var t = 1; t < fifo.length; t++) {
ctx.lineTo(fifo[t], y + (fifo.length - t) * size);
}
ctx.stroke();
// draw main player head
ctx.translate(x, y);
ctx.rotate(0.25*Math.PI);
ctx.fillRect(-size*0.5, -size*0.5, size*2, size*2);
ctx.setTransform(1,0,0,1,0,0);
requestAnimationFrame(loop)
})();
canvas {background:#000}
<canvas width=600 height=360></canvas>
|
Three.js: Show object only on one side of PlaneGeometry
By : Acz
Date : March 29 2020, 07:55 AM
Any of those help As workaround I set the floor lower. If I zoom in I can still see the gap but it seems to be the best / only solution. code :
floor.position.y = -0.5;
|
How do I update width , height after object was added to the scene? Three.PlaneGeometry ( width,height,1,1)
By : Marnix
Date : March 29 2020, 07:55 AM
may help you . The application displays photos. When the user clicks on a photo I want to change its size and location Changing the location works with this code: photo.position.y=700; photo.position.x=700; but I do not know how to change width and height which where set using: Three.PlaneGeometry ( width,height,1,1) ( I do not want to move the camera nor frustrom ) , Once you've created your Mesh, you can modify its scale parameter. code :
var imageGeom = new THREE.PlaneGeometry(1, 1, 1, 1); // Create a 1x1 plane
var imageFrame = new THREE.Mesh(geometry, material); // Build mesh with geometry
// Now you set up the desired dimensions of the resulting mesh
imageFrame.scale.x = 2;
imageFrame.scale.y = 1.5;
|