diff --git a/src/mol-data/int/sorted-ranges.ts b/src/mol-data/int/sorted-ranges.ts index d51ba633178667806c81f5e775878acbfa588e03..967595e0f670ba6840665ca03ebce519fcdde4bb 100644 --- a/src/mol-data/int/sorted-ranges.ts +++ b/src/mol-data/int/sorted-ranges.ts @@ -18,7 +18,7 @@ namespace SortedRanges { export function max<T extends number = number>(ranges: SortedRanges<T>) { return ranges[ranges.length - 1] } export function size<T extends number = number>(ranges: SortedRanges<T>) { let size = 0 - for(let i = 0, il = ranges.length; i < il; i += 2) { + for (let i = 0, il = ranges.length; i < il; i += 2) { size += ranges[i + 1] - ranges[i] + 1 } return size diff --git a/src/mol-data/util/hash-functions.ts b/src/mol-data/util/hash-functions.ts index 001eaf5e1958c31b224d904e7bdb06f5b62f88c3..0f672694237f5d4c7c6a6d7c1df15527582ece27 100644 --- a/src/mol-data/util/hash-functions.ts +++ b/src/mol-data/util/hash-functions.ts @@ -1,7 +1,8 @@ /** - * Copyright (c) 2017 mol* contributors, licensed under MIT, See LICENSE file for more info. + * Copyright (c) 2017-2018 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author David Sehnal <david.sehnal@gmail.com> + * @author Alexander Rose <alexander.rose@weirdbyte.de> */ // from http://burtleburtle.net/bob/hash/integer.html diff --git a/src/mol-gl/webgl/program.ts b/src/mol-gl/webgl/program.ts index 46047d66441a5a847ce1c6c0c1064852bf0cb51a..34fa9501e2ca78895a1789634ccb70b5702dcd46 100644 --- a/src/mol-gl/webgl/program.ts +++ b/src/mol-gl/webgl/program.ts @@ -117,7 +117,7 @@ export type ProgramCache = ReferenceCache<Program, ProgramProps, Context> export function createProgramCache(): ProgramCache { return createReferenceCache( (props: ProgramProps) => { - const array = [props.shaderCode.id] + const array = [ props.shaderCode.id ] Object.keys(props.defineValues).forEach(k => { const v = props.defineValues[k].ref.value array.push(hashString(k), typeof v === 'boolean' ? v ? 1 : 0 : hashString(v))