You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 10, 2023. It is now read-only.
Using latest 4.0.2 version of @angular/three.
Added cannon as follows
npm i @angular-three/cannon cannon-es
ng serve working fine.
Wrapped ngt-group with ngt-physics as follows
<ngt-group #group="ngtGroup" [name]="'room'">
<ngt-mesh *ngFor="let item of shapes"
[position]="item.position" [rotation]="item.rotation" [scale]="item.scale" [castShadow]="true" [receiveShadow]="true"
#mesh="ngtMesh">
<ngt-mesh-standard-material [parameters]="{ color: item.color, roughness: 0.7, metalness:0.0 }">
<ngt-box-geometry *ngIf="item.shapename=='box'" [args]="[0.2, 0.2, 0.2]">
<ngt-cone-geometry *ngIf="item.shapename=='cone'" [args]="[0.2, 0.2, 64]">
<ngt-cylinder-geometry *ngIf="item.shapename=='cylinder'" [args]="[ 0.2, 0.2, 0.2, 64]">
<ngt-icosahedron-geometry *ngIf="item.shapename=='icosahedron'" [args]="[ 0.2, 8]">
<ngt-torus-geometry *ngIf="item.shapename=='torus'" [args]="[ 0.2, 0.04, 64, 32]">
Browser console shows this error.
ERROR DOMException: Failed to construct 'Worker': Script at 'file:///C:/Users/adria/source/repos/angular-vr/node_modules/@angular-three/cannon/fesm2015/utils/worker.js' cannot be accessed from origin 'http://localhost:4200'.
at new NgtPhysicsStore (http://localhost:4200/vendor.js:20051:15)
at NodeInjectorFactory.NgtPhysicsStore_Factory [as factory] (http://localhost:4200/vendor.js:20280:10)
at getNodeInjectable (http://localhost:4200/vendor.js:42415:44)
at searchTokensOnInjector (http://localhost:4200/vendor.js:42352:16)
at getOrCreateInjectable (http://localhost:4200/vendor.js:42296:38)
at Module.ɵɵdirectiveInject (http://localhost:4200/vendor.js:53256:12)
at NodeInjectorFactory.NgtPhysics_Factory [as factory] (http://localhost:4200/vendor.js:20409:95)
at getNodeInjectable (http://localhost:4200/vendor.js:42415:44)
at instantiateAllDirectives (http://localhost:4200/vendor.js:49148:27)
at createDirectivesInstances (http://localhost:4200/vendor.js:48497:5)
Is there something I should be adding to angular.json or tsconfig.json?
The text was updated successfully, but these errors were encountered: