I am porting some of the code in "WebGL: Up and Running" to ClojureScript.
The second JavaScript program the author presents is called "Welcome to WebGL" (example 2-2 and following). To create a texture, I invoke the utility method THREE.ImageUtils.loadTexture(url). When I run my code I see the error message: "Uncaught TypeError: Cannot read property 'crossOrigin' of null." When I examine the source code of loadTexture(), I see that the second line is "loader.crossOrigin = this.crossOrigin;" In my environment, this is null so this line files. Because the example code runs in an inline script, I tried moving the call to THREE.ImageUtils.loadTexture() into an inline script. When I made this change, to my surprise, the this pointer actually had a value. What must I do to set the value of the this pointer in my method appropriately? Thanks. -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/clojurescript.
