material

three.js emissive material maps

独自空忆成欢 提交于 2020-01-01 12:05:13
问题 I'm currently experimenting a bit in three.js, and I'd like to use an emissive map. I've tried just loading a texture into the emissive property of a phong material, but it doesn't work like that, unfortunately. Here's my code: var params = { emissive: THREE.ImageUtils.loadTexture( emissive ), shininess: shininess, map: THREE.ImageUtils.loadTexture( map ), normalMap: THREE.ImageUtils.loadTexture( normalMap ), normalScale: new THREE.Vector2(0,-1), envMap: this.reflectionCube, combine: THREE

three.js emissive material maps

陌路散爱 提交于 2020-01-01 12:05:03
问题 I'm currently experimenting a bit in three.js, and I'd like to use an emissive map. I've tried just loading a texture into the emissive property of a phong material, but it doesn't work like that, unfortunately. Here's my code: var params = { emissive: THREE.ImageUtils.loadTexture( emissive ), shininess: shininess, map: THREE.ImageUtils.loadTexture( map ), normalMap: THREE.ImageUtils.loadTexture( normalMap ), normalScale: new THREE.Vector2(0,-1), envMap: this.reflectionCube, combine: THREE

Angular4 Change md-button's ripple color

a 夏天 提交于 2020-01-01 09:35:35
问题 I have created a md-button in my webpage using Material for Angular4. Is there a way to change the ripple effect's color and make it white? Can I also change other ripple properties, like the duration of the ripple effect? 回答1: It turned out that in order to change the ripple properties, one should create a mixin at the mat-ripple-theme and import it in their app's styles.scss file: @import '~@angular/material/theming'; @mixin mat-ripple-theme($theme) { .mat-ripple-element { background-color:

My own styles in angular material ui

こ雲淡風輕ζ 提交于 2020-01-01 09:16:13
问题 material-ui and I want to customize it. Unfortunalety my own styles are overwritten by the framework styles. For example when I declare styles for md-toolbar md-toolbar { background: red; } this declaration is overwritten by material. I added !important directive and it helped but I don't want to use it everywhere. How should I customize material in an appropriate way? 回答1: Best method which I know, without recompilling less, sass, etc.: You should apply custom theme: angular.module('myApp')

Set CALayer as SCNMaterial's diffuse contents

泪湿孤枕 提交于 2020-01-01 02:44:10
问题 I've been searching all over the internet over the past couple of days to no avail. Unfortunately, the apple documentation about this specific issue is vague and no sample code is available (at least thats what I found out). What seems to be the issue you may ask... I'm trying to set a uiview's layer as the contents of the material that is used to render an iPhone model's screen (Yep, trippy :P ). The iPhone's screen's UV mapping is set from 0 to 1 so that no issue persists in mapping the

Many meshes with the same geometry and material, can I change their colors?

跟風遠走 提交于 2019-12-30 07:55:08
问题 I have a large number (~1000) of THREE.Mesh objects that have been constructed from the same THREE.Geometry and THREE.MeshPhongMaterial (which has a map). I would like to tint (color) these objects individually. Naïvely, I tried changing the mesh.material.color property, but changing this property on any of the objects changes the color of all the objects at once. This makes sense, since there is only one material that is shared among all the objects. My next idea was to create a separate

Show a snackbar after navigate in Flutter

本小妞迷上赌 提交于 2019-12-30 01:59:12
问题 After an action (for example, "save"), user is returned to another page in the app. I want to show a snackbar on the new page to confirm the action, but don't want it to show if the user navigated there without the action. So for example, if user saves "thing", the app sends them to "things" main page and shows the "saved" snackbar, but if they go to "things" main page some other way, I don't want the "saved" snackbar to be there. Here is my code on the panel that saves, but the destination

crash - material design android 5.0

只愿长相守 提交于 2019-12-30 01:40:29
问题 I have a big problem with my app. It crashes and I don't know why. In my app I have a Activity with a listview and a customlistviewadapter and a second Detailactivity . I want to add the material design from Android Lollipop and there is my problem. I added the nice Activity Transaction between the two Activities . I'm taking the picture and the title from the listviewelement out of the listview and using a SparseArray<Bitmap> to transfer the picture, a intent and ActivityOptions to transfer

Three.js texture / image update at runtime

半腔热情 提交于 2019-12-28 13:48:11
问题 I am trying to change a cube image at run time by selecting an option from Select Form element. When running the code, the image changes after selecting, but the previous cube and image stays in the scene. How I clear / refresh / update the scene properly when changing the material / image / texture. <div id = "container"></div> <form id = "changesForm"> Cube Image: <br> <select id = "cubeImage"> <option value = "random">Random</option> <option value = "image1">First Image</option> <option

nesting md-grid-tile into md-button not working (Angular Material)

筅森魡賤 提交于 2019-12-24 16:11:29
问题 I have made a md-grid-list with md-grid-tiles, and I want to make each one a link. I tried wrapping each tile in a md-button but this makes the element disappear. It doesn't have to be an md-button, it could be a simple anchor tag, but I can't seem to resolve this either way. Any help would be appreciated. My code: <md-grid-list> <md-button> <md-grid-tile> <img class="crest" src="img/afc-bournemouth.png"> <md-grid-tile-footer layout-align="center center">Bournemouth</md-grid-tile-footer> </md