teapot.json 4.3 KB

1
  1. {"objects":{"71":{"x":1534,"y":591,"elements":[72,74],"autoResize":true,"source":"layout = {\n\tname: 'Teapot Scene',\n\twidth: 300,\n\telements: [\n\t\t{ name: 'Material', inputType: 'Material' }\n\t]\n};\n\nfunction load() {\n\n\tasync function asyncLoad() {\n\n\t\tconst { RGBMLoader } = await import( 'three/addons/loaders/RGBMLoader.js' );\n\n\t\tconst rgbmUrls = [ 'px.png', 'nx.png', 'py.png', 'ny.png', 'pz.png', 'nz.png' ];\n\n\t\tconst cubeMap = await new RGBMLoader()\n\t\t\t.setMaxRange( 16 )\n\t\t\t.setPath( '../examples/textures/cube/pisaRGBM16/' )\n\t\t\t.loadCubemapAsync( rgbmUrls );\n\n\t\tcubeMap.generateMipmaps = true;\n\t\tcubeMap.minFilter = THREE.LinearMipmapLinearFilter;\n\n\t\t//\n\n\t\tconst scene = global.get( 'scene' );\n\n\t\tscene.environment = cubeMap;\n\n\t\t//\n\n\t\tconst { TeapotGeometry } = await import( 'three/addons/geometries/TeapotGeometry.js' );\n\n\t\tconst geometryTeapot = new TeapotGeometry( 1, 18 );\n\t\tconst mesh = new THREE.Mesh( geometryTeapot );\n\n\t\tlocal.set( 'mesh', mesh );\n\n\t\trefresh();\n\n\t}\n\n\tasyncLoad();\n\n}\n\nfunction main() {\n\n\tconst mesh = local.get( 'mesh', load );\n\n\tif ( mesh ) {\n\n\t\tmesh.material = parameters.get( 'Material' ) || new THREE.MeshStandardMaterial();\n\n\t}\n\n\treturn mesh;\n\n}\n","id":71,"type":"NodePrototypeEditor"},"72":{"outputLength":1,"height":null,"title":"Node Prototype","icon":"ti ti-ti ti-components","id":72,"type":"TitleElement"},"74":{"height":507,"source":"layout = {\n\tname: 'Teapot Scene',\n\twidth: 300,\n\telements: [\n\t\t{ name: 'Material', inputType: 'Material' }\n\t]\n};\n\nfunction load() {\n\n\tasync function asyncLoad() {\n\n\t\tconst { RGBMLoader } = await import( 'three/addons/loaders/RGBMLoader.js' );\n\n\t\tconst rgbmUrls = [ 'px.png', 'nx.png', 'py.png', 'ny.png', 'pz.png', 'nz.png' ];\n\n\t\tconst cubeMap = await new RGBMLoader()\n\t\t\t.setMaxRange( 16 )\n\t\t\t.setPath( '../examples/textures/cube/pisaRGBM16/' )\n\t\t\t.loadCubemapAsync( rgbmUrls );\n\n\t\tcubeMap.generateMipmaps = true;\n\t\tcubeMap.minFilter = THREE.LinearMipmapLinearFilter;\n\n\t\t//\n\n\t\tconst scene = global.get( 'scene' );\n\n\t\tscene.environment = cubeMap;\n\n\t\t//\n\n\t\tconst { TeapotGeometry } = await import( 'three/addons/geometries/TeapotGeometry.js' );\n\n\t\tconst geometryTeapot = new TeapotGeometry( 1, 18 );\n\t\tconst mesh = new THREE.Mesh( geometryTeapot );\n\n\t\tlocal.set( 'mesh', mesh );\n\n\t\trefresh();\n\n\t}\n\n\tasyncLoad();\n\n}\n\nfunction main() {\n\n\tconst mesh = local.get( 'mesh', load );\n\n\tif ( mesh ) {\n\n\t\tmesh.material = parameters.get( 'Material' ) || new THREE.MeshStandardMaterial();\n\n\t}\n\n\treturn mesh;\n\n}\n","id":74,"type":"CodeEditorElement"},"77":{"x":1346,"y":362,"elements":[78,120],"autoResize":false,"layoutJSON":"{\"name\":\"Teapot Scene\",\"width\":300,\"elements\":[{\"name\":\"Material\",\"inputType\":\"Material\"}]}","id":77,"type":"Teapot Scene"},"78":{"outputLength":1,"height":null,"title":"Teapot Scene","icon":"ti ti-ti ti-variable","id":78,"type":"TitleElement"},"82":{"x":750,"y":240,"elements":[83,85,86,87,88,89,90,91],"autoResize":false,"id":82,"type":"StandardMaterialEditor"},"83":{"outputLength":1,"height":null,"title":"Standard Material","icon":"ti ti-ti ti-inner-shadow-top-left","id":83,"type":"TitleElement"},"85":{"inputLength":3,"inputs":[92],"links":[115],"height":null,"id":85,"type":"LabelElement"},"86":{"inputLength":1,"inputs":[93],"height":null,"id":86,"type":"LabelElement"},"87":{"inputLength":1,"inputs":[95],"height":null,"id":87,"type":"LabelElement"},"88":{"inputLength":1,"inputs":[97],"height":null,"id":88,"type":"LabelElement"},"89":{"inputLength":3,"height":null,"id":89,"type":"LabelElement"},"90":{"inputLength":3,"height":null,"id":90,"type":"LabelElement"},"91":{"inputLength":3,"height":null,"id":91,"type":"LabelElement"},"92":{"value":15860226,"id":92,"type":"ColorInput"},"93":{"min":0,"max":1,"value":1,"id":93,"type":"SliderInput"},"95":{"min":0,"max":1,"value":1,"id":95,"type":"SliderInput"},"97":{"min":0,"max":1,"value":0,"id":97,"type":"SliderInput"},"114":{"x":140,"y":405,"elements":[115],"autoResize":false,"id":114,"type":"NormalWorld"},"115":{"outputLength":3,"height":null,"title":"Normal World","icon":"ti ti-arrow-bar-up","id":115,"type":"TitleElement"},"120":{"inputLength":1,"links":[83],"height":null,"id":120,"type":"LabelElement"}},"nodes":[71,82,114,77],"id":2,"type":"Canvas"}