mobile-query-three-js-plugins-materials-tquery.meshbasicmaterial.js / js
Handle Basic Material @class include THREE.MeshBasicMaterial. It inherit from {gray tQuery.Material} @borrows tQuery.Node#get as this.get @borrows tQuery.Node#each as this.each @borrows tQuery.Node#back as this.back
parameter: {THREE.BasicMaterial} element an instance or array of instance
inherit from tQuery.Material
Initial code to automatically extract attribute names from THREE.Material child classesvar extractMaterialAttribute = function(className){ var parentClass = new THREE.Material(); var mainClass = new THREE[className](); var parentProps = Object.keys(parentClass) var mainProps = Object.keys(mainClass) console.log("parentProps", JSON.stringify(parentProps, null, '\t'),"mainProps", JSON.stringify(mainProps, null, '\t')); mainProps = mainProps.filter(function(property){ return parentProps.indexOf(property) === -1; }) console.log("mainProps", JSON.stringify(mainProps, null, '\t')); return mainProps; } */ define all acceptable attributes for this classtQuery.mixinAttributes(tQuery.MeshBasicMaterial, { color : tQuery.convert.toThreeColor, ambient : tQuery.convert.toThreeColor, map : tQuery.convert.toTexture, envMap : tQuery.convert.toTextureCube, refractionRatio : tQuery.convert.toNumber, side : tQuery.convert.identity, wireframe : tQuery.convert.toBoolean, wireframeLinewidth : tQuery.convert.toInteger, wireframeLinecap : tQuery.convert.toString });
[]readme course(s) prefaceI 1 2II 3 4III 5 6 7IV 8 9 10V 11 12 afterthought(s)appendix reference(s) example(s)resource(s) _![]()
(C) Æliens 04/09/2009
You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.