blob: 32169ff6c000083974781189279fc5f44234cd03 [file] [log] [blame]
import { $, $$ } from '../dom';
import './index';
import { UniformGenericSk } from './uniform-generic-sk';
$$<UniformGenericSk>('#float2')!.uniform = {
name: 'iLocation',
columns: 2,
rows: 1,
slot: 1,
};
$$<UniformGenericSk>('#float3x3')!.uniform = {
name: 'iMatrix',
columns: 3,
rows: 3,
slot: 3,
};
$$('#apply')!.addEventListener('click', () => {
const uniforms: number[] = new Array(1 + 2 + 9 + 1);
$<UniformGenericSk>('uniform-generic-sk')!.forEach((ele) => {
ele.applyUniformValues(uniforms);
});
$$<HTMLPreElement>('#results')!.innerText = uniforms.toString();
});