C
I'd like to get an answer that reveals a little why it's the Freumworth that's better or worse than that.Find out which one is more suitable for your tasks.Three.jsFreamworth for coding 3D online, widely used. There's support for the comunity, which is important when problems arise (bags, nobody's got to ask, etc.). Good documentation with a lot of ready examples that are easy to learn.Low-level enough for the most ambitious projects. There is an opportunity.
use WebGL directly. Depending on your preferences, focus on graphic processes and iron (WebGL) or animation and the schedule itself (Threejs).Enough of the cross-sbrauser.var camera, scene, renderer;
var geometry, material, mesh;
init();
animate();
function init() {
camera = new THREE.PerspectiveCamera(70, window.innerWidth / window.innerHeight, 0.01, 10);
camera.position.z = 1;
scene = new THREE.Scene();
geometry = new THREE.BoxGeometry(0.2, 0.2, 0.2);
material = new THREE.MeshNormalMaterial();
mesh = new THREE.Mesh(geometry, material);
scene.add(mesh);
renderer = new THREE.WebGLRenderer({
antialias: true
});
renderer.setSize(window.innerWidth, window.innerHeight);
document.body.appendChild(renderer.domElement);
}
function animate() {
requestAnimationFrame(animate);
mesh.rotation.x += 0.01;
mesh.rotation.y += 0.02;
renderer.render(scene, camera);
}body {
margin: 0;
}<script src="//cdn.rawgit.com/mrdoob/three.js/master/build/three.min.js"></script> https://threejs.org/examples/#webgl_animation_cloth Pixi.jsFramworth 2Dbut not for game design, it's a WebGL screwdriver, you need to separate the necessary libraries (may be weakly supported). From the strong side, speed may be a mobile applix.Touchy Tutorials with detailed explanations of what works. Crossbrowser.
It allows for the manipulation of sprights (most often vegetation images), lungs in the underload (views, JSON objects, etc.), flexible container structures. var app = new PIXI.Application(800, 600, {backgroundColor : 0x1099bb});
document.body.appendChild(app.view);
// create a new Sprite from an image path
var bunny = PIXI.Sprite.fromImage('//picsum.photos/50/50')
// center the sprite's anchor point
bunny.anchor.set(0.5);
// move the sprite to the center of the screen
bunny.x = app.screen.width / 2;
bunny.y = app.screen.height / 2;
app.stage.addChild(bunny);
// Listen for animate update
app.ticker.add(function(delta) {
// just for fun, let's rotate mr rabbit a little
// delta is 1 if running at 100% performance
// creates frame-independent transformation
bunny.rotation += 0.1 * delta;
});<script src="https://cdnjs.cloudflare.com/ajax/libs/pixi.js/4.8.1/pixi.min.js"></script> https://pixijs.io/examples/#/basics/basic.js D3.jsGraphic Visualization Library, mainly data visualization. There are modules for certain tasks. Detailed vector schedule (SVG) also supports JSON, CSV, geoJSON. There are JS-built functions to manipulate facilities. Support is stable, there's a comunity (doc. is partially even transferred to Russian).var svg = d3.select("svg"),
width = +svg.attr("width"),
height = +svg.attr("height"),
transform = d3.zoomIdentity;;
var points = d3.range(2000).map(phyllotaxis(10));
var g = svg.append("g");
g.selectAll("circle")
.data(points)
.enter().append("circle")
.attr("cx", function(d) {
return d.x;
})
.attr("cy", function(d) {
return d.y;
})
.attr("r", 2.5)
.call(d3.drag()
.on("drag", dragged));
svg.call(d3.zoom()
.scaleExtent([1 / 2, 8])
.on("zoom", zoomed));
function zoomed() {
g.attr("transform", d3.event.transform);
}
function dragged(d) {
d3.select(this).attr("cx", d.x = d3.event.x).attr("cy", d.y = d3.event.y);
}
function phyllotaxis(radius) {
var theta = Math.PI * (3 - Math.sqrt(5));
return function(i) {
var r = radius * Math.sqrt(i),
a = theta * i;
return {
x: width / 2 + r * Math.cos(a),
y: height / 2 + r * Math.sin(a)
};
};
}<!-------- https://bl.ocks.org/mbostock/3127661b6f13f9316be745e77fdfb084 -------->
<svg width="960" height="500"></svg>
<!-------- Можно скролить картинку -------->
<script src="https://d3js.org/d3.v4.min.js"></script> http://christopheviau.com/d3list/ https://www.slant.co/versus/1965/11348/~pixi-js_vs_three-js