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
fork icon185
star icon0
watch icon2

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;
fork icon11
star icon28
watch icon2

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, {

fork icon4
star icon26
watch icon0

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;
fork icon2
star icon0
watch icon5

+ 3 other calls in file

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, {

fork icon1
star icon1
watch icon0

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.
  *
fork icon0
star icon2
watch icon1

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.
	 *
fork icon0
star icon0
watch icon2

+ 26 other calls in file

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 });
fork icon0
star icon0
watch icon1

+ 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;
fork icon0
star icon0
watch icon2

+ 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;
fork icon0
star icon0
watch icon0

Other functions in three

Sorted by popularity

function icon

three.Vector3 is the most popular function in three (22341 examples)