-
Notifications
You must be signed in to change notification settings - Fork 0
/
temp.txt
27 lines (22 loc) · 1000 Bytes
/
temp.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
var createScene = function () {
// This creates a basic Babylon Scene object (non-mesh)
var scene = new BABYLON.Scene(engine);
// glTF Files use right handed system
scene.useRightHandedSystem = true;
// Configuring camera
var camera = new BABYLON.ArcRotateCamera("camera", 1.55,1.6,2, BABYLON.Vector3(0,0,0), scene);
camera.attachControl(canvas, true);
camera.wheelPrecision = 100.0;
camera.minZ = 0.01;
camera.maxZ = 1000;
// This creates a light, aiming 0,1,0 - to the sky (non-mesh)
var light = new BABYLON.HemisphericLight("light1", new BABYLON.Vector3(0, 1, 0), scene);
// Default intensity is 1. Let's dim the light a small amount
light.intensity = 0.7;
// Append sample glTF model to scene
BABYLON.SceneLoader.Append("https://raw.githubusercontent.com/feilongfl/pic-bed/master/201711/", "%E6%BB%91%E7%A8%BD.glb", scene, function (scene) {
}, null, function (scene) {
alert("error");
});
return scene;
};