feat: add joystick movement with character animations, add smooth camera behaviour with look-ahead effect
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import {
|
||||
CameraC_internal,
|
||||
CameraType,
|
||||
// JoystickC,
|
||||
Physics_internal,
|
||||
Template,
|
||||
Template3d,
|
||||
@@ -24,23 +23,7 @@ export const beforeResourcesLoadedCb = () => {
|
||||
ThreeC.createBaseLights();
|
||||
ThreeC.setupDirectionalLight();
|
||||
|
||||
let physicsWorld = Physics_internal.init(new Vec3(0, -9.81, 0));
|
||||
|
||||
// example of using joystick. Uncomment if you need joystick
|
||||
|
||||
// JoystickC.init({
|
||||
// zone: document.getElementById("joystick_zone") as HTMLDivElement,
|
||||
// fadeTime: 0,
|
||||
// mode: "dynamic",
|
||||
// restJoystick: true,
|
||||
// catchDistance: 1,
|
||||
// restOpacity: 0,
|
||||
// follow: false,
|
||||
// });
|
||||
|
||||
// JoystickC.onJoysticMove.addDelegate(({event, data}) => {
|
||||
// console.log('onJoysticMove', event, data);
|
||||
// })
|
||||
Physics_internal.init(new Vec3(0, -9.81, 0));
|
||||
|
||||
Template.updateVariableConfig.addDelegate(([category, variable, value]) => {
|
||||
if (category === "global") {
|
||||
|
||||
Reference in New Issue
Block a user