This commit is contained in:
BIN
static/secrets/kennel/finger.png
Normal file
BIN
static/secrets/kennel/finger.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.4 MiB |
BIN
static/secrets/kennel/paw.png
Normal file
BIN
static/secrets/kennel/paw.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.7 MiB |
BIN
static/secrets/kennel/test.bin
Normal file
BIN
static/secrets/kennel/test.bin
Normal file
Binary file not shown.
324
static/secrets/kennel/test.gltf
Normal file
324
static/secrets/kennel/test.gltf
Normal file
@@ -0,0 +1,324 @@
|
||||
{
|
||||
"asset":{
|
||||
"generator":"Khronos glTF Blender I/O v4.5.48",
|
||||
"version":"2.0"
|
||||
},
|
||||
"scene":0,
|
||||
"scenes":[
|
||||
{
|
||||
"name":"Scene",
|
||||
"nodes":[
|
||||
0,
|
||||
1,
|
||||
2
|
||||
]
|
||||
}
|
||||
],
|
||||
"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
|
||||
]
|
||||
}
|
||||
],
|
||||
"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
|
||||
}
|
||||
}
|
||||
],
|
||||
"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
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"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"
|
||||
}
|
||||
],
|
||||
"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
|
||||
}
|
||||
],
|
||||
"buffers":[
|
||||
{
|
||||
"byteLength":69700,
|
||||
"uri":"test.bin"
|
||||
}
|
||||
]
|
||||
}
|
||||
BIN
static/secrets/kennel/test2.bin
Normal file
BIN
static/secrets/kennel/test2.bin
Normal file
Binary file not shown.
420
static/secrets/kennel/test2.gltf
Normal file
420
static/secrets/kennel/test2.gltf
Normal file
@@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
117
static/secrets/kennel/woof.js
Normal file
117
static/secrets/kennel/woof.js
Normal file
@@ -0,0 +1,117 @@
|
||||
import * as THREE from 'three';
|
||||
import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';
|
||||
import { PointerLockControls } from 'three/addons/controls/PointerLockControls.js';
|
||||
|
||||
// Variables
|
||||
const renderer = new THREE.WebGLRenderer({ canvas: document.querySelector('#kennel'), });
|
||||
const camera = new THREE.PerspectiveCamera(60, window.innerWidth / window.innerHeight, 1, 1000);
|
||||
const light = new THREE.HemisphereLight(0xeeeeff, 0x777788, 2.5);
|
||||
const controls = new PointerLockControls(camera, renderer.domElement);
|
||||
const scene = new THREE.Scene();
|
||||
const clock = new THREE.Clock();
|
||||
const keyMap = {}
|
||||
|
||||
// 3D Loaders.
|
||||
const room = new GLTFLoader();
|
||||
const image = new THREE.TextureLoader();
|
||||
|
||||
let pawTexture, fingerTexture, currentSprite;
|
||||
|
||||
init();
|
||||
|
||||
//Initialisation
|
||||
function init() {
|
||||
// Renderer
|
||||
renderer.setSize(window.innerWidth, window.innerHeight);
|
||||
|
||||
// Camera
|
||||
camera.position.z = 5;
|
||||
|
||||
// Light
|
||||
light.position.set(0.5, 1, 0.75);
|
||||
scene.add(light);
|
||||
|
||||
// Scene
|
||||
scene.background = new THREE.Color(0x000000);
|
||||
|
||||
// Controller
|
||||
document.addEventListener('click', () => {
|
||||
controls.lock();
|
||||
});
|
||||
|
||||
const onDocumentKey = (e) => {
|
||||
keyMap[e.code] = e.type === 'keydown';
|
||||
};
|
||||
document.addEventListener('keydown', onDocumentKey, false);
|
||||
document.addEventListener('keyup', onDocumentKey, false);
|
||||
|
||||
room.load(
|
||||
// url of file
|
||||
'../test2.gltf',
|
||||
// when resource is loaded
|
||||
function(gltf) {
|
||||
gltf.scene.position.y = -1;
|
||||
scene.add(gltf.scene);
|
||||
|
||||
gltf.animations;
|
||||
gltf.scene;
|
||||
gltf.scenes;
|
||||
gltf.cameras;
|
||||
gltf.asset;
|
||||
},
|
||||
//when loading is progressing
|
||||
function(xhr) {
|
||||
console.log((xhr.loaded / xhr.total * 100) + '% loaded');
|
||||
},
|
||||
// when error
|
||||
function(error) {
|
||||
console.log('a fucking error lmao: ', error);
|
||||
}
|
||||
);
|
||||
|
||||
image.load('../paw.png', (texture) => {
|
||||
pawTexture = texture;
|
||||
image.load('../finger.png', (texture) => {
|
||||
fingerTexture = texture;
|
||||
const material = new THREE.SpriteMaterial({ map: texture });
|
||||
currentSprite = new THREE.Sprite(material);
|
||||
currentSprite.position.set(1, -0.7, -1.5);
|
||||
camera.add(currentSprite);
|
||||
scene.add(camera);
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function animate() {
|
||||
const delta = clock.getDelta();
|
||||
|
||||
if (controls.isLocked) {
|
||||
if (keyMap['KeyW']) {
|
||||
controls.moveForward(delta * 5);
|
||||
}
|
||||
if (keyMap['KeyS']) {
|
||||
controls.moveForward(-delta * 5);
|
||||
}
|
||||
if (keyMap['KeyA']) {
|
||||
controls.moveRight(-delta * 5);
|
||||
}
|
||||
if (keyMap['KeyD']) {
|
||||
controls.moveRight(delta * 5);
|
||||
}
|
||||
if (keyMap['ShiftLeft']) {
|
||||
if (currentSprite && fingerTexture && currentSprite.material.map !== fingerTexture) {
|
||||
currentSprite.material.map = fingerTexture;
|
||||
console.log("finger up");
|
||||
}
|
||||
} else {
|
||||
if (currentSprite && pawTexture && currentSprite.material.map !== pawTexture) {
|
||||
currentSprite.material.map = pawTexture;
|
||||
console.log("finger down");
|
||||
}
|
||||
}
|
||||
}
|
||||
renderer.render(scene, camera);
|
||||
}
|
||||
renderer.setAnimationLoop(animate);
|
||||
Reference in New Issue
Block a user