Files
cocos4/cocos/3d/framework/renderSystemActor.js
T
Leslie Leigh 3f972a4d3c define mesh its own format; improve the robust of gltf-utils; now the standard gltf can be imported (#3435)
* uuid-loader.js

* Make camera-component is available in previewing;
Remove onLoad of mesh asset class, instead do its content in model-component and skinning-model-component's _updateModels method.

* define mesh its own format; improve the robust of gltf-utils; now the standard gltf can be imported

* typo

* bugfix

* material serialization;gltf material import; fix animation component bug

* cinnebt

* remove skeleton root

* small fix

* bug fix

* remove the hack materials

* small fix
2018-11-05 17:48:24 +08:00

42 lines
939 B
JavaScript

import Component from '../../components/CCComponent';
class RenderSystemActorListener {
constructor() {
this._renderSystem = null;
}
onRenderableComponentCreated(comp) {
if(this._renderSystem === null) {
this._renderSystem = cc.director._renderSystem;
}
comp._system = this._renderSystem;
if (this._renderSystem) {
comp._scene = this._renderSystem.scene;
}
}
}
let listener = new RenderSystemActorListener();
/**
* @class RenderSystemActor
* @extends Component
* RenderSystemActor is used to access Rendersystem
*/
export default class RenderSystemActor extends Component {
constructor() {
super();
this._system = null;
this._scene = null;
listener.onRenderableComponentCreated(this);
}
get renderSystem() {
return this._system;
}
get scene() {
return this._scene;
}
}