matrix-engine
Version:
basic_timeline improved, VT func setup vide html element id with name arg.- DISABLE RAYCAST DEBUG TEST [2.3.3] Fix for GUI win desktop [2.3.0] DestrucMesh solution & loading convex objs for physics BASIC, SpriteAnimation CPU/texture solution added, Improv
32 lines (26 loc) • 785 B
JavaScript
/**
*@Author Nikola Lukic
*@Description
* Matrix Engine Api Example
* Adding default color cube.
*/
/* globals world App */
import App from "../program/manifest";
export var runThis = (world) => {
var textuteImageSamplers = {
source: ["res/images/complex_texture_1/diffuse.webp"],
mix_operation: "multiply",
};
for (var j = -4; j < 4; j++) {
for (var x =-4; x < 4; x++) {
for (var z =2; z < 5; z++) {
world.Add("square", 1, "cube_" + j);
App.scene['cube_' + j].position.SetX(x * 1);
App.scene['cube_' + j].position.SetY(-j * 1);
App.scene['cube_' + j].position.SetZ(-z * 1);
App.scene['cube_' + j].rotation.rotationSpeed.x = 10;
App.scene['cube_' + j].geometry.setScale(0.4)
}
}
}
};