material

three.js 添加 图形控制界面 gui

雨燕双飞 提交于 2019-12-05 06:56:39
需要导入这个js: import { GUI } from '/three.js/jsm/libs/dat.gui.module.js'; 局部代码: var params = { color: 0xffffff, transparency: 0.90, envMapIntensity: 1, lightIntensity: 1, exposure: 1, visible:true }; var gui = new GUI(); gui.addColor(params, 'color') .onChange(function () { material.color.set(params.color); }); gui.add(params, 'transparency', 0, 1) .onChange(function () { material.transparent = true;//允许透明 material.opacity = params.transparency;//设置 透明度 //material.transparency = params.transparency; }); gui.add(params, 'envMapIntensity', 0, 1) .name('envMap intensity') .onChange(function () {

创建Material Design风格的Android应用--使用自定义动画

人盡茶涼 提交于 2019-12-05 06:54:22
动画在Material Design设计中给用户反馈放用户点击时,并且在程序用户界面中提供连贯的视觉。Material主题为按钮(Button)和activity的转换提供了一些默认的动画,在android5.0(api 21)和更高的版本,你可以自定义这些动画和创建一个新动画: Touch feedback(触摸反馈) Circular Reveal(循环揭露效果) Activity transitions(Activity转换效果) Curved motion(曲线运动) View state changes (视图状态改变) 自定义触摸反馈 触摸反馈在Material Design中在触摸点提供了一个即时视觉确认当用户作用在UI元素。按钮的默认触摸反馈动画是使用了新的RippleDrawable类,它会是波纹效果在不同状态间变换。 大多数情况下,我们可以使用这个功能通过在xml文件中定义背景: ?android:attr/selectableItemBackground 有界限的波纹 ?android:attr/selectableItemBackgroundBorderless 可以超出视图区域的波纹 ?android:attr/selectableItemBackgroundBorderless 是21新添加的api 另外,还以使用 ripple 元素定义

SceneKit, flip direction of SCNMaterial

狂风中的少年 提交于 2019-12-05 05:02:51
extremely new to SceneKit, so just looking for help here: I have an SCNSphere with a camera at the center of it I create an SCNMaterial, doubleSided, and assign it to the sphere Since the camera is at the center, the image looks flipped vertically, which when having text inside totally messes things up. So how can i flip the material, or the image (although later it will be frames from a video), any other suggestion is welcome. This solution, btw, is failing on me, normalImage is applied as a material (but the image is flipped when looking from inside the sphere), but assigning flippedImage

md-sidenav toggle() is on top of the md-toolbar

我怕爱的太早我们不能终老 提交于 2019-12-05 01:59:45
I want to be able to toggle a sidenav without hiding the top left part of the md-toolbar, similiar to how Google Inbox works: It seems like the toggle function is causing it, because without the animation, the sidenav in showing underneath the md-toolbar. Is that possible? <body layout="column" ng-controller="mainCtrl"> <md-toolbar layout="column" class="md-medium-tall"><span flex="flex"></span> <div class="md-toolbar-tools"> <md-button class="menu" ng-click="toggleLeft()"> <md-icon md-svg-src="assets/svg/menu.svg"></md-icon> </md-button> <div layout="row" flex="flex" class="fill-height"> <div

Material shines through when zooming out (three.js r78)

自作多情 提交于 2019-12-05 01:15:32
问题 Material shines through when zooming out (three.js r78) When zooming out to a certain extend the material of objects behind other objects starts to shine through. It looks very similar to the effect when faces are overlapping (faces are in the same plane). To demonstrate this I made a fiddle. In this example I draw two thin boxes (thickness 1 and there is a empty space between the boxes of also 1) so the boxes are not touching eachother but the material shines through anyway. // geometry with

How can I force Angular 7+ Material Autocomplete to enter letters only provided by a data source?

陌路散爱 提交于 2019-12-04 17:06:40
Edit: There are some workarounds as posted below (see answers) for template-driven forms. (I am looking for a solution for reactive forms). How can I force Angular Material Autocomplete to enter letters only provided by a data source? >> See the whole app here at stackblitz.com "Adel" is initial value and it is provided by the options-array: options: User[] = [ {name: 'George Michael'}, {name: 'Aretha Franklin'}, {name: 'Adel'}, {name: 'Janet Jackson'}, ]; The auto-complete works properly: However, the following should not be possible: The user may only enter the letters corresponding to an

Material Design progressdialog

女生的网名这么多〃 提交于 2019-12-04 16:35:26
问题 alertDialog = new ProgressDialog(this); alertDialog.setMessage(getResources().getString(R.string.loader)); alertDialog.setCancelable(false); alertDialog.show(); Simply when I do this, green circle shows up with the word loading besides it. However when i DONT USE progress dialog, and i use a progressbar on the page I get a pink color as i have defined the below in my styles.xml <item name="colorPrimary">@color/pink</item> <item name="colorPrimaryDark">@color/pink</item> <item name=

three.js emissive material maps

旧巷老猫 提交于 2019-12-04 10:29:21
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.MixOperation, reflectivity: 0.05 }; var material = new THREE.MeshPhongMaterial(params); Can anyone point

How to use Chips component from android support library?

雨燕双飞 提交于 2019-12-04 06:39:49
I have read the documentation on the official website . But I was unable to implement Chip in my project following the documentation. Android Studio can't find and import Chip class as well as Chip view. I have also noticed that on Google Developer site there is no reference for Chip class. There are some similar questions. But all answers point to use a third-party library. But I am trying to use Chips component from android support library. The feature is included in support library version 28.0.0-alpha1. To use the feature: In app gradle file: android { compileSdkVersion 'android-P' }

My own styles in angular material ui

牧云@^-^@ 提交于 2019-12-04 04:33:58
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? Best method which I know, without recompilling less, sass, etc.: You should apply custom theme: angular.module('myApp').config(['$mdThemingProvider', function($mdThemingProvider) { $mdThemingProvider.theme('myAwesome')