diff --git a/player/player.view.css.ts b/player/player.view.css.ts index b606f9a..845b17c 100644 --- a/player/player.view.css.ts +++ b/player/player.view.css.ts @@ -33,22 +33,22 @@ namespace $.$$ { color: $mol_style_func.vary('--color_c') }, - Spread_label_a: { + Translate_label_a: { color: $mol_style_func.vary('--color_a'), padding: $mol_gap.text, }, - Spread_label_b: { + Translate_label_b: { color: $mol_style_func.vary('--color_b'), padding: $mol_gap.text, }, - Spread_label_c: { + Translate_label_c: { color: $mol_style_func.vary('--color_c'), padding: $mol_gap.text, }, - Spread_cells: { + Translate_cells: { pointerEvents: 'auto', Bubble: { display: 'grid', diff --git a/player/player.view.tree b/player/player.view.tree index 48982f6..3d79c3c 100644 --- a/player/player.view.tree +++ b/player/player.view.tree @@ -5,11 +5,11 @@ $optimade_cifplayer_player $mol_view zoom_scale_step 0.3 vibrate? null unvibrate null - spread_cells / - <= spread_a? 1 - <= spread_b? 1 - <= spread_c? 1 - spread_cells_limit 50 + translate_cells / + <= translate_a? 1 + <= translate_b? 1 + <= translate_c? 1 + translate_cells_limit 50 - plugins / <= Theme $mol_theme_auto @@ -64,31 +64,31 @@ $optimade_cifplayer_player $mol_view <= Sym_check*0 $mol_check_box title <= sym_name* \ checked? <=> symmetry_visible*? false - <= Spread_cells $mol_pick + <= Translate_cells $mol_pick trigger_content / - <= spread_cell_label \1×1×1 + <= translate_cell_label \1×1×1 bubble_content / - <= Spread_label_a $mol_paragraph + <= Translate_label_a $mol_paragraph title \a - <= Spread_a $mol_number - value? <=> spread_a? + <= Translate_a $mol_number + value? <=> translate_a? hint \1 value_min 1 - value_max <= spread_limit_a 1 - <= Spread_label_b $mol_paragraph + value_max <= translate_limit_a 1 + <= Translate_label_b $mol_paragraph title \b - <= Spread_b $mol_number - value? <=> spread_b? + <= Translate_b $mol_number + value? <=> translate_b? hint \1 value_min 1 - value_max <= spread_limit_b 1 - <= Spread_label_c $mol_paragraph + value_max <= translate_limit_b 1 + <= Translate_label_c $mol_paragraph title \c - <= Spread_c $mol_number - value? <=> spread_c? + <= Translate_c $mol_number + value? <=> translate_c? hint \1 value_min 1 - value_max <= spread_limit_c 1 + value_max <= translate_limit_c 1 <= Center $mol_check_icon checked? <=> centered? true Icon <= Center_icon $mol_icon_image_filter_center_focus diff --git a/player/player.view.web.ts b/player/player.view.web.ts index d251dd4..6b44b1d 100644 --- a/player/player.view.web.ts +++ b/player/player.view.web.ts @@ -17,7 +17,7 @@ namespace $.$$ { this.$.$mol_lights( external == 'light' ? true : false ) } - + @ $mol_mem lights_toggle() { return this.externals()?.theme ? [] : super.lights_toggle() @@ -317,11 +317,11 @@ namespace $.$$ { cell_translations() { const translations: [ number, number, number ][] = [] - const [ spread_a, spread_b, spread_c ] = this.spread_cells() + const [ translate_a, translate_b, translate_c ] = this.translate_cells() - for( let a = 0; a < spread_a; a++ ) { - for( let b = 0; b < spread_b; b++ ) { - for( let c = 0; c < spread_c; c++ ) { + for( let a = 0; a < translate_a; a++ ) { + for( let b = 0; b < translate_b; b++ ) { + for( let c = 0; c < translate_c; c++ ) { translations.push( [ a, b, c ] ) } } @@ -343,9 +343,9 @@ namespace $.$$ { this.overlay_boxes().forEach( box => { box.children.forEach( ( label: InstanceType< THREE["Object3D"] >, i: number ) => { - + label.children.forEach( ( sprite: InstanceType< THREE["Object3D"] > ) => label.remove( sprite ) ) - + if( overlay ) { const sprite = this.create_sprite( String( atom_datas[ i ].overlays[ overlay ] ) ) label.add( sprite ) @@ -368,7 +368,7 @@ namespace $.$$ { return overlay_box } - + @ $mol_mem overlay_boxes() { return [ this.overlay_box( [0,0,0] ) ] @@ -554,35 +554,35 @@ namespace $.$$ { } @ $mol_mem - spread_cells() { + translate_cells() { return [ - this.spread_a() || 1, - this.spread_b() || 1, - this.spread_c() || 1, + this.translate_a() || 1, + this.translate_b() || 1, + this.translate_c() || 1, ] } @ $mol_mem - spread_cell_label() { - return this.spread_cells().join('×') + translate_cell_label() { + return this.translate_cells().join('×') } @ $mol_mem - spread_limit_a() { - const [ a, b, c ] = this.spread_cells() - return Math.floor( this.spread_cells_limit() / ( b * c ) ) + translate_limit_a() { + const [ a, b, c ] = this.translate_cells() + return Math.floor( this.translate_cells_limit() / ( b * c ) ) } @ $mol_mem - spread_limit_b() { - const [ a, b, c ] = this.spread_cells() - return Math.floor( this.spread_cells_limit() / ( a * c ) ) + translate_limit_b() { + const [ a, b, c ] = this.translate_cells() + return Math.floor( this.translate_cells_limit() / ( a * c ) ) } @ $mol_mem - spread_limit_c() { - const [ a, b, c ] = this.spread_cells() - return Math.floor( this.spread_cells_limit() / ( a * b ) ) + translate_limit_c() { + const [ a, b, c ] = this.translate_cells() + return Math.floor( this.translate_cells_limit() / ( a * b ) ) } }