View BaseComponent.ts
export class BaseElement extends HTMLElement { | |
dirty: boolean = true; | |
root: ShadowRoot; | |
constructor(hideInternals: boolean = true) { | |
super(); | |
this.root = this.attachShadow({ mode: hideInternals ? 'closed' : 'open' }); | |
const observer = new MutationObserver(() => { |
View index.html
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>loop over array</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
<script src="./suite.js"></script> | |
</head> | |
<body> | |
<h1>Open the console to view the results</h1> |
View main.cpp
#include <chrono> | |
#include <iostream> | |
#include <random> | |
#include <string> | |
using namespace std; | |
using namespace std::chrono; | |
int main() { | |
int playerGuess = 0; |
View main.rs
extern crate rand; | |
extern crate amethyst; | |
use amethyst::{Application, Event, State, Trans, VirtualKeyCode, WindowEvent}; | |
use amethyst::asset_manager::AssetManager; | |
use amethyst::config::Element; | |
use amethyst::ecs::{World, Join, VecStorage, Component, RunArg, System, Entity}; | |
use amethyst::ecs::components::{Mesh, LocalTransform, Texture, Transform, Renderable}; | |
use amethyst::gfx_device::DisplayConfig; |