Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
angular-three-cannon
Advanced tools
angular-three-cannon
This library is a wrapper around the Cannon.js physics engine for use with Angular Three.
npm install angular-three-cannon cannon-es @pmndrs/cannon-worker-api
# yarn add angular-three-cannon cannon-es @pmndrs/cannon-worker-api
# pnpm add angular-three-cannon cannon-es @pmndrs/cannon-worker-api
Make sure to already have
angular-three
installed
@Component({
template: `
<ngt-mesh #mesh>
<ngt-box-geometry />
</ngt-mesh>
`,
})
export class Box {
mesh = viewChild.required<ElementRef<Mesh>>('mesh');
constructor() {
// Make this mesh a Box body in Physics. Only works within ngtc-physics
injectBox(() => ({ mass: 10000, position: [0, 0, 0], args: [1, 1, 1] }), this.mesh);
}
}
@Component({
template: `
<ngtc-physics>
<app-box />
</ngtc-physics>
`,
imports: [NgtcPhysics, Box],
})
export class SceneGraph {}
allowSleep?: boolean
axisIndex?: 0 | 1 | 2
broadphase?: 'Naive' | 'SAP'
defaultContactMaterial?: ContactMaterialOptions
frictionGravity?: Vector3 | null
gravity?: Vector3
isPaused?: boolean
iterations?: number
maxSubSteps?: number
quatNormalizeFast?: boolean
quatNormalizeSkip?: number
shouldInvalidate?: boolean
size?: number
solver?: 'GS' | 'Split'
stepSize?: number
tolerance?: number
Read the debug documentation for more information on how to enable debug mode and view debug information.
Read the body documentation for more information on how to create physics bodies and apply forces.
Read the constraint documentation for more information on how to create constraints between physics bodies.
FAQs
Physics Cannon for Angular Three
We found that angular-three-cannon demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.