This file contains 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
mark { | |
margin: 0 -0.4em; | |
padding: 0.1em 0.4em; | |
border-radius: 0.8em 0.3em; | |
background: transparent; | |
background-image: linear-gradient( | |
to right, | |
rgba(255, 225, 0, 0.1), | |
rgba(255, 225, 0, 0.7) 4%, | |
rgba(255, 225, 0, 0.3) |
This file contains 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
// Core assets | |
let coreAssets = []; | |
// On install, cache core assets | |
self.addEventListener('install', function (event) { | |
// Cache core assets | |
event.waitUntil(caches.open('app').then(function (cache) { | |
for (let asset of coreAssets) { | |
cache.add(new Request(asset)); |
This file contains 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
const parameters = { | |
radius: 1.0, | |
moveSpeed: 0.01, | |
damping: 0.1, | |
tilt: 10, | |
} | |
const raycaster = new THREE.Raycaster() | |
const mouse = new THREE.Vector2() |
This file contains 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
element.rotation.z = -0.2 - (1 + Math.sin(elapsedTime / 1.5)) / 20; | |
element.rotation.x = Math.cos(elapsedTime / 4) / 8; | |
element.rotation.y = Math.sin(elapsedTime / 4) / 8; | |
element.position.y = (1 + Math.sin(elapsedTime / 1.5)) / 10; |
This file contains 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
cameraHelper = new THREE.CameraHelper( camera ); | |
scene.add( cameraHelper ); |
This file contains 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
axis = new THREE.AxesHelper( 1000 ); | |
scene.add( axis ); |
This file contains 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
lightHelper = new THREE.PointLightHelper( light1, 1 ); | |
scene.add( lightHelper ); |
This file contains 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
hemispherelighthelper = new THREE.HemisphereLightHelper( hemiLight, 1 ); | |
scene.add( hemispherelighthelper ); |
This file contains 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
grid = new THREE.GridHelper( 1000, 1000 ); | |
scene.add( grid ); |
This file contains 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
wireframe = new THREE.WireframeGeometry( geometry ); | |
line = new THREE.LineSegments( wireframe ); | |
line.material.depthTest = false; | |
line.material.opacity = 0.6; | |
line.material.transparent = true; | |
scene.add( line ); |
NewerOlder