Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/ShaderRuntime.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ ShaderRuntime.prototype = {

let loadSource = ( index, source ) => {

let loader = new THREE.XHRLoader();
let loader = new THREE.FileLoader();
loader.load( source, ( json ) => {

let parsed;
Expand Down Expand Up @@ -71,7 +71,7 @@ ShaderRuntime.prototype = {

registerCamera( camera ) {

if( !( camera instanceof THREE.Camera ) ) {
if( !( camera.isCamera ) ) {
throw new Error( 'Cannot register a non-camera as a camera!' );
}

Expand All @@ -94,7 +94,7 @@ ShaderRuntime.prototype = {
if( name in this.cubeCameras ) {

delete this.cubeCameras[ name ];

} else if( name === this.mainCamera ) {

delete this.mainCamera;
Expand Down Expand Up @@ -174,7 +174,7 @@ ShaderRuntime.prototype = {
newData.uniforms[ uniformName ].value = this.getUmap( uniform.glslType );
}
}

if( shaderName in this.shaderTypes ) {
// maybe not needed? too sleepy, need document
extend( this.shaderTypes[ shaderName ], newData );
Expand Down