From b89a7ee8b956c96a1dcee995ea840feddc5d4b27 Mon Sep 17 00:00:00 2001 From: Pierre Frisch Date: Thu, 22 Dec 2011 07:25:50 -0800 Subject: First commit of Ninja to ninja-internal Signed-off-by: Valerio Virgillito --- js/panels/Materials/Materials.xml | 11 + js/panels/Materials/MaterialsPanel.js | 44 ++ .../materials-library-panel.css | 47 ++ .../materials-library-panel.html | 40 ++ .../materials-library-panel.js | 205 +++++++ .../materials-popup.reel/materials-popup.css | 162 +++++ .../materials-popup.reel/materials-popup.html | 122 ++++ .../materials-popup.reel/materials-popup.js | 674 +++++++++++++++++++++ 8 files changed, 1305 insertions(+) create mode 100644 js/panels/Materials/Materials.xml create mode 100644 js/panels/Materials/MaterialsPanel.js create mode 100644 js/panels/Materials/materials-library-panel.reel/materials-library-panel.css create mode 100644 js/panels/Materials/materials-library-panel.reel/materials-library-panel.html create mode 100644 js/panels/Materials/materials-library-panel.reel/materials-library-panel.js create mode 100644 js/panels/Materials/materials-popup.reel/materials-popup.css create mode 100644 js/panels/Materials/materials-popup.reel/materials-popup.html create mode 100644 js/panels/Materials/materials-popup.reel/materials-popup.js (limited to 'js/panels/Materials') diff --git a/js/panels/Materials/Materials.xml b/js/panels/Materials/Materials.xml new file mode 100644 index 00000000..de07990e --- /dev/null +++ b/js/panels/Materials/Materials.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/js/panels/Materials/MaterialsPanel.js b/js/panels/Materials/MaterialsPanel.js new file mode 100644 index 00000000..a63ed860 --- /dev/null +++ b/js/panels/Materials/MaterialsPanel.js @@ -0,0 +1,44 @@ +/* +This file contains proprietary software owned by Motorola Mobility, Inc.
+No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.
+(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. +
*/ + +var Montage = require("montage/core/core").Montage, + PanelBase = require("js/panels/PanelBase").PanelBase, + MaterialsLibraryPanel = require("js/panels/Materials/materials-library-panel.reel").MaterialsLibraryPanel; + +exports.MaterialsPanel = Montage.create(PanelBase, { + id : {value : "materialsPanel", writable:true, enumerable:true, configurable:true}, + panelName : {value : "Materials", writable:true, enumerable:true, configurable:true}, + panelHeaderID : {value : "materialsPanelHeader", writable:true, enumerable:true, configurable:true}, + disclosureIconID : {value : "materialsPanelDisclosureIcon", writable:true, enumerable:true, configurable:true}, + closeButtonID : {value : "materialsPanelCloseButton", writable:true, enumerable:true, configurable:true}, + panelContentID : {value : "materialsPanelContent", writable:true, enumerable:true, configurable:true}, + + _materialsLibraryPanel : { + enumerable: true, + value: null, + writable:true + }, + + init : { + enumerable:true, + value : function (){ + /* OLD WAY -- Removing the temporary div + // TODO: Remove this comment once this is tested. + var panelContainer = document.createElement("div"); + + panelContainer.setAttribute("id", "materialsLibraryPanel"); + this._materialsLibraryPanel = MaterialsLibraryPanel.create(); + this._materialsLibraryPanel.element = panelContainer; + //Adding container to the parent + + this.content = this._materialsLibraryPanel; + this._materialsLibraryPanel.needsDraw = true; + */ + this.content = MaterialsLibraryPanel.create(); + } + } + +}); \ No newline at end of file diff --git a/js/panels/Materials/materials-library-panel.reel/materials-library-panel.css b/js/panels/Materials/materials-library-panel.reel/materials-library-panel.css new file mode 100644 index 00000000..07488da1 --- /dev/null +++ b/js/panels/Materials/materials-library-panel.reel/materials-library-panel.css @@ -0,0 +1,47 @@ +/* + This file contains proprietary software owned by Motorola Mobility, Inc.
+ No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.
+ (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. +
*/ + +.materials_library_panel hr { + float: left; + clear: both; + width: 100%; + display: block; + background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0.5, #1d1d1d), color-stop(0.75, #424242)); + border: none; + height: 2px; + margin: 4px 0px 4px 0px; +} + + +#ml_buttons { + clear:both; + float: left; + margin: 0px -4px 0px 4px; + width: 97%; +} + +#ml_buttons button { + height: 22px; + overflow: hidden; + display: block; + cursor: pointer; + margin: 0px 1px; +} + +#materialsLibraryPanel-ml_add_btn { + float: left; + width: 60px; +} + +#materialsLibraryPanel-ml_copy_btn { + float: left; + width: 60px; +} + +#materialsLibraryPanel-ml_delete_btn { + float: right; + width: 60px; +} \ No newline at end of file diff --git a/js/panels/Materials/materials-library-panel.reel/materials-library-panel.html b/js/panels/Materials/materials-library-panel.reel/materials-library-panel.html new file mode 100644 index 00000000..eede02bd --- /dev/null +++ b/js/panels/Materials/materials-library-panel.reel/materials-library-panel.html @@ -0,0 +1,40 @@ + + + + + + + + + + + +
+
+
    +
    +
    +
    + + + +
    +
    + + + \ No newline at end of file diff --git a/js/panels/Materials/materials-library-panel.reel/materials-library-panel.js b/js/panels/Materials/materials-library-panel.reel/materials-library-panel.js new file mode 100644 index 00000000..f97e1a27 --- /dev/null +++ b/js/panels/Materials/materials-library-panel.reel/materials-library-panel.js @@ -0,0 +1,205 @@ +/* +This file contains proprietary software owned by Motorola Mobility, Inc.
    +No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.
    +(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. +
    */ + +var Tree = require("js/components/tree.reel").Tree, + Button = require("js/components/button.reel").Button, + MaterialsPopup = require("js/panels/Materials/materials-popup.reel").MaterialsPopup, + PopupMananger = require("js/components/popup-manager.reel").PopupMananger; + +exports.MaterialsLibraryPanel = (require("montage/core/core").Montage).create(require("montage/ui/component").Component, { + + _hasFocus: { + enumerable: false, + value: false + }, + + prepareForDraw: { + enumerable: false, + value: function() { + var treeHolderDiv = document.getElementById("materials_library_tree"); + var materialsTree = Tree.create(); + materialsTree.element = treeHolderDiv; + materialsTree.dataProvider = this._loadXMLDoc("js/panels/Materials/Materials.xml"); + materialsTree.needsDraw = true; + + materialsTree.addEventListener("change", this, true); + + var addButton = Button.create(); + addButton.element = document.getElementById("ml_add_btn"); + addButton.label = "Add"; + addButton.needsDraw = true; + addButton.addEventListener("action", this, true); + + var copyButton = Button.create(); + copyButton.element = document.getElementById("ml_copy_btn"); + copyButton.label = "Copy"; + copyButton.needsDraw = true; + copyButton.addEventListener("action", this, true); + + var deleteButton = Button.create(); + deleteButton.element = document.getElementById("ml_delete_btn"); + deleteButton.label = "Delete"; + deleteButton.needsDraw = true; + deleteButton.addEventListener("action", this, true); + } + }, + + willDraw: { + enumerable: false, + value: function() { + + } + }, + + draw: { + enumerable: false, + value: function() { + + } + }, + + _loadXMLDoc: { + value:function(dname) { + if (window.XMLHttpRequest) { + xhttp = new XMLHttpRequest(); + } + xhttp.open("GET", dname, false); + xhttp.send(); + return xhttp.responseXML; + } + }, + + captureAction: { + value:function(event) { + switch(event._currentTarget.label) + { + case "Add": + console.log("Add new material"); + break; + case "Copy": + console.log("Copy selected material"); + break; + case "Delete": + console.log("Delete selected material"); + break; + } + } + }, + + captureChange: { + value:function(e) { + var tNode = e._event.treeNode; + var left, top; + //TODO: Figure out if this is the best way to detect where user clicked + var mouseEvent = e._event.mouseEvent; + if (mouseEvent.clientX && mouseEvent.clientY) { + if (mouseEvent.clientX > (parseInt(document.width)/2)) { + left = mouseEvent.clientX - mouseEvent.offsetX-2; + top = mouseEvent.currentTarget.clientHeight/2+mouseEvent.clientY - mouseEvent.offsetY; + } else { + left = mouseEvent.clientX - mouseEvent.offsetX+parseInt(mouseEvent.currentTarget.clientWidth); + top = mouseEvent.clientY - mouseEvent.offsetY; + } + } + + this._showMaterialPopup(left + 'px', top + 'px', 'right', 'top', tNode.id); + } + }, + + _materialPopup: { + enumerable:true, + value:null + }, + + _showMaterialPopup: { + enumerable: false, + value: function (x, y, side, align, materialID) { + if (this._materialPopup && this._materialPopup.opened) { + if (this._materialPopup.popup.position.x === x && this._materialPopup.popup.position.y === y) { + this._hideMaterialPopup(); + } else { + this._materialPopup.popup.position = {x: x, y: y}; + this._materialPopup.popup.tooltip = {side: side, align: align}; + this._materialPopup.popup.base.loadMaterials(materialID); + //TODO: Tooltip needs to be fixed to allow aligning to change on fly + //this._materialPopup.popup.drawTooltip(); + } + } else { + //////////////////////////////////////////////////// + //Creating popup from m-js component + var popup = document.createElement('div'); + var content = document.createElement('div'); + var popupBase = MaterialsPopup.create(); + + + //TODO: Check to see if this HACK is needed + //(elements needs to be on DOM to be drawn) + document.body.appendChild(popup); + popupBase.element = popup; + popupBase.needsDraw = true; + document.body.removeChild(popup); + //Adding drawn element to container + content.appendChild(popupBase.element); + + //Creating an instance of the popup and sending in created material popup content + this._materialPopup = {}; + this._materialPopup.popup = PopupMananger.createPopup(content, {x: x, y: y}, {side: side, align: align}); + this._materialPopup.popup.element.style.opacity = 0; + this._materialPopup.popup.base = popupBase; + popupBase._material = MaterialsLibrary.getMaterial( materialID ); + popupBase._materialName = materialID; + //TODO: Fix this animation/draw HACK (Move to didDraw callback) + setTimeout(function () { + this._materialPopup.popup.element.style.opacity = 1; + this._materialPopup.popup.base.loadMaterials(materialID); + }.bind(this), 150); + + + + //Popup was added, so it's opened + this._materialPopup.opened = true; + //TODO: Fix this HACK, it listens to this canvas to be clicked to close popup + document.getElementById('stageAndScenesContainer').addEventListener('click', this, false); + } + } + }, + //////////////////////////////////////////////////////////////////// + // + handleClick: { + enumerable: true, + value: function (e) { + //TODO: Fix this HACK + if (e._event.target.id === 'stageCanvas' && this._materialPopup.opened) { + this._handleDocumentClick(e); + } + } + }, + //////////////////////////////////////////////////////////////////// + // + _handleDocumentClick: { + enumerable: false, + value: function (e) { + this._hideMaterialPopup(); + //TODO: Fix this HACK + document.getElementById('stageAndScenesContainer').removeEventListener ('click', this, false); + } + }, + //////////////////////////////////////////////////////////////////// + // + _hideMaterialPopup: { + enumerable: false, + value: function () { + if (this._materialPopup.opened) { + // + PopupMananger.removePopup(this._materialPopup.popup.element); + this._materialPopup.opened = false; + //TODO: Fix HACK of removing popup + this._materialPopup.popup.base.destroy(); + this._materialPopup.popup = null; + } + } + } +}); \ No newline at end of file diff --git a/js/panels/Materials/materials-popup.reel/materials-popup.css b/js/panels/Materials/materials-popup.reel/materials-popup.css new file mode 100644 index 00000000..299dc5f9 --- /dev/null +++ b/js/panels/Materials/materials-popup.reel/materials-popup.css @@ -0,0 +1,162 @@ +@charset "UTF-8"; +/* + This file contains proprietary software owned by Motorola Mobility, Inc.
    + No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.
    + (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. +
    */ + +.materials_popup { + font-size: 12px; + text-shadow: 1px 1px 1px #000; + overflow: hidden; +} + +.materials_popup a:hover { + color: #CCC; +} + +.materials_popup hr { + float: left; + clear: both; + width: 100%; + display: block; + background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0.5, #1d1d1d), color-stop(0.75, #424242)); + border: none; + height: 2px; + margin: 4px 0px 4px 0px; +} + +#mp_title { + margin: 4px 0px 0px 0px; + text-align: center; +} + +#mp_preview { + height: 100px; + text-align: center; +} + +#mp_maps div div, +#mp_maps div div:focus, +#mp_maps div input, +#mp_maps div input:focus { + margin: 0px 0px 2px 0px; +} + +#mp_properties_labels, +#mp_maps_labels { + display:block; + float: left; + width:86px; + margin: 0px 8px 2px 5px; + font-family: 'Droid Sans', sans-serif; + font-size: 12px; +} + +#mp_properties_labels div, +#mp_maps_labels div { + float: right; + clear: left; + width: auto; + margin: 0px 0px 3px 0px; +} + +#mp_maps_labels div { + margin: 2px 0px 3px 0px !important; +} + +#mp_properties_labels div { + margin: 6px 0px 6px 0px !important; +} + +#mp_properties_colors +{ + float:left; + width: 24px; + margin: 0px -8px 0px 10px; +} + +#mp_properties_colors button { + width: 22px; + height: 22px; + margin: 2px 0; +} + +#mp_properties_colors input.hottext { + background: none; + float: right; + margin: 4px 0px; + padding: 0px; + width: 23px; + color: #FFF; + text-shadow: 1px 1px 1px #000; + font-family: 'Droid Sans', sans-serif; + font-size: 11px; + text-align: center; +} + +#mp_properties_colors input.hottextInput { + background: #FFF; + color: #000; + text-shadow: none; + border: 1px solid #333; + margin: 3px -2px 5px 1px; + padding: 1px; + text-decoration: none; + outline: none; +} + +#mp_maps_inputs +{ + float: left; + width: auto; +} + +#mp_maps_inputs input { + float:left; + clear:both; + width: 100px; + background: #555; + border: 1px solid #333; + color: #FFF; + padding: 1px 0px 1px 0px; + margin: 0px 0px 0px 10px; + text-decoration: none !important; + text-shadow: 1px 1px 1px #000; + font-family: 'Droid Sans', sans-serif; + font-size: 11px; + letter-spacing: 1px; +} + +#mp_maps_inputs input:focus { + outline: none; + margin: -1px 0px -1px 10px; + background: #FFF; + color: #000; + text-shadow: none; +} + + +#mp_buttons { + clear:both; + float: left; + margin: 0px -4px 0px 4px; + width: 97%; +} + +#mp_buttons button { + height: 22px; + overflow: hidden; + display: block; + cursor: pointer; +} + +#mp_cancel_btn { + float: left; + width: 60px; +} + +#mp_ok_btn { + float: right; + width: 30px; +} \ No newline at end of file diff --git a/js/panels/Materials/materials-popup.reel/materials-popup.html b/js/panels/Materials/materials-popup.reel/materials-popup.html new file mode 100644 index 00000000..bac69f25 --- /dev/null +++ b/js/panels/Materials/materials-popup.reel/materials-popup.html @@ -0,0 +1,122 @@ + + + + + + + + + + + + + + + +
    +
    Material Name
    + +
    + +
    Preview Pane
    + +
    + +
    +
    +
    + +
    + +
    + + +
    + +
    + + + + \ No newline at end of file diff --git a/js/panels/Materials/materials-popup.reel/materials-popup.js b/js/panels/Materials/materials-popup.reel/materials-popup.js new file mode 100644 index 00000000..afdc3628 --- /dev/null +++ b/js/panels/Materials/materials-popup.reel/materials-popup.js @@ -0,0 +1,674 @@ +/* +This file contains proprietary software owned by Motorola Mobility, Inc.
    +No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.
    +(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. +
    */ + +var Montage = require("montage/core/core").Montage, + Component = require("montage/ui/component").Component; +var Button = require("js/components/button.reel").Button; + +//////////////////////////////////////////////////////////////////////// +//Exporting as MaterialsPopup +exports.MaterialsPopup = Montage.create(Component, { + //////////////////////////////////////////////////////////////////// + okButton: { + enumerable: false, + value: null + }, + + cancelButton: { + enumerable: false, + value: null + }, + + //////////////////////////////////////////////////////////////////// + // Material Properties + + materialsProperties: { + enumerable: true, + serializable: true, + value: null + }, + + _materialName: { + enumerable: true, + value: "Material" + }, + + materialTitle: { + enumerable: true, + value: null + }, + + captureAction: { + value:function(event) { + switch(event._currentTarget.label) + { + case "Cancel": + console.log("Cancel material edit"); + break; + case "OK": + console.log("Committing material with the following values:"); + for(var i=0, len=this.materialsProperties.childComponents.length; i< len; i++) + { + var childControl = this.materialsProperties.childComponents[i]; + var childValue = childControl._control[childControl._prop]; + + if(typeof childValue === "object") + { + console.log(childControl.label + " is "); + console.dir(childValue); + } + else + { + console.log(childControl.label + " is " + childValue); + } + console.log("--------------"); + + } + break; + } + } + }, + + updatePreview: + { + value: function(event) + { + if(event.type === "propertyChanging") + { + this._handlePropertyChanging(event); + } + else + { + this._handlePropertyChange(event); + } + } + }, + + _handlePropertyChanging: + { + value: function(event) + { + if(typeof event.propertyValue === "object") + { + console.log(event.propertyLabel + " changing to "); + console.dir(event.propertyValue); + } + else + { + console.log(event.propertyLabel + " changing to " + event.propertyValue); + } + + if (event.propertyLabel && event.propertyValue) + this.applyProperty( event.propertyLabel, event.propertyValue ); + } + }, + + _handlePropertyChange: + { + value: function(event) + { + if(typeof event.propertyValue === "object") + { + console.log(event.propertyLabel + " changed to "); + console.dir(event.propertyValue); + } + else + { + console.log(event.propertyLabel + " changed to " + event.propertyValue); + } + + if (event.propertyLabel) + this.applyProperty( event.propertyLabel, event.propertyValue ); + } + }, + + applyProperty: + { + value: function( propLabel, propValue) + { + // find the property lable in the array + // This assumes no duplication in labels + if (this._propLabels) + { + // the label cones through with a trailing ':'. remove that + var ch = propLabel[ propLabel.length - 1]; + if (ch == ':') + propLabel = propLabel.substr(0, propLabel.length - 1); + + var index; + var nProps = this._propLabels.length; + for (var i=0; i 0)) + { + var index = value.lastIndexOf( "/" ); + if (index < 0) index = value.lastIndexOf( "\\" ); + if (index >= 0) + value = value.substr( index+1 ); + value = "assets\\images\\" + value; + rtnValue = value.slice(0); + } + break; + + case "checkbox": + rtnValue = value; + break; + + default: + console.log( "unrecognized material control type: " + type ); + break; + } + return rtnValue; + } + }, + + //////////////////////////////////////////////////////////////////// + // + prepareForDraw: { + enumerable: false, + value: function() { + this.cancelButton.addEventListener("action", this, true); + + this.okButton.addEventListener("action", this, true); + } + }, + //////////////////////////////////////////////////////////////////// + // + didDraw: { + enumerable: false, + value: function() { + this.materialTitle.innerHTML = this._materialName; + } + }, + + //Garbage collection (Manual method) + destroy: { + enumerable: false, + value: function() { + // add cleanup routines here + } + }, + + loadMaterials: + { + enumerable: true, + value: function(materialID) + { + this._materialName = materialID; + if( + (materialID === "BrickMaterial") || + (materialID === "UberMaterial") || + (materialID === "FlatMaterial") || + (materialID === "BumpMetalMaterial") || + (materialID === "PlasmaMaterial") || + (materialID === "LinearGradientMaterial") || + (materialID === "RadialGradientMaterial") || + (materialID === "RadialBlurMaterial") || + (materialID === "PulseMaterial") || + (materialID === "TunnelMaterial") || + (materialID === "TwistMaterial") || + (materialID === "KeleidoscopeMaterial") || + (materialID === "JuliaMaterial") || + (materialID === "MandelMaterial") || + (materialID === "IridescentScalesMaterial") + ) + { + var material = MaterialsLibrary.getMaterial( materialID ); + if (material) + { + this._material = material; + var matData = this.getMaterialData( material ); + this.materialsData = matData; + } + } + else + { + this.materialsData = this._dummyData1; + } + + this.needsDraw = true; + } + }, + + getMaterialData: + { + value: function( material ) + { + // declare the array to hold the results + var rtnArray = []; + + var propNames = [], propValues = [], propTypes = [], propLabels = []; + this._propNames = propNames; + this._propValues = propValues; + this._propTypes = propTypes; + this._propLabels = propLabels; + material.getAllProperties( propNames, propValues, propTypes, propLabels); + var n = propNames.length; + for (var i=0; i 2) + { + obj["defaults"]["data"][2] = + { + "label": "Z", + "description": "Z value", + "controlType": "HotText", + "defaults": + { + "minValue": -1.e8, + "maxValue": 1.e8, + "value": value[2] + } + } + } + + return obj; + } + }, + + _dummyData1: { + value: [ + { + "label": "Texture1", + "description": "Texture1 value", + "controlType": "FileInput", + "defaults": + { + "filePath": "http://localhost/" + } + }, + { + "label": "Diffuse", + "description": "Diffuse value", + "controlType": "ColorChip", + "defaults": + { + } + }, + { + "label": "Specular", + "description": "Specular value", + "controlType": "Button", + "defaults": + { + "isToggleButton": true + } + }, + { + "label": "Shininess", + "description": "Shininess value", + "controlType": "HotText", + "defaults": + { + "minValue": 0, + "maxValue": 128, + "decimalPlace": 100 + } + }, + { + "label": "RGB", + "description": "RGB value", + "controlType": "InputGroup", + "defaults": + { + data:[ + { + "label": "R", + "description": "R value", + "controlType": "HotText", + "defaults": + { + "minValue": 0, + "maxValue": 255, + "value": 255 + } + }, + { + "label": "G", + "description": "G value", + "controlType": "HotText", + "defaults": + { + "minValue": 0, + "maxValue": 255 + } + }, + { + "label": "B", + "description": "B value", + "controlType": "HotText", + "defaults": + { + "minValue": 0, + "maxValue": 255 + } + } + ] + } + }, + { + "label": "XYZ", + "description": "XYZ value", + "controlType": "InputGroup", + "defaults": + { + data:[ + { + "label": "X", + "description": "X value", + "controlType": "TextField", + "defaults": + { + "text": "0" + } + }, + { + "label": "Y", + "description": "Y value", + "controlType": "TextField", + "defaults": + { + "text": "0" + } + }, + { + "label": "Z", + "description": "Z value", + "controlType": "TextField", + "defaults": + { + "text": "1" + } + } + ] + } + }, + { + "label": "Foo", + "description": "Foo value", + "controlType": "Slider", + "defaults": + { + "minValue": 0, + "maxValue": 100, + "value": 50, + "allowTrackClick": true + } + }, + { + "label": "Bar", + "description": "Bar value", + "controlType": "HotTextUnit", + "defaults": + { + "acceptableUnits": ["%"], + "value": 50, + "units": "%" + } + } + ] + }, + + _dummyData2: { + value: [ + { + "label": "Diffuse", + "description": "Diffuse value", + "controlType": "ColorChip", + "defaults": + { + } + }, + { + "label": "Ambient", + "description": "Ambient value", + "controlType": "ColorChip", + "defaults": + { + } + }, + { + "label": "Specular", + "description": "Specular value", + "controlType": "ColorChip", + "defaults": + { + } + }, + { + "label": "Shininess", + "description": "Shininess value", + "controlType": "HotText", + "defaults": + { + "minValue": 0, + "maxValue": 128 + } + } + ] + }, + + _materialsData: { + enumerable: true, + serializable: true, + value: this._dummyData1 + + }, + + materialsData: { + enumerable: true, + serializable: true, + get: function() { + return this._materialsData; + }, + set: function(data) { + this._materialsData = data; + this.materialsProperties.needsDraw = true; + } + } + + +}); -- cgit v1.2.3