Skip to content

Instantly share code, notes, and snippets.

View arturitu's full-sized avatar

Arturo Paracuellos arturitu

View GitHub Profile
arturitu / JSStats.js
Last active December 16, 2020 10:45
JSStats modified
// Modified from
import * as THREE from 'three'
export default class JStats extends THREE.Group {
constructor (renderer) {
this.renderer = renderer
const can = document.createElement('canvas')
can.width = 256
can.height = 128
this.canvas = can
arturitu / modelViewerAR.txt
Last active June 16, 2019 09:27
Embed a 3D model with model-viewer with AR support
<!-- Import the component -->
<script type="module" src=""></script>
<script nomodule src=""></script>
<!-- Use it like any other HTML element -->
<model-viewer src="assets/model.glb" ios-src="assets/model.usdz" preload camera-controls
background-color="#cccccc" auto-rotate shadow-intensity=".8" poster="img/poster.png"
alt="A 3D model of a futuristic chest">