Skip to content

Commit

Permalink
change camera anim
Browse files Browse the repository at this point in the history
  • Loading branch information
Ch-Shi committed Nov 18, 2020
1 parent e5a6f01 commit 2fee115
Show file tree
Hide file tree
Showing 13 changed files with 32 additions and 27 deletions.
Binary file modified Babylonjs/model/SheBei/Logo_Alpha_Ao.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Babylonjs/model/SheBei/Logo_Normal.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed Babylonjs/model/SheBei/Logo_Normal.png
Binary file not shown.
Binary file not shown.
Binary file modified Babylonjs/model/SheBei/ShenYangShunDa_alpha_ShenYangShunDa.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Babylonjs/model/SheBei/XuanHuiPoSuiJi_Ao.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Babylonjs/model/SheBei/XuanHuiPoSuiJi_Ao2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Babylonjs/model/SheBei/YuanZhuiPoSuiJi_AO.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Babylonjs/model/SheBei/YuanZhuiPoSuiJi_Ao2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Babylonjs/model/SheBei/ZhiShaJi_AO.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Babylonjs/model/SheBei/ZhiShaJi_Ao2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 20 additions & 21 deletions Babylonjs/script/controlscript/svganim.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,48 +47,47 @@ let animationChangeArr = [
//first
[
{
cameraAnimNormolPosition: [1, 2, 3],
cameraAnimTargetNormolPosition: [new BABYLON.Vector3(4, 0.5, 0)],
cameraAnimNormolPosition: [Math.PI/2, Math.PI/2, 3],
cameraAnimTargetNormolPosition: [new BABYLON.Vector3(4, 0.31, 0)],
}, {

cameraAnimNormolPosition: [2, 2, 3],
cameraAnimTargetNormolPosition: [new BABYLON.Vector3(4, 0.5, 0)],
cameraAnimNormolPosition: [1, 1.47, 2.64],
cameraAnimTargetNormolPosition: [new BABYLON.Vector3(4, 0.31, 0)],
}, {

cameraAnimNormolPosition: [3, 2, 3],
cameraAnimTargetNormolPosition: [new BABYLON.Vector3(4, 0.5, 0)],
cameraAnimNormolPosition: [-Math.PI/2, 1.47, 2.64],
cameraAnimTargetNormolPosition: [new BABYLON.Vector3(3.13, 0.249, 0)],
},
{
btnName: "modelbtn1", name: "XuanHuiPoSuiJi", exploitd: false,
val: { exploit: "XuanHuiPoSuiJi_BaoZha", exploitout: "XuanHuiPoSuiJi_BaoZha_Inout", inout: "XuanHuiPoSuiJi_inout" },
cameraAnimNormolPosition: [4, 2, 3],
cameraAnimExploitPosition: [1, 2, 3],
cameraAnimExploitPosition: [0, 1.3939, 5.6],
cameraAnimTargetNormolPosition: [new BABYLON.Vector3(4, 0.5, 0)],
cameraAnimTargetExploitPosition: [new BABYLON.Vector3(4, 1.6, 0)]
},
],
//second
[
{

cameraAnimNormolPosition: [5, 2, 3],
cameraAnimTargetNormolPosition: [new BABYLON.Vector3(0, 0.5, 0)],
cameraAnimNormolPosition: [Math.PI/2, 1.357, 2.5],
cameraAnimTargetNormolPosition: [new BABYLON.Vector3(0, 0.38, 0)],
},
{

cameraAnimNormolPosition: [6, 2, 3],
cameraAnimTargetNormolPosition: [new BABYLON.Vector3(0, 0.5, 0)],
cameraAnimNormolPosition: [2.176, 1.15135, 2.301],
cameraAnimTargetNormolPosition: [new BABYLON.Vector3(0, 0.38, 0)],
},
{

cameraAnimNormolPosition: [7, 2, 3],
cameraAnimTargetNormolPosition: [new BABYLON.Vector3(0, 0.5, 0)],
cameraAnimNormolPosition: [-0.96351, 1.303, 2.75],
cameraAnimTargetNormolPosition: [new BABYLON.Vector3(-0.6374, 0.1744, 0)],
},
{
btnName: "modelbtn2", name: "YuanZhuiPoSuiJi", exploitd: false,
val: { exploit: "YuanZhuiPoSuiJi_BaoZha", exploitout: "YuanZhuiPoSuiJi_BaoZha_Inout", inout: "YuanZhuiPoSuiJi_inout" },
cameraAnimNormolPosition: [8, 2, 3],
cameraAnimExploitPosition: [1, 2, 3],
cameraAnimExploitPosition: [0, 1.3939, 5.6],
cameraAnimTargetNormolPosition: [new BABYLON.Vector3(0, 0.5, 0)],
cameraAnimTargetExploitPosition: [new BABYLON.Vector3(0, 1.5, 0)]
},
Expand All @@ -97,18 +96,18 @@ let animationChangeArr = [
[
{

cameraAnimNormolPosition: [9, 2, 3],
cameraAnimTargetNormolPosition: [new BABYLON.Vector3(-4, 0.3, 0)],
cameraAnimNormolPosition: [Math.PI/2, 1.357, 1.935],
cameraAnimTargetNormolPosition: [new BABYLON.Vector3(-4, 0.080, 0)],
},
{

cameraAnimNormolPosition: [10, 2, 3],
cameraAnimTargetNormolPosition: [new BABYLON.Vector3(-4, 0.3, 0)],
cameraAnimNormolPosition: [2.176, 1.15135, 1.935],
cameraAnimTargetNormolPosition: [new BABYLON.Vector3(-4, 0.080, 0)],
},
{

cameraAnimNormolPosition: [11, 2, 3],
cameraAnimTargetNormolPosition: [new BABYLON.Vector3(-4, 0.3, 0)],
cameraAnimNormolPosition: [-Math.PI/2, 1.357, 1.935],
cameraAnimTargetNormolPosition: [new BABYLON.Vector3(-4, 0.080, 0)],
},
{
btnName: "modelbtn3", name: "ZhiShaJi", exploitd: false,
Expand Down
18 changes: 12 additions & 6 deletions Babylonjs/script/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ var createScene = function () {
camera.maxZ = 10000;

// camera.upperBetaLimit = 1.5;
camera.lowerRadiusLimit = 1;
camera.lowerRadiusLimit = 1.3;
camera.upperRadiusLimit = 7;

//相机惯性
Expand Down Expand Up @@ -124,12 +124,16 @@ var createScene = function () {

let Logo_NormalTexture = new BABYLON.Texture('model/SheBei/Logo_Normal.jpg')
Logo_NormalTexture.vScale = -1;
Logo_NormalTexture.level = 0.23;

let NormalTexture = new BABYLON.Texture("model/SheBei/Normal.jpg", scene);
NormalTexture.level = 0.45;
NormalTexture.uScale = 30;
NormalTexture.vScale = 30;

let Logo_Texture = new BABYLON.Texture("model/SheBei/ShenYangShunDa_alpha_ShenYangShunDa.png");
Logo_Texture.vScale = -1;


BABYLON.SceneLoader.Append("model/SheBei/", "XuanHuiPoSuiJi.gltf", scene, function (meshes) {
scene.getTransformNodeByID("XuanHuiPoSuiJi_G").position = new BABYLON.Vector3(-4, 0, 0);
Expand Down Expand Up @@ -255,8 +259,7 @@ var createScene = function () {


M_ZhiShaJi_Logo_Texture.albedoColor = new BABYLON.Color3(0.07058823529411765, 0.07058823529411765, 0.07058823529411765);
M_ZhiShaJi_Logo_Texture.opacityTexture = new BABYLON.Texture("model/SheBei/ShenYangShunDa_alpha_ShenYangShunDa.png");
M_ZhiShaJi_Logo_Texture.opacityTexture.vScale = -1;
M_ZhiShaJi_Logo_Texture.opacityTexture = Logo_Texture;
M_ZhiShaJi_Logo_Texture.transparencyMode = 3;
M_ZhiShaJi_Logo_Texture.metallic = 1;
M_ZhiShaJi_Logo_Texture.roughness = 0;
Expand Down Expand Up @@ -343,8 +346,7 @@ var createScene = function () {

//材质调整
M_YuanZhuiPoSuiJi_Logo_Texture.albedoColor = new BABYLON.Color3(0.07058823529411765, 0.07058823529411765, 0.07058823529411765);
M_YuanZhuiPoSuiJi_Logo_Texture.opacityTexture = new BABYLON.Texture("model/SheBei/ShenYangShunDa_alpha_ShenYangShunDa.png");
M_YuanZhuiPoSuiJi_Logo_Texture.opacityTexture.vScale = -1;
M_YuanZhuiPoSuiJi_Logo_Texture.opacityTexture = Logo_Texture;
M_YuanZhuiPoSuiJi_Logo_Texture.transparencyMode = 3;
M_YuanZhuiPoSuiJi_Logo_Texture.metallic = 1;
M_YuanZhuiPoSuiJi_Logo_Texture.roughness = 0.5;
Expand All @@ -364,7 +366,7 @@ var createScene = function () {
M_YuanZhuiPoSuiJi_Paint_Less.roughness = 0.05;
M_YuanZhuiPoSuiJi_Paint_Less.bumpTexture = NormalTexture;

M_YuanZhuiPoSuiJi_Metal_Brass.albedoColor = new BABYLON.Color3(0.3411764705882353, 0.27058823529411763, 0.0784313725490196);
M_YuanZhuiPoSuiJi_Metal_Brass.albedoColor = new BABYLON.Color3(0.34901960784313724, 0.34901960784313724, 0.34901960784313724);
M_YuanZhuiPoSuiJi_Metal_Brass.metallic = 1;
M_YuanZhuiPoSuiJi_Metal_Brass.roughness = 0.08;

Expand All @@ -388,6 +390,10 @@ var createScene = function () {
M_YuanZhuiPoSuiJi_Metal_Iron.roughness = 0.08;
M_YuanZhuiPoSuiJi_Metal_Iron.metallic = 1;

M_YuanZhuiPoSuiJi_Screw_Steel.albedoColor = new BABYLON.Color3(0.1803921568627451, 0.1803921568627451, 0.1803921568627451);
M_YuanZhuiPoSuiJi_Screw_Steel.roughness = 0.05;
M_YuanZhuiPoSuiJi_Screw_Steel.metallic = 1;

M_YuanZhuiPoSuiJi_Logo_Normal.albedoColor = M_YuanZhuiPoSuiJi_Paint_Main.albedoColor;
M_YuanZhuiPoSuiJi_Logo_Normal.opacityTexture = Logo_Alpha_Ao;
M_YuanZhuiPoSuiJi_Logo_Normal.bumpTexture = Logo_NormalTexture;
Expand Down

0 comments on commit 2fee115

Please sign in to comment.