material

Displaying background colour through transparent PNG on material?

我们两清 提交于 2019-11-26 21:38:23
问题 I'm making a case builder using THREE.js , the basics are i want to be able to change the height/width/length of a box, rotate it around, and also change the background color of the box. This is it so far: http://design365hosting.co.uk/casebuilder3D/ The dimension changing works, as does the dragging of the box, now i'm working with the background color change. The way i want this to work is by using transparent PNGs as the faces of the box, and setting background colors so that this

How can i make a MatDialog draggable / Angular Material

大兔子大兔子 提交于 2019-11-26 19:51:04
问题 Is it possible to make a Angular Material Dialog draggable? I installed angular2-draggable and can of course use the functionality on all other elements. But because the dialogs are dynamically created i can not use ngDraggable on a special element or can use a template variable. 回答1: Update since Angular Material 7 You can simply use cdkDrag directive from @angular/cdk/drag-drop dialog.html <h1 mat-dialog-title cdkDrag cdkDragRootElement=".cdk-overlay-pane" cdkDragHandle> Hi {{data.name}} <

Display wireframe and solid color

╄→гoц情女王★ 提交于 2019-11-26 19:02:19
Is it possible to display the wireframe of the object and also the solid color of its faces on the same object? I found a way using a clone of the object and assign different materials e.g var geometry = new THREE.PlaneGeometry(plane.width, plane.height,width - 1, height - 1); var materialWireframe = new THREE.MeshPhongMaterial({color:"red",wireframe:true}); var materialSolid = new THREE.MeshPhongMaterial({color:"green",wireframe:false}); var plane = new THREE.Mesh(geometry, materialWireframe ); var plane1 = plane.clone(); plane1.material = materialSolid ; plane1.material.needsUpdate = true;

Objects in Scene dark after calling LoadScene/LoadLevel

大憨熊 提交于 2019-11-26 16:48:47
I completed Unity's roll-a-ball tutorial and it works fine. I changed a couple of materials to make it look better. I also added a C# script that should restart the level when the player falls off of the ground (I disables the walls). I am using Unity 5.5. It initially looks like this: But when I go off the edge and the level restarts, it looks like this: It sometimes looks like this for a few seconds after opening unity when the editor is loading. Here is the script: using UnityEngine; using System.Collections; public class DeathTrigger : MonoBehaviour { // Use this for initialization void

Unity Editor 编辑器扩展 十三 自定义创建资源

夙愿已清 提交于 2019-11-26 02:14:53
目录 初级资源创建 中级资源创建 更自由的自定义资源创建 初级资源创建 Editor文件夹下创建脚本: using UnityEngine; using UnityEditor; public class CreateTest { [MenuItem ( "Assets/Create ExampleAssets" )] static void CreateExampleAssets () { var material = new Material (Shader.Find ( "Standard" )); ProjectWindowUtil.CreateAsset (material, "New Material.mat" ); } } 点击Assets--Create ExampleAssets 就会发现一个材质球被创建 中级资源创建 Editor文件夹下创建脚本: using UnityEngine; using UnityEditor; public class CreateMaterial { [MenuItem ( "Assets/Create Material" )] static void CreateExampleAssets () { var material = new Material (Shader.Find ( "Standard" )); var