We've worked with WWJ for many years, but I am brand new to Web WorldWind. How would I go about animating or updating the position of a collada model? I've added a model per the following code:
If I set the position of the model like this immediately after loading the model it does appear in the new/different position:
But when I try to use the following test code to move the model on a timer nothing happens:
Any help would be greatly appreciated!
Also, is Web WorldWind being actively developed? We've been using Cesium for browser-based globe applications for several years, but the Web WorldWind product has some very interesting features. I would love to see it continue to develop. I would especially like to find out if 3D shapes are being developed (such as spheres, cylinders, polygons, etc.).
Thanks,
Rob
Code:
var modelLayer = new WorldWind.RenderableLayer("ModelLayer"); wwd.addLayer(modelLayer); var position = new WorldWind.Position(37.62, -122.37, 5000); var duck = new WorldWind.ColladaLoader(position); duck.init({dirPath: 'resources/collada_models/duck/'}); duck.load('duck.dae', function (scene) { scene.scale = 200; scene.xRotation = 180; modelLayer.addRenderable(scene); });
If I set the position of the model like this immediately after loading the model it does appear in the new/different position:
Code:
duck.position = new WorldWind.Position(38, -123, 6000);
But when I try to use the following test code to move the model on a timer nothing happens:
Code:
// Use a timer to move the model var lat = 37.62; var lon = -122.37; var alt = 500; window.setInterval(function() { lat += .1; lon += .1; alt += 100; duck.position = new WorldWind.Position(lat, lon, alt); wwd.redraw(); }, 1000);
Also, is Web WorldWind being actively developed? We've been using Cesium for browser-based globe applications for several years, but the Web WorldWind product has some very interesting features. I would love to see it continue to develop. I would especially like to find out if 3D shapes are being developed (such as spheres, cylinders, polygons, etc.).
Thanks,
Rob
Comment