Comments (2)
vote for clone button in every example - such a good Litmus test 😅 🙈
The lack of JSDoc makes it hard to figure out, but I got this to work anyway:
const clone = pc.app.root.children[2].clone();
pc.app.root.addChild(clone);
clone.translate(0.5, 0, 0);
I saw multiple issues:
- Using object spreading for... cloning?
Example:
class Test {
_hi = 123;
get hi() {
return _hi;
}
}
test = new Test();
const obj = {...test};
console.log("obj", obj);
Outputs: {_hi: 123}
, but we need {hi: 123}
!
Happens in two places:
engine/src/framework/components/anim/component.js
Lines 378 to 383 in e3217c4
engine/src/framework/anim/controller/anim-controller.js
Lines 131 to 134 in e3217c4
- data.stateGraph lacks extra layer
engine/src/framework/components/anim/system.js
Lines 46 to 49 in e3217c4
You can hack it up like this for making it work:
if (data.stateGraph) {
data.stateGraph.layers[0] = data.layers[0]; // hack
data.stateGraph.layers[1] = data.layers[1]; // hack
component.stateGraph = data.stateGraph;
component.loadStateGraph(component.stateGraph);
}
And then there are even more issues, just simple type bugs basically. The component just needs more JSDoc and such issues would be automatically detectable.
I tried it in the past, but it was blocked: #2986
from engine.
vote for clone button in every example - such a good Litmus test 😅 🙈
I would suggest that the unit tests are designed exactly for checking this type of thing rather than the examples.
from engine.
Related Issues (20)
- 'Null' device can no longer be selected by the examples
- High draw calls HOT 3
- Using the vertex bus and index bus for meshes. HOT 3
- Custom Engine Specification Not Working Correctly HOT 1
- Add support baseVertex for GPURenderPassEncoder HOT 4
- Remove `XrDepthSensing` for 2.0.0
- Stencil - is not cleared
- Unable to use VertexIterator if VertexBuffer is used by TransformFeedback HOT 1
- Create a ESM Script with attributes HOT 10
- Gizmo SHAPEAXIS constants
- Light cookies broke some time between 1.69.2 and 1.70.0 HOT 1
- USDZ export - error when exporting a model with compressed textures
- Light breaks on build HOT 3
- Array util function is buggy HOT 3
- [Feature Request] 3D Gaussian Splatting MCMC support HOT 11
- Remove `<audio>` tag sound subsystem
- Remove shFromCubemap function
- Vulnerability / Security issue on playcanvas stable min js file HOT 1
- Remove BasicMaterial and allow better ways to create custom shaders using ShaderMaterial
- Possible issue with dynamic refraction
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from engine.