UNPKG

matrix-engine-wgpu

Version:

+HOTFIX raycast, webGPU powered pwa application. Crazy fast rendering with AmmoJS physics support. Simple raycaster hit object added.

30 lines (25 loc) 743 B
import MatrixEngineWGPU from "../src/world.js"; export var unlitTextures = function() { let unlitTextures = new MatrixEngineWGPU({ useSingleRenderPass: false, canvasSize: 'fullscreen' }, () => { let c = { scale: 2, position: {x: -3, y: 0, z: -10}, rotation: {x: 0, y: 0, z: 0}, rotationSpeed: {x: 10, y: 0, z: 0}, texturesPaths: ['./res/textures/rust.jpg'] }; let o = { scale: 2, position: {x: 3, y: 0, z: -10}, rotation: {x: 0, y: 0, z: 0}, rotationSpeed: {x: 10, y: 0, z: 0}, texturesPaths: ['./res/textures/default.png'] }; unlitTextures.addBall(c) unlitTextures.addCube(o) }) window.app = unlitTextures; }