How to use the EventDispatcher function from three
Find comprehensive JavaScript three.EventDispatcher code examples handpicked from public code repositorys.
72 73 74 75 76 77 78 79 80 81
// Initialize lastPosition/Quaternion to initial values. this.update(0); }; FlyControls.prototype = Object.create( THREE.EventDispatcher.prototype ); FlyControls.prototype.constructor = FlyControls; module.exports = { FlyControls: FlyControls
185
0
2
18 19 20 21 22 23 24 25 26 27
this.manager = (manager !== undefined) ? manager : THREE.DefaultLoadingManager; }; Object.assign(THREE.VTKLoader.prototype, THREE.EventDispatcher.prototype, { load: function (url, onLoad, onProgress, onError) { var scope = this;
11
28
2
917 918 919 920 921 922 923 924 925 926 927 928 929 930
this.update(); }; OrbitControls.prototype = Object.create( THREE.EventDispatcher.prototype ); OrbitControls.prototype.constructor = THREE.OrbitControls; Object.defineProperties( OrbitControls.prototype, {
4
26
0
GitHub: Siroko/SimonGame
3 4 5 6 7 8 9 10 11 12
var THREE = require('three'); var BaseGLPass = function( params ) { THREE.EventDispatcher.call( this ); this.renderer = params.renderer; this.bufferGeometry = null;
2
0
5
+ 3 other calls in file
GitHub: teerzo/btx-face
939 940 941 942 943 944 945 946 947 948 949 950 951 952
this.update(); }; THREE.OrbitControls.prototype = Object.create( THREE.EventDispatcher.prototype ); THREE.OrbitControls.prototype.constructor = THREE.OrbitControls; Object.defineProperties( THREE.OrbitControls.prototype, {
1
1
0
9 10 11 12 13 14 15 16 17 18 19 20 21
MTLLoader = function MTLLoader(manager) { this.manager = manager !== undefined ? manager : THREE.DefaultLoadingManager; }; Object.assign(MTLLoader.prototype, THREE.EventDispatcher.prototype, { /** * Loads and parses a MTL asset from a URL. *
0
2
1
10 11 12 13 14 15 16 17 18 19 20 21 22 23
this.manager = ( manager !== undefined ) ? manager : THREE.DefaultLoadingManager; }; Object.assign( MTLLoader.prototype, THREE.EventDispatcher.prototype, { /** * Loads and parses a MTL asset from a URL. *
0
0
2
+ 26 other calls in file
GitHub: fuyoneko/dio2town
94 95 96 97 98 99 100 101 102 103
this._cameraMixer = null; this._lookAtMixier = null; // 注視点を作成 this._lookAtMarker = this.initLookAtMarker(scene, scene.position); // イベント通知者を作成 this._eventDispatcher = new three_1.EventDispatcher(); // デバッグを有効化 // new DebugHelper().enableGuide(scene); // レンダラーの初期化 const renderer = new THREE.WebGLRenderer({ antialias: true, alpha: true });
0
0
1
+ 6 other calls in file
617 618 619 620 621 622 623 624 625
// force an update at start this.update(); }; THREE.TrackballControls.prototype = Object.create( THREE.EventDispatcher.prototype ); THREE.TrackballControls.prototype.constructor = THREE.TrackballControls;
0
0
2
+ 6 other calls in file
622 623 624 625 626 627 628 629 630 631 632 633
// force an update at start this.update(); }; TrackballControls.prototype = Object.create( THREE.EventDispatcher.prototype ); TrackballControls.prototype.constructor = TrackballControls; module.exports.TrackballControls = TrackballControls;
0
0
0
three.Vector3 is the most popular function in three (22341 examples)