
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
ng3-flat-ui
Advanced tools
Angular UI component library for three.js
Components work in browser window using touch or mouse.
Components also work in VR using ray caster to provide an in-scene user interface.
Components include
Panels include
Input methods include
Group directives are provided for automatic vertical or horiztonal layout.
A default theme is provided, but can be override. A matrix theme provides example of doing this.
Components use angular-three as a foundation for defining scene objects.
See ng3-flat-ui for detailed documentation
This library assumes you have a decent understanding of three.js scene, lighting, geometry and material. Also, being familiar with angular-three really helps.
Start with recent Angular CLI project
ng add @angular-three/schematics
ng add @angular-three/soba
ng add ng3-flat-ui
To app.module.ts, add the following
import { NgtCanvasModule } from '@angular-three/core';
import { NgtStatsModule } from '@angular-three/core/stats';
import { NgtMeshModule } from '@angular-three/core/meshes';
import { NgtBoxGeometryModule } from '@angular-three/core/geometries';
import { NgtMeshBasicMaterialModule } from '@angular-three/core/materials';
import { NgtColorAttributeModule } from '@angular-three/core/attributes';
import { NgtAmbientLightModule } from '@angular-three/core/lights';
import { Ng3FlatUiModule } from 'ng3-flat-ui';
Under imports, add
NgtCanvasModule,
NgtStatsModule,
NgtMeshModule,
NgtBoxGeometryModule,
NgtMeshBasicMaterialModule,
NgtColorAttributeModule,
NgtAmbientLightModule,
Ng3FlatUiModule,
Modify app.component.html or add the following to a component
<div style="height:100vh">
<ngt-canvas [camera]="{ position: [0, 0, 3]}">
<ngt-color attach="background" color="black"></ngt-color>
<ngt-ambient-light></ngt-ambient-light>
<ngt-mesh [position]="[0, -0.2, 0]" [rotation]="[0, 1.57/2, 0]">
<ngt-box-geometry></ngt-box-geometry>
<ngt-mesh-basic-material [color]="color"></ngt-mesh-basic-material>
</ngt-mesh>
<flat-ui-button [text]="'click me'" [position]="[0, 0.5, 0]" (pressed)="color='blue'"></flat-ui-button>
<ngt-stats></ngt-stats>
</ngt-canvas>
</div>
Modify app.component.ts or component you added, add the following class variable
color = 'red';
Finally, modify styles.css to remove the border around the canvas
body {
margin: 0px;
}
Click the button to change the cube blue
No. This would be a great student project.
No. This would be a great student project.
List of features that would be nice to add (in no particular order)
FAQs
Angular UI component library for [three.js](https://threejs.org/)
The npm package ng3-flat-ui receives a total of 1 weekly downloads. As such, ng3-flat-ui popularity was classified as not popular.
We found that ng3-flat-ui demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.