Invoking extra TS functions.

This commit is contained in:
2021-09-25 18:21:02 -07:00
parent c3fed0257a
commit 6b7bd658c6
16 changed files with 405 additions and 35 deletions

View File

@ -1,7 +0,0 @@
import { MESSAGE_TEST } from "./test";
import { MESSAGE_ALT } from "./test2";
//@ts-ignore
print(MESSAGE_TEST);
//@ts-ignore
print(MESSAGE_ALT);

35
ts/main.ts Normal file
View File

@ -0,0 +1,35 @@
let cube:Primitive;
let shader:Shader;
let camera:Camera;
const init = () => {
print('Main invoked');
cube = primitiveCreate();
quadInit(cube, 0, -1, -1, 0, 0, 1, 1, 1, 1);
camera = cameraCreate();
shader = shaderCreate();
assetShaderLoad(shader, "shaders/textured.vert", "shaders/textured.frag");
shaderUse(shader);
cameraLookAt(camera, 3,3,3, 0,0,0);
cameraPerspective(camera, 45, 16/9, 0.01, 100);
}
const update = () => {
shaderUse(shader);
cameraLookAt(camera, 3,3,3, 0,0,0);
cameraPerspective(camera, 45, 16/9, 0.01, 100);
shaderUseCamera(shader, camera);
shaderUsePosition(shader, 0,0,0, 0,0,0);
primitiveDraw(cube, 0, -1);
}
const dispose = () => {
cameraDispose(camera);
shaderDispose(shader);
}

View File

@ -1 +0,0 @@
export const MESSAGE_TEST = 'yeet';

View File

@ -1 +0,0 @@
export const MESSAGE_ALT = 'hELLO2';