Skip to content
Snippets Groups Projects
Commit 39b29fe0 authored by Alexander Rose's avatar Alexander Rose
Browse files

formating & code style

parent 5636edc1
No related branches found
No related tags found
No related merge requests found
......@@ -106,7 +106,7 @@ export function computeVertexNormals<T extends NumberArray> (vertices: NumberArr
const cb = Vec3.zero()
const ab = Vec3.zero()
for (let i = 0, il = vertices.length; i < il; i += 9) {
for (let i = 0, il = vertices.length; i < il; i += 9) {
Vec3.fromArray(a, vertices, i)
Vec3.fromArray(b, vertices, i + 3)
Vec3.fromArray(c, vertices, i + 6)
......
......@@ -107,13 +107,13 @@ namespace StateAction {
display: typeof info.display === 'string'
? { name: info.display }
: !!info.display
? info.display
: { name: 'Unnamed State Action' },
? info.display
: { name: 'Unnamed State Action' },
params: typeof info.params === 'object'
? () => info.params as any
: !!info.params
? info.params as any
: void 0,
? info.params as any
: void 0,
isApplicable: info.isApplicable,
...(typeof def === 'function'
? { run: def }
......
......@@ -29,7 +29,7 @@ export class AsyncQueue<T> {
remove(v: T) {
const rem = arrayRemoveInPlace(this.queue, v);
if (rem)
this.signal.next({ v, stillPresent: false })
this.signal.next({ v, stillPresent: false })
return rem;
}
......
......@@ -4,7 +4,7 @@
* @author David Sehnal <david.sehnal@gmail.com>
*/
/** Cache the latest result from calls to a function with any number of arguments */
/** Cache the latest result from calls to a function with any number of arguments */
export function memoizeLatest<Args extends any[], T>(f: (...args: Args) => T): (...args: Args) => T {
let lastArgs: any[] | undefined = void 0, value: any = void 0;
return (...args) => {
......
......@@ -4,8 +4,8 @@
* @author David Sehnal <david.sehnal@gmail.com>
*/
declare var process: any;
declare var window: any;
declare const process: any;
declare const window: any;
const now: () => now.Timestamp = (function () {
if (typeof window !== 'undefined' && window.performance) {
......
......@@ -66,11 +66,11 @@ export function deepClone<T>(source: T): T {
if (null === source || 'object' !== typeof source) return source;
if (source instanceof Array) {
const copy: any[] = [];
for (let i = 0, len = source.length; i < len; i++) {
copy[i] = deepClone(source[i]);
}
return copy as any as T;
const copy: any[] = [];
for (let i = 0, len = source.length; i < len; i++) {
copy[i] = deepClone(source[i]);
}
return copy as any as T;
}
if (source instanceof Object) {
......
......@@ -380,11 +380,11 @@ export namespace PropertyAccess {
}
export async function run() {
// const { structures, models/*, mmcif*/ } = await getBcif('1cbs');
// const { structures, models/* , mmcif */ } = await getBcif('1cbs');
// const { structures, models } = await getBcif('3j3q');
const { structures, models /*, mmcif*/ } = await readCIF('e:/test/quick/1cbs_updated.cif');
// const { structures: s1, /*, mmcif*/ } = await readCIF('e:/test/quick/1tqn_updated.cif');
const { structures, models /* , mmcif */ } = await readCIF('e:/test/quick/1cbs_updated.cif');
// const { structures: s1, /* , mmcif */ } = await readCIF('e:/test/quick/1tqn_updated.cif');
// testGrouping(structures[0]);
// console.log('------');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment