<commit_before>import 'aframe';
import 'aframe-animation-component';
import 'aframe-text-component';
import 'babel-polyfill';
import {Entity, Scene} from 'aframe-react';
import React from 'react';
import ReactDOM from 'react-dom';
import { Link, withRouter } from 'react-router';
import 'aframe-bmfont-text-component';
import Iframe from 'react-iframe';

import Camera from './Camera';
import Text from './Text';
import Sky from './Sky';
import TextPlane from './TextPlane';
import Bookmark from './Bookmark';

// var draw = require("aframe-draw-component").component;
// var textWrap = require('aframe-textwrap-component').component;
// AFRAME.registerComponent("draw", draw);
// AFRAME.registerComponent("textwrap", textwrap);
// let show = false;

/*
not sure how these 'dumb' components will handle the equivalent of
state changes once imported into our smart component?
i.e onClick -> this.setState({louvrePyramid: true}) in order to
determine whether to render Louvre Pyramid etc. obv we can do it
differently but that's how I've always rendered new components in React before
*/

//temporary workaround for now
// let showPyramid = false;

// export default this.props => (
class Louvre extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
      showPyramid: false,
      showLeftWingPlane: false,
      allTitles: ['Louvre_Pyramid', 'Louvre']
    };
  }

  componentWillMount () {
    this.props.getParagraph(this.state.allTitles, allParagraphs => {
      this.setState( {allParagraphs: allParagraphs} );
      console.log('🍊  this.state allParagraphs', this.state.allParagraphs);
    });
  }

  render () {
    let self = this;
    return (
      <Entity >

       <a-image id="close-image" src="#close" geometry="height: 0.3; width: 0.3" position="0 0 0" onClick={() => props.router.replace('/lobby')}></a-image>

        <Entity id="links" layout="type: line; margin: 1.5" position="0 -1 -4">
          <Entity template="src: #link" data-src="#cubes" data-thumb="#cubes-thumb"></Entity>
          <Entity template="src: #link" data-src="#city" data-thumb="#city-thumb"></Entity>
          <Entity template="src: #link" data-src="#sechelt" data-thumb="#sechelt-thumb"></Entity>
        </Entity>

        <Entity id="pyramidTag"
            onClick={() => {
              self.setState({showPyramid: true});
            }}
            geometry="primitive: plane; width: 2; height: 2"
            material={{src: 'url(https://cdn.aframe.io/360-image-gallery-boilerplate/img/thumb-cubes.jpg)', opacity: 0.85}}
            position="-4.34 2.22 6.83"
            rotation="8.02 135.22 -1.15"
        >
        </Entity>

        {self.state.showPyramid ?

            <TextPlane
              id="pyramidTextPlane"
              hidePlane={() => self.setState({showPyramid: false})}

              position="-4.34 2.22 6.83"<commit_msg>Bug fix for louvre lobby button<commit_after>import 'aframe';
import 'aframe-animation-component';
import 'aframe-text-component';
import 'babel-polyfill';
import {Entity, Scene} from 'aframe-react';
import React from 'react';
import ReactDOM from 'react-dom';
import { Link, withRouter } from 'react-router';
import 'aframe-bmfont-text-component';
import Iframe from 'react-iframe';

import Camera from './Camera';
import Text from './Text';
import Sky from './Sky';
import TextPlane from './TextPlane';
import Bookmark from './Bookmark';

// var draw = require("aframe-draw-component").component;
// var textWrap = require('aframe-textwrap-component').component;
// AFRAME.registerComponent("draw", draw);
// AFRAME.registerComponent("textwrap", textwrap);
// let show = false;

/*
not sure how these 'dumb' components will handle the equivalent of
state changes once imported into our smart component?
i.e onClick -> this.setState({louvrePyramid: true}) in order to
determine whether to render Louvre Pyramid etc. obv we can do it
differently but that's how I've always rendered new components in React before
*/

//temporary workaround for now
// let showPyramid = false;

// export default this.props => (
class Louvre extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
      showPyramid: false,
      showLeftWingPlane: false,
      allTitles: ['Louvre_Pyramid', 'Louvre']
    };
  }

  componentWillMount () {
    this.props.getParagraph(this.state.allTitles, allParagraphs => {
      this.setState( {allParagraphs: allParagraphs} );
      console.log('🍊  this.state allParagraphs', this.state.allParagraphs);
    });
  }

  render () {
    let self = this;
    return (
      <Entity >

       <a-image id="close-image" src="#close" geometry="height: 0.3; width: 0.3" position="0 0 2" onClick={() => self.props.router.replace('/lobby')}></a-image>

        <Entity id="links" layout="type: line; margin: 1.5" position="0 -1 -4">
          <Entity template="src: #link" data-src="#cubes" data-thumb="#cubes-thumb"></Entity>
          <Entity template="src: #link" data-src="#city" data-thumb="#city-thumb"></Entity>
          <Entity template="src: #link" data-src="#sechelt" data-thumb="#sechelt-thumb"></Entity>
        </Entity>

        <Entity id="pyramidTag"
            onClick={() => {
              self.setState({showPyramid: true});
            }}
            geometry="primitive: plane; width: 2; height: 2"
            material={{src: 'url(https://cdn.aframe.io/360-image-gallery-boilerplate/img/thumb-cubes.jpg)', opacity: 0.85}}
            position="-4.34 2.22 6.83"
            rotation="8.02 135.22 -1.15"
        >
        </Entity>

        {self.state.showPyramid ?

            <TextPlane
              id="pyramidTextPlane"
              hidePlane={() => self.setState({showPyramid: false})}

              position="-4.34 2.22 6.83"
{'fraction_non_alphanumeric': 0.15329984410185346, 'fraction_numerical': 0.0169755759570414, 'mean_word_length': 3.1213418986438257, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 41, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5276985', 'n_tokens_mistral': 1864, 'n_tokens_neox': 1780, 'n_words': 450}