Published
Edited
Jan 9, 2021
Insert cell
Insert cell
md`# ${untitled}`
Insert cell
html`<h1>${untitled}</h1>`
Insert cell
svg`<svg height="${height}"><text y="${height -
10}" style="fill:#333;font-family:var(--sans-serif);font-weight:600;font-size:2em">${untitled}</text></svg>`
Insert cell
tex`\LARGE ${untitled}`
Insert cell
{
let camera = new THREE.OrthographicCamera(
width / -2,
width / 2,
height / 2,
height / -2,
1,
1000
);

camera.position.set(width / 2 - 5, height / 2 - 10, 1);

let scene = new THREE.Scene();
scene.background = new THREE.Color(0xffffff);

let geometry = new THREE.TextGeometry(untitled, {
font: threeFont,
size: 25,
height: 0
});

var material = new THREE.MeshBasicMaterial({ color: 0x000000 });
var mesh = new THREE.Mesh(geometry, material);
scene.add(mesh);

var renderer = new THREE.WebGLRenderer({ antialias: true });
invalidation.then(() => renderer.dispose());
renderer.setSize(width, height);
renderer.setPixelRatio(devicePixelRatio);

renderer.render(scene, camera);

return renderer.domElement;
}
Insert cell
{
console.log(untitled);
return untitled;
}
Insert cell
eval(`${Untitled}`)
Insert cell
eval(`let ${untitled} = function() {}; new ${untitled}()`)
Insert cell
DOM.uid(untitled)
Insert cell
DOM.select([untitled])
Insert cell
DOM.download(new Blob([untitled], { type: "text/plain" }), untitled, untitled)
Insert cell
{
var synth = window.speechSynthesis;
if (audio) synth.speak(new SpeechSynthesisUtterance(untitled));

const form = html`<form onsubmit="return false;"><button name="button" type="button">${
audio ? '&#10073;&#10073;' : '&#9658;'
} ${untitled}</button></form>`;

form.button.onclick = () => {
synth.cancel();
mutable audio = !audio;
};

return form;
}
Insert cell
{
let i = 0;
if (audio) i = 0; // replay demo when playing the audio
while (i < Untitled.length) {
yield Promises.delay(
250,
(mutable untitled = Untitled.substring(0, (i % Untitled.length) + 1))
);
i++;
}
}
Insert cell
mutable untitled = ''
Insert cell
Untitled = 'Untitled'
Insert cell
THREE = require('three')
Insert cell
threeFont = new Promise(resolve =>
new THREE.FontLoader().load(
'https://raw.githubusercontent.com/mrdoob/three.js/dev/examples/fonts/helvetiker_regular.typeface.json',
resolve
)
)
Insert cell
height = 50
Insert cell
mutable audio = false
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more