Bladeren bron

formating

Alexander Rose 6 jaren geleden
bovenliggende
commit
ce0385f73e
3 gewijzigde bestanden met toevoegingen van 4 en 3 verwijderingen
  1. 1 1
      src/mol-data/int/sorted-ranges.ts
  2. 2 1
      src/mol-data/util/hash-functions.ts
  3. 1 1
      src/mol-gl/webgl/program.ts

+ 1 - 1
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

+ 2 - 1
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

+ 1 - 1
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))