diff --git a/content/secrets/forest/index.md b/content/secrets/forest/index.md new file mode 100644 index 0000000..7678179 --- /dev/null +++ b/content/secrets/forest/index.md @@ -0,0 +1,4 @@ ++++ +title = "The Forest" ++++ + diff --git a/static/secrets/forest/forest.js b/static/secrets/forest/forest.js new file mode 100644 index 0000000..f329ee2 --- /dev/null +++ b/static/secrets/forest/forest.js @@ -0,0 +1,24 @@ +import * as THREE from 'three'; + +const renderer = new THREE.WebGLRenderer({ canvas: document.querySelector('#forest'), }); +const scene = new THREE.Scene(); +const camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 0.1, 1000 ); + +renderer.setSize( window.innerWidth, window.innerHeight ); +renderer.setAnimationLoop( animate ); + +const geometry = new THREE.BoxGeometry( 1, 1, 1 ); +const material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } ); +const cube = new THREE.Mesh( geometry, material ); +scene.add( cube ); + +camera.position.z = 5; + +function animate() { + + cube.rotation.x += 0.01; + cube.rotation.y += 0.01; + + renderer.render( scene, camera ); + +} diff --git a/static/secrets/finger.png b/static/secrets/kennel/finger.png similarity index 100% rename from static/secrets/finger.png rename to static/secrets/kennel/finger.png diff --git a/static/secrets/paw.png b/static/secrets/kennel/paw.png similarity index 100% rename from static/secrets/paw.png rename to static/secrets/kennel/paw.png diff --git a/static/secrets/test.bin b/static/secrets/kennel/test.bin similarity index 100% rename from static/secrets/test.bin rename to static/secrets/kennel/test.bin diff --git a/static/secrets/test.gltf b/static/secrets/kennel/test.gltf similarity index 100% rename from static/secrets/test.gltf rename to static/secrets/kennel/test.gltf diff --git a/static/secrets/kennel/test2.bin b/static/secrets/kennel/test2.bin new file mode 100644 index 0000000..bcffd81 Binary files /dev/null and b/static/secrets/kennel/test2.bin differ diff --git a/static/secrets/kennel/test2.gltf b/static/secrets/kennel/test2.gltf new file mode 100644 index 0000000..bcd6af2 --- /dev/null +++ b/static/secrets/kennel/test2.gltf @@ -0,0 +1,420 @@ +{ + "asset":{ + "generator":"Khronos glTF Blender I/O v4.5.49", + "version":"2.0" + }, + "scene":0, + "scenes":[ + { + "name":"Scene", + "nodes":[ + 0, + 1, + 2, + 3 + ] + } + ], + "nodes":[ + { + "mesh":0, + "name":"Plane", + "scale":[ + 25, + 25, + 25 + ] + }, + { + "mesh":1, + "name":"Cube", + "translation":[ + 0, + 1, + 2.458730936050415 + ] + }, + { + "mesh":2, + "name":"Suzanne", + "rotation":[ + 0.08822915703058243, + -0.27138662338256836, + 0.0949493795633316, + 0.9537031054496765 + ], + "translation":[ + 6.071174144744873, + 2.417121171951294, + 0 + ] + }, + { + "mesh":3, + "name":"Icosphere", + "translation":[ + -2.5536391735076904, + 2.877737522125244, + -0.012781083583831787 + ] + } + ], + "materials":[ + { + "doubleSided":true, + "name":"Ground", + "pbrMetallicRoughness":{ + "baseColorFactor":[ + 0.37110745906829834, + 0.39915257692337036, + 0.364591121673584, + 1 + ], + "metallicFactor":0, + "roughnessFactor":0.5 + } + }, + { + "doubleSided":true, + "name":"Cube", + "pbrMetallicRoughness":{ + "baseColorFactor":[ + 0.8000937700271606, + 0.00807161070406437, + 0.025698840618133545, + 1 + ], + "metallicFactor":0, + "roughnessFactor":0.5 + } + }, + { + "doubleSided":true, + "name":"Monkey", + "pbrMetallicRoughness":{ + "baseColorFactor":[ + 0.12672929465770721, + 0.03563183546066284, + 0.8001565933227539, + 1 + ], + "metallicFactor":0, + "roughnessFactor":0.5 + } + }, + { + "doubleSided":true, + "name":"Material", + "pbrMetallicRoughness":{ + "baseColorFactor":[ + 0.13890013098716736, + 0.8004242181777954, + 0.06036654859781265, + 1 + ], + "metallicFactor":0, + "roughnessFactor":0.5 + } + } + ], + "meshes":[ + { + "name":"Plane", + "primitives":[ + { + "attributes":{ + "POSITION":0, + "NORMAL":1, + "TEXCOORD_0":2 + }, + "indices":3, + "material":0 + } + ] + }, + { + "name":"Cube.001", + "primitives":[ + { + "attributes":{ + "POSITION":4, + "NORMAL":5, + "TEXCOORD_0":6 + }, + "indices":7, + "material":1 + } + ] + }, + { + "name":"Suzanne", + "primitives":[ + { + "attributes":{ + "POSITION":8, + "NORMAL":9, + "TEXCOORD_0":10 + }, + "indices":11, + "material":2 + } + ] + }, + { + "name":"Icosphere", + "primitives":[ + { + "attributes":{ + "POSITION":12, + "NORMAL":13, + "TEXCOORD_0":14 + }, + "indices":15, + "material":3 + } + ] + } + ], + "accessors":[ + { + "bufferView":0, + "componentType":5126, + "count":4, + "max":[ + 1, + 0, + 1 + ], + "min":[ + -1, + 0, + -1 + ], + "type":"VEC3" + }, + { + "bufferView":1, + "componentType":5126, + "count":4, + "type":"VEC3" + }, + { + "bufferView":2, + "componentType":5126, + "count":4, + "type":"VEC2" + }, + { + "bufferView":3, + "componentType":5123, + "count":6, + "type":"SCALAR" + }, + { + "bufferView":4, + "componentType":5126, + "count":24, + "max":[ + 1, + 1, + 1 + ], + "min":[ + -1, + -1, + -1 + ], + "type":"VEC3" + }, + { + "bufferView":5, + "componentType":5126, + "count":24, + "type":"VEC3" + }, + { + "bufferView":6, + "componentType":5126, + "count":24, + "type":"VEC2" + }, + { + "bufferView":7, + "componentType":5123, + "count":36, + "type":"SCALAR" + }, + { + "bufferView":8, + "componentType":5126, + "count":1966, + "max":[ + 1.3671875, + 0.984375, + 0.8515625 + ], + "min":[ + -1.3671875, + -0.984375, + -0.8515625 + ], + "type":"VEC3" + }, + { + "bufferView":9, + "componentType":5126, + "count":1966, + "type":"VEC3" + }, + { + "bufferView":10, + "componentType":5126, + "count":1966, + "type":"VEC2" + }, + { + "bufferView":11, + "componentType":5123, + "count":2904, + "type":"SCALAR" + }, + { + "bufferView":12, + "componentType":5126, + "count":240, + "max":[ + 0.9510578513145447, + 1, + 0.9999999403953552 + ], + "min":[ + -0.9510578513145447, + -1, + -0.9999999403953552 + ], + "type":"VEC3" + }, + { + "bufferView":13, + "componentType":5126, + "count":240, + "type":"VEC3" + }, + { + "bufferView":14, + "componentType":5126, + "count":240, + "type":"VEC2" + }, + { + "bufferView":15, + "componentType":5123, + "count":240, + "type":"SCALAR" + } + ], + "bufferViews":[ + { + "buffer":0, + "byteLength":48, + "byteOffset":0, + "target":34962 + }, + { + "buffer":0, + "byteLength":48, + "byteOffset":48, + "target":34962 + }, + { + "buffer":0, + "byteLength":32, + "byteOffset":96, + "target":34962 + }, + { + "buffer":0, + "byteLength":12, + "byteOffset":128, + "target":34963 + }, + { + "buffer":0, + "byteLength":288, + "byteOffset":140, + "target":34962 + }, + { + "buffer":0, + "byteLength":288, + "byteOffset":428, + "target":34962 + }, + { + "buffer":0, + "byteLength":192, + "byteOffset":716, + "target":34962 + }, + { + "buffer":0, + "byteLength":72, + "byteOffset":908, + "target":34963 + }, + { + "buffer":0, + "byteLength":23592, + "byteOffset":980, + "target":34962 + }, + { + "buffer":0, + "byteLength":23592, + "byteOffset":24572, + "target":34962 + }, + { + "buffer":0, + "byteLength":15728, + "byteOffset":48164, + "target":34962 + }, + { + "buffer":0, + "byteLength":5808, + "byteOffset":63892, + "target":34963 + }, + { + "buffer":0, + "byteLength":2880, + "byteOffset":69700, + "target":34962 + }, + { + "buffer":0, + "byteLength":2880, + "byteOffset":72580, + "target":34962 + }, + { + "buffer":0, + "byteLength":1920, + "byteOffset":75460, + "target":34962 + }, + { + "buffer":0, + "byteLength":480, + "byteOffset":77380, + "target":34963 + } + ], + "buffers":[ + { + "byteLength":77860, + "uri":"test2.bin" + } + ] +} diff --git a/static/secrets/woof.js b/static/secrets/kennel/woof.js similarity index 99% rename from static/secrets/woof.js rename to static/secrets/kennel/woof.js index 9ca1dab..e152eb1 100644 --- a/static/secrets/woof.js +++ b/static/secrets/kennel/woof.js @@ -47,7 +47,7 @@ function init() { room.load( // url of file - '../test.gltf', + '../test2.gltf', // when resource is loaded function(gltf) { gltf.scene.position.y = -1;