Adding a mesh to the scene graph by extending Node breaks in 0.7.0
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- javascript
- Ambito
- computer-graphics
Direzione di ricerca
Riproduci la regressione con i branch Vizzy waves e una nuova installazione di npm usando engine 0.7.0. Leggi src/Grid.js e src/index.js, concentrandoti sulla costruzione di Grid, sul posizionamento nel grafo della scena e sulla configurazione di Background; il lavoro è concluso quando il mesh può essere nuovamente aggiunto estendendo Node e lo sfondo non oscura più il piano.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
When working on my visualizer I had everything working in 0.6.2 (https://github.com/psyrendust/Vizzy/tree/feat/waves). But when doing a fresh npm installI'm getting seeing an issue in 0.7.0. I was able to get it partially working again in this branch (https://github.com/psyrendust/Vizzy/tree/bug/waves). Below are the changes I used to get things working again.
I also had to remove my background because it's placement in the scene graph is different and now cuts my plane in half only allowing you to see a small portion of the wave.
diff --git a/src/Grid.js b/src/Grid.js
index 29b1882..70450a4 100644
--- a/src/Grid.js
+++ b/src/Grid.js
@@ -53,13 +53,12 @@ const vizzyVS = Material.vizzyVS(null, {
}
});
-export default class Grid extends Node {
- constructor(audio) {
- super();
+export default class Grid {
+ constructor(node, audio) {
// gl_PointSize = 20.0;
-
- this
+ this.node = node;
+ this.node
.setAlign(0.5, 0.5, 0.5)
.setOrigin(0.5, 0.5, 0.5)
.setMountPoint(0.5, 0.5, 0.5)
@@ -71,9 +70,9 @@ export default class Grid extends Node {
this.clock = FamousEngine.getClock();
this.audio = audio;
- this.mesh = new Mesh(this);
+ this.mesh = new Mesh(this.node);
this.geometry = new DynamicGeometry();
- this.dragRotation = new DragRotation(this);
+ this.dragRotation = new DragRotation(this.node);
this.plane = new Plane({
detailY: this.audio.getData().TIMEBUFFER - 1,
diff --git a/src/index.js b/src/index.js
index ccb31e8..9db0d9d 100644
--- a/src/index.js
+++ b/src/index.js
@@ -29,12 +29,13 @@ class Background extends Node {
.setAlign(0.5, 0.5, 0.5)
.setOrigin(0.5, 0.5, 0.5)
.setMountPoint(0.5, 0.5, 0.5)
- .setProportionalSize(1, 1)
+ .setProportionalSize(1, 1, 1)
.setPosition(0, 0, 0);
this.opacity = new Opacity(this);
this.opacity.set(0);
this.el = new DOMElement(this, {
properties: {
+ 'z-index': '0',
width: '100%',
height: '100%',
background: "#00b9d7",
@@ -69,10 +70,10 @@ class Vizzy {
this.camera = new Camera(this.scene);
this.camera.setDepth(120);
this.root = this.scene.addChild()
- this.background = this.root.addChild(new Background());
+ // this.background = this.root.addChild(new Background());
this.lights = this.root.addChild(new Lights());
this.audio = new Audio(this.root);
- this.grid = this.root.addChild(new Grid(this.audio));
+ this.grid = new Grid(this.root.addChild(), this.audio);
this.data = {};
this.refreshRate = new RefreshRate(100);
this.id = this.root.addComponent(this);
@@ -80,17 +81,17 @@ class Vizzy {
}
onUpdate() {
this.data = this.audio.getData();
- this.refreshRate.throttle(() => {
- if (this.data.fftBufferFloat[0]) {
- if (this.data.fftBufferFloat[0][this.data.fftSize - 8] > -90) {
- this.background.show();
- } else {
- this.background.hide();
- }
- } else {
- this.background.hide();
- }
- });
+ // this.refreshRate.throttle(() => {
+ // if (this.data.fftBufferFloat[0]) {
+ // if (this.data.fftBufferFloat[0][this.data.fftSize - 8] > -90) {
+ // this.background.show();
+ // } else {
+ // this.background.hide();
+ // }
+ // } else {
+ // this.background.hide();
+ // }
+ // });
this.grid.updateItems(this.data);
this.root.requestUpdateOnNextTick(this.id);
}
- Lingua principale
- JavaScript
- Stelle
- 1.7k
- Fork
- 249
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Famous/engine
-
mechronetechAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 5/100
-
car motors for saleAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 1/100
-
k20 engine for saleAperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 1/100
-
#THEREISNOSPOONAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 10/100
-
Slack sign up not workingAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 10/100
Tutte le issue di Famous/engine
Issue simili
-
[dsh-plugin.org | dsh-plugin-hub] plugin distribution incomplete: yjh051108/dsh-routing-suiteAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 71/100
yjh051108/dsh-routing-suite#227 ·
-
needs-triage release-watch
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 76/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
dusk-network/exu#17 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
jspreadsheet/ce#1809 ·
-
documentation
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 91/100
githubnext/gh-aw-workshop#4458 ·
I maintainer di solito rispondono entro 1 giorno