|
@@ -41,13 +41,13 @@
|
|
|
<script type="text/javascript">
|
|
|
var indoorViewer;
|
|
|
var run = false;
|
|
|
- IV.loaded(function () {
|
|
|
+ IV.loaded(function() {
|
|
|
indoorViewer = new IndoorViewer({
|
|
|
'base_url': '',
|
|
|
'onLoadComplete': setLayers
|
|
|
});
|
|
|
});
|
|
|
- var setLayers = function () {
|
|
|
+ var setLayers = function() {
|
|
|
if (!run) {
|
|
|
run = true;
|
|
|
|
|
@@ -56,7 +56,7 @@
|
|
|
main_view.addToScene(doorOpenCLose);
|
|
|
}
|
|
|
};
|
|
|
- var DoorOpenCLose = function (e) {
|
|
|
+ var DoorOpenCLose = function(e) {
|
|
|
var main_view = IV.getMainView();
|
|
|
var model;
|
|
|
var animations;
|
|
@@ -72,7 +72,7 @@
|
|
|
}
|
|
|
|
|
|
var loader_wall = new IV.THREE.ColladaLoader();
|
|
|
- loader_wall.load('./models/qt.dae', function (collada) {
|
|
|
+ loader_wall.load('./models/qt.dae', function(collada) {
|
|
|
|
|
|
model = collada.scene.children[2];
|
|
|
var material = new IV.THREE.MeshBasicMaterial({
|
|
@@ -88,29 +88,29 @@
|
|
|
//mesh.material.colorWrite = false;
|
|
|
});
|
|
|
var loader = new IV.THREE.ColladaLoader();
|
|
|
- loader.load('./models/m4.dae', function (collada) {
|
|
|
- //console.log(collada)
|
|
|
- model = collada.scene;
|
|
|
- model.renderOrder = 3;
|
|
|
- for (var j = 0; j < model.children.length; ++j) {
|
|
|
- model.children[j].renderOrder = 3;
|
|
|
- }
|
|
|
- animations = collada.animations;
|
|
|
- kfAnimationsLength = animations.length;
|
|
|
-
|
|
|
- model.scale.x = model.scale.y = model.scale.z = 1;
|
|
|
- main_view.scene.add(model);
|
|
|
- //main_view.overlayScene.add(model);
|
|
|
- //map_scene.add(model)
|
|
|
- for (var i = 0; i < kfAnimationsLength; ++i) {
|
|
|
- var animation = animations[i];
|
|
|
- var kfAnimation = new IV.THREE.KeyFrameAnimation(animation);
|
|
|
- kfAnimation.timeScale = 1;
|
|
|
- kfAnimations.push(kfAnimation);
|
|
|
- }
|
|
|
- door_animation_start(0);
|
|
|
- animate(lastTimestamp);
|
|
|
- });
|
|
|
+ // loader.load('./models/m4.dae', function (collada) {
|
|
|
+ // //console.log(collada)
|
|
|
+ // model = collada.scene;
|
|
|
+ // model.renderOrder = 3;
|
|
|
+ // for (var j = 0; j < model.children.length; ++j) {
|
|
|
+ // model.children[j].renderOrder = 3;
|
|
|
+ // }
|
|
|
+ // animations = collada.animations;
|
|
|
+ // kfAnimationsLength = animations.length;
|
|
|
+
|
|
|
+ // model.scale.x = model.scale.y = model.scale.z = 1;
|
|
|
+ // main_view.scene.add(model);
|
|
|
+ // //main_view.overlayScene.add(model);
|
|
|
+ // //map_scene.add(model)
|
|
|
+ // for (var i = 0; i < kfAnimationsLength; ++i) {
|
|
|
+ // var animation = animations[i];
|
|
|
+ // var kfAnimation = new IV.THREE.KeyFrameAnimation(animation);
|
|
|
+ // kfAnimation.timeScale = 1;
|
|
|
+ // kfAnimations.push(kfAnimation);
|
|
|
+ // }
|
|
|
+ // door_animation_start(0);
|
|
|
+ // animate(lastTimestamp);
|
|
|
+ // });
|
|
|
|
|
|
function door_animation_start(time) {
|
|
|
for (var i = 0; i < kfAnimationsLength; ++i) {
|