Skip to content

refactor ISketch to just be a react component. #51

@hellochar

Description

@hellochar

Consolidate

abstract class SketchComponent extends React.Component {...}

class Line extends SketchComponent {
  init() {
  }

  animate() {
  }

  render() {
    return (
      <Renderer init={this.init} animate={this.animate} addBackButton addAudioButton navBar={this.renderNavBar()}>
        <canvas onMouseMove={...} onMousePress={...} /> <-- in the future we can turn this into a <UnifiedCanvas /> that unifies mouse and touch.
      </Renderer>
    );
  }
  renderNavBar() {
    return (<button className="help-button">);
  }
}

Unifies mouse events, mixing React elements, having a navbar, and composability. Win win!

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions