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
'use strict';console.log(famous);//var famous = require('famous');varDOMElement=famous.domRenderables.DOMElement;varFamousEngine=famous.core.FamousEngine;varMesh=famous.webglRenderables.Mesh;varColor=famous.utilities.Color;varGeometry=famous.webglGeometries.Geometry;varCamera=famous.components.Camera;varscene=FamousEngine.createScene();varcenteredOriginNode;FamousEngine.init();scene.setSizeMode('relative','relative','absolute').setProportionalSize(0.7,0.7,0.7).setAbsoluteSize(1000,1000,500).setOrigin(0.5,0.5,0.5).setRotation(0.5,0.5,0.5);centeredOriginNode=scene.addChild().setSizeMode('relative','relative','relative').setProportionalSize(0.6,0.6,0.6).setAlign(0.5,0.5,0.5).setOrigin(0.5,0.5,0.5).setMountPoint(0.5,0.5,0.5);varoCubeNode=addDebugCube(centeredOriginNode);oCubeNode.setOrigin(0.5,0.5,0.5);varoDOMElement=newDOMElement(centeredOriginNode,{properties: {'font-size':'100px','background-color':'#F00'}}).setContent("hello cruel world!");setTimeout(function(){varoCamera=newCamera(scene).setDepth(800);oDOMElement.setContent("camera added to scene");setTimeout(function(){scene.setScale(0.5,0.5,0.5);oDOMElement.setContent("scene scaled (notice we are now missing the cube mesh)");},1000*3);},1000*3);functionaddDebugCube(parent){varoCube=parent.addChild().setOpacity(0.3);// cubevaroGeometry=newGeometry({type: 'LINES',buffers: [{name: 'a_pos',data: [-1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,1,1,1,1,-1,1,1],size: 3},{name: 'indices',data: [0,1,1,2,2,3,3,0,// front face4,5,5,6,6,7,7,4,// back face0,4,4,7,7,3,3,0,// left face1,5,5,6,6,2,2,1// right face],size: 2}]});varoMesh=newMesh(oCube).setGeometry(oGeometry).setBaseColor(newColor("#FFFFFF"));returnoCube;};
Relevant code chunk
setTimeout(function(){scene.setScale(0.5,0.5,0.5);oDOMElement.setContent("scene scaled (notice we are now missing the cube mesh)");},1000*3);
Observed Output
After one adds a wireframe cube mesh & a DOM element (correct output):
After then adding a camera (again correct output):
Finally, this is the output after scaling the scene. Notice that the wireframe cube has disappeared:
Expected Output
The red DOM element should be enclosed by a wireframe cube. Instead the cube has disappeared.
Workaround
Add a child node to the scene below the camera then Node#setScale() the child node instead.
The text was updated successfully, but these errors were encountered:
Steps to reproduce
Isolation
Tested against:
Code Example
Relevant code chunk
Observed Output
After one adds a wireframe cube mesh & a DOM element (correct output):
After then adding a camera (again correct output):
Finally, this is the output after scaling the scene. Notice that the wireframe cube has disappeared:
Expected Output
The red DOM element should be enclosed by a wireframe cube. Instead the cube has disappeared.
Workaround
Add a child node to the scene below the camera then Node#setScale() the child node instead.
The text was updated successfully, but these errors were encountered: