blob: 45ccece308a1707b2e59d13f82ed103e5add7793 [file] [log] [blame]
import { $, $$ } from '../../../infra-sk/modules/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();
});