UNPKG

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

42 lines (35 loc) 1.2 kB
/* eslint-disable no-unused-vars */ /** * @Author Nikola Lukic * @Description Matrix Engine Api Example. */ /* globals world App world */ import App from "../program/manifest"; export var runThis = world => { /* globals world App ENUMERATORS SWITCHER OSCILLATOR */ var textuteImageSamplers = { source: ["res/images/complex_texture_1/diffuse.webp"], mix_operation: "multiply", }; for (var d = -2; d < 3; d++) { for (var t = -1; t < 2; t++) { world.Add( "cubeLightTex", 0.3, "MyCubeTex" + Math.abs(d), textuteImageSamplers ); eval("App.scene.MyCubeTex" + Math.abs(d) + ".position.x += d*0.8"); eval("App.scene.MyCubeTex" + Math.abs(d) + ".position.y += t*0.8"); eval( "App.scene.MyCubeTex" + Math.abs(d) + ".rotation.rotationSpeed.x = 0;" ); } } world.Add("triangle", 1, "MyColoredTriangle1"); world.Add("triangle", 1, "MyColoredTriangle2"); world.Add("triangle", 1, "MyColoredTriangle3"); App.scene.MyColoredTriangle1.position.SetX(2.5); App.scene.MyColoredTriangle2.position.SetX(0); App.scene.MyColoredTriangle3.position.SetX(-2.5); };