V3D.helicopter = function(base){ this.base = base; this.mesh = new THREE.Object3D(); this.parts = []; this.ToRad = Math.PI / 180; this.gaz = 0.6; this.ge = 0; //this.hud = document.getElementsByClassName('hud');// this.hud = document.getElementById('hud').contentDocument; this.init(); } V3D.helicopter.prototype = { constructor: V3D.helicopter, init:function() { this.sound = new Audio("./sound/helico/8534.mp3"); var mtx = new THREE.Matrix4().makeScale(1, 1, -1); var m = this.base.meshs['elico']; m.material = this.base.townMaterial; m.geometry.applyMatrix( mtx ); m.position.set(0,-0.12,0); this.mesh.add( m ); this.mesh.position.set(0,1,0); this.parts[0] = m; var o; for(var i=0;i2){ this.move(1); } }, //------------------ rotate : function(name, deg){ var div = this.hud.getElementById(name); if(div){ div.setAttribute("transform", "rotate(" + (deg) + ")"); } } }