This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * class manages drawing to a canvas | |
| * @author antonmills. (http://www.antonmills.com / http://www.twitter.com/antonmill) | |
| */ | |
| class MapController { | |
| // privates (hehe ;p) | |
| private _canvas; // the render target | |
| private _image; // the source image | |
| private _ctx; // ctx |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var MapController = (function () { | |
| function MapController(canvas, imagePath) { | |
| this.canvas = canvas; | |
| this.imagePath = imagePath; | |
| this._canvas = canvas; | |
| this._canvas.width = 960; | |
| this._canvas.height = 640; | |
| this._ctx = this._canvas.getContext('2d'); | |
| this._that = this; | |
| this._image = new Image(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| _canvas.style.position = "absolute"; | |
| _canvas.style.left = "" + -(_car.GetWorldCenter().x * worldScale) + "px"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Tests if a Polygon shape is convex. | |
| * Pass an Array of vertices(or points) that have x/y properties | |
| * | |
| * @return {Boolean} true is a convex shape | |
| */ | |
| Polygon.prototype.isConvex = function() | |
| { | |
| if (this.vertices.length < 4) | |
| return true; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { Component } from 'react'; | |
| import { BrowserRouter as Router, Route, Link } from 'react-router-dom'; | |
| import ReactDOM from 'react-dom'; | |
| import { Button, Jumbotron, Form, Col, FormGroup, FormControl, ControlLabel, InputGroup, Overlay, Tooltip, Popover } from 'react-bootstrap'; | |
| class ViewHome extends Component { | |
| constructor(props) { | |
| super(props); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {"lastUpload":"2020-01-29T10:19:40.195Z","extensionVersion":"v3.4.3"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| To start the Podman user socket | |
| systemctl --user start podman.socket | |
| To make it auto-start on login: | |
| systemctl --user enable podman.socket | |
| Then confirm it’s running: | |
| systemctl --user status podman.socket |